All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.btnguyen2k.queueserver.thrift.TQueueService Maven / Gradle / Ivy

/**
 * Autogenerated by Thrift Compiler (0.9.1)
 *
 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
 *  @generated
 */
package com.github.btnguyen2k.queueserver.thrift;

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

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

public class TQueueService {

  public interface Iface {

    /**
     * "Ping" the server. This method is to test if server is reachable.
     */
    public void ping() throws org.apache.thrift.TException;

    /**
     * "Ping" the server. This method is to test if server is reachable.
     */
    public boolean ping2() throws org.apache.thrift.TException;

    /**
     * Checks if a queue exists.
     * 
     * @param _secret
     * @param _queueName
     * @return {@code status == 200} if queue exists, {@code status == 404} otherwise; {@code status == 500} means "exception/error on server"
     * 
     * @param _secret
     * @param _queueName
     */
    public TQueueResponse queueExists(String _secret, String _queueName) throws org.apache.thrift.TException;

    /**
     * Creates & Initializes a new queue.
     * 
     * @param _secret
     * @param _queueName
     * @return {@code status == 200} if successful; {@code status == 500} means "exception/error on server"
     * 
     * @param _secret
     * @param _queueName
     */
    public TQueueResponse initQueue(String _secret, String _queueName) throws org.apache.thrift.TException;

    /**
     * Puts a message to a queue.
     * 
     * @param _secret
     * @param _queueName
     * @param _message
     * @return {@code status == 200} if successful, {@code status == 404} if queue does not exist; {@code status == 500} means "exception/error on server"
     * 
     * @param _secret
     * @param _queueName
     * @param _message
     */
    public TQueueResponse queue(String _secret, String _queueName, TQueueMessage _message) throws org.apache.thrift.TException;

    /**
     * Re-queues a message.
     * 
     * @param _secret
     * @param _queueName
     * @param _message
     * @return {@code status == 200} if successful, {@code status == 404} if queue does not exist; {@code status == 500} means "exception/error on server"
     * 
     * @param _secret
     * @param _queueName
     * @param _message
     */
    public TQueueResponse requeue(String _secret, String _queueName, TQueueMessage _message) throws org.apache.thrift.TException;

    /**
     * Re-queues a message "silently".
     * 
     * @param _secret
     * @param _queueName
     * @param _message
     * @return {@code status == 200} if successful, {@code status == 404} if queue does not exist; {@code status == 500} means "exception/error on server"
     * 
     * @param _secret
     * @param _queueName
     * @param _message
     */
    public TQueueResponse requeueSilent(String _secret, String _queueName, TQueueMessage _message) throws org.apache.thrift.TException;

    /**
     * Called when finish processing the message to cleanup ephemeral storage.
     * 
     * @param _secret
     * @param _queueName
     * @param _message
     * @return {@code status == 200} if successful, {@code status == 404} if queue does not exist; {@code status == 500} means "exception/error on server"
     * 
     * @param _secret
     * @param _queueName
     * @param _message
     */
    public TQueueResponse finish(String _secret, String _queueName, TQueueMessage _message) throws org.apache.thrift.TException;

    /**
     * Takes a message from a queue.
     * 
     * @param _secret
     * @param _queueName
     * @return {@code status == 200} if successful, {@code status == 404} if queue does not exist; {@code status == 500} means "exception/error on server"
     * 
     * @param _secret
     * @param _queueName
     */
    public TQueueResponse take(String _secret, String _queueName) throws org.apache.thrift.TException;

    /**
     * Gets number of items currently in a queue.
     * 
     * @param _secret
     * @param _queueName
     * @return {@code status == 200} if successful, {@code status == 404} if queue does not exist; {@code status == 500} means "exception/error on server"
     * 
     * @param _secret
     * @param _queueName
     */
    public TQueueSizeResponse queueSize(String _secret, String _queueName) throws org.apache.thrift.TException;

    /**
     * Gets number of items currently in a queue's ephemeral storage.
     * 
     * @param _secret
     * @param _queueName
     * @return {@code status == 200} if successful, {@code status == 404} if queue does not exist; {@code status == 500} means "exception/error on server"
     * 
     * @param _secret
     * @param _queueName
     */
    public TQueueSizeResponse ephemeralSize(String _secret, String _queueName) throws org.apache.thrift.TException;

  }

  public interface AsyncIface {

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

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

    public void queueExists(String _secret, String _queueName, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void initQueue(String _secret, String _queueName, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void queue(String _secret, String _queueName, TQueueMessage _message, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void requeue(String _secret, String _queueName, TQueueMessage _message, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void requeueSilent(String _secret, String _queueName, TQueueMessage _message, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void finish(String _secret, String _queueName, TQueueMessage _message, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void take(String _secret, String _queueName, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void queueSize(String _secret, String _queueName, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void ephemeralSize(String _secret, String _queueName, 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 {
      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 void ping() throws org.apache.thrift.TException
    {
      send_ping();
    }

    public void send_ping() throws org.apache.thrift.TException
    {
      ping_args args = new ping_args();
      sendBase("ping", args);
    }

    public boolean ping2() throws org.apache.thrift.TException
    {
      send_ping2();
      return recv_ping2();
    }

    public void send_ping2() throws org.apache.thrift.TException
    {
      ping2_args args = new ping2_args();
      sendBase("ping2", args);
    }

    public boolean recv_ping2() throws org.apache.thrift.TException
    {
      ping2_result result = new ping2_result();
      receiveBase(result, "ping2");
      if (result.isSetSuccess()) {
        return result.success;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "ping2 failed: unknown result");
    }

    public TQueueResponse queueExists(String _secret, String _queueName) throws org.apache.thrift.TException
    {
      send_queueExists(_secret, _queueName);
      return recv_queueExists();
    }

    public void send_queueExists(String _secret, String _queueName) throws org.apache.thrift.TException
    {
      queueExists_args args = new queueExists_args();
      args.set_secret(_secret);
      args.set_queueName(_queueName);
      sendBase("queueExists", args);
    }

    public TQueueResponse recv_queueExists() throws org.apache.thrift.TException
    {
      queueExists_result result = new queueExists_result();
      receiveBase(result, "queueExists");
      if (result.isSetSuccess()) {
        return result.success;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "queueExists failed: unknown result");
    }

    public TQueueResponse initQueue(String _secret, String _queueName) throws org.apache.thrift.TException
    {
      send_initQueue(_secret, _queueName);
      return recv_initQueue();
    }

    public void send_initQueue(String _secret, String _queueName) throws org.apache.thrift.TException
    {
      initQueue_args args = new initQueue_args();
      args.set_secret(_secret);
      args.set_queueName(_queueName);
      sendBase("initQueue", args);
    }

    public TQueueResponse recv_initQueue() throws org.apache.thrift.TException
    {
      initQueue_result result = new initQueue_result();
      receiveBase(result, "initQueue");
      if (result.isSetSuccess()) {
        return result.success;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "initQueue failed: unknown result");
    }

    public TQueueResponse queue(String _secret, String _queueName, TQueueMessage _message) throws org.apache.thrift.TException
    {
      send_queue(_secret, _queueName, _message);
      return recv_queue();
    }

    public void send_queue(String _secret, String _queueName, TQueueMessage _message) throws org.apache.thrift.TException
    {
      queue_args args = new queue_args();
      args.set_secret(_secret);
      args.set_queueName(_queueName);
      args.set_message(_message);
      sendBase("queue", args);
    }

    public TQueueResponse recv_queue() throws org.apache.thrift.TException
    {
      queue_result result = new queue_result();
      receiveBase(result, "queue");
      if (result.isSetSuccess()) {
        return result.success;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "queue failed: unknown result");
    }

    public TQueueResponse requeue(String _secret, String _queueName, TQueueMessage _message) throws org.apache.thrift.TException
    {
      send_requeue(_secret, _queueName, _message);
      return recv_requeue();
    }

    public void send_requeue(String _secret, String _queueName, TQueueMessage _message) throws org.apache.thrift.TException
    {
      requeue_args args = new requeue_args();
      args.set_secret(_secret);
      args.set_queueName(_queueName);
      args.set_message(_message);
      sendBase("requeue", args);
    }

    public TQueueResponse recv_requeue() throws org.apache.thrift.TException
    {
      requeue_result result = new requeue_result();
      receiveBase(result, "requeue");
      if (result.isSetSuccess()) {
        return result.success;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "requeue failed: unknown result");
    }

    public TQueueResponse requeueSilent(String _secret, String _queueName, TQueueMessage _message) throws org.apache.thrift.TException
    {
      send_requeueSilent(_secret, _queueName, _message);
      return recv_requeueSilent();
    }

    public void send_requeueSilent(String _secret, String _queueName, TQueueMessage _message) throws org.apache.thrift.TException
    {
      requeueSilent_args args = new requeueSilent_args();
      args.set_secret(_secret);
      args.set_queueName(_queueName);
      args.set_message(_message);
      sendBase("requeueSilent", args);
    }

    public TQueueResponse recv_requeueSilent() throws org.apache.thrift.TException
    {
      requeueSilent_result result = new requeueSilent_result();
      receiveBase(result, "requeueSilent");
      if (result.isSetSuccess()) {
        return result.success;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "requeueSilent failed: unknown result");
    }

    public TQueueResponse finish(String _secret, String _queueName, TQueueMessage _message) throws org.apache.thrift.TException
    {
      send_finish(_secret, _queueName, _message);
      return recv_finish();
    }

    public void send_finish(String _secret, String _queueName, TQueueMessage _message) throws org.apache.thrift.TException
    {
      finish_args args = new finish_args();
      args.set_secret(_secret);
      args.set_queueName(_queueName);
      args.set_message(_message);
      sendBase("finish", args);
    }

    public TQueueResponse recv_finish() throws org.apache.thrift.TException
    {
      finish_result result = new finish_result();
      receiveBase(result, "finish");
      if (result.isSetSuccess()) {
        return result.success;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "finish failed: unknown result");
    }

    public TQueueResponse take(String _secret, String _queueName) throws org.apache.thrift.TException
    {
      send_take(_secret, _queueName);
      return recv_take();
    }

    public void send_take(String _secret, String _queueName) throws org.apache.thrift.TException
    {
      take_args args = new take_args();
      args.set_secret(_secret);
      args.set_queueName(_queueName);
      sendBase("take", args);
    }

    public TQueueResponse recv_take() throws org.apache.thrift.TException
    {
      take_result result = new take_result();
      receiveBase(result, "take");
      if (result.isSetSuccess()) {
        return result.success;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "take failed: unknown result");
    }

    public TQueueSizeResponse queueSize(String _secret, String _queueName) throws org.apache.thrift.TException
    {
      send_queueSize(_secret, _queueName);
      return recv_queueSize();
    }

    public void send_queueSize(String _secret, String _queueName) throws org.apache.thrift.TException
    {
      queueSize_args args = new queueSize_args();
      args.set_secret(_secret);
      args.set_queueName(_queueName);
      sendBase("queueSize", args);
    }

    public TQueueSizeResponse recv_queueSize() throws org.apache.thrift.TException
    {
      queueSize_result result = new queueSize_result();
      receiveBase(result, "queueSize");
      if (result.isSetSuccess()) {
        return result.success;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "queueSize failed: unknown result");
    }

    public TQueueSizeResponse ephemeralSize(String _secret, String _queueName) throws org.apache.thrift.TException
    {
      send_ephemeralSize(_secret, _queueName);
      return recv_ephemeralSize();
    }

    public void send_ephemeralSize(String _secret, String _queueName) throws org.apache.thrift.TException
    {
      ephemeralSize_args args = new ephemeralSize_args();
      args.set_secret(_secret);
      args.set_queueName(_queueName);
      sendBase("ephemeralSize", args);
    }

    public TQueueSizeResponse recv_ephemeralSize() throws org.apache.thrift.TException
    {
      ephemeralSize_result result = new ephemeralSize_result();
      receiveBase(result, "ephemeralSize");
      if (result.isSetSuccess()) {
        return result.success;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "ephemeralSize failed: unknown result");
    }

  }
  public static class AsyncClient extends org.apache.thrift.async.TAsyncClient implements AsyncIface {
    public static class Factory implements org.apache.thrift.async.TAsyncClientFactory {
      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 ping(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
      checkReady();
      ping_call method_call = new ping_call(resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class ping_call extends org.apache.thrift.async.TAsyncMethodCall {
      public ping_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("ping", org.apache.thrift.protocol.TMessageType.CALL, 0));
        ping_args args = new ping_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 void ping2(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
      checkReady();
      ping2_call method_call = new ping2_call(resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class ping2_call extends org.apache.thrift.async.TAsyncMethodCall {
      public ping2_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("ping2", org.apache.thrift.protocol.TMessageType.CALL, 0));
        ping2_args args = new ping2_args();
        args.write(prot);
        prot.writeMessageEnd();
      }

      public boolean 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);
        return (new Client(prot)).recv_ping2();
      }
    }

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

    public static class queueExists_call extends org.apache.thrift.async.TAsyncMethodCall {
      private String _secret;
      private String _queueName;
      public queueExists_call(String _secret, String _queueName, 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._secret = _secret;
        this._queueName = _queueName;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("queueExists", org.apache.thrift.protocol.TMessageType.CALL, 0));
        queueExists_args args = new queueExists_args();
        args.set_secret(_secret);
        args.set_queueName(_queueName);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public TQueueResponse 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);
        return (new Client(prot)).recv_queueExists();
      }
    }

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

    public static class initQueue_call extends org.apache.thrift.async.TAsyncMethodCall {
      private String _secret;
      private String _queueName;
      public initQueue_call(String _secret, String _queueName, 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._secret = _secret;
        this._queueName = _queueName;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("initQueue", org.apache.thrift.protocol.TMessageType.CALL, 0));
        initQueue_args args = new initQueue_args();
        args.set_secret(_secret);
        args.set_queueName(_queueName);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public TQueueResponse 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);
        return (new Client(prot)).recv_initQueue();
      }
    }

    public void queue(String _secret, String _queueName, TQueueMessage _message, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
      checkReady();
      queue_call method_call = new queue_call(_secret, _queueName, _message, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class queue_call extends org.apache.thrift.async.TAsyncMethodCall {
      private String _secret;
      private String _queueName;
      private TQueueMessage _message;
      public queue_call(String _secret, String _queueName, TQueueMessage _message, 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._secret = _secret;
        this._queueName = _queueName;
        this._message = _message;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("queue", org.apache.thrift.protocol.TMessageType.CALL, 0));
        queue_args args = new queue_args();
        args.set_secret(_secret);
        args.set_queueName(_queueName);
        args.set_message(_message);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public TQueueResponse 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);
        return (new Client(prot)).recv_queue();
      }
    }

    public void requeue(String _secret, String _queueName, TQueueMessage _message, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
      checkReady();
      requeue_call method_call = new requeue_call(_secret, _queueName, _message, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class requeue_call extends org.apache.thrift.async.TAsyncMethodCall {
      private String _secret;
      private String _queueName;
      private TQueueMessage _message;
      public requeue_call(String _secret, String _queueName, TQueueMessage _message, 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._secret = _secret;
        this._queueName = _queueName;
        this._message = _message;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("requeue", org.apache.thrift.protocol.TMessageType.CALL, 0));
        requeue_args args = new requeue_args();
        args.set_secret(_secret);
        args.set_queueName(_queueName);
        args.set_message(_message);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public TQueueResponse 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);
        return (new Client(prot)).recv_requeue();
      }
    }

    public void requeueSilent(String _secret, String _queueName, TQueueMessage _message, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
      checkReady();
      requeueSilent_call method_call = new requeueSilent_call(_secret, _queueName, _message, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class requeueSilent_call extends org.apache.thrift.async.TAsyncMethodCall {
      private String _secret;
      private String _queueName;
      private TQueueMessage _message;
      public requeueSilent_call(String _secret, String _queueName, TQueueMessage _message, 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._secret = _secret;
        this._queueName = _queueName;
        this._message = _message;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("requeueSilent", org.apache.thrift.protocol.TMessageType.CALL, 0));
        requeueSilent_args args = new requeueSilent_args();
        args.set_secret(_secret);
        args.set_queueName(_queueName);
        args.set_message(_message);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public TQueueResponse 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);
        return (new Client(prot)).recv_requeueSilent();
      }
    }

    public void finish(String _secret, String _queueName, TQueueMessage _message, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
      checkReady();
      finish_call method_call = new finish_call(_secret, _queueName, _message, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class finish_call extends org.apache.thrift.async.TAsyncMethodCall {
      private String _secret;
      private String _queueName;
      private TQueueMessage _message;
      public finish_call(String _secret, String _queueName, TQueueMessage _message, 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._secret = _secret;
        this._queueName = _queueName;
        this._message = _message;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("finish", org.apache.thrift.protocol.TMessageType.CALL, 0));
        finish_args args = new finish_args();
        args.set_secret(_secret);
        args.set_queueName(_queueName);
        args.set_message(_message);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public TQueueResponse 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);
        return (new Client(prot)).recv_finish();
      }
    }

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

    public static class take_call extends org.apache.thrift.async.TAsyncMethodCall {
      private String _secret;
      private String _queueName;
      public take_call(String _secret, String _queueName, 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._secret = _secret;
        this._queueName = _queueName;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("take", org.apache.thrift.protocol.TMessageType.CALL, 0));
        take_args args = new take_args();
        args.set_secret(_secret);
        args.set_queueName(_queueName);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public TQueueResponse 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);
        return (new Client(prot)).recv_take();
      }
    }

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

    public static class queueSize_call extends org.apache.thrift.async.TAsyncMethodCall {
      private String _secret;
      private String _queueName;
      public queueSize_call(String _secret, String _queueName, 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._secret = _secret;
        this._queueName = _queueName;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("queueSize", org.apache.thrift.protocol.TMessageType.CALL, 0));
        queueSize_args args = new queueSize_args();
        args.set_secret(_secret);
        args.set_queueName(_queueName);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public TQueueSizeResponse 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);
        return (new Client(prot)).recv_queueSize();
      }
    }

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

    public static class ephemeralSize_call extends org.apache.thrift.async.TAsyncMethodCall {
      private String _secret;
      private String _queueName;
      public ephemeralSize_call(String _secret, String _queueName, 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._secret = _secret;
        this._queueName = _queueName;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("ephemeralSize", org.apache.thrift.protocol.TMessageType.CALL, 0));
        ephemeralSize_args args = new ephemeralSize_args();
        args.set_secret(_secret);
        args.set_queueName(_queueName);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public TQueueSizeResponse 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);
        return (new Client(prot)).recv_ephemeralSize();
      }
    }

  }

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

    protected Processor(I iface, Map> processMap) {
      super(iface, getProcessMap(processMap));
    }

    private static  Map> getProcessMap(Map> processMap) {
      processMap.put("ping", new ping());
      processMap.put("ping2", new ping2());
      processMap.put("queueExists", new queueExists());
      processMap.put("initQueue", new initQueue());
      processMap.put("queue", new queue());
      processMap.put("requeue", new requeue());
      processMap.put("requeueSilent", new requeueSilent());
      processMap.put("finish", new finish());
      processMap.put("take", new take());
      processMap.put("queueSize", new queueSize());
      processMap.put("ephemeralSize", new ephemeralSize());
      return processMap;
    }

    public static class ping extends org.apache.thrift.ProcessFunction {
      public ping() {
        super("ping");
      }

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

      protected boolean isOneway() {
        return true;
      }

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

    public static class ping2 extends org.apache.thrift.ProcessFunction {
      public ping2() {
        super("ping2");
      }

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

      protected boolean isOneway() {
        return false;
      }

      public ping2_result getResult(I iface, ping2_args args) throws org.apache.thrift.TException {
        ping2_result result = new ping2_result();
        result.success = iface.ping2();
        result.setSuccessIsSet(true);
        return result;
      }
    }

    public static class queueExists extends org.apache.thrift.ProcessFunction {
      public queueExists() {
        super("queueExists");
      }

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

      protected boolean isOneway() {
        return false;
      }

      public queueExists_result getResult(I iface, queueExists_args args) throws org.apache.thrift.TException {
        queueExists_result result = new queueExists_result();
        result.success = iface.queueExists(args._secret, args._queueName);
        return result;
      }
    }

    public static class initQueue extends org.apache.thrift.ProcessFunction {
      public initQueue() {
        super("initQueue");
      }

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

      protected boolean isOneway() {
        return false;
      }

      public initQueue_result getResult(I iface, initQueue_args args) throws org.apache.thrift.TException {
        initQueue_result result = new initQueue_result();
        result.success = iface.initQueue(args._secret, args._queueName);
        return result;
      }
    }

    public static class queue extends org.apache.thrift.ProcessFunction {
      public queue() {
        super("queue");
      }

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

      protected boolean isOneway() {
        return false;
      }

      public queue_result getResult(I iface, queue_args args) throws org.apache.thrift.TException {
        queue_result result = new queue_result();
        result.success = iface.queue(args._secret, args._queueName, args._message);
        return result;
      }
    }

    public static class requeue extends org.apache.thrift.ProcessFunction {
      public requeue() {
        super("requeue");
      }

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

      protected boolean isOneway() {
        return false;
      }

      public requeue_result getResult(I iface, requeue_args args) throws org.apache.thrift.TException {
        requeue_result result = new requeue_result();
        result.success = iface.requeue(args._secret, args._queueName, args._message);
        return result;
      }
    }

    public static class requeueSilent extends org.apache.thrift.ProcessFunction {
      public requeueSilent() {
        super("requeueSilent");
      }

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

      protected boolean isOneway() {
        return false;
      }

      public requeueSilent_result getResult(I iface, requeueSilent_args args) throws org.apache.thrift.TException {
        requeueSilent_result result = new requeueSilent_result();
        result.success = iface.requeueSilent(args._secret, args._queueName, args._message);
        return result;
      }
    }

    public static class finish extends org.apache.thrift.ProcessFunction {
      public finish() {
        super("finish");
      }

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

      protected boolean isOneway() {
        return false;
      }

      public finish_result getResult(I iface, finish_args args) throws org.apache.thrift.TException {
        finish_result result = new finish_result();
        result.success = iface.finish(args._secret, args._queueName, args._message);
        return result;
      }
    }

    public static class take extends org.apache.thrift.ProcessFunction {
      public take() {
        super("take");
      }

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

      protected boolean isOneway() {
        return false;
      }

      public take_result getResult(I iface, take_args args) throws org.apache.thrift.TException {
        take_result result = new take_result();
        result.success = iface.take(args._secret, args._queueName);
        return result;
      }
    }

    public static class queueSize extends org.apache.thrift.ProcessFunction {
      public queueSize() {
        super("queueSize");
      }

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

      protected boolean isOneway() {
        return false;
      }

      public queueSize_result getResult(I iface, queueSize_args args) throws org.apache.thrift.TException {
        queueSize_result result = new queueSize_result();
        result.success = iface.queueSize(args._secret, args._queueName);
        return result;
      }
    }

    public static class ephemeralSize extends org.apache.thrift.ProcessFunction {
      public ephemeralSize() {
        super("ephemeralSize");
      }

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

      protected boolean isOneway() {
        return false;
      }

      public ephemeralSize_result getResult(I iface, ephemeralSize_args args) throws org.apache.thrift.TException {
        ephemeralSize_result result = new ephemeralSize_result();
        result.success = iface.ephemeralSize(args._secret, args._queueName);
        return result;
      }
    }

  }

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

    protected AsyncProcessor(I iface, Map> processMap) {
      super(iface, getProcessMap(processMap));
    }

    private static  Map> getProcessMap(Map> processMap) {
      processMap.put("ping", new ping());
      processMap.put("ping2", new ping2());
      processMap.put("queueExists", new queueExists());
      processMap.put("initQueue", new initQueue());
      processMap.put("queue", new queue());
      processMap.put("requeue", new requeue());
      processMap.put("requeueSilent", new requeueSilent());
      processMap.put("finish", new finish());
      processMap.put("take", new take());
      processMap.put("queueSize", new queueSize());
      processMap.put("ephemeralSize", new ephemeralSize());
      return processMap;
    }

    public static class ping extends org.apache.thrift.AsyncProcessFunction {
      public ping() {
        super("ping");
      }

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

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

      protected boolean isOneway() {
        return true;
      }

      public void start(I iface, ping_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException {
        iface.ping(resultHandler);
      }
    }

    public static class ping2 extends org.apache.thrift.AsyncProcessFunction {
      public ping2() {
        super("ping2");
      }

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

      public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
        final org.apache.thrift.AsyncProcessFunction fcall = this;
        return new AsyncMethodCallback() { 
          public void onComplete(Boolean o) {
            ping2_result result = new ping2_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;
            ping2_result result = new ping2_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, ping2_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException {
        iface.ping2(resultHandler);
      }
    }

    public static class queueExists extends org.apache.thrift.AsyncProcessFunction {
      public queueExists() {
        super("queueExists");
      }

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

      public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
        final org.apache.thrift.AsyncProcessFunction fcall = this;
        return new AsyncMethodCallback() { 
          public void onComplete(TQueueResponse o) {
            queueExists_result result = new queueExists_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;
            queueExists_result result = new queueExists_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, queueExists_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException {
        iface.queueExists(args._secret, args._queueName,resultHandler);
      }
    }

    public static class initQueue extends org.apache.thrift.AsyncProcessFunction {
      public initQueue() {
        super("initQueue");
      }

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

      public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
        final org.apache.thrift.AsyncProcessFunction fcall = this;
        return new AsyncMethodCallback() { 
          public void onComplete(TQueueResponse o) {
            initQueue_result result = new initQueue_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;
            initQueue_result result = new initQueue_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, initQueue_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException {
        iface.initQueue(args._secret, args._queueName,resultHandler);
      }
    }

    public static class queue extends org.apache.thrift.AsyncProcessFunction {
      public queue() {
        super("queue");
      }

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

      public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
        final org.apache.thrift.AsyncProcessFunction fcall = this;
        return new AsyncMethodCallback() { 
          public void onComplete(TQueueResponse o) {
            queue_result result = new queue_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;
            queue_result result = new queue_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, queue_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException {
        iface.queue(args._secret, args._queueName, args._message,resultHandler);
      }
    }

    public static class requeue extends org.apache.thrift.AsyncProcessFunction {
      public requeue() {
        super("requeue");
      }

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

      public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
        final org.apache.thrift.AsyncProcessFunction fcall = this;
        return new AsyncMethodCallback() { 
          public void onComplete(TQueueResponse o) {
            requeue_result result = new requeue_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;
            requeue_result result = new requeue_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, requeue_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException {
        iface.requeue(args._secret, args._queueName, args._message,resultHandler);
      }
    }

    public static class requeueSilent extends org.apache.thrift.AsyncProcessFunction {
      public requeueSilent() {
        super("requeueSilent");
      }

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

      public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
        final org.apache.thrift.AsyncProcessFunction fcall = this;
        return new AsyncMethodCallback() { 
          public void onComplete(TQueueResponse o) {
            requeueSilent_result result = new requeueSilent_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;
            requeueSilent_result result = new requeueSilent_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, requeueSilent_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException {
        iface.requeueSilent(args._secret, args._queueName, args._message,resultHandler);
      }
    }

    public static class finish extends org.apache.thrift.AsyncProcessFunction {
      public finish() {
        super("finish");
      }

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

      public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
        final org.apache.thrift.AsyncProcessFunction fcall = this;
        return new AsyncMethodCallback() { 
          public void onComplete(TQueueResponse o) {
            finish_result result = new finish_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;
            finish_result result = new finish_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, finish_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException {
        iface.finish(args._secret, args._queueName, args._message,resultHandler);
      }
    }

    public static class take extends org.apache.thrift.AsyncProcessFunction {
      public take() {
        super("take");
      }

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

      public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
        final org.apache.thrift.AsyncProcessFunction fcall = this;
        return new AsyncMethodCallback() { 
          public void onComplete(TQueueResponse o) {
            take_result result = new take_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;
            take_result result = new take_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, take_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException {
        iface.take(args._secret, args._queueName,resultHandler);
      }
    }

    public static class queueSize extends org.apache.thrift.AsyncProcessFunction {
      public queueSize() {
        super("queueSize");
      }

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

      public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
        final org.apache.thrift.AsyncProcessFunction fcall = this;
        return new AsyncMethodCallback() { 
          public void onComplete(TQueueSizeResponse o) {
            queueSize_result result = new queueSize_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;
            queueSize_result result = new queueSize_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, queueSize_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException {
        iface.queueSize(args._secret, args._queueName,resultHandler);
      }
    }

    public static class ephemeralSize extends org.apache.thrift.AsyncProcessFunction {
      public ephemeralSize() {
        super("ephemeralSize");
      }

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

      public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
        final org.apache.thrift.AsyncProcessFunction fcall = this;
        return new AsyncMethodCallback() { 
          public void onComplete(TQueueSizeResponse o) {
            ephemeralSize_result result = new ephemeralSize_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;
            ephemeralSize_result result = new ephemeralSize_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, ephemeralSize_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException {
        iface.ephemeralSize(args._secret, args._queueName,resultHandler);
      }
    }

  }

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


    private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>();
    static {
      schemes.put(StandardScheme.class, new ping_argsStandardSchemeFactory());
      schemes.put(TupleScheme.class, new ping_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 byName = new HashMap();

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

    public ping_args() {
    }

    /**
     * Performs a deep copy on other.
     */
    public ping_args(ping_args other) {
    }

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

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

      return true;
    }

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

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

    private static class ping_argsStandardScheme extends StandardScheme {

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

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

    }

    private static class ping_argsTupleSchemeFactory implements SchemeFactory {
      public ping_argsTupleScheme getScheme() {
        return new ping_argsTupleScheme();
      }
    }

    private static class ping_argsTupleScheme extends TupleScheme {

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

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

  }

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


    private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>();
    static {
      schemes.put(StandardScheme.class, new ping2_argsStandardSchemeFactory());
      schemes.put(TupleScheme.class, new ping2_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 byName = new HashMap();

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

    public ping2_args() {
    }

    /**
     * Performs a deep copy on other.
     */
    public ping2_args(ping2_args other) {
    }

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

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

      return true;
    }

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

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

    private static class ping2_argsStandardScheme extends StandardScheme {

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

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

    }

    private static class ping2_argsTupleSchemeFactory implements SchemeFactory {
      public ping2_argsTupleScheme getScheme() {
        return new ping2_argsTupleScheme();
      }
    }

    private static class ping2_argsTupleScheme extends TupleScheme {

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

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

  }

  public static class ping2_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ping2_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 Map, SchemeFactory> schemes = new HashMap, SchemeFactory>();
    static {
      schemes.put(StandardScheme.class, new ping2_resultStandardSchemeFactory());
      schemes.put(TupleScheme.class, new ping2_resultTupleSchemeFactory());
    }

    public boolean success; // 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");

      private static final Map byName = new HashMap();

      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;
          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)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ping2_result.class, metaDataMap);
    }

    public ping2_result() {
    }

    public ping2_result(
      boolean success)
    {
      this();
      this.success = success;
      setSuccessIsSet(true);
    }

    /**
     * Performs a deep copy on other.
     */
    public ping2_result(ping2_result other) {
      __isset_bitfield = other.__isset_bitfield;
      this.success = other.success;
    }

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

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

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

    public ping2_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 void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((Boolean)value);
        }
        break;

      }
    }

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

      }
      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();
      }
      throw new IllegalStateException();
    }

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

    public boolean equals(ping2_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;
      }

      return true;
    }

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

    @Override
    public int compareTo(ping2_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;
        }
      }
      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("ping2_result(");
      boolean first = true;

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

    private static class ping2_resultStandardScheme extends StandardScheme {

      public void read(org.apache.thrift.protocol.TProtocol iprot, ping2_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;
            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, ping2_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();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class ping2_resultTupleSchemeFactory implements SchemeFactory {
      public ping2_resultTupleScheme getScheme() {
        return new ping2_resultTupleScheme();
      }
    }

    private static class ping2_resultTupleScheme extends TupleScheme {

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

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

  }

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

    private static final org.apache.thrift.protocol.TField _SECRET_FIELD_DESC = new org.apache.thrift.protocol.TField("_secret", org.apache.thrift.protocol.TType.STRING, (short)1);
    private static final org.apache.thrift.protocol.TField _QUEUE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("_queueName", org.apache.thrift.protocol.TType.STRING, (short)2);

    private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>();
    static {
      schemes.put(StandardScheme.class, new queueExists_argsStandardSchemeFactory());
      schemes.put(TupleScheme.class, new queueExists_argsTupleSchemeFactory());
    }

    public String _secret; // required
    public String _queueName; // 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 {
      _SECRET((short)1, "_secret"),
      _QUEUE_NAME((short)2, "_queueName");

      private static final Map byName = new HashMap();

      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: // _SECRET
            return _SECRET;
          case 2: // _QUEUE_NAME
            return _QUEUE_NAME;
          default:
            return null;
        }
      }

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

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

      private final short _thriftId;
      private final String _fieldName;

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

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields._SECRET, new org.apache.thrift.meta_data.FieldMetaData("_secret", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
      tmpMap.put(_Fields._QUEUE_NAME, new org.apache.thrift.meta_data.FieldMetaData("_queueName", 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(queueExists_args.class, metaDataMap);
    }

    public queueExists_args() {
    }

    public queueExists_args(
      String _secret,
      String _queueName)
    {
      this();
      this._secret = _secret;
      this._queueName = _queueName;
    }

    /**
     * Performs a deep copy on other.
     */
    public queueExists_args(queueExists_args other) {
      if (other.isSet_secret()) {
        this._secret = other._secret;
      }
      if (other.isSet_queueName()) {
        this._queueName = other._queueName;
      }
    }

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

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

    public String get_secret() {
      return this._secret;
    }

    public queueExists_args set_secret(String _secret) {
      this._secret = _secret;
      return this;
    }

    public void unset_secret() {
      this._secret = null;
    }

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

    public void set_secretIsSet(boolean value) {
      if (!value) {
        this._secret = null;
      }
    }

    public String get_queueName() {
      return this._queueName;
    }

    public queueExists_args set_queueName(String _queueName) {
      this._queueName = _queueName;
      return this;
    }

    public void unset_queueName() {
      this._queueName = null;
    }

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

    public void set_queueNameIsSet(boolean value) {
      if (!value) {
        this._queueName = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case _SECRET:
        if (value == null) {
          unset_secret();
        } else {
          set_secret((String)value);
        }
        break;

      case _QUEUE_NAME:
        if (value == null) {
          unset_queueName();
        } else {
          set_queueName((String)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case _SECRET:
        return get_secret();

      case _QUEUE_NAME:
        return get_queueName();

      }
      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 _SECRET:
        return isSet_secret();
      case _QUEUE_NAME:
        return isSet_queueName();
      }
      throw new IllegalStateException();
    }

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

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

      boolean this_present__secret = true && this.isSet_secret();
      boolean that_present__secret = true && that.isSet_secret();
      if (this_present__secret || that_present__secret) {
        if (!(this_present__secret && that_present__secret))
          return false;
        if (!this._secret.equals(that._secret))
          return false;
      }

      boolean this_present__queueName = true && this.isSet_queueName();
      boolean that_present__queueName = true && that.isSet_queueName();
      if (this_present__queueName || that_present__queueName) {
        if (!(this_present__queueName && that_present__queueName))
          return false;
        if (!this._queueName.equals(that._queueName))
          return false;
      }

      return true;
    }

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

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

      int lastComparison = 0;

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

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

    private static class queueExists_argsStandardScheme extends StandardScheme {

      public void read(org.apache.thrift.protocol.TProtocol iprot, queueExists_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: // _SECRET
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct._secret = iprot.readString();
                struct.set_secretIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // _QUEUE_NAME
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct._queueName = iprot.readString();
                struct.set_queueNameIsSet(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, queueExists_args struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct._secret != null) {
          oprot.writeFieldBegin(_SECRET_FIELD_DESC);
          oprot.writeString(struct._secret);
          oprot.writeFieldEnd();
        }
        if (struct._queueName != null) {
          oprot.writeFieldBegin(_QUEUE_NAME_FIELD_DESC);
          oprot.writeString(struct._queueName);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class queueExists_argsTupleSchemeFactory implements SchemeFactory {
      public queueExists_argsTupleScheme getScheme() {
        return new queueExists_argsTupleScheme();
      }
    }

    private static class queueExists_argsTupleScheme extends TupleScheme {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, queueExists_args struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSet_secret()) {
          optionals.set(0);
        }
        if (struct.isSet_queueName()) {
          optionals.set(1);
        }
        oprot.writeBitSet(optionals, 2);
        if (struct.isSet_secret()) {
          oprot.writeString(struct._secret);
        }
        if (struct.isSet_queueName()) {
          oprot.writeString(struct._queueName);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, queueExists_args struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(2);
        if (incoming.get(0)) {
          struct._secret = iprot.readString();
          struct.set_secretIsSet(true);
        }
        if (incoming.get(1)) {
          struct._queueName = iprot.readString();
          struct.set_queueNameIsSet(true);
        }
      }
    }

  }

  public static class queueExists_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("queueExists_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 Map, SchemeFactory> schemes = new HashMap, SchemeFactory>();
    static {
      schemes.put(StandardScheme.class, new queueExists_resultStandardSchemeFactory());
      schemes.put(TupleScheme.class, new queueExists_resultTupleSchemeFactory());
    }

    public TQueueResponse success; // 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");

      private static final Map byName = new HashMap();

      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;
          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, TQueueResponse.class)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(queueExists_result.class, metaDataMap);
    }

    public queueExists_result() {
    }

    public queueExists_result(
      TQueueResponse success)
    {
      this();
      this.success = success;
    }

    /**
     * Performs a deep copy on other.
     */
    public queueExists_result(queueExists_result other) {
      if (other.isSetSuccess()) {
        this.success = new TQueueResponse(other.success);
      }
    }

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

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

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

    public queueExists_result setSuccess(TQueueResponse 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 void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((TQueueResponse)value);
        }
        break;

      }
    }

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

      }
      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();
      }
      throw new IllegalStateException();
    }

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

    public boolean equals(queueExists_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;
      }

      return true;
    }

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

    @Override
    public int compareTo(queueExists_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;
        }
      }
      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("queueExists_result(");
      boolean first = true;

      sb.append("success:");
      if (this.success == null) {
        sb.append("null");
      } else {
        sb.append(this.success);
      }
      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 queueExists_resultStandardSchemeFactory implements SchemeFactory {
      public queueExists_resultStandardScheme getScheme() {
        return new queueExists_resultStandardScheme();
      }
    }

    private static class queueExists_resultStandardScheme extends StandardScheme {

      public void read(org.apache.thrift.protocol.TProtocol iprot, queueExists_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 TQueueResponse();
                struct.success.read(iprot);
                struct.setSuccessIsSet(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, queueExists_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();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class queueExists_resultTupleSchemeFactory implements SchemeFactory {
      public queueExists_resultTupleScheme getScheme() {
        return new queueExists_resultTupleScheme();
      }
    }

    private static class queueExists_resultTupleScheme extends TupleScheme {

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

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

  }

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

    private static final org.apache.thrift.protocol.TField _SECRET_FIELD_DESC = new org.apache.thrift.protocol.TField("_secret", org.apache.thrift.protocol.TType.STRING, (short)1);
    private static final org.apache.thrift.protocol.TField _QUEUE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("_queueName", org.apache.thrift.protocol.TType.STRING, (short)2);

    private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>();
    static {
      schemes.put(StandardScheme.class, new initQueue_argsStandardSchemeFactory());
      schemes.put(TupleScheme.class, new initQueue_argsTupleSchemeFactory());
    }

    public String _secret; // required
    public String _queueName; // 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 {
      _SECRET((short)1, "_secret"),
      _QUEUE_NAME((short)2, "_queueName");

      private static final Map byName = new HashMap();

      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: // _SECRET
            return _SECRET;
          case 2: // _QUEUE_NAME
            return _QUEUE_NAME;
          default:
            return null;
        }
      }

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

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

      private final short _thriftId;
      private final String _fieldName;

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

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields._SECRET, new org.apache.thrift.meta_data.FieldMetaData("_secret", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
      tmpMap.put(_Fields._QUEUE_NAME, new org.apache.thrift.meta_data.FieldMetaData("_queueName", 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(initQueue_args.class, metaDataMap);
    }

    public initQueue_args() {
    }

    public initQueue_args(
      String _secret,
      String _queueName)
    {
      this();
      this._secret = _secret;
      this._queueName = _queueName;
    }

    /**
     * Performs a deep copy on other.
     */
    public initQueue_args(initQueue_args other) {
      if (other.isSet_secret()) {
        this._secret = other._secret;
      }
      if (other.isSet_queueName()) {
        this._queueName = other._queueName;
      }
    }

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

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

    public String get_secret() {
      return this._secret;
    }

    public initQueue_args set_secret(String _secret) {
      this._secret = _secret;
      return this;
    }

    public void unset_secret() {
      this._secret = null;
    }

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

    public void set_secretIsSet(boolean value) {
      if (!value) {
        this._secret = null;
      }
    }

    public String get_queueName() {
      return this._queueName;
    }

    public initQueue_args set_queueName(String _queueName) {
      this._queueName = _queueName;
      return this;
    }

    public void unset_queueName() {
      this._queueName = null;
    }

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

    public void set_queueNameIsSet(boolean value) {
      if (!value) {
        this._queueName = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case _SECRET:
        if (value == null) {
          unset_secret();
        } else {
          set_secret((String)value);
        }
        break;

      case _QUEUE_NAME:
        if (value == null) {
          unset_queueName();
        } else {
          set_queueName((String)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case _SECRET:
        return get_secret();

      case _QUEUE_NAME:
        return get_queueName();

      }
      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 _SECRET:
        return isSet_secret();
      case _QUEUE_NAME:
        return isSet_queueName();
      }
      throw new IllegalStateException();
    }

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

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

      boolean this_present__secret = true && this.isSet_secret();
      boolean that_present__secret = true && that.isSet_secret();
      if (this_present__secret || that_present__secret) {
        if (!(this_present__secret && that_present__secret))
          return false;
        if (!this._secret.equals(that._secret))
          return false;
      }

      boolean this_present__queueName = true && this.isSet_queueName();
      boolean that_present__queueName = true && that.isSet_queueName();
      if (this_present__queueName || that_present__queueName) {
        if (!(this_present__queueName && that_present__queueName))
          return false;
        if (!this._queueName.equals(that._queueName))
          return false;
      }

      return true;
    }

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

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

      int lastComparison = 0;

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

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

    private static class initQueue_argsStandardScheme extends StandardScheme {

      public void read(org.apache.thrift.protocol.TProtocol iprot, initQueue_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: // _SECRET
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct._secret = iprot.readString();
                struct.set_secretIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // _QUEUE_NAME
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct._queueName = iprot.readString();
                struct.set_queueNameIsSet(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, initQueue_args struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct._secret != null) {
          oprot.writeFieldBegin(_SECRET_FIELD_DESC);
          oprot.writeString(struct._secret);
          oprot.writeFieldEnd();
        }
        if (struct._queueName != null) {
          oprot.writeFieldBegin(_QUEUE_NAME_FIELD_DESC);
          oprot.writeString(struct._queueName);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class initQueue_argsTupleSchemeFactory implements SchemeFactory {
      public initQueue_argsTupleScheme getScheme() {
        return new initQueue_argsTupleScheme();
      }
    }

    private static class initQueue_argsTupleScheme extends TupleScheme {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, initQueue_args struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSet_secret()) {
          optionals.set(0);
        }
        if (struct.isSet_queueName()) {
          optionals.set(1);
        }
        oprot.writeBitSet(optionals, 2);
        if (struct.isSet_secret()) {
          oprot.writeString(struct._secret);
        }
        if (struct.isSet_queueName()) {
          oprot.writeString(struct._queueName);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, initQueue_args struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(2);
        if (incoming.get(0)) {
          struct._secret = iprot.readString();
          struct.set_secretIsSet(true);
        }
        if (incoming.get(1)) {
          struct._queueName = iprot.readString();
          struct.set_queueNameIsSet(true);
        }
      }
    }

  }

  public static class initQueue_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("initQueue_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 Map, SchemeFactory> schemes = new HashMap, SchemeFactory>();
    static {
      schemes.put(StandardScheme.class, new initQueue_resultStandardSchemeFactory());
      schemes.put(TupleScheme.class, new initQueue_resultTupleSchemeFactory());
    }

    public TQueueResponse success; // 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");

      private static final Map byName = new HashMap();

      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;
          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, TQueueResponse.class)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(initQueue_result.class, metaDataMap);
    }

    public initQueue_result() {
    }

    public initQueue_result(
      TQueueResponse success)
    {
      this();
      this.success = success;
    }

    /**
     * Performs a deep copy on other.
     */
    public initQueue_result(initQueue_result other) {
      if (other.isSetSuccess()) {
        this.success = new TQueueResponse(other.success);
      }
    }

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

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

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

    public initQueue_result setSuccess(TQueueResponse 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 void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((TQueueResponse)value);
        }
        break;

      }
    }

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

      }
      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();
      }
      throw new IllegalStateException();
    }

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

    public boolean equals(initQueue_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;
      }

      return true;
    }

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

    @Override
    public int compareTo(initQueue_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;
        }
      }
      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("initQueue_result(");
      boolean first = true;

      sb.append("success:");
      if (this.success == null) {
        sb.append("null");
      } else {
        sb.append(this.success);
      }
      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 initQueue_resultStandardSchemeFactory implements SchemeFactory {
      public initQueue_resultStandardScheme getScheme() {
        return new initQueue_resultStandardScheme();
      }
    }

    private static class initQueue_resultStandardScheme extends StandardScheme {

      public void read(org.apache.thrift.protocol.TProtocol iprot, initQueue_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 TQueueResponse();
                struct.success.read(iprot);
                struct.setSuccessIsSet(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, initQueue_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();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class initQueue_resultTupleSchemeFactory implements SchemeFactory {
      public initQueue_resultTupleScheme getScheme() {
        return new initQueue_resultTupleScheme();
      }
    }

    private static class initQueue_resultTupleScheme extends TupleScheme {

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

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

  }

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

    private static final org.apache.thrift.protocol.TField _SECRET_FIELD_DESC = new org.apache.thrift.protocol.TField("_secret", org.apache.thrift.protocol.TType.STRING, (short)1);
    private static final org.apache.thrift.protocol.TField _QUEUE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("_queueName", org.apache.thrift.protocol.TType.STRING, (short)2);
    private static final org.apache.thrift.protocol.TField _MESSAGE_FIELD_DESC = new org.apache.thrift.protocol.TField("_message", org.apache.thrift.protocol.TType.STRUCT, (short)3);

    private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>();
    static {
      schemes.put(StandardScheme.class, new queue_argsStandardSchemeFactory());
      schemes.put(TupleScheme.class, new queue_argsTupleSchemeFactory());
    }

    public String _secret; // required
    public String _queueName; // required
    public TQueueMessage _message; // 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 {
      _SECRET((short)1, "_secret"),
      _QUEUE_NAME((short)2, "_queueName"),
      _MESSAGE((short)3, "_message");

      private static final Map byName = new HashMap();

      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: // _SECRET
            return _SECRET;
          case 2: // _QUEUE_NAME
            return _QUEUE_NAME;
          case 3: // _MESSAGE
            return _MESSAGE;
          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._SECRET, new org.apache.thrift.meta_data.FieldMetaData("_secret", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
      tmpMap.put(_Fields._QUEUE_NAME, new org.apache.thrift.meta_data.FieldMetaData("_queueName", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
      tmpMap.put(_Fields._MESSAGE, new org.apache.thrift.meta_data.FieldMetaData("_message", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TQueueMessage.class)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(queue_args.class, metaDataMap);
    }

    public queue_args() {
    }

    public queue_args(
      String _secret,
      String _queueName,
      TQueueMessage _message)
    {
      this();
      this._secret = _secret;
      this._queueName = _queueName;
      this._message = _message;
    }

    /**
     * Performs a deep copy on other.
     */
    public queue_args(queue_args other) {
      if (other.isSet_secret()) {
        this._secret = other._secret;
      }
      if (other.isSet_queueName()) {
        this._queueName = other._queueName;
      }
      if (other.isSet_message()) {
        this._message = new TQueueMessage(other._message);
      }
    }

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

    @Override
    public void clear() {
      this._secret = null;
      this._queueName = null;
      this._message = null;
    }

    public String get_secret() {
      return this._secret;
    }

    public queue_args set_secret(String _secret) {
      this._secret = _secret;
      return this;
    }

    public void unset_secret() {
      this._secret = null;
    }

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

    public void set_secretIsSet(boolean value) {
      if (!value) {
        this._secret = null;
      }
    }

    public String get_queueName() {
      return this._queueName;
    }

    public queue_args set_queueName(String _queueName) {
      this._queueName = _queueName;
      return this;
    }

    public void unset_queueName() {
      this._queueName = null;
    }

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

    public void set_queueNameIsSet(boolean value) {
      if (!value) {
        this._queueName = null;
      }
    }

    public TQueueMessage get_message() {
      return this._message;
    }

    public queue_args set_message(TQueueMessage _message) {
      this._message = _message;
      return this;
    }

    public void unset_message() {
      this._message = null;
    }

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

    public void set_messageIsSet(boolean value) {
      if (!value) {
        this._message = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case _SECRET:
        if (value == null) {
          unset_secret();
        } else {
          set_secret((String)value);
        }
        break;

      case _QUEUE_NAME:
        if (value == null) {
          unset_queueName();
        } else {
          set_queueName((String)value);
        }
        break;

      case _MESSAGE:
        if (value == null) {
          unset_message();
        } else {
          set_message((TQueueMessage)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case _SECRET:
        return get_secret();

      case _QUEUE_NAME:
        return get_queueName();

      case _MESSAGE:
        return get_message();

      }
      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 _SECRET:
        return isSet_secret();
      case _QUEUE_NAME:
        return isSet_queueName();
      case _MESSAGE:
        return isSet_message();
      }
      throw new IllegalStateException();
    }

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

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

      boolean this_present__secret = true && this.isSet_secret();
      boolean that_present__secret = true && that.isSet_secret();
      if (this_present__secret || that_present__secret) {
        if (!(this_present__secret && that_present__secret))
          return false;
        if (!this._secret.equals(that._secret))
          return false;
      }

      boolean this_present__queueName = true && this.isSet_queueName();
      boolean that_present__queueName = true && that.isSet_queueName();
      if (this_present__queueName || that_present__queueName) {
        if (!(this_present__queueName && that_present__queueName))
          return false;
        if (!this._queueName.equals(that._queueName))
          return false;
      }

      boolean this_present__message = true && this.isSet_message();
      boolean that_present__message = true && that.isSet_message();
      if (this_present__message || that_present__message) {
        if (!(this_present__message && that_present__message))
          return false;
        if (!this._message.equals(that._message))
          return false;
      }

      return true;
    }

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

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

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSet_secret()).compareTo(other.isSet_secret());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSet_secret()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this._secret, other._secret);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSet_queueName()).compareTo(other.isSet_queueName());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSet_queueName()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this._queueName, other._queueName);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSet_message()).compareTo(other.isSet_message());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSet_message()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this._message, other._message);
        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("queue_args(");
      boolean first = true;

      sb.append("_secret:");
      if (this._secret == null) {
        sb.append("null");
      } else {
        sb.append(this._secret);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("_queueName:");
      if (this._queueName == null) {
        sb.append("null");
      } else {
        sb.append(this._queueName);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("_message:");
      if (this._message == null) {
        sb.append("null");
      } else {
        sb.append(this._message);
      }
      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 (_message != null) {
        _message.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 queue_argsStandardSchemeFactory implements SchemeFactory {
      public queue_argsStandardScheme getScheme() {
        return new queue_argsStandardScheme();
      }
    }

    private static class queue_argsStandardScheme extends StandardScheme {

      public void read(org.apache.thrift.protocol.TProtocol iprot, queue_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: // _SECRET
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct._secret = iprot.readString();
                struct.set_secretIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // _QUEUE_NAME
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct._queueName = iprot.readString();
                struct.set_queueNameIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 3: // _MESSAGE
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct._message = new TQueueMessage();
                struct._message.read(iprot);
                struct.set_messageIsSet(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, queue_args struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct._secret != null) {
          oprot.writeFieldBegin(_SECRET_FIELD_DESC);
          oprot.writeString(struct._secret);
          oprot.writeFieldEnd();
        }
        if (struct._queueName != null) {
          oprot.writeFieldBegin(_QUEUE_NAME_FIELD_DESC);
          oprot.writeString(struct._queueName);
          oprot.writeFieldEnd();
        }
        if (struct._message != null) {
          oprot.writeFieldBegin(_MESSAGE_FIELD_DESC);
          struct._message.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class queue_argsTupleSchemeFactory implements SchemeFactory {
      public queue_argsTupleScheme getScheme() {
        return new queue_argsTupleScheme();
      }
    }

    private static class queue_argsTupleScheme extends TupleScheme {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, queue_args struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSet_secret()) {
          optionals.set(0);
        }
        if (struct.isSet_queueName()) {
          optionals.set(1);
        }
        if (struct.isSet_message()) {
          optionals.set(2);
        }
        oprot.writeBitSet(optionals, 3);
        if (struct.isSet_secret()) {
          oprot.writeString(struct._secret);
        }
        if (struct.isSet_queueName()) {
          oprot.writeString(struct._queueName);
        }
        if (struct.isSet_message()) {
          struct._message.write(oprot);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, queue_args struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(3);
        if (incoming.get(0)) {
          struct._secret = iprot.readString();
          struct.set_secretIsSet(true);
        }
        if (incoming.get(1)) {
          struct._queueName = iprot.readString();
          struct.set_queueNameIsSet(true);
        }
        if (incoming.get(2)) {
          struct._message = new TQueueMessage();
          struct._message.read(iprot);
          struct.set_messageIsSet(true);
        }
      }
    }

  }

  public static class queue_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("queue_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 Map, SchemeFactory> schemes = new HashMap, SchemeFactory>();
    static {
      schemes.put(StandardScheme.class, new queue_resultStandardSchemeFactory());
      schemes.put(TupleScheme.class, new queue_resultTupleSchemeFactory());
    }

    public TQueueResponse success; // 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");

      private static final Map byName = new HashMap();

      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;
          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, TQueueResponse.class)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(queue_result.class, metaDataMap);
    }

    public queue_result() {
    }

    public queue_result(
      TQueueResponse success)
    {
      this();
      this.success = success;
    }

    /**
     * Performs a deep copy on other.
     */
    public queue_result(queue_result other) {
      if (other.isSetSuccess()) {
        this.success = new TQueueResponse(other.success);
      }
    }

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

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

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

    public queue_result setSuccess(TQueueResponse 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 void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((TQueueResponse)value);
        }
        break;

      }
    }

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

      }
      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();
      }
      throw new IllegalStateException();
    }

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

    public boolean equals(queue_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;
      }

      return true;
    }

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

    @Override
    public int compareTo(queue_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;
        }
      }
      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("queue_result(");
      boolean first = true;

      sb.append("success:");
      if (this.success == null) {
        sb.append("null");
      } else {
        sb.append(this.success);
      }
      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 queue_resultStandardSchemeFactory implements SchemeFactory {
      public queue_resultStandardScheme getScheme() {
        return new queue_resultStandardScheme();
      }
    }

    private static class queue_resultStandardScheme extends StandardScheme {

      public void read(org.apache.thrift.protocol.TProtocol iprot, queue_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 TQueueResponse();
                struct.success.read(iprot);
                struct.setSuccessIsSet(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, queue_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();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class queue_resultTupleSchemeFactory implements SchemeFactory {
      public queue_resultTupleScheme getScheme() {
        return new queue_resultTupleScheme();
      }
    }

    private static class queue_resultTupleScheme extends TupleScheme {

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

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

  }

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

    private static final org.apache.thrift.protocol.TField _SECRET_FIELD_DESC = new org.apache.thrift.protocol.TField("_secret", org.apache.thrift.protocol.TType.STRING, (short)1);
    private static final org.apache.thrift.protocol.TField _QUEUE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("_queueName", org.apache.thrift.protocol.TType.STRING, (short)2);
    private static final org.apache.thrift.protocol.TField _MESSAGE_FIELD_DESC = new org.apache.thrift.protocol.TField("_message", org.apache.thrift.protocol.TType.STRUCT, (short)3);

    private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>();
    static {
      schemes.put(StandardScheme.class, new requeue_argsStandardSchemeFactory());
      schemes.put(TupleScheme.class, new requeue_argsTupleSchemeFactory());
    }

    public String _secret; // required
    public String _queueName; // required
    public TQueueMessage _message; // 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 {
      _SECRET((short)1, "_secret"),
      _QUEUE_NAME((short)2, "_queueName"),
      _MESSAGE((short)3, "_message");

      private static final Map byName = new HashMap();

      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: // _SECRET
            return _SECRET;
          case 2: // _QUEUE_NAME
            return _QUEUE_NAME;
          case 3: // _MESSAGE
            return _MESSAGE;
          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._SECRET, new org.apache.thrift.meta_data.FieldMetaData("_secret", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
      tmpMap.put(_Fields._QUEUE_NAME, new org.apache.thrift.meta_data.FieldMetaData("_queueName", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
      tmpMap.put(_Fields._MESSAGE, new org.apache.thrift.meta_data.FieldMetaData("_message", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TQueueMessage.class)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(requeue_args.class, metaDataMap);
    }

    public requeue_args() {
    }

    public requeue_args(
      String _secret,
      String _queueName,
      TQueueMessage _message)
    {
      this();
      this._secret = _secret;
      this._queueName = _queueName;
      this._message = _message;
    }

    /**
     * Performs a deep copy on other.
     */
    public requeue_args(requeue_args other) {
      if (other.isSet_secret()) {
        this._secret = other._secret;
      }
      if (other.isSet_queueName()) {
        this._queueName = other._queueName;
      }
      if (other.isSet_message()) {
        this._message = new TQueueMessage(other._message);
      }
    }

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

    @Override
    public void clear() {
      this._secret = null;
      this._queueName = null;
      this._message = null;
    }

    public String get_secret() {
      return this._secret;
    }

    public requeue_args set_secret(String _secret) {
      this._secret = _secret;
      return this;
    }

    public void unset_secret() {
      this._secret = null;
    }

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

    public void set_secretIsSet(boolean value) {
      if (!value) {
        this._secret = null;
      }
    }

    public String get_queueName() {
      return this._queueName;
    }

    public requeue_args set_queueName(String _queueName) {
      this._queueName = _queueName;
      return this;
    }

    public void unset_queueName() {
      this._queueName = null;
    }

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

    public void set_queueNameIsSet(boolean value) {
      if (!value) {
        this._queueName = null;
      }
    }

    public TQueueMessage get_message() {
      return this._message;
    }

    public requeue_args set_message(TQueueMessage _message) {
      this._message = _message;
      return this;
    }

    public void unset_message() {
      this._message = null;
    }

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

    public void set_messageIsSet(boolean value) {
      if (!value) {
        this._message = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case _SECRET:
        if (value == null) {
          unset_secret();
        } else {
          set_secret((String)value);
        }
        break;

      case _QUEUE_NAME:
        if (value == null) {
          unset_queueName();
        } else {
          set_queueName((String)value);
        }
        break;

      case _MESSAGE:
        if (value == null) {
          unset_message();
        } else {
          set_message((TQueueMessage)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case _SECRET:
        return get_secret();

      case _QUEUE_NAME:
        return get_queueName();

      case _MESSAGE:
        return get_message();

      }
      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 _SECRET:
        return isSet_secret();
      case _QUEUE_NAME:
        return isSet_queueName();
      case _MESSAGE:
        return isSet_message();
      }
      throw new IllegalStateException();
    }

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

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

      boolean this_present__secret = true && this.isSet_secret();
      boolean that_present__secret = true && that.isSet_secret();
      if (this_present__secret || that_present__secret) {
        if (!(this_present__secret && that_present__secret))
          return false;
        if (!this._secret.equals(that._secret))
          return false;
      }

      boolean this_present__queueName = true && this.isSet_queueName();
      boolean that_present__queueName = true && that.isSet_queueName();
      if (this_present__queueName || that_present__queueName) {
        if (!(this_present__queueName && that_present__queueName))
          return false;
        if (!this._queueName.equals(that._queueName))
          return false;
      }

      boolean this_present__message = true && this.isSet_message();
      boolean that_present__message = true && that.isSet_message();
      if (this_present__message || that_present__message) {
        if (!(this_present__message && that_present__message))
          return false;
        if (!this._message.equals(that._message))
          return false;
      }

      return true;
    }

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

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

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSet_secret()).compareTo(other.isSet_secret());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSet_secret()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this._secret, other._secret);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSet_queueName()).compareTo(other.isSet_queueName());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSet_queueName()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this._queueName, other._queueName);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSet_message()).compareTo(other.isSet_message());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSet_message()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this._message, other._message);
        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("requeue_args(");
      boolean first = true;

      sb.append("_secret:");
      if (this._secret == null) {
        sb.append("null");
      } else {
        sb.append(this._secret);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("_queueName:");
      if (this._queueName == null) {
        sb.append("null");
      } else {
        sb.append(this._queueName);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("_message:");
      if (this._message == null) {
        sb.append("null");
      } else {
        sb.append(this._message);
      }
      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 (_message != null) {
        _message.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 requeue_argsStandardSchemeFactory implements SchemeFactory {
      public requeue_argsStandardScheme getScheme() {
        return new requeue_argsStandardScheme();
      }
    }

    private static class requeue_argsStandardScheme extends StandardScheme {

      public void read(org.apache.thrift.protocol.TProtocol iprot, requeue_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: // _SECRET
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct._secret = iprot.readString();
                struct.set_secretIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // _QUEUE_NAME
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct._queueName = iprot.readString();
                struct.set_queueNameIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 3: // _MESSAGE
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct._message = new TQueueMessage();
                struct._message.read(iprot);
                struct.set_messageIsSet(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, requeue_args struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct._secret != null) {
          oprot.writeFieldBegin(_SECRET_FIELD_DESC);
          oprot.writeString(struct._secret);
          oprot.writeFieldEnd();
        }
        if (struct._queueName != null) {
          oprot.writeFieldBegin(_QUEUE_NAME_FIELD_DESC);
          oprot.writeString(struct._queueName);
          oprot.writeFieldEnd();
        }
        if (struct._message != null) {
          oprot.writeFieldBegin(_MESSAGE_FIELD_DESC);
          struct._message.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class requeue_argsTupleSchemeFactory implements SchemeFactory {
      public requeue_argsTupleScheme getScheme() {
        return new requeue_argsTupleScheme();
      }
    }

    private static class requeue_argsTupleScheme extends TupleScheme {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, requeue_args struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSet_secret()) {
          optionals.set(0);
        }
        if (struct.isSet_queueName()) {
          optionals.set(1);
        }
        if (struct.isSet_message()) {
          optionals.set(2);
        }
        oprot.writeBitSet(optionals, 3);
        if (struct.isSet_secret()) {
          oprot.writeString(struct._secret);
        }
        if (struct.isSet_queueName()) {
          oprot.writeString(struct._queueName);
        }
        if (struct.isSet_message()) {
          struct._message.write(oprot);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, requeue_args struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(3);
        if (incoming.get(0)) {
          struct._secret = iprot.readString();
          struct.set_secretIsSet(true);
        }
        if (incoming.get(1)) {
          struct._queueName = iprot.readString();
          struct.set_queueNameIsSet(true);
        }
        if (incoming.get(2)) {
          struct._message = new TQueueMessage();
          struct._message.read(iprot);
          struct.set_messageIsSet(true);
        }
      }
    }

  }

  public static class requeue_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("requeue_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 Map, SchemeFactory> schemes = new HashMap, SchemeFactory>();
    static {
      schemes.put(StandardScheme.class, new requeue_resultStandardSchemeFactory());
      schemes.put(TupleScheme.class, new requeue_resultTupleSchemeFactory());
    }

    public TQueueResponse success; // 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");

      private static final Map byName = new HashMap();

      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;
          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, TQueueResponse.class)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(requeue_result.class, metaDataMap);
    }

    public requeue_result() {
    }

    public requeue_result(
      TQueueResponse success)
    {
      this();
      this.success = success;
    }

    /**
     * Performs a deep copy on other.
     */
    public requeue_result(requeue_result other) {
      if (other.isSetSuccess()) {
        this.success = new TQueueResponse(other.success);
      }
    }

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

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

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

    public requeue_result setSuccess(TQueueResponse 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 void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((TQueueResponse)value);
        }
        break;

      }
    }

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

      }
      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();
      }
      throw new IllegalStateException();
    }

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

    public boolean equals(requeue_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;
      }

      return true;
    }

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

    @Override
    public int compareTo(requeue_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;
        }
      }
      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("requeue_result(");
      boolean first = true;

      sb.append("success:");
      if (this.success == null) {
        sb.append("null");
      } else {
        sb.append(this.success);
      }
      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 requeue_resultStandardSchemeFactory implements SchemeFactory {
      public requeue_resultStandardScheme getScheme() {
        return new requeue_resultStandardScheme();
      }
    }

    private static class requeue_resultStandardScheme extends StandardScheme {

      public void read(org.apache.thrift.protocol.TProtocol iprot, requeue_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 TQueueResponse();
                struct.success.read(iprot);
                struct.setSuccessIsSet(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, requeue_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();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class requeue_resultTupleSchemeFactory implements SchemeFactory {
      public requeue_resultTupleScheme getScheme() {
        return new requeue_resultTupleScheme();
      }
    }

    private static class requeue_resultTupleScheme extends TupleScheme {

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

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

  }

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

    private static final org.apache.thrift.protocol.TField _SECRET_FIELD_DESC = new org.apache.thrift.protocol.TField("_secret", org.apache.thrift.protocol.TType.STRING, (short)1);
    private static final org.apache.thrift.protocol.TField _QUEUE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("_queueName", org.apache.thrift.protocol.TType.STRING, (short)2);
    private static final org.apache.thrift.protocol.TField _MESSAGE_FIELD_DESC = new org.apache.thrift.protocol.TField("_message", org.apache.thrift.protocol.TType.STRUCT, (short)3);

    private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>();
    static {
      schemes.put(StandardScheme.class, new requeueSilent_argsStandardSchemeFactory());
      schemes.put(TupleScheme.class, new requeueSilent_argsTupleSchemeFactory());
    }

    public String _secret; // required
    public String _queueName; // required
    public TQueueMessage _message; // 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 {
      _SECRET((short)1, "_secret"),
      _QUEUE_NAME((short)2, "_queueName"),
      _MESSAGE((short)3, "_message");

      private static final Map byName = new HashMap();

      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: // _SECRET
            return _SECRET;
          case 2: // _QUEUE_NAME
            return _QUEUE_NAME;
          case 3: // _MESSAGE
            return _MESSAGE;
          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._SECRET, new org.apache.thrift.meta_data.FieldMetaData("_secret", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
      tmpMap.put(_Fields._QUEUE_NAME, new org.apache.thrift.meta_data.FieldMetaData("_queueName", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
      tmpMap.put(_Fields._MESSAGE, new org.apache.thrift.meta_data.FieldMetaData("_message", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TQueueMessage.class)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(requeueSilent_args.class, metaDataMap);
    }

    public requeueSilent_args() {
    }

    public requeueSilent_args(
      String _secret,
      String _queueName,
      TQueueMessage _message)
    {
      this();
      this._secret = _secret;
      this._queueName = _queueName;
      this._message = _message;
    }

    /**
     * Performs a deep copy on other.
     */
    public requeueSilent_args(requeueSilent_args other) {
      if (other.isSet_secret()) {
        this._secret = other._secret;
      }
      if (other.isSet_queueName()) {
        this._queueName = other._queueName;
      }
      if (other.isSet_message()) {
        this._message = new TQueueMessage(other._message);
      }
    }

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

    @Override
    public void clear() {
      this._secret = null;
      this._queueName = null;
      this._message = null;
    }

    public String get_secret() {
      return this._secret;
    }

    public requeueSilent_args set_secret(String _secret) {
      this._secret = _secret;
      return this;
    }

    public void unset_secret() {
      this._secret = null;
    }

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

    public void set_secretIsSet(boolean value) {
      if (!value) {
        this._secret = null;
      }
    }

    public String get_queueName() {
      return this._queueName;
    }

    public requeueSilent_args set_queueName(String _queueName) {
      this._queueName = _queueName;
      return this;
    }

    public void unset_queueName() {
      this._queueName = null;
    }

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

    public void set_queueNameIsSet(boolean value) {
      if (!value) {
        this._queueName = null;
      }
    }

    public TQueueMessage get_message() {
      return this._message;
    }

    public requeueSilent_args set_message(TQueueMessage _message) {
      this._message = _message;
      return this;
    }

    public void unset_message() {
      this._message = null;
    }

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

    public void set_messageIsSet(boolean value) {
      if (!value) {
        this._message = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case _SECRET:
        if (value == null) {
          unset_secret();
        } else {
          set_secret((String)value);
        }
        break;

      case _QUEUE_NAME:
        if (value == null) {
          unset_queueName();
        } else {
          set_queueName((String)value);
        }
        break;

      case _MESSAGE:
        if (value == null) {
          unset_message();
        } else {
          set_message((TQueueMessage)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case _SECRET:
        return get_secret();

      case _QUEUE_NAME:
        return get_queueName();

      case _MESSAGE:
        return get_message();

      }
      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 _SECRET:
        return isSet_secret();
      case _QUEUE_NAME:
        return isSet_queueName();
      case _MESSAGE:
        return isSet_message();
      }
      throw new IllegalStateException();
    }

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

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

      boolean this_present__secret = true && this.isSet_secret();
      boolean that_present__secret = true && that.isSet_secret();
      if (this_present__secret || that_present__secret) {
        if (!(this_present__secret && that_present__secret))
          return false;
        if (!this._secret.equals(that._secret))
          return false;
      }

      boolean this_present__queueName = true && this.isSet_queueName();
      boolean that_present__queueName = true && that.isSet_queueName();
      if (this_present__queueName || that_present__queueName) {
        if (!(this_present__queueName && that_present__queueName))
          return false;
        if (!this._queueName.equals(that._queueName))
          return false;
      }

      boolean this_present__message = true && this.isSet_message();
      boolean that_present__message = true && that.isSet_message();
      if (this_present__message || that_present__message) {
        if (!(this_present__message && that_present__message))
          return false;
        if (!this._message.equals(that._message))
          return false;
      }

      return true;
    }

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

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

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSet_secret()).compareTo(other.isSet_secret());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSet_secret()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this._secret, other._secret);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSet_queueName()).compareTo(other.isSet_queueName());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSet_queueName()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this._queueName, other._queueName);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSet_message()).compareTo(other.isSet_message());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSet_message()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this._message, other._message);
        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("requeueSilent_args(");
      boolean first = true;

      sb.append("_secret:");
      if (this._secret == null) {
        sb.append("null");
      } else {
        sb.append(this._secret);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("_queueName:");
      if (this._queueName == null) {
        sb.append("null");
      } else {
        sb.append(this._queueName);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("_message:");
      if (this._message == null) {
        sb.append("null");
      } else {
        sb.append(this._message);
      }
      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 (_message != null) {
        _message.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 requeueSilent_argsStandardSchemeFactory implements SchemeFactory {
      public requeueSilent_argsStandardScheme getScheme() {
        return new requeueSilent_argsStandardScheme();
      }
    }

    private static class requeueSilent_argsStandardScheme extends StandardScheme {

      public void read(org.apache.thrift.protocol.TProtocol iprot, requeueSilent_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: // _SECRET
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct._secret = iprot.readString();
                struct.set_secretIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // _QUEUE_NAME
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct._queueName = iprot.readString();
                struct.set_queueNameIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 3: // _MESSAGE
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct._message = new TQueueMessage();
                struct._message.read(iprot);
                struct.set_messageIsSet(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, requeueSilent_args struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct._secret != null) {
          oprot.writeFieldBegin(_SECRET_FIELD_DESC);
          oprot.writeString(struct._secret);
          oprot.writeFieldEnd();
        }
        if (struct._queueName != null) {
          oprot.writeFieldBegin(_QUEUE_NAME_FIELD_DESC);
          oprot.writeString(struct._queueName);
          oprot.writeFieldEnd();
        }
        if (struct._message != null) {
          oprot.writeFieldBegin(_MESSAGE_FIELD_DESC);
          struct._message.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class requeueSilent_argsTupleSchemeFactory implements SchemeFactory {
      public requeueSilent_argsTupleScheme getScheme() {
        return new requeueSilent_argsTupleScheme();
      }
    }

    private static class requeueSilent_argsTupleScheme extends TupleScheme {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, requeueSilent_args struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSet_secret()) {
          optionals.set(0);
        }
        if (struct.isSet_queueName()) {
          optionals.set(1);
        }
        if (struct.isSet_message()) {
          optionals.set(2);
        }
        oprot.writeBitSet(optionals, 3);
        if (struct.isSet_secret()) {
          oprot.writeString(struct._secret);
        }
        if (struct.isSet_queueName()) {
          oprot.writeString(struct._queueName);
        }
        if (struct.isSet_message()) {
          struct._message.write(oprot);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, requeueSilent_args struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(3);
        if (incoming.get(0)) {
          struct._secret = iprot.readString();
          struct.set_secretIsSet(true);
        }
        if (incoming.get(1)) {
          struct._queueName = iprot.readString();
          struct.set_queueNameIsSet(true);
        }
        if (incoming.get(2)) {
          struct._message = new TQueueMessage();
          struct._message.read(iprot);
          struct.set_messageIsSet(true);
        }
      }
    }

  }

  public static class requeueSilent_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("requeueSilent_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 Map, SchemeFactory> schemes = new HashMap, SchemeFactory>();
    static {
      schemes.put(StandardScheme.class, new requeueSilent_resultStandardSchemeFactory());
      schemes.put(TupleScheme.class, new requeueSilent_resultTupleSchemeFactory());
    }

    public TQueueResponse success; // 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");

      private static final Map byName = new HashMap();

      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;
          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, TQueueResponse.class)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(requeueSilent_result.class, metaDataMap);
    }

    public requeueSilent_result() {
    }

    public requeueSilent_result(
      TQueueResponse success)
    {
      this();
      this.success = success;
    }

    /**
     * Performs a deep copy on other.
     */
    public requeueSilent_result(requeueSilent_result other) {
      if (other.isSetSuccess()) {
        this.success = new TQueueResponse(other.success);
      }
    }

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

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

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

    public requeueSilent_result setSuccess(TQueueResponse 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 void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((TQueueResponse)value);
        }
        break;

      }
    }

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

      }
      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();
      }
      throw new IllegalStateException();
    }

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

    public boolean equals(requeueSilent_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;
      }

      return true;
    }

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

    @Override
    public int compareTo(requeueSilent_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;
        }
      }
      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("requeueSilent_result(");
      boolean first = true;

      sb.append("success:");
      if (this.success == null) {
        sb.append("null");
      } else {
        sb.append(this.success);
      }
      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 requeueSilent_resultStandardSchemeFactory implements SchemeFactory {
      public requeueSilent_resultStandardScheme getScheme() {
        return new requeueSilent_resultStandardScheme();
      }
    }

    private static class requeueSilent_resultStandardScheme extends StandardScheme {

      public void read(org.apache.thrift.protocol.TProtocol iprot, requeueSilent_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 TQueueResponse();
                struct.success.read(iprot);
                struct.setSuccessIsSet(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, requeueSilent_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();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class requeueSilent_resultTupleSchemeFactory implements SchemeFactory {
      public requeueSilent_resultTupleScheme getScheme() {
        return new requeueSilent_resultTupleScheme();
      }
    }

    private static class requeueSilent_resultTupleScheme extends TupleScheme {

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

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

  }

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

    private static final org.apache.thrift.protocol.TField _SECRET_FIELD_DESC = new org.apache.thrift.protocol.TField("_secret", org.apache.thrift.protocol.TType.STRING, (short)1);
    private static final org.apache.thrift.protocol.TField _QUEUE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("_queueName", org.apache.thrift.protocol.TType.STRING, (short)2);
    private static final org.apache.thrift.protocol.TField _MESSAGE_FIELD_DESC = new org.apache.thrift.protocol.TField("_message", org.apache.thrift.protocol.TType.STRUCT, (short)3);

    private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>();
    static {
      schemes.put(StandardScheme.class, new finish_argsStandardSchemeFactory());
      schemes.put(TupleScheme.class, new finish_argsTupleSchemeFactory());
    }

    public String _secret; // required
    public String _queueName; // required
    public TQueueMessage _message; // 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 {
      _SECRET((short)1, "_secret"),
      _QUEUE_NAME((short)2, "_queueName"),
      _MESSAGE((short)3, "_message");

      private static final Map byName = new HashMap();

      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: // _SECRET
            return _SECRET;
          case 2: // _QUEUE_NAME
            return _QUEUE_NAME;
          case 3: // _MESSAGE
            return _MESSAGE;
          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._SECRET, new org.apache.thrift.meta_data.FieldMetaData("_secret", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
      tmpMap.put(_Fields._QUEUE_NAME, new org.apache.thrift.meta_data.FieldMetaData("_queueName", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
      tmpMap.put(_Fields._MESSAGE, new org.apache.thrift.meta_data.FieldMetaData("_message", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TQueueMessage.class)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(finish_args.class, metaDataMap);
    }

    public finish_args() {
    }

    public finish_args(
      String _secret,
      String _queueName,
      TQueueMessage _message)
    {
      this();
      this._secret = _secret;
      this._queueName = _queueName;
      this._message = _message;
    }

    /**
     * Performs a deep copy on other.
     */
    public finish_args(finish_args other) {
      if (other.isSet_secret()) {
        this._secret = other._secret;
      }
      if (other.isSet_queueName()) {
        this._queueName = other._queueName;
      }
      if (other.isSet_message()) {
        this._message = new TQueueMessage(other._message);
      }
    }

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

    @Override
    public void clear() {
      this._secret = null;
      this._queueName = null;
      this._message = null;
    }

    public String get_secret() {
      return this._secret;
    }

    public finish_args set_secret(String _secret) {
      this._secret = _secret;
      return this;
    }

    public void unset_secret() {
      this._secret = null;
    }

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

    public void set_secretIsSet(boolean value) {
      if (!value) {
        this._secret = null;
      }
    }

    public String get_queueName() {
      return this._queueName;
    }

    public finish_args set_queueName(String _queueName) {
      this._queueName = _queueName;
      return this;
    }

    public void unset_queueName() {
      this._queueName = null;
    }

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

    public void set_queueNameIsSet(boolean value) {
      if (!value) {
        this._queueName = null;
      }
    }

    public TQueueMessage get_message() {
      return this._message;
    }

    public finish_args set_message(TQueueMessage _message) {
      this._message = _message;
      return this;
    }

    public void unset_message() {
      this._message = null;
    }

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

    public void set_messageIsSet(boolean value) {
      if (!value) {
        this._message = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case _SECRET:
        if (value == null) {
          unset_secret();
        } else {
          set_secret((String)value);
        }
        break;

      case _QUEUE_NAME:
        if (value == null) {
          unset_queueName();
        } else {
          set_queueName((String)value);
        }
        break;

      case _MESSAGE:
        if (value == null) {
          unset_message();
        } else {
          set_message((TQueueMessage)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case _SECRET:
        return get_secret();

      case _QUEUE_NAME:
        return get_queueName();

      case _MESSAGE:
        return get_message();

      }
      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 _SECRET:
        return isSet_secret();
      case _QUEUE_NAME:
        return isSet_queueName();
      case _MESSAGE:
        return isSet_message();
      }
      throw new IllegalStateException();
    }

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

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

      boolean this_present__secret = true && this.isSet_secret();
      boolean that_present__secret = true && that.isSet_secret();
      if (this_present__secret || that_present__secret) {
        if (!(this_present__secret && that_present__secret))
          return false;
        if (!this._secret.equals(that._secret))
          return false;
      }

      boolean this_present__queueName = true && this.isSet_queueName();
      boolean that_present__queueName = true && that.isSet_queueName();
      if (this_present__queueName || that_present__queueName) {
        if (!(this_present__queueName && that_present__queueName))
          return false;
        if (!this._queueName.equals(that._queueName))
          return false;
      }

      boolean this_present__message = true && this.isSet_message();
      boolean that_present__message = true && that.isSet_message();
      if (this_present__message || that_present__message) {
        if (!(this_present__message && that_present__message))
          return false;
        if (!this._message.equals(that._message))
          return false;
      }

      return true;
    }

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

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

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSet_secret()).compareTo(other.isSet_secret());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSet_secret()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this._secret, other._secret);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSet_queueName()).compareTo(other.isSet_queueName());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSet_queueName()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this._queueName, other._queueName);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSet_message()).compareTo(other.isSet_message());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSet_message()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this._message, other._message);
        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("finish_args(");
      boolean first = true;

      sb.append("_secret:");
      if (this._secret == null) {
        sb.append("null");
      } else {
        sb.append(this._secret);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("_queueName:");
      if (this._queueName == null) {
        sb.append("null");
      } else {
        sb.append(this._queueName);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("_message:");
      if (this._message == null) {
        sb.append("null");
      } else {
        sb.append(this._message);
      }
      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 (_message != null) {
        _message.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 finish_argsStandardSchemeFactory implements SchemeFactory {
      public finish_argsStandardScheme getScheme() {
        return new finish_argsStandardScheme();
      }
    }

    private static class finish_argsStandardScheme extends StandardScheme {

      public void read(org.apache.thrift.protocol.TProtocol iprot, finish_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: // _SECRET
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct._secret = iprot.readString();
                struct.set_secretIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // _QUEUE_NAME
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct._queueName = iprot.readString();
                struct.set_queueNameIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 3: // _MESSAGE
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct._message = new TQueueMessage();
                struct._message.read(iprot);
                struct.set_messageIsSet(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, finish_args struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct._secret != null) {
          oprot.writeFieldBegin(_SECRET_FIELD_DESC);
          oprot.writeString(struct._secret);
          oprot.writeFieldEnd();
        }
        if (struct._queueName != null) {
          oprot.writeFieldBegin(_QUEUE_NAME_FIELD_DESC);
          oprot.writeString(struct._queueName);
          oprot.writeFieldEnd();
        }
        if (struct._message != null) {
          oprot.writeFieldBegin(_MESSAGE_FIELD_DESC);
          struct._message.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class finish_argsTupleSchemeFactory implements SchemeFactory {
      public finish_argsTupleScheme getScheme() {
        return new finish_argsTupleScheme();
      }
    }

    private static class finish_argsTupleScheme extends TupleScheme {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, finish_args struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSet_secret()) {
          optionals.set(0);
        }
        if (struct.isSet_queueName()) {
          optionals.set(1);
        }
        if (struct.isSet_message()) {
          optionals.set(2);
        }
        oprot.writeBitSet(optionals, 3);
        if (struct.isSet_secret()) {
          oprot.writeString(struct._secret);
        }
        if (struct.isSet_queueName()) {
          oprot.writeString(struct._queueName);
        }
        if (struct.isSet_message()) {
          struct._message.write(oprot);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, finish_args struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(3);
        if (incoming.get(0)) {
          struct._secret = iprot.readString();
          struct.set_secretIsSet(true);
        }
        if (incoming.get(1)) {
          struct._queueName = iprot.readString();
          struct.set_queueNameIsSet(true);
        }
        if (incoming.get(2)) {
          struct._message = new TQueueMessage();
          struct._message.read(iprot);
          struct.set_messageIsSet(true);
        }
      }
    }

  }

  public static class finish_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("finish_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 Map, SchemeFactory> schemes = new HashMap, SchemeFactory>();
    static {
      schemes.put(StandardScheme.class, new finish_resultStandardSchemeFactory());
      schemes.put(TupleScheme.class, new finish_resultTupleSchemeFactory());
    }

    public TQueueResponse success; // 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");

      private static final Map byName = new HashMap();

      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;
          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, TQueueResponse.class)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(finish_result.class, metaDataMap);
    }

    public finish_result() {
    }

    public finish_result(
      TQueueResponse success)
    {
      this();
      this.success = success;
    }

    /**
     * Performs a deep copy on other.
     */
    public finish_result(finish_result other) {
      if (other.isSetSuccess()) {
        this.success = new TQueueResponse(other.success);
      }
    }

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

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

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

    public finish_result setSuccess(TQueueResponse 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 void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((TQueueResponse)value);
        }
        break;

      }
    }

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

      }
      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();
      }
      throw new IllegalStateException();
    }

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

    public boolean equals(finish_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;
      }

      return true;
    }

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

    @Override
    public int compareTo(finish_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;
        }
      }
      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("finish_result(");
      boolean first = true;

      sb.append("success:");
      if (this.success == null) {
        sb.append("null");
      } else {
        sb.append(this.success);
      }
      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 finish_resultStandardSchemeFactory implements SchemeFactory {
      public finish_resultStandardScheme getScheme() {
        return new finish_resultStandardScheme();
      }
    }

    private static class finish_resultStandardScheme extends StandardScheme {

      public void read(org.apache.thrift.protocol.TProtocol iprot, finish_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 TQueueResponse();
                struct.success.read(iprot);
                struct.setSuccessIsSet(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, finish_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();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class finish_resultTupleSchemeFactory implements SchemeFactory {
      public finish_resultTupleScheme getScheme() {
        return new finish_resultTupleScheme();
      }
    }

    private static class finish_resultTupleScheme extends TupleScheme {

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

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

  }

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

    private static final org.apache.thrift.protocol.TField _SECRET_FIELD_DESC = new org.apache.thrift.protocol.TField("_secret", org.apache.thrift.protocol.TType.STRING, (short)1);
    private static final org.apache.thrift.protocol.TField _QUEUE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("_queueName", org.apache.thrift.protocol.TType.STRING, (short)2);

    private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>();
    static {
      schemes.put(StandardScheme.class, new take_argsStandardSchemeFactory());
      schemes.put(TupleScheme.class, new take_argsTupleSchemeFactory());
    }

    public String _secret; // required
    public String _queueName; // 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 {
      _SECRET((short)1, "_secret"),
      _QUEUE_NAME((short)2, "_queueName");

      private static final Map byName = new HashMap();

      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: // _SECRET
            return _SECRET;
          case 2: // _QUEUE_NAME
            return _QUEUE_NAME;
          default:
            return null;
        }
      }

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

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

      private final short _thriftId;
      private final String _fieldName;

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

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields._SECRET, new org.apache.thrift.meta_data.FieldMetaData("_secret", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
      tmpMap.put(_Fields._QUEUE_NAME, new org.apache.thrift.meta_data.FieldMetaData("_queueName", 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(take_args.class, metaDataMap);
    }

    public take_args() {
    }

    public take_args(
      String _secret,
      String _queueName)
    {
      this();
      this._secret = _secret;
      this._queueName = _queueName;
    }

    /**
     * Performs a deep copy on other.
     */
    public take_args(take_args other) {
      if (other.isSet_secret()) {
        this._secret = other._secret;
      }
      if (other.isSet_queueName()) {
        this._queueName = other._queueName;
      }
    }

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

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

    public String get_secret() {
      return this._secret;
    }

    public take_args set_secret(String _secret) {
      this._secret = _secret;
      return this;
    }

    public void unset_secret() {
      this._secret = null;
    }

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

    public void set_secretIsSet(boolean value) {
      if (!value) {
        this._secret = null;
      }
    }

    public String get_queueName() {
      return this._queueName;
    }

    public take_args set_queueName(String _queueName) {
      this._queueName = _queueName;
      return this;
    }

    public void unset_queueName() {
      this._queueName = null;
    }

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

    public void set_queueNameIsSet(boolean value) {
      if (!value) {
        this._queueName = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case _SECRET:
        if (value == null) {
          unset_secret();
        } else {
          set_secret((String)value);
        }
        break;

      case _QUEUE_NAME:
        if (value == null) {
          unset_queueName();
        } else {
          set_queueName((String)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case _SECRET:
        return get_secret();

      case _QUEUE_NAME:
        return get_queueName();

      }
      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 _SECRET:
        return isSet_secret();
      case _QUEUE_NAME:
        return isSet_queueName();
      }
      throw new IllegalStateException();
    }

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

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

      boolean this_present__secret = true && this.isSet_secret();
      boolean that_present__secret = true && that.isSet_secret();
      if (this_present__secret || that_present__secret) {
        if (!(this_present__secret && that_present__secret))
          return false;
        if (!this._secret.equals(that._secret))
          return false;
      }

      boolean this_present__queueName = true && this.isSet_queueName();
      boolean that_present__queueName = true && that.isSet_queueName();
      if (this_present__queueName || that_present__queueName) {
        if (!(this_present__queueName && that_present__queueName))
          return false;
        if (!this._queueName.equals(that._queueName))
          return false;
      }

      return true;
    }

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

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

      int lastComparison = 0;

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

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

    private static class take_argsStandardScheme extends StandardScheme {

      public void read(org.apache.thrift.protocol.TProtocol iprot, take_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: // _SECRET
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct._secret = iprot.readString();
                struct.set_secretIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // _QUEUE_NAME
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct._queueName = iprot.readString();
                struct.set_queueNameIsSet(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, take_args struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct._secret != null) {
          oprot.writeFieldBegin(_SECRET_FIELD_DESC);
          oprot.writeString(struct._secret);
          oprot.writeFieldEnd();
        }
        if (struct._queueName != null) {
          oprot.writeFieldBegin(_QUEUE_NAME_FIELD_DESC);
          oprot.writeString(struct._queueName);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class take_argsTupleSchemeFactory implements SchemeFactory {
      public take_argsTupleScheme getScheme() {
        return new take_argsTupleScheme();
      }
    }

    private static class take_argsTupleScheme extends TupleScheme {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, take_args struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSet_secret()) {
          optionals.set(0);
        }
        if (struct.isSet_queueName()) {
          optionals.set(1);
        }
        oprot.writeBitSet(optionals, 2);
        if (struct.isSet_secret()) {
          oprot.writeString(struct._secret);
        }
        if (struct.isSet_queueName()) {
          oprot.writeString(struct._queueName);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, take_args struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(2);
        if (incoming.get(0)) {
          struct._secret = iprot.readString();
          struct.set_secretIsSet(true);
        }
        if (incoming.get(1)) {
          struct._queueName = iprot.readString();
          struct.set_queueNameIsSet(true);
        }
      }
    }

  }

  public static class take_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("take_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 Map, SchemeFactory> schemes = new HashMap, SchemeFactory>();
    static {
      schemes.put(StandardScheme.class, new take_resultStandardSchemeFactory());
      schemes.put(TupleScheme.class, new take_resultTupleSchemeFactory());
    }

    public TQueueResponse success; // 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");

      private static final Map byName = new HashMap();

      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;
          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, TQueueResponse.class)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(take_result.class, metaDataMap);
    }

    public take_result() {
    }

    public take_result(
      TQueueResponse success)
    {
      this();
      this.success = success;
    }

    /**
     * Performs a deep copy on other.
     */
    public take_result(take_result other) {
      if (other.isSetSuccess()) {
        this.success = new TQueueResponse(other.success);
      }
    }

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

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

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

    public take_result setSuccess(TQueueResponse 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 void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((TQueueResponse)value);
        }
        break;

      }
    }

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

      }
      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();
      }
      throw new IllegalStateException();
    }

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

    public boolean equals(take_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;
      }

      return true;
    }

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

    @Override
    public int compareTo(take_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;
        }
      }
      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("take_result(");
      boolean first = true;

      sb.append("success:");
      if (this.success == null) {
        sb.append("null");
      } else {
        sb.append(this.success);
      }
      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 take_resultStandardSchemeFactory implements SchemeFactory {
      public take_resultStandardScheme getScheme() {
        return new take_resultStandardScheme();
      }
    }

    private static class take_resultStandardScheme extends StandardScheme {

      public void read(org.apache.thrift.protocol.TProtocol iprot, take_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 TQueueResponse();
                struct.success.read(iprot);
                struct.setSuccessIsSet(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, take_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();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class take_resultTupleSchemeFactory implements SchemeFactory {
      public take_resultTupleScheme getScheme() {
        return new take_resultTupleScheme();
      }
    }

    private static class take_resultTupleScheme extends TupleScheme {

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

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

  }

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

    private static final org.apache.thrift.protocol.TField _SECRET_FIELD_DESC = new org.apache.thrift.protocol.TField("_secret", org.apache.thrift.protocol.TType.STRING, (short)1);
    private static final org.apache.thrift.protocol.TField _QUEUE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("_queueName", org.apache.thrift.protocol.TType.STRING, (short)2);

    private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>();
    static {
      schemes.put(StandardScheme.class, new queueSize_argsStandardSchemeFactory());
      schemes.put(TupleScheme.class, new queueSize_argsTupleSchemeFactory());
    }

    public String _secret; // required
    public String _queueName; // 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 {
      _SECRET((short)1, "_secret"),
      _QUEUE_NAME((short)2, "_queueName");

      private static final Map byName = new HashMap();

      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: // _SECRET
            return _SECRET;
          case 2: // _QUEUE_NAME
            return _QUEUE_NAME;
          default:
            return null;
        }
      }

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

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

      private final short _thriftId;
      private final String _fieldName;

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

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields._SECRET, new org.apache.thrift.meta_data.FieldMetaData("_secret", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
      tmpMap.put(_Fields._QUEUE_NAME, new org.apache.thrift.meta_data.FieldMetaData("_queueName", 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(queueSize_args.class, metaDataMap);
    }

    public queueSize_args() {
    }

    public queueSize_args(
      String _secret,
      String _queueName)
    {
      this();
      this._secret = _secret;
      this._queueName = _queueName;
    }

    /**
     * Performs a deep copy on other.
     */
    public queueSize_args(queueSize_args other) {
      if (other.isSet_secret()) {
        this._secret = other._secret;
      }
      if (other.isSet_queueName()) {
        this._queueName = other._queueName;
      }
    }

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

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

    public String get_secret() {
      return this._secret;
    }

    public queueSize_args set_secret(String _secret) {
      this._secret = _secret;
      return this;
    }

    public void unset_secret() {
      this._secret = null;
    }

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

    public void set_secretIsSet(boolean value) {
      if (!value) {
        this._secret = null;
      }
    }

    public String get_queueName() {
      return this._queueName;
    }

    public queueSize_args set_queueName(String _queueName) {
      this._queueName = _queueName;
      return this;
    }

    public void unset_queueName() {
      this._queueName = null;
    }

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

    public void set_queueNameIsSet(boolean value) {
      if (!value) {
        this._queueName = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case _SECRET:
        if (value == null) {
          unset_secret();
        } else {
          set_secret((String)value);
        }
        break;

      case _QUEUE_NAME:
        if (value == null) {
          unset_queueName();
        } else {
          set_queueName((String)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case _SECRET:
        return get_secret();

      case _QUEUE_NAME:
        return get_queueName();

      }
      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 _SECRET:
        return isSet_secret();
      case _QUEUE_NAME:
        return isSet_queueName();
      }
      throw new IllegalStateException();
    }

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

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

      boolean this_present__secret = true && this.isSet_secret();
      boolean that_present__secret = true && that.isSet_secret();
      if (this_present__secret || that_present__secret) {
        if (!(this_present__secret && that_present__secret))
          return false;
        if (!this._secret.equals(that._secret))
          return false;
      }

      boolean this_present__queueName = true && this.isSet_queueName();
      boolean that_present__queueName = true && that.isSet_queueName();
      if (this_present__queueName || that_present__queueName) {
        if (!(this_present__queueName && that_present__queueName))
          return false;
        if (!this._queueName.equals(that._queueName))
          return false;
      }

      return true;
    }

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

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

      int lastComparison = 0;

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

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

    private static class queueSize_argsStandardScheme extends StandardScheme {

      public void read(org.apache.thrift.protocol.TProtocol iprot, queueSize_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: // _SECRET
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct._secret = iprot.readString();
                struct.set_secretIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // _QUEUE_NAME
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct._queueName = iprot.readString();
                struct.set_queueNameIsSet(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, queueSize_args struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct._secret != null) {
          oprot.writeFieldBegin(_SECRET_FIELD_DESC);
          oprot.writeString(struct._secret);
          oprot.writeFieldEnd();
        }
        if (struct._queueName != null) {
          oprot.writeFieldBegin(_QUEUE_NAME_FIELD_DESC);
          oprot.writeString(struct._queueName);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class queueSize_argsTupleSchemeFactory implements SchemeFactory {
      public queueSize_argsTupleScheme getScheme() {
        return new queueSize_argsTupleScheme();
      }
    }

    private static class queueSize_argsTupleScheme extends TupleScheme {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, queueSize_args struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSet_secret()) {
          optionals.set(0);
        }
        if (struct.isSet_queueName()) {
          optionals.set(1);
        }
        oprot.writeBitSet(optionals, 2);
        if (struct.isSet_secret()) {
          oprot.writeString(struct._secret);
        }
        if (struct.isSet_queueName()) {
          oprot.writeString(struct._queueName);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, queueSize_args struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(2);
        if (incoming.get(0)) {
          struct._secret = iprot.readString();
          struct.set_secretIsSet(true);
        }
        if (incoming.get(1)) {
          struct._queueName = iprot.readString();
          struct.set_queueNameIsSet(true);
        }
      }
    }

  }

  public static class queueSize_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("queueSize_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 Map, SchemeFactory> schemes = new HashMap, SchemeFactory>();
    static {
      schemes.put(StandardScheme.class, new queueSize_resultStandardSchemeFactory());
      schemes.put(TupleScheme.class, new queueSize_resultTupleSchemeFactory());
    }

    public TQueueSizeResponse success; // 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");

      private static final Map byName = new HashMap();

      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;
          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, TQueueSizeResponse.class)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(queueSize_result.class, metaDataMap);
    }

    public queueSize_result() {
    }

    public queueSize_result(
      TQueueSizeResponse success)
    {
      this();
      this.success = success;
    }

    /**
     * Performs a deep copy on other.
     */
    public queueSize_result(queueSize_result other) {
      if (other.isSetSuccess()) {
        this.success = new TQueueSizeResponse(other.success);
      }
    }

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

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

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

    public queueSize_result setSuccess(TQueueSizeResponse 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 void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((TQueueSizeResponse)value);
        }
        break;

      }
    }

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

      }
      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();
      }
      throw new IllegalStateException();
    }

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

    public boolean equals(queueSize_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;
      }

      return true;
    }

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

    @Override
    public int compareTo(queueSize_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;
        }
      }
      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("queueSize_result(");
      boolean first = true;

      sb.append("success:");
      if (this.success == null) {
        sb.append("null");
      } else {
        sb.append(this.success);
      }
      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 queueSize_resultStandardSchemeFactory implements SchemeFactory {
      public queueSize_resultStandardScheme getScheme() {
        return new queueSize_resultStandardScheme();
      }
    }

    private static class queueSize_resultStandardScheme extends StandardScheme {

      public void read(org.apache.thrift.protocol.TProtocol iprot, queueSize_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 TQueueSizeResponse();
                struct.success.read(iprot);
                struct.setSuccessIsSet(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, queueSize_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();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class queueSize_resultTupleSchemeFactory implements SchemeFactory {
      public queueSize_resultTupleScheme getScheme() {
        return new queueSize_resultTupleScheme();
      }
    }

    private static class queueSize_resultTupleScheme extends TupleScheme {

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

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

  }

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

    private static final org.apache.thrift.protocol.TField _SECRET_FIELD_DESC = new org.apache.thrift.protocol.TField("_secret", org.apache.thrift.protocol.TType.STRING, (short)1);
    private static final org.apache.thrift.protocol.TField _QUEUE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("_queueName", org.apache.thrift.protocol.TType.STRING, (short)2);

    private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>();
    static {
      schemes.put(StandardScheme.class, new ephemeralSize_argsStandardSchemeFactory());
      schemes.put(TupleScheme.class, new ephemeralSize_argsTupleSchemeFactory());
    }

    public String _secret; // required
    public String _queueName; // 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 {
      _SECRET((short)1, "_secret"),
      _QUEUE_NAME((short)2, "_queueName");

      private static final Map byName = new HashMap();

      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: // _SECRET
            return _SECRET;
          case 2: // _QUEUE_NAME
            return _QUEUE_NAME;
          default:
            return null;
        }
      }

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

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

      private final short _thriftId;
      private final String _fieldName;

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

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields._SECRET, new org.apache.thrift.meta_data.FieldMetaData("_secret", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
      tmpMap.put(_Fields._QUEUE_NAME, new org.apache.thrift.meta_data.FieldMetaData("_queueName", 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(ephemeralSize_args.class, metaDataMap);
    }

    public ephemeralSize_args() {
    }

    public ephemeralSize_args(
      String _secret,
      String _queueName)
    {
      this();
      this._secret = _secret;
      this._queueName = _queueName;
    }

    /**
     * Performs a deep copy on other.
     */
    public ephemeralSize_args(ephemeralSize_args other) {
      if (other.isSet_secret()) {
        this._secret = other._secret;
      }
      if (other.isSet_queueName()) {
        this._queueName = other._queueName;
      }
    }

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

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

    public String get_secret() {
      return this._secret;
    }

    public ephemeralSize_args set_secret(String _secret) {
      this._secret = _secret;
      return this;
    }

    public void unset_secret() {
      this._secret = null;
    }

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

    public void set_secretIsSet(boolean value) {
      if (!value) {
        this._secret = null;
      }
    }

    public String get_queueName() {
      return this._queueName;
    }

    public ephemeralSize_args set_queueName(String _queueName) {
      this._queueName = _queueName;
      return this;
    }

    public void unset_queueName() {
      this._queueName = null;
    }

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

    public void set_queueNameIsSet(boolean value) {
      if (!value) {
        this._queueName = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case _SECRET:
        if (value == null) {
          unset_secret();
        } else {
          set_secret((String)value);
        }
        break;

      case _QUEUE_NAME:
        if (value == null) {
          unset_queueName();
        } else {
          set_queueName((String)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case _SECRET:
        return get_secret();

      case _QUEUE_NAME:
        return get_queueName();

      }
      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 _SECRET:
        return isSet_secret();
      case _QUEUE_NAME:
        return isSet_queueName();
      }
      throw new IllegalStateException();
    }

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

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

      boolean this_present__secret = true && this.isSet_secret();
      boolean that_present__secret = true && that.isSet_secret();
      if (this_present__secret || that_present__secret) {
        if (!(this_present__secret && that_present__secret))
          return false;
        if (!this._secret.equals(that._secret))
          return false;
      }

      boolean this_present__queueName = true && this.isSet_queueName();
      boolean that_present__queueName = true && that.isSet_queueName();
      if (this_present__queueName || that_present__queueName) {
        if (!(this_present__queueName && that_present__queueName))
          return false;
        if (!this._queueName.equals(that._queueName))
          return false;
      }

      return true;
    }

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

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

      int lastComparison = 0;

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

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

    private static class ephemeralSize_argsStandardScheme extends StandardScheme {

      public void read(org.apache.thrift.protocol.TProtocol iprot, ephemeralSize_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: // _SECRET
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct._secret = iprot.readString();
                struct.set_secretIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // _QUEUE_NAME
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct._queueName = iprot.readString();
                struct.set_queueNameIsSet(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, ephemeralSize_args struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct._secret != null) {
          oprot.writeFieldBegin(_SECRET_FIELD_DESC);
          oprot.writeString(struct._secret);
          oprot.writeFieldEnd();
        }
        if (struct._queueName != null) {
          oprot.writeFieldBegin(_QUEUE_NAME_FIELD_DESC);
          oprot.writeString(struct._queueName);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class ephemeralSize_argsTupleSchemeFactory implements SchemeFactory {
      public ephemeralSize_argsTupleScheme getScheme() {
        return new ephemeralSize_argsTupleScheme();
      }
    }

    private static class ephemeralSize_argsTupleScheme extends TupleScheme {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, ephemeralSize_args struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSet_secret()) {
          optionals.set(0);
        }
        if (struct.isSet_queueName()) {
          optionals.set(1);
        }
        oprot.writeBitSet(optionals, 2);
        if (struct.isSet_secret()) {
          oprot.writeString(struct._secret);
        }
        if (struct.isSet_queueName()) {
          oprot.writeString(struct._queueName);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, ephemeralSize_args struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(2);
        if (incoming.get(0)) {
          struct._secret = iprot.readString();
          struct.set_secretIsSet(true);
        }
        if (incoming.get(1)) {
          struct._queueName = iprot.readString();
          struct.set_queueNameIsSet(true);
        }
      }
    }

  }

  public static class ephemeralSize_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ephemeralSize_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 Map, SchemeFactory> schemes = new HashMap, SchemeFactory>();
    static {
      schemes.put(StandardScheme.class, new ephemeralSize_resultStandardSchemeFactory());
      schemes.put(TupleScheme.class, new ephemeralSize_resultTupleSchemeFactory());
    }

    public TQueueSizeResponse success; // 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");

      private static final Map byName = new HashMap();

      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;
          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, TQueueSizeResponse.class)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ephemeralSize_result.class, metaDataMap);
    }

    public ephemeralSize_result() {
    }

    public ephemeralSize_result(
      TQueueSizeResponse success)
    {
      this();
      this.success = success;
    }

    /**
     * Performs a deep copy on other.
     */
    public ephemeralSize_result(ephemeralSize_result other) {
      if (other.isSetSuccess()) {
        this.success = new TQueueSizeResponse(other.success);
      }
    }

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

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

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

    public ephemeralSize_result setSuccess(TQueueSizeResponse 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 void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((TQueueSizeResponse)value);
        }
        break;

      }
    }

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

      }
      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();
      }
      throw new IllegalStateException();
    }

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

    public boolean equals(ephemeralSize_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;
      }

      return true;
    }

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

    @Override
    public int compareTo(ephemeralSize_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;
        }
      }
      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("ephemeralSize_result(");
      boolean first = true;

      sb.append("success:");
      if (this.success == null) {
        sb.append("null");
      } else {
        sb.append(this.success);
      }
      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 ephemeralSize_resultStandardSchemeFactory implements SchemeFactory {
      public ephemeralSize_resultStandardScheme getScheme() {
        return new ephemeralSize_resultStandardScheme();
      }
    }

    private static class ephemeralSize_resultStandardScheme extends StandardScheme {

      public void read(org.apache.thrift.protocol.TProtocol iprot, ephemeralSize_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 TQueueSizeResponse();
                struct.success.read(iprot);
                struct.setSuccessIsSet(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, ephemeralSize_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();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class ephemeralSize_resultTupleSchemeFactory implements SchemeFactory {
      public ephemeralSize_resultTupleScheme getScheme() {
        return new ephemeralSize_resultTupleScheme();
      }
    }

    private static class ephemeralSize_resultTupleScheme extends TupleScheme {

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

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

  }

}