/*******************************************************************************
 * Copyright (c) 2015, 2016 CNRS, IRIT, IRT AESE (IRT Saint Exupéry).
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the LGPL 3.0
 * which accompanies this distribution, and is available at
 * https://www.gnu.org/licenses/lgpl-3.0-standalone.html
 *
 * Contributors:
 *      Faiez Zalila - initial API and implementation and/or initial documentation
 *******************************************************************************/
/**
 * Autogenerated by Thrift Compiler (0.9.2)
 *
 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
 *  @generated
 */
package tts;

import java.util.ArrayList;
import java.util.BitSet;
import java.util.Collections;
import java.util.EnumMap;
import java.util.EnumSet;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import javax.annotation.Generated;

import org.apache.thrift.EncodingUtils;
import org.apache.thrift.TException;
import org.apache.thrift.async.AsyncMethodCallback;
import org.apache.thrift.protocol.TTupleProtocol;
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.server.AbstractNonblockingServer.AsyncFrameBuffer;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2016-2-8")
public class TTS {

  public interface Iface {

    public Net load_local(String path) throws Error, InvalidPath, org.apache.thrift.TException;

    public TTSState initial_state() throws Error, org.apache.thrift.TException;

    public boolean is_enabled(long sid, long tid) throws Error, StateNotFound, TransitionNotFound, org.apache.thrift.TException;

    public List<Long> enabled(long sid) throws Error, StateNotFound, org.apache.thrift.TException;

    public boolean is_fireable(long sid, long tid) throws Error, StateNotFound, TransitionNotFound, org.apache.thrift.TException;

    public List<Long> fireable(long sid) throws Error, StateNotFound, org.apache.thrift.TException;

    public TTSState fire(long sid, long tid) throws Error, StateNotFound, TransitionNotFound, NotFireable, org.apache.thrift.TException;

    public boolean can_advance_time(long sid, Clock delay) throws Error, StateNotFound, org.apache.thrift.TException;

    public TTSState advance_time(long sid, Clock delay) throws Error, StateNotFound, InvalidDelay, org.apache.thrift.TException;

    public void discard(List<Long> sids) throws org.apache.thrift.TException;

    public void discard_all_except(List<Long> sids) throws org.apache.thrift.TException;

    public void shutdown() throws org.apache.thrift.TException;

  }

  public interface AsyncIface {

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

    public void initial_state(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void is_enabled(long sid, long tid, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void enabled(long sid, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void is_fireable(long sid, long tid, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void fireable(long sid, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void fire(long sid, long tid, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void can_advance_time(long sid, Clock delay, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void advance_time(long sid, Clock delay, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void discard(List<Long> sids, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void discard_all_except(List<Long> sids, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void shutdown(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 Net load_local(String path) throws Error, InvalidPath, org.apache.thrift.TException
    {
      send_load_local(path);
      return recv_load_local();
    }

    public void send_load_local(String path) throws org.apache.thrift.TException
    {
      load_local_args args = new load_local_args();
      args.setPath(path);
      sendBase("load_local", args);
    }

    public Net recv_load_local() throws Error, InvalidPath, org.apache.thrift.TException
    {
      load_local_result result = new load_local_result();
      receiveBase(result, "load_local");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.error != null) {
        throw result.error;
      }
      if (result.path_error != null) {
        throw result.path_error;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "load_local failed: unknown result");
    }

    public TTSState initial_state() throws Error, org.apache.thrift.TException
    {
      send_initial_state();
      return recv_initial_state();
    }

    public void send_initial_state() throws org.apache.thrift.TException
    {
      initial_state_args args = new initial_state_args();
      sendBase("initial_state", args);
    }

    public TTSState recv_initial_state() throws Error, org.apache.thrift.TException
    {
      initial_state_result result = new initial_state_result();
      receiveBase(result, "initial_state");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.error != null) {
        throw result.error;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "initial_state failed: unknown result");
    }

    public boolean is_enabled(long sid, long tid) throws Error, StateNotFound, TransitionNotFound, org.apache.thrift.TException
    {
      send_is_enabled(sid, tid);
      return recv_is_enabled();
    }

    public void send_is_enabled(long sid, long tid) throws org.apache.thrift.TException
    {
      is_enabled_args args = new is_enabled_args();
      args.setSid(sid);
      args.setTid(tid);
      sendBase("is_enabled", args);
    }

    public boolean recv_is_enabled() throws Error, StateNotFound, TransitionNotFound, org.apache.thrift.TException
    {
      is_enabled_result result = new is_enabled_result();
      receiveBase(result, "is_enabled");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.error != null) {
        throw result.error;
      }
      if (result.state_error != null) {
        throw result.state_error;
      }
      if (result.transition_error != null) {
        throw result.transition_error;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "is_enabled failed: unknown result");
    }

    public List<Long> enabled(long sid) throws Error, StateNotFound, org.apache.thrift.TException
    {
      send_enabled(sid);
      return recv_enabled();
    }

    public void send_enabled(long sid) throws org.apache.thrift.TException
    {
      enabled_args args = new enabled_args();
      args.setSid(sid);
      sendBase("enabled", args);
    }

    public List<Long> recv_enabled() throws Error, StateNotFound, org.apache.thrift.TException
    {
      enabled_result result = new enabled_result();
      receiveBase(result, "enabled");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.error != null) {
        throw result.error;
      }
      if (result.state_error != null) {
        throw result.state_error;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "enabled failed: unknown result");
    }

    public boolean is_fireable(long sid, long tid) throws Error, StateNotFound, TransitionNotFound, org.apache.thrift.TException
    {
      send_is_fireable(sid, tid);
      return recv_is_fireable();
    }

    public void send_is_fireable(long sid, long tid) throws org.apache.thrift.TException
    {
      is_fireable_args args = new is_fireable_args();
      args.setSid(sid);
      args.setTid(tid);
      sendBase("is_fireable", args);
    }

    public boolean recv_is_fireable() throws Error, StateNotFound, TransitionNotFound, org.apache.thrift.TException
    {
      is_fireable_result result = new is_fireable_result();
      receiveBase(result, "is_fireable");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.error != null) {
        throw result.error;
      }
      if (result.state_error != null) {
        throw result.state_error;
      }
      if (result.transition_error != null) {
        throw result.transition_error;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "is_fireable failed: unknown result");
    }

    public List<Long> fireable(long sid) throws Error, StateNotFound, org.apache.thrift.TException
    {
      send_fireable(sid);
      return recv_fireable();
    }

    public void send_fireable(long sid) throws org.apache.thrift.TException
    {
      fireable_args args = new fireable_args();
      args.setSid(sid);
      sendBase("fireable", args);
    }

    public List<Long> recv_fireable() throws Error, StateNotFound, org.apache.thrift.TException
    {
      fireable_result result = new fireable_result();
      receiveBase(result, "fireable");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.error != null) {
        throw result.error;
      }
      if (result.s_error != null) {
        throw result.s_error;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "fireable failed: unknown result");
    }

    public TTSState fire(long sid, long tid) throws Error, StateNotFound, TransitionNotFound, NotFireable, org.apache.thrift.TException
    {
      send_fire(sid, tid);
      return recv_fire();
    }

    public void send_fire(long sid, long tid) throws org.apache.thrift.TException
    {
      fire_args args = new fire_args();
      args.setSid(sid);
      args.setTid(tid);
      sendBase("fire", args);
    }

    public TTSState recv_fire() throws Error, StateNotFound, TransitionNotFound, NotFireable, org.apache.thrift.TException
    {
      fire_result result = new fire_result();
      receiveBase(result, "fire");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.error != null) {
        throw result.error;
      }
      if (result.state_error != null) {
        throw result.state_error;
      }
      if (result.transition_error != null) {
        throw result.transition_error;
      }
      if (result.fireable_error != null) {
        throw result.fireable_error;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "fire failed: unknown result");
    }

    public boolean can_advance_time(long sid, Clock delay) throws Error, StateNotFound, org.apache.thrift.TException
    {
      send_can_advance_time(sid, delay);
      return recv_can_advance_time();
    }

    public void send_can_advance_time(long sid, Clock delay) throws org.apache.thrift.TException
    {
      can_advance_time_args args = new can_advance_time_args();
      args.setSid(sid);
      args.setDelay(delay);
      sendBase("can_advance_time", args);
    }

    public boolean recv_can_advance_time() throws Error, StateNotFound, org.apache.thrift.TException
    {
      can_advance_time_result result = new can_advance_time_result();
      receiveBase(result, "can_advance_time");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.error != null) {
        throw result.error;
      }
      if (result.state_error != null) {
        throw result.state_error;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "can_advance_time failed: unknown result");
    }

    public TTSState advance_time(long sid, Clock delay) throws Error, StateNotFound, InvalidDelay, org.apache.thrift.TException
    {
      send_advance_time(sid, delay);
      return recv_advance_time();
    }

    public void send_advance_time(long sid, Clock delay) throws org.apache.thrift.TException
    {
      advance_time_args args = new advance_time_args();
      args.setSid(sid);
      args.setDelay(delay);
      sendBase("advance_time", args);
    }

    public TTSState recv_advance_time() throws Error, StateNotFound, InvalidDelay, org.apache.thrift.TException
    {
      advance_time_result result = new advance_time_result();
      receiveBase(result, "advance_time");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.error != null) {
        throw result.error;
      }
      if (result.state_error != null) {
        throw result.state_error;
      }
      if (result.delay_error != null) {
        throw result.delay_error;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "advance_time failed: unknown result");
    }

    public void discard(List<Long> sids) throws org.apache.thrift.TException
    {
      send_discard(sids);
      recv_discard();
    }

    public void send_discard(List<Long> sids) throws org.apache.thrift.TException
    {
      discard_args args = new discard_args();
      args.setSids(sids);
      sendBase("discard", args);
    }

    public void recv_discard() throws org.apache.thrift.TException
    {
      discard_result result = new discard_result();
      receiveBase(result, "discard");
      return;
    }

    public void discard_all_except(List<Long> sids) throws org.apache.thrift.TException
    {
      send_discard_all_except(sids);
      recv_discard_all_except();
    }

    public void send_discard_all_except(List<Long> sids) throws org.apache.thrift.TException
    {
      discard_all_except_args args = new discard_all_except_args();
      args.setSids(sids);
      sendBase("discard_all_except", args);
    }

    public void recv_discard_all_except() throws org.apache.thrift.TException
    {
      discard_all_except_result result = new discard_all_except_result();
      receiveBase(result, "discard_all_except");
      return;
    }

    public void shutdown() throws org.apache.thrift.TException
    {
      send_shutdown();
    }

    public void send_shutdown() throws org.apache.thrift.TException
    {
      shutdown_args args = new shutdown_args();
      sendBase("shutdown", args);
    }

  }
  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 load_local(String path, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
      checkReady();
      load_local_call method_call = new load_local_call(path, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class load_local_call extends org.apache.thrift.async.TAsyncMethodCall {
      private String path;
      public load_local_call(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.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("load_local", org.apache.thrift.protocol.TMessageType.CALL, 0));
        load_local_args args = new load_local_args();
        args.setPath(path);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public Net getResult() throws Error, InvalidPath, 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_load_local();
      }
    }

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

    public static class initial_state_call extends org.apache.thrift.async.TAsyncMethodCall {
      public initial_state_call(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);
      }

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

      public TTSState getResult() throws Error, 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_initial_state();
      }
    }

    public void is_enabled(long sid, long tid, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
      checkReady();
      is_enabled_call method_call = new is_enabled_call(sid, tid, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class is_enabled_call extends org.apache.thrift.async.TAsyncMethodCall {
      private long sid;
      private long tid;
      public is_enabled_call(long sid, long tid, 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.sid = sid;
        this.tid = tid;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("is_enabled", org.apache.thrift.protocol.TMessageType.CALL, 0));
        is_enabled_args args = new is_enabled_args();
        args.setSid(sid);
        args.setTid(tid);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public boolean getResult() throws Error, StateNotFound, TransitionNotFound, 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_is_enabled();
      }
    }

    public void enabled(long sid, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
      checkReady();
      enabled_call method_call = new enabled_call(sid, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class enabled_call extends org.apache.thrift.async.TAsyncMethodCall {
      private long sid;
      public enabled_call(long sid, 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.sid = sid;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("enabled", org.apache.thrift.protocol.TMessageType.CALL, 0));
        enabled_args args = new enabled_args();
        args.setSid(sid);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public List<Long> getResult() throws Error, StateNotFound, 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_enabled();
      }
    }

    public void is_fireable(long sid, long tid, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
      checkReady();
      is_fireable_call method_call = new is_fireable_call(sid, tid, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class is_fireable_call extends org.apache.thrift.async.TAsyncMethodCall {
      private long sid;
      private long tid;
      public is_fireable_call(long sid, long tid, 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.sid = sid;
        this.tid = tid;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("is_fireable", org.apache.thrift.protocol.TMessageType.CALL, 0));
        is_fireable_args args = new is_fireable_args();
        args.setSid(sid);
        args.setTid(tid);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public boolean getResult() throws Error, StateNotFound, TransitionNotFound, 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_is_fireable();
      }
    }

    public void fireable(long sid, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
      checkReady();
      fireable_call method_call = new fireable_call(sid, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class fireable_call extends org.apache.thrift.async.TAsyncMethodCall {
      private long sid;
      public fireable_call(long sid, 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.sid = sid;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("fireable", org.apache.thrift.protocol.TMessageType.CALL, 0));
        fireable_args args = new fireable_args();
        args.setSid(sid);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public List<Long> getResult() throws Error, StateNotFound, 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_fireable();
      }
    }

    public void fire(long sid, long tid, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
      checkReady();
      fire_call method_call = new fire_call(sid, tid, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class fire_call extends org.apache.thrift.async.TAsyncMethodCall {
      private long sid;
      private long tid;
      public fire_call(long sid, long tid, 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.sid = sid;
        this.tid = tid;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("fire", org.apache.thrift.protocol.TMessageType.CALL, 0));
        fire_args args = new fire_args();
        args.setSid(sid);
        args.setTid(tid);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public TTSState getResult() throws Error, StateNotFound, TransitionNotFound, NotFireable, 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_fire();
      }
    }

    public void can_advance_time(long sid, Clock delay, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
      checkReady();
      can_advance_time_call method_call = new can_advance_time_call(sid, delay, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class can_advance_time_call extends org.apache.thrift.async.TAsyncMethodCall {
      private long sid;
      private Clock delay;
      public can_advance_time_call(long sid, Clock delay, 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.sid = sid;
        this.delay = delay;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("can_advance_time", org.apache.thrift.protocol.TMessageType.CALL, 0));
        can_advance_time_args args = new can_advance_time_args();
        args.setSid(sid);
        args.setDelay(delay);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public boolean getResult() throws Error, StateNotFound, 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_can_advance_time();
      }
    }

    public void advance_time(long sid, Clock delay, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
      checkReady();
      advance_time_call method_call = new advance_time_call(sid, delay, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class advance_time_call extends org.apache.thrift.async.TAsyncMethodCall {
      private long sid;
      private Clock delay;
      public advance_time_call(long sid, Clock delay, 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.sid = sid;
        this.delay = delay;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("advance_time", org.apache.thrift.protocol.TMessageType.CALL, 0));
        advance_time_args args = new advance_time_args();
        args.setSid(sid);
        args.setDelay(delay);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public TTSState getResult() throws Error, StateNotFound, InvalidDelay, 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_advance_time();
      }
    }

    public void discard(List<Long> sids, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
      checkReady();
      discard_call method_call = new discard_call(sids, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class discard_call extends org.apache.thrift.async.TAsyncMethodCall {
      private List<Long> sids;
      public discard_call(List<Long> sids, 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.sids = sids;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("discard", org.apache.thrift.protocol.TMessageType.CALL, 0));
        discard_args args = new discard_args();
        args.setSids(sids);
        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_discard();
      }
    }

    public void discard_all_except(List<Long> sids, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
      checkReady();
      discard_all_except_call method_call = new discard_all_except_call(sids, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class discard_all_except_call extends org.apache.thrift.async.TAsyncMethodCall {
      private List<Long> sids;
      public discard_all_except_call(List<Long> sids, 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.sids = sids;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("discard_all_except", org.apache.thrift.protocol.TMessageType.CALL, 0));
        discard_all_except_args args = new discard_all_except_args();
        args.setSids(sids);
        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_discard_all_except();
      }
    }

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

    public static class shutdown_call extends org.apache.thrift.async.TAsyncMethodCall {
      public shutdown_call(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);
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("shutdown", org.apache.thrift.protocol.TMessageType.ONEWAY, 0));
        shutdown_args args = new shutdown_args();
        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 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("load_local", new load_local());
      processMap.put("initial_state", new initial_state());
      processMap.put("is_enabled", new is_enabled());
      processMap.put("enabled", new enabled());
      processMap.put("is_fireable", new is_fireable());
      processMap.put("fireable", new fireable());
      processMap.put("fire", new fire());
      processMap.put("can_advance_time", new can_advance_time());
      processMap.put("advance_time", new advance_time());
      processMap.put("discard", new discard());
      processMap.put("discard_all_except", new discard_all_except());
      processMap.put("shutdown", new shutdown());
      return processMap;
    }

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

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

      protected boolean isOneway() {
        return false;
      }

      public load_local_result getResult(I iface, load_local_args args) throws org.apache.thrift.TException {
        load_local_result result = new load_local_result();
        try {
          result.success = iface.load_local(args.path);
        } catch (Error error) {
          result.error = error;
        } catch (InvalidPath path_error) {
          result.path_error = path_error;
        }
        return result;
      }
    }

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

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

      protected boolean isOneway() {
        return false;
      }

      public initial_state_result getResult(I iface, initial_state_args args) throws org.apache.thrift.TException {
        initial_state_result result = new initial_state_result();
        try {
          result.success = iface.initial_state();
        } catch (Error error) {
          result.error = error;
        }
        return result;
      }
    }

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

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

      protected boolean isOneway() {
        return false;
      }

      public is_enabled_result getResult(I iface, is_enabled_args args) throws org.apache.thrift.TException {
        is_enabled_result result = new is_enabled_result();
        try {
          result.success = iface.is_enabled(args.sid, args.tid);
          result.setSuccessIsSet(true);
        } catch (Error error) {
          result.error = error;
        } catch (StateNotFound state_error) {
          result.state_error = state_error;
        } catch (TransitionNotFound transition_error) {
          result.transition_error = transition_error;
        }
        return result;
      }
    }

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

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

      protected boolean isOneway() {
        return false;
      }

      public enabled_result getResult(I iface, enabled_args args) throws org.apache.thrift.TException {
        enabled_result result = new enabled_result();
        try {
          result.success = iface.enabled(args.sid);
        } catch (Error error) {
          result.error = error;
        } catch (StateNotFound state_error) {
          result.state_error = state_error;
        }
        return result;
      }
    }

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

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

      protected boolean isOneway() {
        return false;
      }

      public is_fireable_result getResult(I iface, is_fireable_args args) throws org.apache.thrift.TException {
        is_fireable_result result = new is_fireable_result();
        try {
          result.success = iface.is_fireable(args.sid, args.tid);
          result.setSuccessIsSet(true);
        } catch (Error error) {
          result.error = error;
        } catch (StateNotFound state_error) {
          result.state_error = state_error;
        } catch (TransitionNotFound transition_error) {
          result.transition_error = transition_error;
        }
        return result;
      }
    }

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

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

      protected boolean isOneway() {
        return false;
      }

      public fireable_result getResult(I iface, fireable_args args) throws org.apache.thrift.TException {
        fireable_result result = new fireable_result();
        try {
          result.success = iface.fireable(args.sid);
        } catch (Error error) {
          result.error = error;
        } catch (StateNotFound s_error) {
          result.s_error = s_error;
        }
        return result;
      }
    }

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

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

      protected boolean isOneway() {
        return false;
      }

      public fire_result getResult(I iface, fire_args args) throws org.apache.thrift.TException {
        fire_result result = new fire_result();
        try {
          result.success = iface.fire(args.sid, args.tid);
        } catch (Error error) {
          result.error = error;
        } catch (StateNotFound state_error) {
          result.state_error = state_error;
        } catch (TransitionNotFound transition_error) {
          result.transition_error = transition_error;
        } catch (NotFireable fireable_error) {
          result.fireable_error = fireable_error;
        }
        return result;
      }
    }

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

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

      protected boolean isOneway() {
        return false;
      }

      public can_advance_time_result getResult(I iface, can_advance_time_args args) throws org.apache.thrift.TException {
        can_advance_time_result result = new can_advance_time_result();
        try {
          result.success = iface.can_advance_time(args.sid, args.delay);
          result.setSuccessIsSet(true);
        } catch (Error error) {
          result.error = error;
        } catch (StateNotFound state_error) {
          result.state_error = state_error;
        }
        return result;
      }
    }

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

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

      protected boolean isOneway() {
        return false;
      }

      public advance_time_result getResult(I iface, advance_time_args args) throws org.apache.thrift.TException {
        advance_time_result result = new advance_time_result();
        try {
          result.success = iface.advance_time(args.sid, args.delay);
        } catch (Error error) {
          result.error = error;
        } catch (StateNotFound state_error) {
          result.state_error = state_error;
        } catch (InvalidDelay delay_error) {
          result.delay_error = delay_error;
        }
        return result;
      }
    }

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

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

      protected boolean isOneway() {
        return false;
      }

      public discard_result getResult(I iface, discard_args args) throws org.apache.thrift.TException {
        discard_result result = new discard_result();
        iface.discard(args.sids);
        return result;
      }
    }

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

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

      protected boolean isOneway() {
        return false;
      }

      public discard_all_except_result getResult(I iface, discard_all_except_args args) throws org.apache.thrift.TException {
        discard_all_except_result result = new discard_all_except_result();
        iface.discard_all_except(args.sids);
        return result;
      }
    }

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

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

      protected boolean isOneway() {
        return true;
      }

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

  }

  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("load_local", new load_local());
      processMap.put("initial_state", new initial_state());
      processMap.put("is_enabled", new is_enabled());
      processMap.put("enabled", new enabled());
      processMap.put("is_fireable", new is_fireable());
      processMap.put("fireable", new fireable());
      processMap.put("fire", new fire());
      processMap.put("can_advance_time", new can_advance_time());
      processMap.put("advance_time", new advance_time());
      processMap.put("discard", new discard());
      processMap.put("discard_all_except", new discard_all_except());
      processMap.put("shutdown", new shutdown());
      return processMap;
    }

    public static class load_local<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, load_local_args, Net> {
      public load_local() {
        super("load_local");
      }

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

      public AsyncMethodCallback<Net> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
        final org.apache.thrift.AsyncProcessFunction fcall = this;
        return new AsyncMethodCallback<Net>() { 
          public void onComplete(Net o) {
            load_local_result result = new load_local_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;
            load_local_result result = new load_local_result();
            if (e instanceof Error) {
                        result.error = (Error) e;
                        result.setErrorIsSet(true);
                        msg = result;
            }
            else             if (e instanceof InvalidPath) {
                        result.path_error = (InvalidPath) e;
                        result.setPath_errorIsSet(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, load_local_args args, org.apache.thrift.async.AsyncMethodCallback<Net> resultHandler) throws TException {
        iface.load_local(args.path,resultHandler);
      }
    }

    public static class initial_state<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, initial_state_args, TTSState> {
      public initial_state() {
        super("initial_state");
      }

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

      public AsyncMethodCallback<TTSState> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
        final org.apache.thrift.AsyncProcessFunction fcall = this;
        return new AsyncMethodCallback<TTSState>() { 
          public void onComplete(TTSState o) {
            initial_state_result result = new initial_state_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;
            initial_state_result result = new initial_state_result();
            if (e instanceof Error) {
                        result.error = (Error) e;
                        result.setErrorIsSet(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, initial_state_args args, org.apache.thrift.async.AsyncMethodCallback<TTSState> resultHandler) throws TException {
        iface.initial_state(resultHandler);
      }
    }

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

      public is_enabled_args getEmptyArgsInstance() {
        return new is_enabled_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) {
            is_enabled_result result = new is_enabled_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;
            is_enabled_result result = new is_enabled_result();
            if (e instanceof Error) {
                        result.error = (Error) e;
                        result.setErrorIsSet(true);
                        msg = result;
            }
            else             if (e instanceof StateNotFound) {
                        result.state_error = (StateNotFound) e;
                        result.setState_errorIsSet(true);
                        msg = result;
            }
            else             if (e instanceof TransitionNotFound) {
                        result.transition_error = (TransitionNotFound) e;
                        result.setTransition_errorIsSet(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, is_enabled_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
        iface.is_enabled(args.sid, args.tid,resultHandler);
      }
    }

    public static class enabled<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, enabled_args, List<Long>> {
      public enabled() {
        super("enabled");
      }

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

      public AsyncMethodCallback<List<Long>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
        final org.apache.thrift.AsyncProcessFunction fcall = this;
        return new AsyncMethodCallback<List<Long>>() { 
          public void onComplete(List<Long> o) {
            enabled_result result = new enabled_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;
            enabled_result result = new enabled_result();
            if (e instanceof Error) {
                        result.error = (Error) e;
                        result.setErrorIsSet(true);
                        msg = result;
            }
            else             if (e instanceof StateNotFound) {
                        result.state_error = (StateNotFound) e;
                        result.setState_errorIsSet(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, enabled_args args, org.apache.thrift.async.AsyncMethodCallback<List<Long>> resultHandler) throws TException {
        iface.enabled(args.sid,resultHandler);
      }
    }

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

      public is_fireable_args getEmptyArgsInstance() {
        return new is_fireable_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) {
            is_fireable_result result = new is_fireable_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;
            is_fireable_result result = new is_fireable_result();
            if (e instanceof Error) {
                        result.error = (Error) e;
                        result.setErrorIsSet(true);
                        msg = result;
            }
            else             if (e instanceof StateNotFound) {
                        result.state_error = (StateNotFound) e;
                        result.setState_errorIsSet(true);
                        msg = result;
            }
            else             if (e instanceof TransitionNotFound) {
                        result.transition_error = (TransitionNotFound) e;
                        result.setTransition_errorIsSet(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, is_fireable_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
        iface.is_fireable(args.sid, args.tid,resultHandler);
      }
    }

    public static class fireable<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, fireable_args, List<Long>> {
      public fireable() {
        super("fireable");
      }

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

      public AsyncMethodCallback<List<Long>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
        final org.apache.thrift.AsyncProcessFunction fcall = this;
        return new AsyncMethodCallback<List<Long>>() { 
          public void onComplete(List<Long> o) {
            fireable_result result = new fireable_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;
            fireable_result result = new fireable_result();
            if (e instanceof Error) {
                        result.error = (Error) e;
                        result.setErrorIsSet(true);
                        msg = result;
            }
            else             if (e instanceof StateNotFound) {
                        result.s_error = (StateNotFound) e;
                        result.setS_errorIsSet(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, fireable_args args, org.apache.thrift.async.AsyncMethodCallback<List<Long>> resultHandler) throws TException {
        iface.fireable(args.sid,resultHandler);
      }
    }

    public static class fire<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, fire_args, TTSState> {
      public fire() {
        super("fire");
      }

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

      public AsyncMethodCallback<TTSState> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
        final org.apache.thrift.AsyncProcessFunction fcall = this;
        return new AsyncMethodCallback<TTSState>() { 
          public void onComplete(TTSState o) {
            fire_result result = new fire_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;
            fire_result result = new fire_result();
            if (e instanceof Error) {
                        result.error = (Error) e;
                        result.setErrorIsSet(true);
                        msg = result;
            }
            else             if (e instanceof StateNotFound) {
                        result.state_error = (StateNotFound) e;
                        result.setState_errorIsSet(true);
                        msg = result;
            }
            else             if (e instanceof TransitionNotFound) {
                        result.transition_error = (TransitionNotFound) e;
                        result.setTransition_errorIsSet(true);
                        msg = result;
            }
            else             if (e instanceof NotFireable) {
                        result.fireable_error = (NotFireable) e;
                        result.setFireable_errorIsSet(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, fire_args args, org.apache.thrift.async.AsyncMethodCallback<TTSState> resultHandler) throws TException {
        iface.fire(args.sid, args.tid,resultHandler);
      }
    }

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

      public can_advance_time_args getEmptyArgsInstance() {
        return new can_advance_time_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) {
            can_advance_time_result result = new can_advance_time_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;
            can_advance_time_result result = new can_advance_time_result();
            if (e instanceof Error) {
                        result.error = (Error) e;
                        result.setErrorIsSet(true);
                        msg = result;
            }
            else             if (e instanceof StateNotFound) {
                        result.state_error = (StateNotFound) e;
                        result.setState_errorIsSet(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, can_advance_time_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
        iface.can_advance_time(args.sid, args.delay,resultHandler);
      }
    }

    public static class advance_time<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, advance_time_args, TTSState> {
      public advance_time() {
        super("advance_time");
      }

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

      public AsyncMethodCallback<TTSState> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
        final org.apache.thrift.AsyncProcessFunction fcall = this;
        return new AsyncMethodCallback<TTSState>() { 
          public void onComplete(TTSState o) {
            advance_time_result result = new advance_time_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;
            advance_time_result result = new advance_time_result();
            if (e instanceof Error) {
                        result.error = (Error) e;
                        result.setErrorIsSet(true);
                        msg = result;
            }
            else             if (e instanceof StateNotFound) {
                        result.state_error = (StateNotFound) e;
                        result.setState_errorIsSet(true);
                        msg = result;
            }
            else             if (e instanceof InvalidDelay) {
                        result.delay_error = (InvalidDelay) e;
                        result.setDelay_errorIsSet(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, advance_time_args args, org.apache.thrift.async.AsyncMethodCallback<TTSState> resultHandler) throws TException {
        iface.advance_time(args.sid, args.delay,resultHandler);
      }
    }

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

      public discard_args getEmptyArgsInstance() {
        return new discard_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) {
            discard_result result = new discard_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;
            discard_result result = new discard_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, discard_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws TException {
        iface.discard(args.sids,resultHandler);
      }
    }

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

      public discard_all_except_args getEmptyArgsInstance() {
        return new discard_all_except_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) {
            discard_all_except_result result = new discard_all_except_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;
            discard_all_except_result result = new discard_all_except_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, discard_all_except_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws TException {
        iface.discard_all_except(args.sids,resultHandler);
      }
    }

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

      public shutdown_args getEmptyArgsInstance() {
        return new shutdown_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, shutdown_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws TException {
        iface.shutdown(resultHandler);
      }
    }

  }

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

    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)1);

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

    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 {
      PATH((short)1, "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: // 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.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(load_local_args.class, metaDataMap);
    }

    public load_local_args() {
    }

    public load_local_args(
      String path)
    {
      this();
      this.path = path;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public load_local_args(load_local_args other) {
      if (other.isSetPath()) {
        this.path = other.path;
      }
    }

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

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

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

    public load_local_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 PATH:
        if (value == null) {
          unsetPath();
        } else {
          setPath((String)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      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 PATH:
        return isSetPath();
      }
      throw new IllegalStateException();
    }

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

    public boolean equals(load_local_args that) {
      if (that == null)
        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() {
      List<Object> list = new ArrayList<Object>();

      boolean present_path = true && (isSetPath());
      list.add(present_path);
      if (present_path)
        list.add(path);

      return list.hashCode();
    }

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

      int lastComparison = 0;

      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("load_local_args(");
      boolean first = true;

      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
    }

    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 load_local_argsStandardSchemeFactory implements SchemeFactory {
      public load_local_argsStandardScheme getScheme() {
        return new load_local_argsStandardScheme();
      }
    }

    private static class load_local_argsStandardScheme extends StandardScheme<load_local_args> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, load_local_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: // 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, load_local_args struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.path != null) {
          oprot.writeFieldBegin(PATH_FIELD_DESC);
          oprot.writeString(struct.path);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class load_local_argsTupleSchemeFactory implements SchemeFactory {
      public load_local_argsTupleScheme getScheme() {
        return new load_local_argsTupleScheme();
      }
    }

    private static class load_local_argsTupleScheme extends TupleScheme<load_local_args> {

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

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, load_local_args struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(1);
        if (incoming.get(0)) {
          struct.path = iprot.readString();
          struct.setPathIsSet(true);
        }
      }
    }

  }

  public static class load_local_result implements org.apache.thrift.TBase<load_local_result, load_local_result._Fields>, java.io.Serializable, Cloneable, Comparable<load_local_result>   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("load_local_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 ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("error", org.apache.thrift.protocol.TType.STRUCT, (short)1);
    private static final org.apache.thrift.protocol.TField PATH_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("path_error", 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 load_local_resultStandardSchemeFactory());
      schemes.put(TupleScheme.class, new load_local_resultTupleSchemeFactory());
    }

    public Net success; // required
    public Error error; // required
    public InvalidPath path_error; // 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"),
      ERROR((short)1, "error"),
      PATH_ERROR((short)2, "path_error");

      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: // ERROR
            return ERROR;
          case 2: // PATH_ERROR
            return PATH_ERROR;
          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, Net.class)));
      tmpMap.put(_Fields.ERROR, new org.apache.thrift.meta_data.FieldMetaData("error", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      tmpMap.put(_Fields.PATH_ERROR, new org.apache.thrift.meta_data.FieldMetaData("path_error", 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(load_local_result.class, metaDataMap);
    }

    public load_local_result() {
    }

    public load_local_result(
      Net success,
      Error error,
      InvalidPath path_error)
    {
      this();
      this.success = success;
      this.error = error;
      this.path_error = path_error;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public load_local_result(load_local_result other) {
      if (other.isSetSuccess()) {
        this.success = new Net(other.success);
      }
      if (other.isSetError()) {
        this.error = new Error(other.error);
      }
      if (other.isSetPath_error()) {
        this.path_error = new InvalidPath(other.path_error);
      }
    }

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

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

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

    public load_local_result setSuccess(Net 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 Error getError() {
      return this.error;
    }

    public load_local_result setError(Error error) {
      this.error = error;
      return this;
    }

    public void unsetError() {
      this.error = null;
    }

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

    public void setErrorIsSet(boolean value) {
      if (!value) {
        this.error = null;
      }
    }

    public InvalidPath getPath_error() {
      return this.path_error;
    }

    public load_local_result setPath_error(InvalidPath path_error) {
      this.path_error = path_error;
      return this;
    }

    public void unsetPath_error() {
      this.path_error = null;
    }

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

    public void setPath_errorIsSet(boolean value) {
      if (!value) {
        this.path_error = null;
      }
    }

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

      case ERROR:
        if (value == null) {
          unsetError();
        } else {
          setError((Error)value);
        }
        break;

      case PATH_ERROR:
        if (value == null) {
          unsetPath_error();
        } else {
          setPath_error((InvalidPath)value);
        }
        break;

      }
    }

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

      case ERROR:
        return getError();

      case PATH_ERROR:
        return getPath_error();

      }
      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 ERROR:
        return isSetError();
      case PATH_ERROR:
        return isSetPath_error();
      }
      throw new IllegalStateException();
    }

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

    public boolean equals(load_local_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_error = true && this.isSetError();
      boolean that_present_error = true && that.isSetError();
      if (this_present_error || that_present_error) {
        if (!(this_present_error && that_present_error))
          return false;
        if (!this.error.equals(that.error))
          return false;
      }

      boolean this_present_path_error = true && this.isSetPath_error();
      boolean that_present_path_error = true && that.isSetPath_error();
      if (this_present_path_error || that_present_path_error) {
        if (!(this_present_path_error && that_present_path_error))
          return false;
        if (!this.path_error.equals(that.path_error))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      List<Object> list = new ArrayList<Object>();

      boolean present_success = true && (isSetSuccess());
      list.add(present_success);
      if (present_success)
        list.add(success);

      boolean present_error = true && (isSetError());
      list.add(present_error);
      if (present_error)
        list.add(error);

      boolean present_path_error = true && (isSetPath_error());
      list.add(present_path_error);
      if (present_path_error)
        list.add(path_error);

      return list.hashCode();
    }

    @Override
    public int compareTo(load_local_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(isSetError()).compareTo(other.isSetError());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetError()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.error, other.error);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetPath_error()).compareTo(other.isSetPath_error());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetPath_error()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.path_error, other.path_error);
        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("load_local_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("error:");
      if (this.error == null) {
        sb.append("null");
      } else {
        sb.append(this.error);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("path_error:");
      if (this.path_error == null) {
        sb.append("null");
      } else {
        sb.append(this.path_error);
      }
      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 load_local_resultStandardSchemeFactory implements SchemeFactory {
      public load_local_resultStandardScheme getScheme() {
        return new load_local_resultStandardScheme();
      }
    }

    private static class load_local_resultStandardScheme extends StandardScheme<load_local_result> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, load_local_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 Net();
                struct.success.read(iprot);
                struct.setSuccessIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 1: // ERROR
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.error = new Error();
                struct.error.read(iprot);
                struct.setErrorIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // PATH_ERROR
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.path_error = new InvalidPath();
                struct.path_error.read(iprot);
                struct.setPath_errorIsSet(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, load_local_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.error != null) {
          oprot.writeFieldBegin(ERROR_FIELD_DESC);
          struct.error.write(oprot);
          oprot.writeFieldEnd();
        }
        if (struct.path_error != null) {
          oprot.writeFieldBegin(PATH_ERROR_FIELD_DESC);
          struct.path_error.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class load_local_resultTupleSchemeFactory implements SchemeFactory {
      public load_local_resultTupleScheme getScheme() {
        return new load_local_resultTupleScheme();
      }
    }

    private static class load_local_resultTupleScheme extends TupleScheme<load_local_result> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, load_local_result struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetSuccess()) {
          optionals.set(0);
        }
        if (struct.isSetError()) {
          optionals.set(1);
        }
        if (struct.isSetPath_error()) {
          optionals.set(2);
        }
        oprot.writeBitSet(optionals, 3);
        if (struct.isSetSuccess()) {
          struct.success.write(oprot);
        }
        if (struct.isSetError()) {
          struct.error.write(oprot);
        }
        if (struct.isSetPath_error()) {
          struct.path_error.write(oprot);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, load_local_result struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(3);
        if (incoming.get(0)) {
          struct.success = new Net();
          struct.success.read(iprot);
          struct.setSuccessIsSet(true);
        }
        if (incoming.get(1)) {
          struct.error = new Error();
          struct.error.read(iprot);
          struct.setErrorIsSet(true);
        }
        if (incoming.get(2)) {
          struct.path_error = new InvalidPath();
          struct.path_error.read(iprot);
          struct.setPath_errorIsSet(true);
        }
      }
    }

  }

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


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


    /** 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(initial_state_args.class, metaDataMap);
    }

    public initial_state_args() {
    }

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

    public initial_state_args deepCopy() {
      return new initial_state_args(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 initial_state_args)
        return this.equals((initial_state_args)that);
      return false;
    }

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

      return true;
    }

    @Override
    public int hashCode() {
      List<Object> list = new ArrayList<Object>();

      return list.hashCode();
    }

    @Override
    public int compareTo(initial_state_args 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("initial_state_args(");
      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 initial_state_argsStandardSchemeFactory implements SchemeFactory {
      public initial_state_argsStandardScheme getScheme() {
        return new initial_state_argsStandardScheme();
      }
    }

    private static class initial_state_argsStandardScheme extends StandardScheme<initial_state_args> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, initial_state_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) {
            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, initial_state_args struct) throws org.apache.thrift.TException {
        struct.validate();

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

    }

    private static class initial_state_argsTupleSchemeFactory implements SchemeFactory {
      public initial_state_argsTupleScheme getScheme() {
        return new initial_state_argsTupleScheme();
      }
    }

    private static class initial_state_argsTupleScheme extends TupleScheme<initial_state_args> {

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

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

  }

  public static class initial_state_result implements org.apache.thrift.TBase<initial_state_result, initial_state_result._Fields>, java.io.Serializable, Cloneable, Comparable<initial_state_result>   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("initial_state_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 ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("error", 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 initial_state_resultStandardSchemeFactory());
      schemes.put(TupleScheme.class, new initial_state_resultTupleSchemeFactory());
    }

    public TTSState success; // required
    public Error error; // 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"),
      ERROR((short)1, "error");

      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: // ERROR
            return ERROR;
          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, TTSState.class)));
      tmpMap.put(_Fields.ERROR, new org.apache.thrift.meta_data.FieldMetaData("error", 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(initial_state_result.class, metaDataMap);
    }

    public initial_state_result() {
    }

    public initial_state_result(
      TTSState success,
      Error error)
    {
      this();
      this.success = success;
      this.error = error;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public initial_state_result(initial_state_result other) {
      if (other.isSetSuccess()) {
        this.success = new TTSState(other.success);
      }
      if (other.isSetError()) {
        this.error = new Error(other.error);
      }
    }

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

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

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

    public initial_state_result setSuccess(TTSState 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 Error getError() {
      return this.error;
    }

    public initial_state_result setError(Error error) {
      this.error = error;
      return this;
    }

    public void unsetError() {
      this.error = null;
    }

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

    public void setErrorIsSet(boolean value) {
      if (!value) {
        this.error = null;
      }
    }

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

      case ERROR:
        if (value == null) {
          unsetError();
        } else {
          setError((Error)value);
        }
        break;

      }
    }

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

      case ERROR:
        return getError();

      }
      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 ERROR:
        return isSetError();
      }
      throw new IllegalStateException();
    }

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

    public boolean equals(initial_state_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_error = true && this.isSetError();
      boolean that_present_error = true && that.isSetError();
      if (this_present_error || that_present_error) {
        if (!(this_present_error && that_present_error))
          return false;
        if (!this.error.equals(that.error))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      List<Object> list = new ArrayList<Object>();

      boolean present_success = true && (isSetSuccess());
      list.add(present_success);
      if (present_success)
        list.add(success);

      boolean present_error = true && (isSetError());
      list.add(present_error);
      if (present_error)
        list.add(error);

      return list.hashCode();
    }

    @Override
    public int compareTo(initial_state_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(isSetError()).compareTo(other.isSetError());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetError()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.error, other.error);
        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("initial_state_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("error:");
      if (this.error == null) {
        sb.append("null");
      } else {
        sb.append(this.error);
      }
      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 initial_state_resultStandardSchemeFactory implements SchemeFactory {
      public initial_state_resultStandardScheme getScheme() {
        return new initial_state_resultStandardScheme();
      }
    }

    private static class initial_state_resultStandardScheme extends StandardScheme<initial_state_result> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, initial_state_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 TTSState();
                struct.success.read(iprot);
                struct.setSuccessIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 1: // ERROR
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.error = new Error();
                struct.error.read(iprot);
                struct.setErrorIsSet(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, initial_state_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.error != null) {
          oprot.writeFieldBegin(ERROR_FIELD_DESC);
          struct.error.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class initial_state_resultTupleSchemeFactory implements SchemeFactory {
      public initial_state_resultTupleScheme getScheme() {
        return new initial_state_resultTupleScheme();
      }
    }

    private static class initial_state_resultTupleScheme extends TupleScheme<initial_state_result> {

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

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, initial_state_result struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(2);
        if (incoming.get(0)) {
          struct.success = new TTSState();
          struct.success.read(iprot);
          struct.setSuccessIsSet(true);
        }
        if (incoming.get(1)) {
          struct.error = new Error();
          struct.error.read(iprot);
          struct.setErrorIsSet(true);
        }
      }
    }

  }

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

    private static final org.apache.thrift.protocol.TField SID_FIELD_DESC = new org.apache.thrift.protocol.TField("sid", org.apache.thrift.protocol.TType.I64, (short)1);
    private static final org.apache.thrift.protocol.TField TID_FIELD_DESC = new org.apache.thrift.protocol.TField("tid", org.apache.thrift.protocol.TType.I64, (short)2);

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

    public long sid; // required
    public long tid; // 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 {
      SID((short)1, "sid"),
      TID((short)2, "tid");

      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: // SID
            return SID;
          case 2: // TID
            return TID;
          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 __SID_ISSET_ID = 0;
    private static final int __TID_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.SID, new org.apache.thrift.meta_data.FieldMetaData("sid", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64          , "state_id")));
      tmpMap.put(_Fields.TID, new org.apache.thrift.meta_data.FieldMetaData("tid", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64          , "transition_id")));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(is_enabled_args.class, metaDataMap);
    }

    public is_enabled_args() {
    }

    public is_enabled_args(
      long sid,
      long tid)
    {
      this();
      this.sid = sid;
      setSidIsSet(true);
      this.tid = tid;
      setTidIsSet(true);
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public is_enabled_args(is_enabled_args other) {
      __isset_bitfield = other.__isset_bitfield;
      this.sid = other.sid;
      this.tid = other.tid;
    }

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

    @Override
    public void clear() {
      setSidIsSet(false);
      this.sid = 0;
      setTidIsSet(false);
      this.tid = 0;
    }

    public long getSid() {
      return this.sid;
    }

    public is_enabled_args setSid(long sid) {
      this.sid = sid;
      setSidIsSet(true);
      return this;
    }

    public void unsetSid() {
      __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SID_ISSET_ID);
    }

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

    public void setSidIsSet(boolean value) {
      __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SID_ISSET_ID, value);
    }

    public long getTid() {
      return this.tid;
    }

    public is_enabled_args setTid(long tid) {
      this.tid = tid;
      setTidIsSet(true);
      return this;
    }

    public void unsetTid() {
      __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __TID_ISSET_ID);
    }

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

    public void setTidIsSet(boolean value) {
      __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __TID_ISSET_ID, value);
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SID:
        if (value == null) {
          unsetSid();
        } else {
          setSid((Long)value);
        }
        break;

      case TID:
        if (value == null) {
          unsetTid();
        } else {
          setTid((Long)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SID:
        return Long.valueOf(getSid());

      case TID:
        return Long.valueOf(getTid());

      }
      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 SID:
        return isSetSid();
      case TID:
        return isSetTid();
      }
      throw new IllegalStateException();
    }

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

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

      boolean this_present_sid = true;
      boolean that_present_sid = true;
      if (this_present_sid || that_present_sid) {
        if (!(this_present_sid && that_present_sid))
          return false;
        if (this.sid != that.sid)
          return false;
      }

      boolean this_present_tid = true;
      boolean that_present_tid = true;
      if (this_present_tid || that_present_tid) {
        if (!(this_present_tid && that_present_tid))
          return false;
        if (this.tid != that.tid)
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      List<Object> list = new ArrayList<Object>();

      boolean present_sid = true;
      list.add(present_sid);
      if (present_sid)
        list.add(sid);

      boolean present_tid = true;
      list.add(present_tid);
      if (present_tid)
        list.add(tid);

      return list.hashCode();
    }

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

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetSid()).compareTo(other.isSetSid());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSid()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sid, other.sid);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetTid()).compareTo(other.isSetTid());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetTid()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tid, other.tid);
        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("is_enabled_args(");
      boolean first = true;

      sb.append("sid:");
      sb.append(this.sid);
      first = false;
      if (!first) sb.append(", ");
      sb.append("tid:");
      sb.append(this.tid);
      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 is_enabled_argsStandardSchemeFactory implements SchemeFactory {
      public is_enabled_argsStandardScheme getScheme() {
        return new is_enabled_argsStandardScheme();
      }
    }

    private static class is_enabled_argsStandardScheme extends StandardScheme<is_enabled_args> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, is_enabled_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: // SID
              if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
                struct.sid = iprot.readI64();
                struct.setSidIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // TID
              if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
                struct.tid = iprot.readI64();
                struct.setTidIsSet(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, is_enabled_args struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        oprot.writeFieldBegin(SID_FIELD_DESC);
        oprot.writeI64(struct.sid);
        oprot.writeFieldEnd();
        oprot.writeFieldBegin(TID_FIELD_DESC);
        oprot.writeI64(struct.tid);
        oprot.writeFieldEnd();
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class is_enabled_argsTupleSchemeFactory implements SchemeFactory {
      public is_enabled_argsTupleScheme getScheme() {
        return new is_enabled_argsTupleScheme();
      }
    }

    private static class is_enabled_argsTupleScheme extends TupleScheme<is_enabled_args> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, is_enabled_args struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetSid()) {
          optionals.set(0);
        }
        if (struct.isSetTid()) {
          optionals.set(1);
        }
        oprot.writeBitSet(optionals, 2);
        if (struct.isSetSid()) {
          oprot.writeI64(struct.sid);
        }
        if (struct.isSetTid()) {
          oprot.writeI64(struct.tid);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, is_enabled_args struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(2);
        if (incoming.get(0)) {
          struct.sid = iprot.readI64();
          struct.setSidIsSet(true);
        }
        if (incoming.get(1)) {
          struct.tid = iprot.readI64();
          struct.setTidIsSet(true);
        }
      }
    }

  }

  public static class is_enabled_result implements org.apache.thrift.TBase<is_enabled_result, is_enabled_result._Fields>, java.io.Serializable, Cloneable, Comparable<is_enabled_result>   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("is_enabled_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 ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("error", org.apache.thrift.protocol.TType.STRUCT, (short)1);
    private static final org.apache.thrift.protocol.TField STATE_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("state_error", org.apache.thrift.protocol.TType.STRUCT, (short)2);
    private static final org.apache.thrift.protocol.TField TRANSITION_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("transition_error", org.apache.thrift.protocol.TType.STRUCT, (short)3);

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

    public boolean success; // required
    public Error error; // required
    public StateNotFound state_error; // required
    public TransitionNotFound transition_error; // 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"),
      ERROR((short)1, "error"),
      STATE_ERROR((short)2, "state_error"),
      TRANSITION_ERROR((short)3, "transition_error");

      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: // ERROR
            return ERROR;
          case 2: // STATE_ERROR
            return STATE_ERROR;
          case 3: // TRANSITION_ERROR
            return TRANSITION_ERROR;
          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.ERROR, new org.apache.thrift.meta_data.FieldMetaData("error", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      tmpMap.put(_Fields.STATE_ERROR, new org.apache.thrift.meta_data.FieldMetaData("state_error", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      tmpMap.put(_Fields.TRANSITION_ERROR, new org.apache.thrift.meta_data.FieldMetaData("transition_error", 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(is_enabled_result.class, metaDataMap);
    }

    public is_enabled_result() {
    }

    public is_enabled_result(
      boolean success,
      Error error,
      StateNotFound state_error,
      TransitionNotFound transition_error)
    {
      this();
      this.success = success;
      setSuccessIsSet(true);
      this.error = error;
      this.state_error = state_error;
      this.transition_error = transition_error;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public is_enabled_result(is_enabled_result other) {
      __isset_bitfield = other.__isset_bitfield;
      this.success = other.success;
      if (other.isSetError()) {
        this.error = new Error(other.error);
      }
      if (other.isSetState_error()) {
        this.state_error = new StateNotFound(other.state_error);
      }
      if (other.isSetTransition_error()) {
        this.transition_error = new TransitionNotFound(other.transition_error);
      }
    }

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

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

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

    public is_enabled_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 Error getError() {
      return this.error;
    }

    public is_enabled_result setError(Error error) {
      this.error = error;
      return this;
    }

    public void unsetError() {
      this.error = null;
    }

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

    public void setErrorIsSet(boolean value) {
      if (!value) {
        this.error = null;
      }
    }

    public StateNotFound getState_error() {
      return this.state_error;
    }

    public is_enabled_result setState_error(StateNotFound state_error) {
      this.state_error = state_error;
      return this;
    }

    public void unsetState_error() {
      this.state_error = null;
    }

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

    public void setState_errorIsSet(boolean value) {
      if (!value) {
        this.state_error = null;
      }
    }

    public TransitionNotFound getTransition_error() {
      return this.transition_error;
    }

    public is_enabled_result setTransition_error(TransitionNotFound transition_error) {
      this.transition_error = transition_error;
      return this;
    }

    public void unsetTransition_error() {
      this.transition_error = null;
    }

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

    public void setTransition_errorIsSet(boolean value) {
      if (!value) {
        this.transition_error = null;
      }
    }

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

      case ERROR:
        if (value == null) {
          unsetError();
        } else {
          setError((Error)value);
        }
        break;

      case STATE_ERROR:
        if (value == null) {
          unsetState_error();
        } else {
          setState_error((StateNotFound)value);
        }
        break;

      case TRANSITION_ERROR:
        if (value == null) {
          unsetTransition_error();
        } else {
          setTransition_error((TransitionNotFound)value);
        }
        break;

      }
    }

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

      case ERROR:
        return getError();

      case STATE_ERROR:
        return getState_error();

      case TRANSITION_ERROR:
        return getTransition_error();

      }
      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 ERROR:
        return isSetError();
      case STATE_ERROR:
        return isSetState_error();
      case TRANSITION_ERROR:
        return isSetTransition_error();
      }
      throw new IllegalStateException();
    }

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

    public boolean equals(is_enabled_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_error = true && this.isSetError();
      boolean that_present_error = true && that.isSetError();
      if (this_present_error || that_present_error) {
        if (!(this_present_error && that_present_error))
          return false;
        if (!this.error.equals(that.error))
          return false;
      }

      boolean this_present_state_error = true && this.isSetState_error();
      boolean that_present_state_error = true && that.isSetState_error();
      if (this_present_state_error || that_present_state_error) {
        if (!(this_present_state_error && that_present_state_error))
          return false;
        if (!this.state_error.equals(that.state_error))
          return false;
      }

      boolean this_present_transition_error = true && this.isSetTransition_error();
      boolean that_present_transition_error = true && that.isSetTransition_error();
      if (this_present_transition_error || that_present_transition_error) {
        if (!(this_present_transition_error && that_present_transition_error))
          return false;
        if (!this.transition_error.equals(that.transition_error))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      List<Object> list = new ArrayList<Object>();

      boolean present_success = true;
      list.add(present_success);
      if (present_success)
        list.add(success);

      boolean present_error = true && (isSetError());
      list.add(present_error);
      if (present_error)
        list.add(error);

      boolean present_state_error = true && (isSetState_error());
      list.add(present_state_error);
      if (present_state_error)
        list.add(state_error);

      boolean present_transition_error = true && (isSetTransition_error());
      list.add(present_transition_error);
      if (present_transition_error)
        list.add(transition_error);

      return list.hashCode();
    }

    @Override
    public int compareTo(is_enabled_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(isSetError()).compareTo(other.isSetError());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetError()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.error, other.error);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetState_error()).compareTo(other.isSetState_error());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetState_error()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.state_error, other.state_error);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetTransition_error()).compareTo(other.isSetTransition_error());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetTransition_error()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.transition_error, other.transition_error);
        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("is_enabled_result(");
      boolean first = true;

      sb.append("success:");
      sb.append(this.success);
      first = false;
      if (!first) sb.append(", ");
      sb.append("error:");
      if (this.error == null) {
        sb.append("null");
      } else {
        sb.append(this.error);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("state_error:");
      if (this.state_error == null) {
        sb.append("null");
      } else {
        sb.append(this.state_error);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("transition_error:");
      if (this.transition_error == null) {
        sb.append("null");
      } else {
        sb.append(this.transition_error);
      }
      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 is_enabled_resultStandardSchemeFactory implements SchemeFactory {
      public is_enabled_resultStandardScheme getScheme() {
        return new is_enabled_resultStandardScheme();
      }
    }

    private static class is_enabled_resultStandardScheme extends StandardScheme<is_enabled_result> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, is_enabled_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: // ERROR
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.error = new Error();
                struct.error.read(iprot);
                struct.setErrorIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // STATE_ERROR
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.state_error = new StateNotFound();
                struct.state_error.read(iprot);
                struct.setState_errorIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 3: // TRANSITION_ERROR
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.transition_error = new TransitionNotFound();
                struct.transition_error.read(iprot);
                struct.setTransition_errorIsSet(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, is_enabled_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.error != null) {
          oprot.writeFieldBegin(ERROR_FIELD_DESC);
          struct.error.write(oprot);
          oprot.writeFieldEnd();
        }
        if (struct.state_error != null) {
          oprot.writeFieldBegin(STATE_ERROR_FIELD_DESC);
          struct.state_error.write(oprot);
          oprot.writeFieldEnd();
        }
        if (struct.transition_error != null) {
          oprot.writeFieldBegin(TRANSITION_ERROR_FIELD_DESC);
          struct.transition_error.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class is_enabled_resultTupleSchemeFactory implements SchemeFactory {
      public is_enabled_resultTupleScheme getScheme() {
        return new is_enabled_resultTupleScheme();
      }
    }

    private static class is_enabled_resultTupleScheme extends TupleScheme<is_enabled_result> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, is_enabled_result struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetSuccess()) {
          optionals.set(0);
        }
        if (struct.isSetError()) {
          optionals.set(1);
        }
        if (struct.isSetState_error()) {
          optionals.set(2);
        }
        if (struct.isSetTransition_error()) {
          optionals.set(3);
        }
        oprot.writeBitSet(optionals, 4);
        if (struct.isSetSuccess()) {
          oprot.writeBool(struct.success);
        }
        if (struct.isSetError()) {
          struct.error.write(oprot);
        }
        if (struct.isSetState_error()) {
          struct.state_error.write(oprot);
        }
        if (struct.isSetTransition_error()) {
          struct.transition_error.write(oprot);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, is_enabled_result struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(4);
        if (incoming.get(0)) {
          struct.success = iprot.readBool();
          struct.setSuccessIsSet(true);
        }
        if (incoming.get(1)) {
          struct.error = new Error();
          struct.error.read(iprot);
          struct.setErrorIsSet(true);
        }
        if (incoming.get(2)) {
          struct.state_error = new StateNotFound();
          struct.state_error.read(iprot);
          struct.setState_errorIsSet(true);
        }
        if (incoming.get(3)) {
          struct.transition_error = new TransitionNotFound();
          struct.transition_error.read(iprot);
          struct.setTransition_errorIsSet(true);
        }
      }
    }

  }

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

    private static final org.apache.thrift.protocol.TField SID_FIELD_DESC = new org.apache.thrift.protocol.TField("sid", org.apache.thrift.protocol.TType.I64, (short)1);

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

    public long sid; // 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 {
      SID((short)1, "sid");

      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: // SID
            return SID;
          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 __SID_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.SID, new org.apache.thrift.meta_data.FieldMetaData("sid", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64          , "state_id")));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(enabled_args.class, metaDataMap);
    }

    public enabled_args() {
    }

    public enabled_args(
      long sid)
    {
      this();
      this.sid = sid;
      setSidIsSet(true);
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public enabled_args(enabled_args other) {
      __isset_bitfield = other.__isset_bitfield;
      this.sid = other.sid;
    }

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

    @Override
    public void clear() {
      setSidIsSet(false);
      this.sid = 0;
    }

    public long getSid() {
      return this.sid;
    }

    public enabled_args setSid(long sid) {
      this.sid = sid;
      setSidIsSet(true);
      return this;
    }

    public void unsetSid() {
      __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SID_ISSET_ID);
    }

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

    public void setSidIsSet(boolean value) {
      __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SID_ISSET_ID, value);
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SID:
        if (value == null) {
          unsetSid();
        } else {
          setSid((Long)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SID:
        return Long.valueOf(getSid());

      }
      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 SID:
        return isSetSid();
      }
      throw new IllegalStateException();
    }

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

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

      boolean this_present_sid = true;
      boolean that_present_sid = true;
      if (this_present_sid || that_present_sid) {
        if (!(this_present_sid && that_present_sid))
          return false;
        if (this.sid != that.sid)
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      List<Object> list = new ArrayList<Object>();

      boolean present_sid = true;
      list.add(present_sid);
      if (present_sid)
        list.add(sid);

      return list.hashCode();
    }

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

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetSid()).compareTo(other.isSetSid());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSid()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sid, other.sid);
        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("enabled_args(");
      boolean first = true;

      sb.append("sid:");
      sb.append(this.sid);
      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 enabled_argsStandardSchemeFactory implements SchemeFactory {
      public enabled_argsStandardScheme getScheme() {
        return new enabled_argsStandardScheme();
      }
    }

    private static class enabled_argsStandardScheme extends StandardScheme<enabled_args> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, enabled_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: // SID
              if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
                struct.sid = iprot.readI64();
                struct.setSidIsSet(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, enabled_args struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        oprot.writeFieldBegin(SID_FIELD_DESC);
        oprot.writeI64(struct.sid);
        oprot.writeFieldEnd();
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class enabled_argsTupleSchemeFactory implements SchemeFactory {
      public enabled_argsTupleScheme getScheme() {
        return new enabled_argsTupleScheme();
      }
    }

    private static class enabled_argsTupleScheme extends TupleScheme<enabled_args> {

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

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, enabled_args struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(1);
        if (incoming.get(0)) {
          struct.sid = iprot.readI64();
          struct.setSidIsSet(true);
        }
      }
    }

  }

  public static class enabled_result implements org.apache.thrift.TBase<enabled_result, enabled_result._Fields>, java.io.Serializable, Cloneable, Comparable<enabled_result>   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("enabled_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 ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("error", org.apache.thrift.protocol.TType.STRUCT, (short)1);
    private static final org.apache.thrift.protocol.TField STATE_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("state_error", 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 enabled_resultStandardSchemeFactory());
      schemes.put(TupleScheme.class, new enabled_resultTupleSchemeFactory());
    }

    public List<Long> success; // required
    public Error error; // required
    public StateNotFound state_error; // 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"),
      ERROR((short)1, "error"),
      STATE_ERROR((short)2, "state_error");

      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: // ERROR
            return ERROR;
          case 2: // STATE_ERROR
            return STATE_ERROR;
          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.FieldValueMetaData(org.apache.thrift.protocol.TType.I64              , "transition_id"))));
      tmpMap.put(_Fields.ERROR, new org.apache.thrift.meta_data.FieldMetaData("error", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      tmpMap.put(_Fields.STATE_ERROR, new org.apache.thrift.meta_data.FieldMetaData("state_error", 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(enabled_result.class, metaDataMap);
    }

    public enabled_result() {
    }

    public enabled_result(
      List<Long> success,
      Error error,
      StateNotFound state_error)
    {
      this();
      this.success = success;
      this.error = error;
      this.state_error = state_error;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public enabled_result(enabled_result other) {
      if (other.isSetSuccess()) {
        List<Long> __this__success = new ArrayList<Long>(other.success.size());
        for (Long other_element : other.success) {
          __this__success.add(other_element);
        }
        this.success = __this__success;
      }
      if (other.isSetError()) {
        this.error = new Error(other.error);
      }
      if (other.isSetState_error()) {
        this.state_error = new StateNotFound(other.state_error);
      }
    }

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

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

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

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

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

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

    public enabled_result setSuccess(List<Long> 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 Error getError() {
      return this.error;
    }

    public enabled_result setError(Error error) {
      this.error = error;
      return this;
    }

    public void unsetError() {
      this.error = null;
    }

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

    public void setErrorIsSet(boolean value) {
      if (!value) {
        this.error = null;
      }
    }

    public StateNotFound getState_error() {
      return this.state_error;
    }

    public enabled_result setState_error(StateNotFound state_error) {
      this.state_error = state_error;
      return this;
    }

    public void unsetState_error() {
      this.state_error = null;
    }

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

    public void setState_errorIsSet(boolean value) {
      if (!value) {
        this.state_error = null;
      }
    }

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

      case ERROR:
        if (value == null) {
          unsetError();
        } else {
          setError((Error)value);
        }
        break;

      case STATE_ERROR:
        if (value == null) {
          unsetState_error();
        } else {
          setState_error((StateNotFound)value);
        }
        break;

      }
    }

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

      case ERROR:
        return getError();

      case STATE_ERROR:
        return getState_error();

      }
      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 ERROR:
        return isSetError();
      case STATE_ERROR:
        return isSetState_error();
      }
      throw new IllegalStateException();
    }

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

    public boolean equals(enabled_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_error = true && this.isSetError();
      boolean that_present_error = true && that.isSetError();
      if (this_present_error || that_present_error) {
        if (!(this_present_error && that_present_error))
          return false;
        if (!this.error.equals(that.error))
          return false;
      }

      boolean this_present_state_error = true && this.isSetState_error();
      boolean that_present_state_error = true && that.isSetState_error();
      if (this_present_state_error || that_present_state_error) {
        if (!(this_present_state_error && that_present_state_error))
          return false;
        if (!this.state_error.equals(that.state_error))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      List<Object> list = new ArrayList<Object>();

      boolean present_success = true && (isSetSuccess());
      list.add(present_success);
      if (present_success)
        list.add(success);

      boolean present_error = true && (isSetError());
      list.add(present_error);
      if (present_error)
        list.add(error);

      boolean present_state_error = true && (isSetState_error());
      list.add(present_state_error);
      if (present_state_error)
        list.add(state_error);

      return list.hashCode();
    }

    @Override
    public int compareTo(enabled_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(isSetError()).compareTo(other.isSetError());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetError()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.error, other.error);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetState_error()).compareTo(other.isSetState_error());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetState_error()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.state_error, other.state_error);
        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("enabled_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("error:");
      if (this.error == null) {
        sb.append("null");
      } else {
        sb.append(this.error);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("state_error:");
      if (this.state_error == null) {
        sb.append("null");
      } else {
        sb.append(this.state_error);
      }
      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 enabled_resultStandardSchemeFactory implements SchemeFactory {
      public enabled_resultStandardScheme getScheme() {
        return new enabled_resultStandardScheme();
      }
    }

    private static class enabled_resultStandardScheme extends StandardScheme<enabled_result> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, enabled_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 _list34 = iprot.readListBegin();
                  struct.success = new ArrayList<Long>(_list34.size);
                  long _elem35;
                  for (int _i36 = 0; _i36 < _list34.size; ++_i36)
                  {
                    _elem35 = iprot.readI64();
                    struct.success.add(_elem35);
                  }
                  iprot.readListEnd();
                }
                struct.setSuccessIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 1: // ERROR
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.error = new Error();
                struct.error.read(iprot);
                struct.setErrorIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // STATE_ERROR
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.state_error = new StateNotFound();
                struct.state_error.read(iprot);
                struct.setState_errorIsSet(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, enabled_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.I64, struct.success.size()));
            for (long _iter37 : struct.success)
            {
              oprot.writeI64(_iter37);
            }
            oprot.writeListEnd();
          }
          oprot.writeFieldEnd();
        }
        if (struct.error != null) {
          oprot.writeFieldBegin(ERROR_FIELD_DESC);
          struct.error.write(oprot);
          oprot.writeFieldEnd();
        }
        if (struct.state_error != null) {
          oprot.writeFieldBegin(STATE_ERROR_FIELD_DESC);
          struct.state_error.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class enabled_resultTupleSchemeFactory implements SchemeFactory {
      public enabled_resultTupleScheme getScheme() {
        return new enabled_resultTupleScheme();
      }
    }

    private static class enabled_resultTupleScheme extends TupleScheme<enabled_result> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, enabled_result struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetSuccess()) {
          optionals.set(0);
        }
        if (struct.isSetError()) {
          optionals.set(1);
        }
        if (struct.isSetState_error()) {
          optionals.set(2);
        }
        oprot.writeBitSet(optionals, 3);
        if (struct.isSetSuccess()) {
          {
            oprot.writeI32(struct.success.size());
            for (long _iter38 : struct.success)
            {
              oprot.writeI64(_iter38);
            }
          }
        }
        if (struct.isSetError()) {
          struct.error.write(oprot);
        }
        if (struct.isSetState_error()) {
          struct.state_error.write(oprot);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, enabled_result struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(3);
        if (incoming.get(0)) {
          {
            org.apache.thrift.protocol.TList _list39 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, iprot.readI32());
            struct.success = new ArrayList<Long>(_list39.size);
            long _elem40;
            for (int _i41 = 0; _i41 < _list39.size; ++_i41)
            {
              _elem40 = iprot.readI64();
              struct.success.add(_elem40);
            }
          }
          struct.setSuccessIsSet(true);
        }
        if (incoming.get(1)) {
          struct.error = new Error();
          struct.error.read(iprot);
          struct.setErrorIsSet(true);
        }
        if (incoming.get(2)) {
          struct.state_error = new StateNotFound();
          struct.state_error.read(iprot);
          struct.setState_errorIsSet(true);
        }
      }
    }

  }

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

    private static final org.apache.thrift.protocol.TField SID_FIELD_DESC = new org.apache.thrift.protocol.TField("sid", org.apache.thrift.protocol.TType.I64, (short)1);
    private static final org.apache.thrift.protocol.TField TID_FIELD_DESC = new org.apache.thrift.protocol.TField("tid", org.apache.thrift.protocol.TType.I64, (short)2);

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

    public long sid; // required
    public long tid; // 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 {
      SID((short)1, "sid"),
      TID((short)2, "tid");

      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: // SID
            return SID;
          case 2: // TID
            return TID;
          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 __SID_ISSET_ID = 0;
    private static final int __TID_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.SID, new org.apache.thrift.meta_data.FieldMetaData("sid", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64          , "state_id")));
      tmpMap.put(_Fields.TID, new org.apache.thrift.meta_data.FieldMetaData("tid", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64          , "transition_id")));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(is_fireable_args.class, metaDataMap);
    }

    public is_fireable_args() {
    }

    public is_fireable_args(
      long sid,
      long tid)
    {
      this();
      this.sid = sid;
      setSidIsSet(true);
      this.tid = tid;
      setTidIsSet(true);
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public is_fireable_args(is_fireable_args other) {
      __isset_bitfield = other.__isset_bitfield;
      this.sid = other.sid;
      this.tid = other.tid;
    }

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

    @Override
    public void clear() {
      setSidIsSet(false);
      this.sid = 0;
      setTidIsSet(false);
      this.tid = 0;
    }

    public long getSid() {
      return this.sid;
    }

    public is_fireable_args setSid(long sid) {
      this.sid = sid;
      setSidIsSet(true);
      return this;
    }

    public void unsetSid() {
      __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SID_ISSET_ID);
    }

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

    public void setSidIsSet(boolean value) {
      __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SID_ISSET_ID, value);
    }

    public long getTid() {
      return this.tid;
    }

    public is_fireable_args setTid(long tid) {
      this.tid = tid;
      setTidIsSet(true);
      return this;
    }

    public void unsetTid() {
      __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __TID_ISSET_ID);
    }

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

    public void setTidIsSet(boolean value) {
      __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __TID_ISSET_ID, value);
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SID:
        if (value == null) {
          unsetSid();
        } else {
          setSid((Long)value);
        }
        break;

      case TID:
        if (value == null) {
          unsetTid();
        } else {
          setTid((Long)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SID:
        return Long.valueOf(getSid());

      case TID:
        return Long.valueOf(getTid());

      }
      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 SID:
        return isSetSid();
      case TID:
        return isSetTid();
      }
      throw new IllegalStateException();
    }

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

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

      boolean this_present_sid = true;
      boolean that_present_sid = true;
      if (this_present_sid || that_present_sid) {
        if (!(this_present_sid && that_present_sid))
          return false;
        if (this.sid != that.sid)
          return false;
      }

      boolean this_present_tid = true;
      boolean that_present_tid = true;
      if (this_present_tid || that_present_tid) {
        if (!(this_present_tid && that_present_tid))
          return false;
        if (this.tid != that.tid)
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      List<Object> list = new ArrayList<Object>();

      boolean present_sid = true;
      list.add(present_sid);
      if (present_sid)
        list.add(sid);

      boolean present_tid = true;
      list.add(present_tid);
      if (present_tid)
        list.add(tid);

      return list.hashCode();
    }

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

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetSid()).compareTo(other.isSetSid());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSid()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sid, other.sid);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetTid()).compareTo(other.isSetTid());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetTid()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tid, other.tid);
        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("is_fireable_args(");
      boolean first = true;

      sb.append("sid:");
      sb.append(this.sid);
      first = false;
      if (!first) sb.append(", ");
      sb.append("tid:");
      sb.append(this.tid);
      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 is_fireable_argsStandardSchemeFactory implements SchemeFactory {
      public is_fireable_argsStandardScheme getScheme() {
        return new is_fireable_argsStandardScheme();
      }
    }

    private static class is_fireable_argsStandardScheme extends StandardScheme<is_fireable_args> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, is_fireable_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: // SID
              if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
                struct.sid = iprot.readI64();
                struct.setSidIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // TID
              if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
                struct.tid = iprot.readI64();
                struct.setTidIsSet(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, is_fireable_args struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        oprot.writeFieldBegin(SID_FIELD_DESC);
        oprot.writeI64(struct.sid);
        oprot.writeFieldEnd();
        oprot.writeFieldBegin(TID_FIELD_DESC);
        oprot.writeI64(struct.tid);
        oprot.writeFieldEnd();
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class is_fireable_argsTupleSchemeFactory implements SchemeFactory {
      public is_fireable_argsTupleScheme getScheme() {
        return new is_fireable_argsTupleScheme();
      }
    }

    private static class is_fireable_argsTupleScheme extends TupleScheme<is_fireable_args> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, is_fireable_args struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetSid()) {
          optionals.set(0);
        }
        if (struct.isSetTid()) {
          optionals.set(1);
        }
        oprot.writeBitSet(optionals, 2);
        if (struct.isSetSid()) {
          oprot.writeI64(struct.sid);
        }
        if (struct.isSetTid()) {
          oprot.writeI64(struct.tid);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, is_fireable_args struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(2);
        if (incoming.get(0)) {
          struct.sid = iprot.readI64();
          struct.setSidIsSet(true);
        }
        if (incoming.get(1)) {
          struct.tid = iprot.readI64();
          struct.setTidIsSet(true);
        }
      }
    }

  }

  public static class is_fireable_result implements org.apache.thrift.TBase<is_fireable_result, is_fireable_result._Fields>, java.io.Serializable, Cloneable, Comparable<is_fireable_result>   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("is_fireable_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 ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("error", org.apache.thrift.protocol.TType.STRUCT, (short)1);
    private static final org.apache.thrift.protocol.TField STATE_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("state_error", org.apache.thrift.protocol.TType.STRUCT, (short)2);
    private static final org.apache.thrift.protocol.TField TRANSITION_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("transition_error", org.apache.thrift.protocol.TType.STRUCT, (short)3);

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

    public boolean success; // required
    public Error error; // required
    public StateNotFound state_error; // required
    public TransitionNotFound transition_error; // 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"),
      ERROR((short)1, "error"),
      STATE_ERROR((short)2, "state_error"),
      TRANSITION_ERROR((short)3, "transition_error");

      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: // ERROR
            return ERROR;
          case 2: // STATE_ERROR
            return STATE_ERROR;
          case 3: // TRANSITION_ERROR
            return TRANSITION_ERROR;
          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.ERROR, new org.apache.thrift.meta_data.FieldMetaData("error", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      tmpMap.put(_Fields.STATE_ERROR, new org.apache.thrift.meta_data.FieldMetaData("state_error", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      tmpMap.put(_Fields.TRANSITION_ERROR, new org.apache.thrift.meta_data.FieldMetaData("transition_error", 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(is_fireable_result.class, metaDataMap);
    }

    public is_fireable_result() {
    }

    public is_fireable_result(
      boolean success,
      Error error,
      StateNotFound state_error,
      TransitionNotFound transition_error)
    {
      this();
      this.success = success;
      setSuccessIsSet(true);
      this.error = error;
      this.state_error = state_error;
      this.transition_error = transition_error;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public is_fireable_result(is_fireable_result other) {
      __isset_bitfield = other.__isset_bitfield;
      this.success = other.success;
      if (other.isSetError()) {
        this.error = new Error(other.error);
      }
      if (other.isSetState_error()) {
        this.state_error = new StateNotFound(other.state_error);
      }
      if (other.isSetTransition_error()) {
        this.transition_error = new TransitionNotFound(other.transition_error);
      }
    }

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

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

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

    public is_fireable_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 Error getError() {
      return this.error;
    }

    public is_fireable_result setError(Error error) {
      this.error = error;
      return this;
    }

    public void unsetError() {
      this.error = null;
    }

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

    public void setErrorIsSet(boolean value) {
      if (!value) {
        this.error = null;
      }
    }

    public StateNotFound getState_error() {
      return this.state_error;
    }

    public is_fireable_result setState_error(StateNotFound state_error) {
      this.state_error = state_error;
      return this;
    }

    public void unsetState_error() {
      this.state_error = null;
    }

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

    public void setState_errorIsSet(boolean value) {
      if (!value) {
        this.state_error = null;
      }
    }

    public TransitionNotFound getTransition_error() {
      return this.transition_error;
    }

    public is_fireable_result setTransition_error(TransitionNotFound transition_error) {
      this.transition_error = transition_error;
      return this;
    }

    public void unsetTransition_error() {
      this.transition_error = null;
    }

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

    public void setTransition_errorIsSet(boolean value) {
      if (!value) {
        this.transition_error = null;
      }
    }

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

      case ERROR:
        if (value == null) {
          unsetError();
        } else {
          setError((Error)value);
        }
        break;

      case STATE_ERROR:
        if (value == null) {
          unsetState_error();
        } else {
          setState_error((StateNotFound)value);
        }
        break;

      case TRANSITION_ERROR:
        if (value == null) {
          unsetTransition_error();
        } else {
          setTransition_error((TransitionNotFound)value);
        }
        break;

      }
    }

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

      case ERROR:
        return getError();

      case STATE_ERROR:
        return getState_error();

      case TRANSITION_ERROR:
        return getTransition_error();

      }
      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 ERROR:
        return isSetError();
      case STATE_ERROR:
        return isSetState_error();
      case TRANSITION_ERROR:
        return isSetTransition_error();
      }
      throw new IllegalStateException();
    }

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

    public boolean equals(is_fireable_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_error = true && this.isSetError();
      boolean that_present_error = true && that.isSetError();
      if (this_present_error || that_present_error) {
        if (!(this_present_error && that_present_error))
          return false;
        if (!this.error.equals(that.error))
          return false;
      }

      boolean this_present_state_error = true && this.isSetState_error();
      boolean that_present_state_error = true && that.isSetState_error();
      if (this_present_state_error || that_present_state_error) {
        if (!(this_present_state_error && that_present_state_error))
          return false;
        if (!this.state_error.equals(that.state_error))
          return false;
      }

      boolean this_present_transition_error = true && this.isSetTransition_error();
      boolean that_present_transition_error = true && that.isSetTransition_error();
      if (this_present_transition_error || that_present_transition_error) {
        if (!(this_present_transition_error && that_present_transition_error))
          return false;
        if (!this.transition_error.equals(that.transition_error))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      List<Object> list = new ArrayList<Object>();

      boolean present_success = true;
      list.add(present_success);
      if (present_success)
        list.add(success);

      boolean present_error = true && (isSetError());
      list.add(present_error);
      if (present_error)
        list.add(error);

      boolean present_state_error = true && (isSetState_error());
      list.add(present_state_error);
      if (present_state_error)
        list.add(state_error);

      boolean present_transition_error = true && (isSetTransition_error());
      list.add(present_transition_error);
      if (present_transition_error)
        list.add(transition_error);

      return list.hashCode();
    }

    @Override
    public int compareTo(is_fireable_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(isSetError()).compareTo(other.isSetError());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetError()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.error, other.error);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetState_error()).compareTo(other.isSetState_error());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetState_error()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.state_error, other.state_error);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetTransition_error()).compareTo(other.isSetTransition_error());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetTransition_error()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.transition_error, other.transition_error);
        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("is_fireable_result(");
      boolean first = true;

      sb.append("success:");
      sb.append(this.success);
      first = false;
      if (!first) sb.append(", ");
      sb.append("error:");
      if (this.error == null) {
        sb.append("null");
      } else {
        sb.append(this.error);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("state_error:");
      if (this.state_error == null) {
        sb.append("null");
      } else {
        sb.append(this.state_error);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("transition_error:");
      if (this.transition_error == null) {
        sb.append("null");
      } else {
        sb.append(this.transition_error);
      }
      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 is_fireable_resultStandardSchemeFactory implements SchemeFactory {
      public is_fireable_resultStandardScheme getScheme() {
        return new is_fireable_resultStandardScheme();
      }
    }

    private static class is_fireable_resultStandardScheme extends StandardScheme<is_fireable_result> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, is_fireable_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: // ERROR
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.error = new Error();
                struct.error.read(iprot);
                struct.setErrorIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // STATE_ERROR
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.state_error = new StateNotFound();
                struct.state_error.read(iprot);
                struct.setState_errorIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 3: // TRANSITION_ERROR
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.transition_error = new TransitionNotFound();
                struct.transition_error.read(iprot);
                struct.setTransition_errorIsSet(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, is_fireable_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.error != null) {
          oprot.writeFieldBegin(ERROR_FIELD_DESC);
          struct.error.write(oprot);
          oprot.writeFieldEnd();
        }
        if (struct.state_error != null) {
          oprot.writeFieldBegin(STATE_ERROR_FIELD_DESC);
          struct.state_error.write(oprot);
          oprot.writeFieldEnd();
        }
        if (struct.transition_error != null) {
          oprot.writeFieldBegin(TRANSITION_ERROR_FIELD_DESC);
          struct.transition_error.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class is_fireable_resultTupleSchemeFactory implements SchemeFactory {
      public is_fireable_resultTupleScheme getScheme() {
        return new is_fireable_resultTupleScheme();
      }
    }

    private static class is_fireable_resultTupleScheme extends TupleScheme<is_fireable_result> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, is_fireable_result struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetSuccess()) {
          optionals.set(0);
        }
        if (struct.isSetError()) {
          optionals.set(1);
        }
        if (struct.isSetState_error()) {
          optionals.set(2);
        }
        if (struct.isSetTransition_error()) {
          optionals.set(3);
        }
        oprot.writeBitSet(optionals, 4);
        if (struct.isSetSuccess()) {
          oprot.writeBool(struct.success);
        }
        if (struct.isSetError()) {
          struct.error.write(oprot);
        }
        if (struct.isSetState_error()) {
          struct.state_error.write(oprot);
        }
        if (struct.isSetTransition_error()) {
          struct.transition_error.write(oprot);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, is_fireable_result struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(4);
        if (incoming.get(0)) {
          struct.success = iprot.readBool();
          struct.setSuccessIsSet(true);
        }
        if (incoming.get(1)) {
          struct.error = new Error();
          struct.error.read(iprot);
          struct.setErrorIsSet(true);
        }
        if (incoming.get(2)) {
          struct.state_error = new StateNotFound();
          struct.state_error.read(iprot);
          struct.setState_errorIsSet(true);
        }
        if (incoming.get(3)) {
          struct.transition_error = new TransitionNotFound();
          struct.transition_error.read(iprot);
          struct.setTransition_errorIsSet(true);
        }
      }
    }

  }

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

    private static final org.apache.thrift.protocol.TField SID_FIELD_DESC = new org.apache.thrift.protocol.TField("sid", org.apache.thrift.protocol.TType.I64, (short)1);

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

    public long sid; // 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 {
      SID((short)1, "sid");

      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: // SID
            return SID;
          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 __SID_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.SID, new org.apache.thrift.meta_data.FieldMetaData("sid", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64          , "state_id")));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(fireable_args.class, metaDataMap);
    }

    public fireable_args() {
    }

    public fireable_args(
      long sid)
    {
      this();
      this.sid = sid;
      setSidIsSet(true);
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public fireable_args(fireable_args other) {
      __isset_bitfield = other.__isset_bitfield;
      this.sid = other.sid;
    }

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

    @Override
    public void clear() {
      setSidIsSet(false);
      this.sid = 0;
    }

    public long getSid() {
      return this.sid;
    }

    public fireable_args setSid(long sid) {
      this.sid = sid;
      setSidIsSet(true);
      return this;
    }

    public void unsetSid() {
      __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SID_ISSET_ID);
    }

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

    public void setSidIsSet(boolean value) {
      __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SID_ISSET_ID, value);
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SID:
        if (value == null) {
          unsetSid();
        } else {
          setSid((Long)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SID:
        return Long.valueOf(getSid());

      }
      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 SID:
        return isSetSid();
      }
      throw new IllegalStateException();
    }

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

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

      boolean this_present_sid = true;
      boolean that_present_sid = true;
      if (this_present_sid || that_present_sid) {
        if (!(this_present_sid && that_present_sid))
          return false;
        if (this.sid != that.sid)
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      List<Object> list = new ArrayList<Object>();

      boolean present_sid = true;
      list.add(present_sid);
      if (present_sid)
        list.add(sid);

      return list.hashCode();
    }

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

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetSid()).compareTo(other.isSetSid());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSid()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sid, other.sid);
        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("fireable_args(");
      boolean first = true;

      sb.append("sid:");
      sb.append(this.sid);
      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 fireable_argsStandardSchemeFactory implements SchemeFactory {
      public fireable_argsStandardScheme getScheme() {
        return new fireable_argsStandardScheme();
      }
    }

    private static class fireable_argsStandardScheme extends StandardScheme<fireable_args> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, fireable_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: // SID
              if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
                struct.sid = iprot.readI64();
                struct.setSidIsSet(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, fireable_args struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        oprot.writeFieldBegin(SID_FIELD_DESC);
        oprot.writeI64(struct.sid);
        oprot.writeFieldEnd();
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class fireable_argsTupleSchemeFactory implements SchemeFactory {
      public fireable_argsTupleScheme getScheme() {
        return new fireable_argsTupleScheme();
      }
    }

    private static class fireable_argsTupleScheme extends TupleScheme<fireable_args> {

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

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, fireable_args struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(1);
        if (incoming.get(0)) {
          struct.sid = iprot.readI64();
          struct.setSidIsSet(true);
        }
      }
    }

  }

  public static class fireable_result implements org.apache.thrift.TBase<fireable_result, fireable_result._Fields>, java.io.Serializable, Cloneable, Comparable<fireable_result>   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("fireable_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 ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("error", org.apache.thrift.protocol.TType.STRUCT, (short)1);
    private static final org.apache.thrift.protocol.TField S_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("s_error", 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 fireable_resultStandardSchemeFactory());
      schemes.put(TupleScheme.class, new fireable_resultTupleSchemeFactory());
    }

    public List<Long> success; // required
    public Error error; // required
    public StateNotFound s_error; // 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"),
      ERROR((short)1, "error"),
      S_ERROR((short)2, "s_error");

      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: // ERROR
            return ERROR;
          case 2: // S_ERROR
            return S_ERROR;
          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.FieldValueMetaData(org.apache.thrift.protocol.TType.I64              , "transition_id"))));
      tmpMap.put(_Fields.ERROR, new org.apache.thrift.meta_data.FieldMetaData("error", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      tmpMap.put(_Fields.S_ERROR, new org.apache.thrift.meta_data.FieldMetaData("s_error", 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(fireable_result.class, metaDataMap);
    }

    public fireable_result() {
    }

    public fireable_result(
      List<Long> success,
      Error error,
      StateNotFound s_error)
    {
      this();
      this.success = success;
      this.error = error;
      this.s_error = s_error;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public fireable_result(fireable_result other) {
      if (other.isSetSuccess()) {
        List<Long> __this__success = new ArrayList<Long>(other.success.size());
        for (Long other_element : other.success) {
          __this__success.add(other_element);
        }
        this.success = __this__success;
      }
      if (other.isSetError()) {
        this.error = new Error(other.error);
      }
      if (other.isSetS_error()) {
        this.s_error = new StateNotFound(other.s_error);
      }
    }

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

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

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

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

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

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

    public fireable_result setSuccess(List<Long> 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 Error getError() {
      return this.error;
    }

    public fireable_result setError(Error error) {
      this.error = error;
      return this;
    }

    public void unsetError() {
      this.error = null;
    }

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

    public void setErrorIsSet(boolean value) {
      if (!value) {
        this.error = null;
      }
    }

    public StateNotFound getS_error() {
      return this.s_error;
    }

    public fireable_result setS_error(StateNotFound s_error) {
      this.s_error = s_error;
      return this;
    }

    public void unsetS_error() {
      this.s_error = null;
    }

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

    public void setS_errorIsSet(boolean value) {
      if (!value) {
        this.s_error = null;
      }
    }

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

      case ERROR:
        if (value == null) {
          unsetError();
        } else {
          setError((Error)value);
        }
        break;

      case S_ERROR:
        if (value == null) {
          unsetS_error();
        } else {
          setS_error((StateNotFound)value);
        }
        break;

      }
    }

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

      case ERROR:
        return getError();

      case S_ERROR:
        return getS_error();

      }
      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 ERROR:
        return isSetError();
      case S_ERROR:
        return isSetS_error();
      }
      throw new IllegalStateException();
    }

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

    public boolean equals(fireable_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_error = true && this.isSetError();
      boolean that_present_error = true && that.isSetError();
      if (this_present_error || that_present_error) {
        if (!(this_present_error && that_present_error))
          return false;
        if (!this.error.equals(that.error))
          return false;
      }

      boolean this_present_s_error = true && this.isSetS_error();
      boolean that_present_s_error = true && that.isSetS_error();
      if (this_present_s_error || that_present_s_error) {
        if (!(this_present_s_error && that_present_s_error))
          return false;
        if (!this.s_error.equals(that.s_error))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      List<Object> list = new ArrayList<Object>();

      boolean present_success = true && (isSetSuccess());
      list.add(present_success);
      if (present_success)
        list.add(success);

      boolean present_error = true && (isSetError());
      list.add(present_error);
      if (present_error)
        list.add(error);

      boolean present_s_error = true && (isSetS_error());
      list.add(present_s_error);
      if (present_s_error)
        list.add(s_error);

      return list.hashCode();
    }

    @Override
    public int compareTo(fireable_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(isSetError()).compareTo(other.isSetError());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetError()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.error, other.error);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetS_error()).compareTo(other.isSetS_error());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetS_error()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.s_error, other.s_error);
        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("fireable_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("error:");
      if (this.error == null) {
        sb.append("null");
      } else {
        sb.append(this.error);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("s_error:");
      if (this.s_error == null) {
        sb.append("null");
      } else {
        sb.append(this.s_error);
      }
      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 fireable_resultStandardSchemeFactory implements SchemeFactory {
      public fireable_resultStandardScheme getScheme() {
        return new fireable_resultStandardScheme();
      }
    }

    private static class fireable_resultStandardScheme extends StandardScheme<fireable_result> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, fireable_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 _list42 = iprot.readListBegin();
                  struct.success = new ArrayList<Long>(_list42.size);
                  long _elem43;
                  for (int _i44 = 0; _i44 < _list42.size; ++_i44)
                  {
                    _elem43 = iprot.readI64();
                    struct.success.add(_elem43);
                  }
                  iprot.readListEnd();
                }
                struct.setSuccessIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 1: // ERROR
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.error = new Error();
                struct.error.read(iprot);
                struct.setErrorIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // S_ERROR
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.s_error = new StateNotFound();
                struct.s_error.read(iprot);
                struct.setS_errorIsSet(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, fireable_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.I64, struct.success.size()));
            for (long _iter45 : struct.success)
            {
              oprot.writeI64(_iter45);
            }
            oprot.writeListEnd();
          }
          oprot.writeFieldEnd();
        }
        if (struct.error != null) {
          oprot.writeFieldBegin(ERROR_FIELD_DESC);
          struct.error.write(oprot);
          oprot.writeFieldEnd();
        }
        if (struct.s_error != null) {
          oprot.writeFieldBegin(S_ERROR_FIELD_DESC);
          struct.s_error.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class fireable_resultTupleSchemeFactory implements SchemeFactory {
      public fireable_resultTupleScheme getScheme() {
        return new fireable_resultTupleScheme();
      }
    }

    private static class fireable_resultTupleScheme extends TupleScheme<fireable_result> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, fireable_result struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetSuccess()) {
          optionals.set(0);
        }
        if (struct.isSetError()) {
          optionals.set(1);
        }
        if (struct.isSetS_error()) {
          optionals.set(2);
        }
        oprot.writeBitSet(optionals, 3);
        if (struct.isSetSuccess()) {
          {
            oprot.writeI32(struct.success.size());
            for (long _iter46 : struct.success)
            {
              oprot.writeI64(_iter46);
            }
          }
        }
        if (struct.isSetError()) {
          struct.error.write(oprot);
        }
        if (struct.isSetS_error()) {
          struct.s_error.write(oprot);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, fireable_result struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(3);
        if (incoming.get(0)) {
          {
            org.apache.thrift.protocol.TList _list47 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, iprot.readI32());
            struct.success = new ArrayList<Long>(_list47.size);
            long _elem48;
            for (int _i49 = 0; _i49 < _list47.size; ++_i49)
            {
              _elem48 = iprot.readI64();
              struct.success.add(_elem48);
            }
          }
          struct.setSuccessIsSet(true);
        }
        if (incoming.get(1)) {
          struct.error = new Error();
          struct.error.read(iprot);
          struct.setErrorIsSet(true);
        }
        if (incoming.get(2)) {
          struct.s_error = new StateNotFound();
          struct.s_error.read(iprot);
          struct.setS_errorIsSet(true);
        }
      }
    }

  }

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

    private static final org.apache.thrift.protocol.TField SID_FIELD_DESC = new org.apache.thrift.protocol.TField("sid", org.apache.thrift.protocol.TType.I64, (short)1);
    private static final org.apache.thrift.protocol.TField TID_FIELD_DESC = new org.apache.thrift.protocol.TField("tid", org.apache.thrift.protocol.TType.I64, (short)2);

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

    public long sid; // required
    public long tid; // 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 {
      SID((short)1, "sid"),
      TID((short)2, "tid");

      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: // SID
            return SID;
          case 2: // TID
            return TID;
          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 __SID_ISSET_ID = 0;
    private static final int __TID_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.SID, new org.apache.thrift.meta_data.FieldMetaData("sid", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64          , "state_id")));
      tmpMap.put(_Fields.TID, new org.apache.thrift.meta_data.FieldMetaData("tid", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64          , "transition_id")));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(fire_args.class, metaDataMap);
    }

    public fire_args() {
    }

    public fire_args(
      long sid,
      long tid)
    {
      this();
      this.sid = sid;
      setSidIsSet(true);
      this.tid = tid;
      setTidIsSet(true);
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public fire_args(fire_args other) {
      __isset_bitfield = other.__isset_bitfield;
      this.sid = other.sid;
      this.tid = other.tid;
    }

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

    @Override
    public void clear() {
      setSidIsSet(false);
      this.sid = 0;
      setTidIsSet(false);
      this.tid = 0;
    }

    public long getSid() {
      return this.sid;
    }

    public fire_args setSid(long sid) {
      this.sid = sid;
      setSidIsSet(true);
      return this;
    }

    public void unsetSid() {
      __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SID_ISSET_ID);
    }

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

    public void setSidIsSet(boolean value) {
      __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SID_ISSET_ID, value);
    }

    public long getTid() {
      return this.tid;
    }

    public fire_args setTid(long tid) {
      this.tid = tid;
      setTidIsSet(true);
      return this;
    }

    public void unsetTid() {
      __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __TID_ISSET_ID);
    }

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

    public void setTidIsSet(boolean value) {
      __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __TID_ISSET_ID, value);
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SID:
        if (value == null) {
          unsetSid();
        } else {
          setSid((Long)value);
        }
        break;

      case TID:
        if (value == null) {
          unsetTid();
        } else {
          setTid((Long)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SID:
        return Long.valueOf(getSid());

      case TID:
        return Long.valueOf(getTid());

      }
      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 SID:
        return isSetSid();
      case TID:
        return isSetTid();
      }
      throw new IllegalStateException();
    }

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

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

      boolean this_present_sid = true;
      boolean that_present_sid = true;
      if (this_present_sid || that_present_sid) {
        if (!(this_present_sid && that_present_sid))
          return false;
        if (this.sid != that.sid)
          return false;
      }

      boolean this_present_tid = true;
      boolean that_present_tid = true;
      if (this_present_tid || that_present_tid) {
        if (!(this_present_tid && that_present_tid))
          return false;
        if (this.tid != that.tid)
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      List<Object> list = new ArrayList<Object>();

      boolean present_sid = true;
      list.add(present_sid);
      if (present_sid)
        list.add(sid);

      boolean present_tid = true;
      list.add(present_tid);
      if (present_tid)
        list.add(tid);

      return list.hashCode();
    }

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

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetSid()).compareTo(other.isSetSid());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSid()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sid, other.sid);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetTid()).compareTo(other.isSetTid());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetTid()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tid, other.tid);
        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("fire_args(");
      boolean first = true;

      sb.append("sid:");
      sb.append(this.sid);
      first = false;
      if (!first) sb.append(", ");
      sb.append("tid:");
      sb.append(this.tid);
      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 fire_argsStandardSchemeFactory implements SchemeFactory {
      public fire_argsStandardScheme getScheme() {
        return new fire_argsStandardScheme();
      }
    }

    private static class fire_argsStandardScheme extends StandardScheme<fire_args> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, fire_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: // SID
              if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
                struct.sid = iprot.readI64();
                struct.setSidIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // TID
              if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
                struct.tid = iprot.readI64();
                struct.setTidIsSet(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, fire_args struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        oprot.writeFieldBegin(SID_FIELD_DESC);
        oprot.writeI64(struct.sid);
        oprot.writeFieldEnd();
        oprot.writeFieldBegin(TID_FIELD_DESC);
        oprot.writeI64(struct.tid);
        oprot.writeFieldEnd();
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class fire_argsTupleSchemeFactory implements SchemeFactory {
      public fire_argsTupleScheme getScheme() {
        return new fire_argsTupleScheme();
      }
    }

    private static class fire_argsTupleScheme extends TupleScheme<fire_args> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, fire_args struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetSid()) {
          optionals.set(0);
        }
        if (struct.isSetTid()) {
          optionals.set(1);
        }
        oprot.writeBitSet(optionals, 2);
        if (struct.isSetSid()) {
          oprot.writeI64(struct.sid);
        }
        if (struct.isSetTid()) {
          oprot.writeI64(struct.tid);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, fire_args struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(2);
        if (incoming.get(0)) {
          struct.sid = iprot.readI64();
          struct.setSidIsSet(true);
        }
        if (incoming.get(1)) {
          struct.tid = iprot.readI64();
          struct.setTidIsSet(true);
        }
      }
    }

  }

  public static class fire_result implements org.apache.thrift.TBase<fire_result, fire_result._Fields>, java.io.Serializable, Cloneable, Comparable<fire_result>   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("fire_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 ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("error", org.apache.thrift.protocol.TType.STRUCT, (short)1);
    private static final org.apache.thrift.protocol.TField STATE_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("state_error", org.apache.thrift.protocol.TType.STRUCT, (short)2);
    private static final org.apache.thrift.protocol.TField TRANSITION_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("transition_error", org.apache.thrift.protocol.TType.STRUCT, (short)3);
    private static final org.apache.thrift.protocol.TField FIREABLE_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("fireable_error", org.apache.thrift.protocol.TType.STRUCT, (short)4);

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

    public TTSState success; // required
    public Error error; // required
    public StateNotFound state_error; // required
    public TransitionNotFound transition_error; // required
    public NotFireable fireable_error; // 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"),
      ERROR((short)1, "error"),
      STATE_ERROR((short)2, "state_error"),
      TRANSITION_ERROR((short)3, "transition_error"),
      FIREABLE_ERROR((short)4, "fireable_error");

      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: // ERROR
            return ERROR;
          case 2: // STATE_ERROR
            return STATE_ERROR;
          case 3: // TRANSITION_ERROR
            return TRANSITION_ERROR;
          case 4: // FIREABLE_ERROR
            return FIREABLE_ERROR;
          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, TTSState.class)));
      tmpMap.put(_Fields.ERROR, new org.apache.thrift.meta_data.FieldMetaData("error", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      tmpMap.put(_Fields.STATE_ERROR, new org.apache.thrift.meta_data.FieldMetaData("state_error", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      tmpMap.put(_Fields.TRANSITION_ERROR, new org.apache.thrift.meta_data.FieldMetaData("transition_error", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      tmpMap.put(_Fields.FIREABLE_ERROR, new org.apache.thrift.meta_data.FieldMetaData("fireable_error", 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(fire_result.class, metaDataMap);
    }

    public fire_result() {
    }

    public fire_result(
      TTSState success,
      Error error,
      StateNotFound state_error,
      TransitionNotFound transition_error,
      NotFireable fireable_error)
    {
      this();
      this.success = success;
      this.error = error;
      this.state_error = state_error;
      this.transition_error = transition_error;
      this.fireable_error = fireable_error;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public fire_result(fire_result other) {
      if (other.isSetSuccess()) {
        this.success = new TTSState(other.success);
      }
      if (other.isSetError()) {
        this.error = new Error(other.error);
      }
      if (other.isSetState_error()) {
        this.state_error = new StateNotFound(other.state_error);
      }
      if (other.isSetTransition_error()) {
        this.transition_error = new TransitionNotFound(other.transition_error);
      }
      if (other.isSetFireable_error()) {
        this.fireable_error = new NotFireable(other.fireable_error);
      }
    }

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

    @Override
    public void clear() {
      this.success = null;
      this.error = null;
      this.state_error = null;
      this.transition_error = null;
      this.fireable_error = null;
    }

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

    public fire_result setSuccess(TTSState 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 Error getError() {
      return this.error;
    }

    public fire_result setError(Error error) {
      this.error = error;
      return this;
    }

    public void unsetError() {
      this.error = null;
    }

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

    public void setErrorIsSet(boolean value) {
      if (!value) {
        this.error = null;
      }
    }

    public StateNotFound getState_error() {
      return this.state_error;
    }

    public fire_result setState_error(StateNotFound state_error) {
      this.state_error = state_error;
      return this;
    }

    public void unsetState_error() {
      this.state_error = null;
    }

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

    public void setState_errorIsSet(boolean value) {
      if (!value) {
        this.state_error = null;
      }
    }

    public TransitionNotFound getTransition_error() {
      return this.transition_error;
    }

    public fire_result setTransition_error(TransitionNotFound transition_error) {
      this.transition_error = transition_error;
      return this;
    }

    public void unsetTransition_error() {
      this.transition_error = null;
    }

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

    public void setTransition_errorIsSet(boolean value) {
      if (!value) {
        this.transition_error = null;
      }
    }

    public NotFireable getFireable_error() {
      return this.fireable_error;
    }

    public fire_result setFireable_error(NotFireable fireable_error) {
      this.fireable_error = fireable_error;
      return this;
    }

    public void unsetFireable_error() {
      this.fireable_error = null;
    }

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

    public void setFireable_errorIsSet(boolean value) {
      if (!value) {
        this.fireable_error = null;
      }
    }

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

      case ERROR:
        if (value == null) {
          unsetError();
        } else {
          setError((Error)value);
        }
        break;

      case STATE_ERROR:
        if (value == null) {
          unsetState_error();
        } else {
          setState_error((StateNotFound)value);
        }
        break;

      case TRANSITION_ERROR:
        if (value == null) {
          unsetTransition_error();
        } else {
          setTransition_error((TransitionNotFound)value);
        }
        break;

      case FIREABLE_ERROR:
        if (value == null) {
          unsetFireable_error();
        } else {
          setFireable_error((NotFireable)value);
        }
        break;

      }
    }

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

      case ERROR:
        return getError();

      case STATE_ERROR:
        return getState_error();

      case TRANSITION_ERROR:
        return getTransition_error();

      case FIREABLE_ERROR:
        return getFireable_error();

      }
      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 ERROR:
        return isSetError();
      case STATE_ERROR:
        return isSetState_error();
      case TRANSITION_ERROR:
        return isSetTransition_error();
      case FIREABLE_ERROR:
        return isSetFireable_error();
      }
      throw new IllegalStateException();
    }

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

    public boolean equals(fire_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_error = true && this.isSetError();
      boolean that_present_error = true && that.isSetError();
      if (this_present_error || that_present_error) {
        if (!(this_present_error && that_present_error))
          return false;
        if (!this.error.equals(that.error))
          return false;
      }

      boolean this_present_state_error = true && this.isSetState_error();
      boolean that_present_state_error = true && that.isSetState_error();
      if (this_present_state_error || that_present_state_error) {
        if (!(this_present_state_error && that_present_state_error))
          return false;
        if (!this.state_error.equals(that.state_error))
          return false;
      }

      boolean this_present_transition_error = true && this.isSetTransition_error();
      boolean that_present_transition_error = true && that.isSetTransition_error();
      if (this_present_transition_error || that_present_transition_error) {
        if (!(this_present_transition_error && that_present_transition_error))
          return false;
        if (!this.transition_error.equals(that.transition_error))
          return false;
      }

      boolean this_present_fireable_error = true && this.isSetFireable_error();
      boolean that_present_fireable_error = true && that.isSetFireable_error();
      if (this_present_fireable_error || that_present_fireable_error) {
        if (!(this_present_fireable_error && that_present_fireable_error))
          return false;
        if (!this.fireable_error.equals(that.fireable_error))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      List<Object> list = new ArrayList<Object>();

      boolean present_success = true && (isSetSuccess());
      list.add(present_success);
      if (present_success)
        list.add(success);

      boolean present_error = true && (isSetError());
      list.add(present_error);
      if (present_error)
        list.add(error);

      boolean present_state_error = true && (isSetState_error());
      list.add(present_state_error);
      if (present_state_error)
        list.add(state_error);

      boolean present_transition_error = true && (isSetTransition_error());
      list.add(present_transition_error);
      if (present_transition_error)
        list.add(transition_error);

      boolean present_fireable_error = true && (isSetFireable_error());
      list.add(present_fireable_error);
      if (present_fireable_error)
        list.add(fireable_error);

      return list.hashCode();
    }

    @Override
    public int compareTo(fire_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(isSetError()).compareTo(other.isSetError());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetError()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.error, other.error);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetState_error()).compareTo(other.isSetState_error());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetState_error()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.state_error, other.state_error);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetTransition_error()).compareTo(other.isSetTransition_error());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetTransition_error()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.transition_error, other.transition_error);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetFireable_error()).compareTo(other.isSetFireable_error());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetFireable_error()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.fireable_error, other.fireable_error);
        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("fire_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("error:");
      if (this.error == null) {
        sb.append("null");
      } else {
        sb.append(this.error);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("state_error:");
      if (this.state_error == null) {
        sb.append("null");
      } else {
        sb.append(this.state_error);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("transition_error:");
      if (this.transition_error == null) {
        sb.append("null");
      } else {
        sb.append(this.transition_error);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("fireable_error:");
      if (this.fireable_error == null) {
        sb.append("null");
      } else {
        sb.append(this.fireable_error);
      }
      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 fire_resultStandardSchemeFactory implements SchemeFactory {
      public fire_resultStandardScheme getScheme() {
        return new fire_resultStandardScheme();
      }
    }

    private static class fire_resultStandardScheme extends StandardScheme<fire_result> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, fire_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 TTSState();
                struct.success.read(iprot);
                struct.setSuccessIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 1: // ERROR
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.error = new Error();
                struct.error.read(iprot);
                struct.setErrorIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // STATE_ERROR
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.state_error = new StateNotFound();
                struct.state_error.read(iprot);
                struct.setState_errorIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 3: // TRANSITION_ERROR
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.transition_error = new TransitionNotFound();
                struct.transition_error.read(iprot);
                struct.setTransition_errorIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 4: // FIREABLE_ERROR
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.fireable_error = new NotFireable();
                struct.fireable_error.read(iprot);
                struct.setFireable_errorIsSet(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, fire_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.error != null) {
          oprot.writeFieldBegin(ERROR_FIELD_DESC);
          struct.error.write(oprot);
          oprot.writeFieldEnd();
        }
        if (struct.state_error != null) {
          oprot.writeFieldBegin(STATE_ERROR_FIELD_DESC);
          struct.state_error.write(oprot);
          oprot.writeFieldEnd();
        }
        if (struct.transition_error != null) {
          oprot.writeFieldBegin(TRANSITION_ERROR_FIELD_DESC);
          struct.transition_error.write(oprot);
          oprot.writeFieldEnd();
        }
        if (struct.fireable_error != null) {
          oprot.writeFieldBegin(FIREABLE_ERROR_FIELD_DESC);
          struct.fireable_error.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class fire_resultTupleSchemeFactory implements SchemeFactory {
      public fire_resultTupleScheme getScheme() {
        return new fire_resultTupleScheme();
      }
    }

    private static class fire_resultTupleScheme extends TupleScheme<fire_result> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, fire_result struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetSuccess()) {
          optionals.set(0);
        }
        if (struct.isSetError()) {
          optionals.set(1);
        }
        if (struct.isSetState_error()) {
          optionals.set(2);
        }
        if (struct.isSetTransition_error()) {
          optionals.set(3);
        }
        if (struct.isSetFireable_error()) {
          optionals.set(4);
        }
        oprot.writeBitSet(optionals, 5);
        if (struct.isSetSuccess()) {
          struct.success.write(oprot);
        }
        if (struct.isSetError()) {
          struct.error.write(oprot);
        }
        if (struct.isSetState_error()) {
          struct.state_error.write(oprot);
        }
        if (struct.isSetTransition_error()) {
          struct.transition_error.write(oprot);
        }
        if (struct.isSetFireable_error()) {
          struct.fireable_error.write(oprot);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, fire_result struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(5);
        if (incoming.get(0)) {
          struct.success = new TTSState();
          struct.success.read(iprot);
          struct.setSuccessIsSet(true);
        }
        if (incoming.get(1)) {
          struct.error = new Error();
          struct.error.read(iprot);
          struct.setErrorIsSet(true);
        }
        if (incoming.get(2)) {
          struct.state_error = new StateNotFound();
          struct.state_error.read(iprot);
          struct.setState_errorIsSet(true);
        }
        if (incoming.get(3)) {
          struct.transition_error = new TransitionNotFound();
          struct.transition_error.read(iprot);
          struct.setTransition_errorIsSet(true);
        }
        if (incoming.get(4)) {
          struct.fireable_error = new NotFireable();
          struct.fireable_error.read(iprot);
          struct.setFireable_errorIsSet(true);
        }
      }
    }

  }

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

    private static final org.apache.thrift.protocol.TField SID_FIELD_DESC = new org.apache.thrift.protocol.TField("sid", org.apache.thrift.protocol.TType.I64, (short)1);
    private static final org.apache.thrift.protocol.TField DELAY_FIELD_DESC = new org.apache.thrift.protocol.TField("delay", 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 can_advance_time_argsStandardSchemeFactory());
      schemes.put(TupleScheme.class, new can_advance_time_argsTupleSchemeFactory());
    }

    public long sid; // required
    public Clock delay; // 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 {
      SID((short)1, "sid"),
      DELAY((short)2, "delay");

      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: // SID
            return SID;
          case 2: // DELAY
            return DELAY;
          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 __SID_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.SID, new org.apache.thrift.meta_data.FieldMetaData("sid", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64          , "state_id")));
      tmpMap.put(_Fields.DELAY, new org.apache.thrift.meta_data.FieldMetaData("delay", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Clock.class)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(can_advance_time_args.class, metaDataMap);
    }

    public can_advance_time_args() {
    }

    public can_advance_time_args(
      long sid,
      Clock delay)
    {
      this();
      this.sid = sid;
      setSidIsSet(true);
      this.delay = delay;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public can_advance_time_args(can_advance_time_args other) {
      __isset_bitfield = other.__isset_bitfield;
      this.sid = other.sid;
      if (other.isSetDelay()) {
        this.delay = new Clock(other.delay);
      }
    }

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

    @Override
    public void clear() {
      setSidIsSet(false);
      this.sid = 0;
      this.delay = null;
    }

    public long getSid() {
      return this.sid;
    }

    public can_advance_time_args setSid(long sid) {
      this.sid = sid;
      setSidIsSet(true);
      return this;
    }

    public void unsetSid() {
      __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SID_ISSET_ID);
    }

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

    public void setSidIsSet(boolean value) {
      __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SID_ISSET_ID, value);
    }

    public Clock getDelay() {
      return this.delay;
    }

    public can_advance_time_args setDelay(Clock delay) {
      this.delay = delay;
      return this;
    }

    public void unsetDelay() {
      this.delay = null;
    }

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

    public void setDelayIsSet(boolean value) {
      if (!value) {
        this.delay = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SID:
        if (value == null) {
          unsetSid();
        } else {
          setSid((Long)value);
        }
        break;

      case DELAY:
        if (value == null) {
          unsetDelay();
        } else {
          setDelay((Clock)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SID:
        return Long.valueOf(getSid());

      case DELAY:
        return getDelay();

      }
      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 SID:
        return isSetSid();
      case DELAY:
        return isSetDelay();
      }
      throw new IllegalStateException();
    }

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

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

      boolean this_present_sid = true;
      boolean that_present_sid = true;
      if (this_present_sid || that_present_sid) {
        if (!(this_present_sid && that_present_sid))
          return false;
        if (this.sid != that.sid)
          return false;
      }

      boolean this_present_delay = true && this.isSetDelay();
      boolean that_present_delay = true && that.isSetDelay();
      if (this_present_delay || that_present_delay) {
        if (!(this_present_delay && that_present_delay))
          return false;
        if (!this.delay.equals(that.delay))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      List<Object> list = new ArrayList<Object>();

      boolean present_sid = true;
      list.add(present_sid);
      if (present_sid)
        list.add(sid);

      boolean present_delay = true && (isSetDelay());
      list.add(present_delay);
      if (present_delay)
        list.add(delay);

      return list.hashCode();
    }

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

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetSid()).compareTo(other.isSetSid());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSid()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sid, other.sid);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetDelay()).compareTo(other.isSetDelay());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetDelay()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.delay, other.delay);
        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("can_advance_time_args(");
      boolean first = true;

      sb.append("sid:");
      sb.append(this.sid);
      first = false;
      if (!first) sb.append(", ");
      sb.append("delay:");
      if (this.delay == null) {
        sb.append("null");
      } else {
        sb.append(this.delay);
      }
      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 (delay != null) {
        delay.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 can_advance_time_argsStandardSchemeFactory implements SchemeFactory {
      public can_advance_time_argsStandardScheme getScheme() {
        return new can_advance_time_argsStandardScheme();
      }
    }

    private static class can_advance_time_argsStandardScheme extends StandardScheme<can_advance_time_args> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, can_advance_time_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: // SID
              if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
                struct.sid = iprot.readI64();
                struct.setSidIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // DELAY
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.delay = new Clock();
                struct.delay.read(iprot);
                struct.setDelayIsSet(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, can_advance_time_args struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        oprot.writeFieldBegin(SID_FIELD_DESC);
        oprot.writeI64(struct.sid);
        oprot.writeFieldEnd();
        if (struct.delay != null) {
          oprot.writeFieldBegin(DELAY_FIELD_DESC);
          struct.delay.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class can_advance_time_argsTupleSchemeFactory implements SchemeFactory {
      public can_advance_time_argsTupleScheme getScheme() {
        return new can_advance_time_argsTupleScheme();
      }
    }

    private static class can_advance_time_argsTupleScheme extends TupleScheme<can_advance_time_args> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, can_advance_time_args struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetSid()) {
          optionals.set(0);
        }
        if (struct.isSetDelay()) {
          optionals.set(1);
        }
        oprot.writeBitSet(optionals, 2);
        if (struct.isSetSid()) {
          oprot.writeI64(struct.sid);
        }
        if (struct.isSetDelay()) {
          struct.delay.write(oprot);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, can_advance_time_args struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(2);
        if (incoming.get(0)) {
          struct.sid = iprot.readI64();
          struct.setSidIsSet(true);
        }
        if (incoming.get(1)) {
          struct.delay = new Clock();
          struct.delay.read(iprot);
          struct.setDelayIsSet(true);
        }
      }
    }

  }

  public static class can_advance_time_result implements org.apache.thrift.TBase<can_advance_time_result, can_advance_time_result._Fields>, java.io.Serializable, Cloneable, Comparable<can_advance_time_result>   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("can_advance_time_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 ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("error", org.apache.thrift.protocol.TType.STRUCT, (short)1);
    private static final org.apache.thrift.protocol.TField STATE_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("state_error", 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 can_advance_time_resultStandardSchemeFactory());
      schemes.put(TupleScheme.class, new can_advance_time_resultTupleSchemeFactory());
    }

    public boolean success; // required
    public Error error; // required
    public StateNotFound state_error; // 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"),
      ERROR((short)1, "error"),
      STATE_ERROR((short)2, "state_error");

      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: // ERROR
            return ERROR;
          case 2: // STATE_ERROR
            return STATE_ERROR;
          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.ERROR, new org.apache.thrift.meta_data.FieldMetaData("error", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      tmpMap.put(_Fields.STATE_ERROR, new org.apache.thrift.meta_data.FieldMetaData("state_error", 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(can_advance_time_result.class, metaDataMap);
    }

    public can_advance_time_result() {
    }

    public can_advance_time_result(
      boolean success,
      Error error,
      StateNotFound state_error)
    {
      this();
      this.success = success;
      setSuccessIsSet(true);
      this.error = error;
      this.state_error = state_error;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public can_advance_time_result(can_advance_time_result other) {
      __isset_bitfield = other.__isset_bitfield;
      this.success = other.success;
      if (other.isSetError()) {
        this.error = new Error(other.error);
      }
      if (other.isSetState_error()) {
        this.state_error = new StateNotFound(other.state_error);
      }
    }

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

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

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

    public can_advance_time_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 Error getError() {
      return this.error;
    }

    public can_advance_time_result setError(Error error) {
      this.error = error;
      return this;
    }

    public void unsetError() {
      this.error = null;
    }

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

    public void setErrorIsSet(boolean value) {
      if (!value) {
        this.error = null;
      }
    }

    public StateNotFound getState_error() {
      return this.state_error;
    }

    public can_advance_time_result setState_error(StateNotFound state_error) {
      this.state_error = state_error;
      return this;
    }

    public void unsetState_error() {
      this.state_error = null;
    }

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

    public void setState_errorIsSet(boolean value) {
      if (!value) {
        this.state_error = null;
      }
    }

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

      case ERROR:
        if (value == null) {
          unsetError();
        } else {
          setError((Error)value);
        }
        break;

      case STATE_ERROR:
        if (value == null) {
          unsetState_error();
        } else {
          setState_error((StateNotFound)value);
        }
        break;

      }
    }

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

      case ERROR:
        return getError();

      case STATE_ERROR:
        return getState_error();

      }
      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 ERROR:
        return isSetError();
      case STATE_ERROR:
        return isSetState_error();
      }
      throw new IllegalStateException();
    }

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

    public boolean equals(can_advance_time_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_error = true && this.isSetError();
      boolean that_present_error = true && that.isSetError();
      if (this_present_error || that_present_error) {
        if (!(this_present_error && that_present_error))
          return false;
        if (!this.error.equals(that.error))
          return false;
      }

      boolean this_present_state_error = true && this.isSetState_error();
      boolean that_present_state_error = true && that.isSetState_error();
      if (this_present_state_error || that_present_state_error) {
        if (!(this_present_state_error && that_present_state_error))
          return false;
        if (!this.state_error.equals(that.state_error))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      List<Object> list = new ArrayList<Object>();

      boolean present_success = true;
      list.add(present_success);
      if (present_success)
        list.add(success);

      boolean present_error = true && (isSetError());
      list.add(present_error);
      if (present_error)
        list.add(error);

      boolean present_state_error = true && (isSetState_error());
      list.add(present_state_error);
      if (present_state_error)
        list.add(state_error);

      return list.hashCode();
    }

    @Override
    public int compareTo(can_advance_time_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(isSetError()).compareTo(other.isSetError());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetError()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.error, other.error);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetState_error()).compareTo(other.isSetState_error());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetState_error()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.state_error, other.state_error);
        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("can_advance_time_result(");
      boolean first = true;

      sb.append("success:");
      sb.append(this.success);
      first = false;
      if (!first) sb.append(", ");
      sb.append("error:");
      if (this.error == null) {
        sb.append("null");
      } else {
        sb.append(this.error);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("state_error:");
      if (this.state_error == null) {
        sb.append("null");
      } else {
        sb.append(this.state_error);
      }
      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 can_advance_time_resultStandardSchemeFactory implements SchemeFactory {
      public can_advance_time_resultStandardScheme getScheme() {
        return new can_advance_time_resultStandardScheme();
      }
    }

    private static class can_advance_time_resultStandardScheme extends StandardScheme<can_advance_time_result> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, can_advance_time_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: // ERROR
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.error = new Error();
                struct.error.read(iprot);
                struct.setErrorIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // STATE_ERROR
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.state_error = new StateNotFound();
                struct.state_error.read(iprot);
                struct.setState_errorIsSet(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, can_advance_time_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.error != null) {
          oprot.writeFieldBegin(ERROR_FIELD_DESC);
          struct.error.write(oprot);
          oprot.writeFieldEnd();
        }
        if (struct.state_error != null) {
          oprot.writeFieldBegin(STATE_ERROR_FIELD_DESC);
          struct.state_error.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class can_advance_time_resultTupleSchemeFactory implements SchemeFactory {
      public can_advance_time_resultTupleScheme getScheme() {
        return new can_advance_time_resultTupleScheme();
      }
    }

    private static class can_advance_time_resultTupleScheme extends TupleScheme<can_advance_time_result> {

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

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, can_advance_time_result struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(3);
        if (incoming.get(0)) {
          struct.success = iprot.readBool();
          struct.setSuccessIsSet(true);
        }
        if (incoming.get(1)) {
          struct.error = new Error();
          struct.error.read(iprot);
          struct.setErrorIsSet(true);
        }
        if (incoming.get(2)) {
          struct.state_error = new StateNotFound();
          struct.state_error.read(iprot);
          struct.setState_errorIsSet(true);
        }
      }
    }

  }

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

    private static final org.apache.thrift.protocol.TField SID_FIELD_DESC = new org.apache.thrift.protocol.TField("sid", org.apache.thrift.protocol.TType.I64, (short)1);
    private static final org.apache.thrift.protocol.TField DELAY_FIELD_DESC = new org.apache.thrift.protocol.TField("delay", 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 advance_time_argsStandardSchemeFactory());
      schemes.put(TupleScheme.class, new advance_time_argsTupleSchemeFactory());
    }

    public long sid; // required
    public Clock delay; // 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 {
      SID((short)1, "sid"),
      DELAY((short)2, "delay");

      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: // SID
            return SID;
          case 2: // DELAY
            return DELAY;
          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 __SID_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.SID, new org.apache.thrift.meta_data.FieldMetaData("sid", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64          , "state_id")));
      tmpMap.put(_Fields.DELAY, new org.apache.thrift.meta_data.FieldMetaData("delay", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Clock.class)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(advance_time_args.class, metaDataMap);
    }

    public advance_time_args() {
    }

    public advance_time_args(
      long sid,
      Clock delay)
    {
      this();
      this.sid = sid;
      setSidIsSet(true);
      this.delay = delay;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public advance_time_args(advance_time_args other) {
      __isset_bitfield = other.__isset_bitfield;
      this.sid = other.sid;
      if (other.isSetDelay()) {
        this.delay = new Clock(other.delay);
      }
    }

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

    @Override
    public void clear() {
      setSidIsSet(false);
      this.sid = 0;
      this.delay = null;
    }

    public long getSid() {
      return this.sid;
    }

    public advance_time_args setSid(long sid) {
      this.sid = sid;
      setSidIsSet(true);
      return this;
    }

    public void unsetSid() {
      __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SID_ISSET_ID);
    }

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

    public void setSidIsSet(boolean value) {
      __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SID_ISSET_ID, value);
    }

    public Clock getDelay() {
      return this.delay;
    }

    public advance_time_args setDelay(Clock delay) {
      this.delay = delay;
      return this;
    }

    public void unsetDelay() {
      this.delay = null;
    }

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

    public void setDelayIsSet(boolean value) {
      if (!value) {
        this.delay = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SID:
        if (value == null) {
          unsetSid();
        } else {
          setSid((Long)value);
        }
        break;

      case DELAY:
        if (value == null) {
          unsetDelay();
        } else {
          setDelay((Clock)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SID:
        return Long.valueOf(getSid());

      case DELAY:
        return getDelay();

      }
      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 SID:
        return isSetSid();
      case DELAY:
        return isSetDelay();
      }
      throw new IllegalStateException();
    }

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

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

      boolean this_present_sid = true;
      boolean that_present_sid = true;
      if (this_present_sid || that_present_sid) {
        if (!(this_present_sid && that_present_sid))
          return false;
        if (this.sid != that.sid)
          return false;
      }

      boolean this_present_delay = true && this.isSetDelay();
      boolean that_present_delay = true && that.isSetDelay();
      if (this_present_delay || that_present_delay) {
        if (!(this_present_delay && that_present_delay))
          return false;
        if (!this.delay.equals(that.delay))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      List<Object> list = new ArrayList<Object>();

      boolean present_sid = true;
      list.add(present_sid);
      if (present_sid)
        list.add(sid);

      boolean present_delay = true && (isSetDelay());
      list.add(present_delay);
      if (present_delay)
        list.add(delay);

      return list.hashCode();
    }

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

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetSid()).compareTo(other.isSetSid());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSid()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sid, other.sid);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetDelay()).compareTo(other.isSetDelay());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetDelay()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.delay, other.delay);
        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("advance_time_args(");
      boolean first = true;

      sb.append("sid:");
      sb.append(this.sid);
      first = false;
      if (!first) sb.append(", ");
      sb.append("delay:");
      if (this.delay == null) {
        sb.append("null");
      } else {
        sb.append(this.delay);
      }
      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 (delay != null) {
        delay.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 advance_time_argsStandardSchemeFactory implements SchemeFactory {
      public advance_time_argsStandardScheme getScheme() {
        return new advance_time_argsStandardScheme();
      }
    }

    private static class advance_time_argsStandardScheme extends StandardScheme<advance_time_args> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, advance_time_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: // SID
              if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
                struct.sid = iprot.readI64();
                struct.setSidIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // DELAY
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.delay = new Clock();
                struct.delay.read(iprot);
                struct.setDelayIsSet(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, advance_time_args struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        oprot.writeFieldBegin(SID_FIELD_DESC);
        oprot.writeI64(struct.sid);
        oprot.writeFieldEnd();
        if (struct.delay != null) {
          oprot.writeFieldBegin(DELAY_FIELD_DESC);
          struct.delay.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class advance_time_argsTupleSchemeFactory implements SchemeFactory {
      public advance_time_argsTupleScheme getScheme() {
        return new advance_time_argsTupleScheme();
      }
    }

    private static class advance_time_argsTupleScheme extends TupleScheme<advance_time_args> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, advance_time_args struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetSid()) {
          optionals.set(0);
        }
        if (struct.isSetDelay()) {
          optionals.set(1);
        }
        oprot.writeBitSet(optionals, 2);
        if (struct.isSetSid()) {
          oprot.writeI64(struct.sid);
        }
        if (struct.isSetDelay()) {
          struct.delay.write(oprot);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, advance_time_args struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(2);
        if (incoming.get(0)) {
          struct.sid = iprot.readI64();
          struct.setSidIsSet(true);
        }
        if (incoming.get(1)) {
          struct.delay = new Clock();
          struct.delay.read(iprot);
          struct.setDelayIsSet(true);
        }
      }
    }

  }

  public static class advance_time_result implements org.apache.thrift.TBase<advance_time_result, advance_time_result._Fields>, java.io.Serializable, Cloneable, Comparable<advance_time_result>   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("advance_time_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 ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("error", org.apache.thrift.protocol.TType.STRUCT, (short)1);
    private static final org.apache.thrift.protocol.TField STATE_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("state_error", org.apache.thrift.protocol.TType.STRUCT, (short)2);
    private static final org.apache.thrift.protocol.TField DELAY_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("delay_error", org.apache.thrift.protocol.TType.STRUCT, (short)3);

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

    public TTSState success; // required
    public Error error; // required
    public StateNotFound state_error; // required
    public InvalidDelay delay_error; // 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"),
      ERROR((short)1, "error"),
      STATE_ERROR((short)2, "state_error"),
      DELAY_ERROR((short)3, "delay_error");

      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: // ERROR
            return ERROR;
          case 2: // STATE_ERROR
            return STATE_ERROR;
          case 3: // DELAY_ERROR
            return DELAY_ERROR;
          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, TTSState.class)));
      tmpMap.put(_Fields.ERROR, new org.apache.thrift.meta_data.FieldMetaData("error", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      tmpMap.put(_Fields.STATE_ERROR, new org.apache.thrift.meta_data.FieldMetaData("state_error", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      tmpMap.put(_Fields.DELAY_ERROR, new org.apache.thrift.meta_data.FieldMetaData("delay_error", 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(advance_time_result.class, metaDataMap);
    }

    public advance_time_result() {
    }

    public advance_time_result(
      TTSState success,
      Error error,
      StateNotFound state_error,
      InvalidDelay delay_error)
    {
      this();
      this.success = success;
      this.error = error;
      this.state_error = state_error;
      this.delay_error = delay_error;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public advance_time_result(advance_time_result other) {
      if (other.isSetSuccess()) {
        this.success = new TTSState(other.success);
      }
      if (other.isSetError()) {
        this.error = new Error(other.error);
      }
      if (other.isSetState_error()) {
        this.state_error = new StateNotFound(other.state_error);
      }
      if (other.isSetDelay_error()) {
        this.delay_error = new InvalidDelay(other.delay_error);
      }
    }

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

    @Override
    public void clear() {
      this.success = null;
      this.error = null;
      this.state_error = null;
      this.delay_error = null;
    }

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

    public advance_time_result setSuccess(TTSState 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 Error getError() {
      return this.error;
    }

    public advance_time_result setError(Error error) {
      this.error = error;
      return this;
    }

    public void unsetError() {
      this.error = null;
    }

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

    public void setErrorIsSet(boolean value) {
      if (!value) {
        this.error = null;
      }
    }

    public StateNotFound getState_error() {
      return this.state_error;
    }

    public advance_time_result setState_error(StateNotFound state_error) {
      this.state_error = state_error;
      return this;
    }

    public void unsetState_error() {
      this.state_error = null;
    }

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

    public void setState_errorIsSet(boolean value) {
      if (!value) {
        this.state_error = null;
      }
    }

    public InvalidDelay getDelay_error() {
      return this.delay_error;
    }

    public advance_time_result setDelay_error(InvalidDelay delay_error) {
      this.delay_error = delay_error;
      return this;
    }

    public void unsetDelay_error() {
      this.delay_error = null;
    }

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

    public void setDelay_errorIsSet(boolean value) {
      if (!value) {
        this.delay_error = null;
      }
    }

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

      case ERROR:
        if (value == null) {
          unsetError();
        } else {
          setError((Error)value);
        }
        break;

      case STATE_ERROR:
        if (value == null) {
          unsetState_error();
        } else {
          setState_error((StateNotFound)value);
        }
        break;

      case DELAY_ERROR:
        if (value == null) {
          unsetDelay_error();
        } else {
          setDelay_error((InvalidDelay)value);
        }
        break;

      }
    }

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

      case ERROR:
        return getError();

      case STATE_ERROR:
        return getState_error();

      case DELAY_ERROR:
        return getDelay_error();

      }
      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 ERROR:
        return isSetError();
      case STATE_ERROR:
        return isSetState_error();
      case DELAY_ERROR:
        return isSetDelay_error();
      }
      throw new IllegalStateException();
    }

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

    public boolean equals(advance_time_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_error = true && this.isSetError();
      boolean that_present_error = true && that.isSetError();
      if (this_present_error || that_present_error) {
        if (!(this_present_error && that_present_error))
          return false;
        if (!this.error.equals(that.error))
          return false;
      }

      boolean this_present_state_error = true && this.isSetState_error();
      boolean that_present_state_error = true && that.isSetState_error();
      if (this_present_state_error || that_present_state_error) {
        if (!(this_present_state_error && that_present_state_error))
          return false;
        if (!this.state_error.equals(that.state_error))
          return false;
      }

      boolean this_present_delay_error = true && this.isSetDelay_error();
      boolean that_present_delay_error = true && that.isSetDelay_error();
      if (this_present_delay_error || that_present_delay_error) {
        if (!(this_present_delay_error && that_present_delay_error))
          return false;
        if (!this.delay_error.equals(that.delay_error))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      List<Object> list = new ArrayList<Object>();

      boolean present_success = true && (isSetSuccess());
      list.add(present_success);
      if (present_success)
        list.add(success);

      boolean present_error = true && (isSetError());
      list.add(present_error);
      if (present_error)
        list.add(error);

      boolean present_state_error = true && (isSetState_error());
      list.add(present_state_error);
      if (present_state_error)
        list.add(state_error);

      boolean present_delay_error = true && (isSetDelay_error());
      list.add(present_delay_error);
      if (present_delay_error)
        list.add(delay_error);

      return list.hashCode();
    }

    @Override
    public int compareTo(advance_time_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(isSetError()).compareTo(other.isSetError());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetError()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.error, other.error);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetState_error()).compareTo(other.isSetState_error());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetState_error()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.state_error, other.state_error);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetDelay_error()).compareTo(other.isSetDelay_error());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetDelay_error()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.delay_error, other.delay_error);
        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("advance_time_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("error:");
      if (this.error == null) {
        sb.append("null");
      } else {
        sb.append(this.error);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("state_error:");
      if (this.state_error == null) {
        sb.append("null");
      } else {
        sb.append(this.state_error);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("delay_error:");
      if (this.delay_error == null) {
        sb.append("null");
      } else {
        sb.append(this.delay_error);
      }
      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 advance_time_resultStandardSchemeFactory implements SchemeFactory {
      public advance_time_resultStandardScheme getScheme() {
        return new advance_time_resultStandardScheme();
      }
    }

    private static class advance_time_resultStandardScheme extends StandardScheme<advance_time_result> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, advance_time_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 TTSState();
                struct.success.read(iprot);
                struct.setSuccessIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 1: // ERROR
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.error = new Error();
                struct.error.read(iprot);
                struct.setErrorIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // STATE_ERROR
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.state_error = new StateNotFound();
                struct.state_error.read(iprot);
                struct.setState_errorIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 3: // DELAY_ERROR
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.delay_error = new InvalidDelay();
                struct.delay_error.read(iprot);
                struct.setDelay_errorIsSet(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, advance_time_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.error != null) {
          oprot.writeFieldBegin(ERROR_FIELD_DESC);
          struct.error.write(oprot);
          oprot.writeFieldEnd();
        }
        if (struct.state_error != null) {
          oprot.writeFieldBegin(STATE_ERROR_FIELD_DESC);
          struct.state_error.write(oprot);
          oprot.writeFieldEnd();
        }
        if (struct.delay_error != null) {
          oprot.writeFieldBegin(DELAY_ERROR_FIELD_DESC);
          struct.delay_error.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class advance_time_resultTupleSchemeFactory implements SchemeFactory {
      public advance_time_resultTupleScheme getScheme() {
        return new advance_time_resultTupleScheme();
      }
    }

    private static class advance_time_resultTupleScheme extends TupleScheme<advance_time_result> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, advance_time_result struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetSuccess()) {
          optionals.set(0);
        }
        if (struct.isSetError()) {
          optionals.set(1);
        }
        if (struct.isSetState_error()) {
          optionals.set(2);
        }
        if (struct.isSetDelay_error()) {
          optionals.set(3);
        }
        oprot.writeBitSet(optionals, 4);
        if (struct.isSetSuccess()) {
          struct.success.write(oprot);
        }
        if (struct.isSetError()) {
          struct.error.write(oprot);
        }
        if (struct.isSetState_error()) {
          struct.state_error.write(oprot);
        }
        if (struct.isSetDelay_error()) {
          struct.delay_error.write(oprot);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, advance_time_result struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(4);
        if (incoming.get(0)) {
          struct.success = new TTSState();
          struct.success.read(iprot);
          struct.setSuccessIsSet(true);
        }
        if (incoming.get(1)) {
          struct.error = new Error();
          struct.error.read(iprot);
          struct.setErrorIsSet(true);
        }
        if (incoming.get(2)) {
          struct.state_error = new StateNotFound();
          struct.state_error.read(iprot);
          struct.setState_errorIsSet(true);
        }
        if (incoming.get(3)) {
          struct.delay_error = new InvalidDelay();
          struct.delay_error.read(iprot);
          struct.setDelay_errorIsSet(true);
        }
      }
    }

  }

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

    private static final org.apache.thrift.protocol.TField SIDS_FIELD_DESC = new org.apache.thrift.protocol.TField("sids", org.apache.thrift.protocol.TType.LIST, (short)1);

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

    public List<Long> sids; // 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 {
      SIDS((short)1, "sids");

      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: // SIDS
            return SIDS;
          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.SIDS, new org.apache.thrift.meta_data.FieldMetaData("sids", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
              new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64              , "state_id"))));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(discard_args.class, metaDataMap);
    }

    public discard_args() {
    }

    public discard_args(
      List<Long> sids)
    {
      this();
      this.sids = sids;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public discard_args(discard_args other) {
      if (other.isSetSids()) {
        List<Long> __this__sids = new ArrayList<Long>(other.sids.size());
        for (Long other_element : other.sids) {
          __this__sids.add(other_element);
        }
        this.sids = __this__sids;
      }
    }

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

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

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

    public java.util.Iterator<Long> getSidsIterator() {
      return (this.sids == null) ? null : this.sids.iterator();
    }

    public void addToSids(long elem) {
      if (this.sids == null) {
        this.sids = new ArrayList<Long>();
      }
      this.sids.add(elem);
    }

    public List<Long> getSids() {
      return this.sids;
    }

    public discard_args setSids(List<Long> sids) {
      this.sids = sids;
      return this;
    }

    public void unsetSids() {
      this.sids = null;
    }

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

    public void setSidsIsSet(boolean value) {
      if (!value) {
        this.sids = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SIDS:
        if (value == null) {
          unsetSids();
        } else {
          setSids((List<Long>)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SIDS:
        return getSids();

      }
      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 SIDS:
        return isSetSids();
      }
      throw new IllegalStateException();
    }

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

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

      boolean this_present_sids = true && this.isSetSids();
      boolean that_present_sids = true && that.isSetSids();
      if (this_present_sids || that_present_sids) {
        if (!(this_present_sids && that_present_sids))
          return false;
        if (!this.sids.equals(that.sids))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      List<Object> list = new ArrayList<Object>();

      boolean present_sids = true && (isSetSids());
      list.add(present_sids);
      if (present_sids)
        list.add(sids);

      return list.hashCode();
    }

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

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetSids()).compareTo(other.isSetSids());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSids()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sids, other.sids);
        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("discard_args(");
      boolean first = true;

      sb.append("sids:");
      if (this.sids == null) {
        sb.append("null");
      } else {
        sb.append(this.sids);
      }
      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 discard_argsStandardSchemeFactory implements SchemeFactory {
      public discard_argsStandardScheme getScheme() {
        return new discard_argsStandardScheme();
      }
    }

    private static class discard_argsStandardScheme extends StandardScheme<discard_args> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, discard_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: // SIDS
              if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
                {
                  org.apache.thrift.protocol.TList _list50 = iprot.readListBegin();
                  struct.sids = new ArrayList<Long>(_list50.size);
                  long _elem51;
                  for (int _i52 = 0; _i52 < _list50.size; ++_i52)
                  {
                    _elem51 = iprot.readI64();
                    struct.sids.add(_elem51);
                  }
                  iprot.readListEnd();
                }
                struct.setSidsIsSet(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, discard_args struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.sids != null) {
          oprot.writeFieldBegin(SIDS_FIELD_DESC);
          {
            oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, struct.sids.size()));
            for (long _iter53 : struct.sids)
            {
              oprot.writeI64(_iter53);
            }
            oprot.writeListEnd();
          }
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class discard_argsTupleSchemeFactory implements SchemeFactory {
      public discard_argsTupleScheme getScheme() {
        return new discard_argsTupleScheme();
      }
    }

    private static class discard_argsTupleScheme extends TupleScheme<discard_args> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, discard_args struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetSids()) {
          optionals.set(0);
        }
        oprot.writeBitSet(optionals, 1);
        if (struct.isSetSids()) {
          {
            oprot.writeI32(struct.sids.size());
            for (long _iter54 : struct.sids)
            {
              oprot.writeI64(_iter54);
            }
          }
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, discard_args struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(1);
        if (incoming.get(0)) {
          {
            org.apache.thrift.protocol.TList _list55 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, iprot.readI32());
            struct.sids = new ArrayList<Long>(_list55.size);
            long _elem56;
            for (int _i57 = 0; _i57 < _list55.size; ++_i57)
            {
              _elem56 = iprot.readI64();
              struct.sids.add(_elem56);
            }
          }
          struct.setSidsIsSet(true);
        }
      }
    }

  }

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


    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
    static {
      schemes.put(StandardScheme.class, new discard_resultStandardSchemeFactory());
      schemes.put(TupleScheme.class, new discard_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(discard_result.class, metaDataMap);
    }

    public discard_result() {
    }

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

    public discard_result deepCopy() {
      return new discard_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 discard_result)
        return this.equals((discard_result)that);
      return false;
    }

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

      return true;
    }

    @Override
    public int hashCode() {
      List<Object> list = new ArrayList<Object>();

      return list.hashCode();
    }

    @Override
    public int compareTo(discard_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("discard_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 discard_resultStandardSchemeFactory implements SchemeFactory {
      public discard_resultStandardScheme getScheme() {
        return new discard_resultStandardScheme();
      }
    }

    private static class discard_resultStandardScheme extends StandardScheme<discard_result> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, discard_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, discard_result struct) throws org.apache.thrift.TException {
        struct.validate();

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

    }

    private static class discard_resultTupleSchemeFactory implements SchemeFactory {
      public discard_resultTupleScheme getScheme() {
        return new discard_resultTupleScheme();
      }
    }

    private static class discard_resultTupleScheme extends TupleScheme<discard_result> {

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

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

  }

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

    private static final org.apache.thrift.protocol.TField SIDS_FIELD_DESC = new org.apache.thrift.protocol.TField("sids", org.apache.thrift.protocol.TType.LIST, (short)1);

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

    public List<Long> sids; // 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 {
      SIDS((short)1, "sids");

      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: // SIDS
            return SIDS;
          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.SIDS, new org.apache.thrift.meta_data.FieldMetaData("sids", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
              new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64              , "state_id"))));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(discard_all_except_args.class, metaDataMap);
    }

    public discard_all_except_args() {
    }

    public discard_all_except_args(
      List<Long> sids)
    {
      this();
      this.sids = sids;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public discard_all_except_args(discard_all_except_args other) {
      if (other.isSetSids()) {
        List<Long> __this__sids = new ArrayList<Long>(other.sids.size());
        for (Long other_element : other.sids) {
          __this__sids.add(other_element);
        }
        this.sids = __this__sids;
      }
    }

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

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

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

    public java.util.Iterator<Long> getSidsIterator() {
      return (this.sids == null) ? null : this.sids.iterator();
    }

    public void addToSids(long elem) {
      if (this.sids == null) {
        this.sids = new ArrayList<Long>();
      }
      this.sids.add(elem);
    }

    public List<Long> getSids() {
      return this.sids;
    }

    public discard_all_except_args setSids(List<Long> sids) {
      this.sids = sids;
      return this;
    }

    public void unsetSids() {
      this.sids = null;
    }

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

    public void setSidsIsSet(boolean value) {
      if (!value) {
        this.sids = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SIDS:
        if (value == null) {
          unsetSids();
        } else {
          setSids((List<Long>)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SIDS:
        return getSids();

      }
      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 SIDS:
        return isSetSids();
      }
      throw new IllegalStateException();
    }

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

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

      boolean this_present_sids = true && this.isSetSids();
      boolean that_present_sids = true && that.isSetSids();
      if (this_present_sids || that_present_sids) {
        if (!(this_present_sids && that_present_sids))
          return false;
        if (!this.sids.equals(that.sids))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      List<Object> list = new ArrayList<Object>();

      boolean present_sids = true && (isSetSids());
      list.add(present_sids);
      if (present_sids)
        list.add(sids);

      return list.hashCode();
    }

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

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetSids()).compareTo(other.isSetSids());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSids()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sids, other.sids);
        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("discard_all_except_args(");
      boolean first = true;

      sb.append("sids:");
      if (this.sids == null) {
        sb.append("null");
      } else {
        sb.append(this.sids);
      }
      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 discard_all_except_argsStandardSchemeFactory implements SchemeFactory {
      public discard_all_except_argsStandardScheme getScheme() {
        return new discard_all_except_argsStandardScheme();
      }
    }

    private static class discard_all_except_argsStandardScheme extends StandardScheme<discard_all_except_args> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, discard_all_except_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: // SIDS
              if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
                {
                  org.apache.thrift.protocol.TList _list58 = iprot.readListBegin();
                  struct.sids = new ArrayList<Long>(_list58.size);
                  long _elem59;
                  for (int _i60 = 0; _i60 < _list58.size; ++_i60)
                  {
                    _elem59 = iprot.readI64();
                    struct.sids.add(_elem59);
                  }
                  iprot.readListEnd();
                }
                struct.setSidsIsSet(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, discard_all_except_args struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.sids != null) {
          oprot.writeFieldBegin(SIDS_FIELD_DESC);
          {
            oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, struct.sids.size()));
            for (long _iter61 : struct.sids)
            {
              oprot.writeI64(_iter61);
            }
            oprot.writeListEnd();
          }
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class discard_all_except_argsTupleSchemeFactory implements SchemeFactory {
      public discard_all_except_argsTupleScheme getScheme() {
        return new discard_all_except_argsTupleScheme();
      }
    }

    private static class discard_all_except_argsTupleScheme extends TupleScheme<discard_all_except_args> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, discard_all_except_args struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetSids()) {
          optionals.set(0);
        }
        oprot.writeBitSet(optionals, 1);
        if (struct.isSetSids()) {
          {
            oprot.writeI32(struct.sids.size());
            for (long _iter62 : struct.sids)
            {
              oprot.writeI64(_iter62);
            }
          }
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, discard_all_except_args struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(1);
        if (incoming.get(0)) {
          {
            org.apache.thrift.protocol.TList _list63 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, iprot.readI32());
            struct.sids = new ArrayList<Long>(_list63.size);
            long _elem64;
            for (int _i65 = 0; _i65 < _list63.size; ++_i65)
            {
              _elem64 = iprot.readI64();
              struct.sids.add(_elem64);
            }
          }
          struct.setSidsIsSet(true);
        }
      }
    }

  }

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


    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
    static {
      schemes.put(StandardScheme.class, new discard_all_except_resultStandardSchemeFactory());
      schemes.put(TupleScheme.class, new discard_all_except_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(discard_all_except_result.class, metaDataMap);
    }

    public discard_all_except_result() {
    }

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

    public discard_all_except_result deepCopy() {
      return new discard_all_except_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 discard_all_except_result)
        return this.equals((discard_all_except_result)that);
      return false;
    }

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

      return true;
    }

    @Override
    public int hashCode() {
      List<Object> list = new ArrayList<Object>();

      return list.hashCode();
    }

    @Override
    public int compareTo(discard_all_except_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("discard_all_except_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 discard_all_except_resultStandardSchemeFactory implements SchemeFactory {
      public discard_all_except_resultStandardScheme getScheme() {
        return new discard_all_except_resultStandardScheme();
      }
    }

    private static class discard_all_except_resultStandardScheme extends StandardScheme<discard_all_except_result> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, discard_all_except_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, discard_all_except_result struct) throws org.apache.thrift.TException {
        struct.validate();

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

    }

    private static class discard_all_except_resultTupleSchemeFactory implements SchemeFactory {
      public discard_all_except_resultTupleScheme getScheme() {
        return new discard_all_except_resultTupleScheme();
      }
    }

    private static class discard_all_except_resultTupleScheme extends TupleScheme<discard_all_except_result> {

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

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

  }

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


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


    /** 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(shutdown_args.class, metaDataMap);
    }

    public shutdown_args() {
    }

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

    public shutdown_args deepCopy() {
      return new shutdown_args(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 shutdown_args)
        return this.equals((shutdown_args)that);
      return false;
    }

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

      return true;
    }

    @Override
    public int hashCode() {
      List<Object> list = new ArrayList<Object>();

      return list.hashCode();
    }

    @Override
    public int compareTo(shutdown_args 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("shutdown_args(");
      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 shutdown_argsStandardSchemeFactory implements SchemeFactory {
      public shutdown_argsStandardScheme getScheme() {
        return new shutdown_argsStandardScheme();
      }
    }

    private static class shutdown_argsStandardScheme extends StandardScheme<shutdown_args> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, shutdown_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) {
            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, shutdown_args struct) throws org.apache.thrift.TException {
        struct.validate();

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

    }

    private static class shutdown_argsTupleSchemeFactory implements SchemeFactory {
      public shutdown_argsTupleScheme getScheme() {
        return new shutdown_argsTupleScheme();
      }
    }

    private static class shutdown_argsTupleScheme extends TupleScheme<shutdown_args> {

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

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

  }

}
