/**
 * Autogenerated by Thrift Compiler (0.12.0)
 *
 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
 *  @generated
 */
package confluo.rpc;

@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.12.0)", date = "2019-10-09")
public class rpc_service {

  public interface Iface {

    /**
     * Management ops *
     */
    public void registerHandler() throws rpc_management_exception, org.apache.thrift.TException;

    public void deregisterHandler() throws rpc_management_exception, org.apache.thrift.TException;

    public long createAtomicMultilog(java.lang.String name, java.util.List<rpc_column> schema, rpc_storage_mode mode) throws rpc_management_exception, org.apache.thrift.TException;

    public rpc_atomic_multilog_info loadAtomicMultilog(java.lang.String name) throws rpc_management_exception, org.apache.thrift.TException;

    public rpc_atomic_multilog_info getAtomicMultilogInfo(java.lang.String name) throws rpc_management_exception, org.apache.thrift.TException;

    public void removeAtomicMultilog(long mid) throws rpc_management_exception, org.apache.thrift.TException;

    public void addIndex(long mid, java.lang.String field_name, double bucket_size) throws rpc_management_exception, org.apache.thrift.TException;

    public void removeIndex(long mid, java.lang.String field_name) throws rpc_management_exception, org.apache.thrift.TException;

    public void addFilter(long mid, java.lang.String filter_id, java.lang.String filter_ex) throws rpc_management_exception, org.apache.thrift.TException;

    public void removeFilter(long mid, java.lang.String filter_id) throws rpc_management_exception, org.apache.thrift.TException;

    public void addAggregate(long mid, java.lang.String aggregate_name, java.lang.String filter_id, java.lang.String aggregate_expr) throws rpc_management_exception, org.apache.thrift.TException;

    public void removeAggregate(long mid, java.lang.String aggregate_name) throws rpc_management_exception, org.apache.thrift.TException;

    public void addTrigger(long mid, java.lang.String trigger_id, java.lang.String trigger_expr) throws rpc_management_exception, org.apache.thrift.TException;

    public void removeTrigger(long mid, java.lang.String trigger_id) throws rpc_management_exception, org.apache.thrift.TException;

    public void archive(long mid, long offset) throws rpc_management_exception, org.apache.thrift.TException;

    /**
     * Query ops *
     * 
     * @param mid
     * @param data
     */
    public long append(long mid, java.nio.ByteBuffer data) throws org.apache.thrift.TException;

    public long appendBatch(long mid, rpc_record_batch batch) throws org.apache.thrift.TException;

    public java.nio.ByteBuffer read(long mid, long offset, long nrecords) throws org.apache.thrift.TException;

    public java.lang.String queryAggregate(long mid, java.lang.String aggregate_name, long beg_ms, long end_ms) throws rpc_invalid_operation, org.apache.thrift.TException;

    public java.lang.String adhocAggregate(long mid, java.lang.String aggregate_expr, java.lang.String filter_ex) throws rpc_invalid_operation, org.apache.thrift.TException;

    public rpc_iterator_handle adhocFilter(long mid, java.lang.String filter_ex) throws rpc_invalid_operation, org.apache.thrift.TException;

    public rpc_iterator_handle predefFilter(long mid, java.lang.String filter_id, long beg_ms, long end_ms) throws rpc_invalid_operation, org.apache.thrift.TException;

    public rpc_iterator_handle combinedFilter(long mid, java.lang.String filter_id, java.lang.String filter_ex, long beg_ms, long end_ms) throws rpc_invalid_operation, org.apache.thrift.TException;

    public rpc_iterator_handle alertsByTime(long mid, long beg_ms, long end_ms) throws rpc_invalid_operation, org.apache.thrift.TException;

    public rpc_iterator_handle alertsByTriggerAndTime(long mid, java.lang.String trigger_id, long beg_ms, long end_ms) throws rpc_invalid_operation, org.apache.thrift.TException;

    public rpc_iterator_handle getMore(long mid, rpc_iterator_descriptor desc) throws rpc_invalid_operation, org.apache.thrift.TException;

    public long numRecords(long mid) throws org.apache.thrift.TException;

  }

  public interface AsyncIface {

    public void registerHandler(org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;

    public void deregisterHandler(org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;

    public void createAtomicMultilog(java.lang.String name, java.util.List<rpc_column> schema, rpc_storage_mode mode, org.apache.thrift.async.AsyncMethodCallback<java.lang.Long> resultHandler) throws org.apache.thrift.TException;

    public void loadAtomicMultilog(java.lang.String name, org.apache.thrift.async.AsyncMethodCallback<rpc_atomic_multilog_info> resultHandler) throws org.apache.thrift.TException;

    public void getAtomicMultilogInfo(java.lang.String name, org.apache.thrift.async.AsyncMethodCallback<rpc_atomic_multilog_info> resultHandler) throws org.apache.thrift.TException;

    public void removeAtomicMultilog(long mid, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;

    public void addIndex(long mid, java.lang.String field_name, double bucket_size, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;

    public void removeIndex(long mid, java.lang.String field_name, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;

    public void addFilter(long mid, java.lang.String filter_id, java.lang.String filter_ex, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;

    public void removeFilter(long mid, java.lang.String filter_id, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;

    public void addAggregate(long mid, java.lang.String aggregate_name, java.lang.String filter_id, java.lang.String aggregate_expr, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;

    public void removeAggregate(long mid, java.lang.String aggregate_name, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;

    public void addTrigger(long mid, java.lang.String trigger_id, java.lang.String trigger_expr, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;

    public void removeTrigger(long mid, java.lang.String trigger_id, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;

    public void archive(long mid, long offset, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;

    public void append(long mid, java.nio.ByteBuffer data, org.apache.thrift.async.AsyncMethodCallback<java.lang.Long> resultHandler) throws org.apache.thrift.TException;

    public void appendBatch(long mid, rpc_record_batch batch, org.apache.thrift.async.AsyncMethodCallback<java.lang.Long> resultHandler) throws org.apache.thrift.TException;

    public void read(long mid, long offset, long nrecords, org.apache.thrift.async.AsyncMethodCallback<java.nio.ByteBuffer> resultHandler) throws org.apache.thrift.TException;

    public void queryAggregate(long mid, java.lang.String aggregate_name, long beg_ms, long end_ms, org.apache.thrift.async.AsyncMethodCallback<java.lang.String> resultHandler) throws org.apache.thrift.TException;

    public void adhocAggregate(long mid, java.lang.String aggregate_expr, java.lang.String filter_ex, org.apache.thrift.async.AsyncMethodCallback<java.lang.String> resultHandler) throws org.apache.thrift.TException;

    public void adhocFilter(long mid, java.lang.String filter_ex, org.apache.thrift.async.AsyncMethodCallback<rpc_iterator_handle> resultHandler) throws org.apache.thrift.TException;

    public void predefFilter(long mid, java.lang.String filter_id, long beg_ms, long end_ms, org.apache.thrift.async.AsyncMethodCallback<rpc_iterator_handle> resultHandler) throws org.apache.thrift.TException;

    public void combinedFilter(long mid, java.lang.String filter_id, java.lang.String filter_ex, long beg_ms, long end_ms, org.apache.thrift.async.AsyncMethodCallback<rpc_iterator_handle> resultHandler) throws org.apache.thrift.TException;

    public void alertsByTime(long mid, long beg_ms, long end_ms, org.apache.thrift.async.AsyncMethodCallback<rpc_iterator_handle> resultHandler) throws org.apache.thrift.TException;

    public void alertsByTriggerAndTime(long mid, java.lang.String trigger_id, long beg_ms, long end_ms, org.apache.thrift.async.AsyncMethodCallback<rpc_iterator_handle> resultHandler) throws org.apache.thrift.TException;

    public void getMore(long mid, rpc_iterator_descriptor desc, org.apache.thrift.async.AsyncMethodCallback<rpc_iterator_handle> resultHandler) throws org.apache.thrift.TException;

    public void numRecords(long mid, org.apache.thrift.async.AsyncMethodCallback<java.lang.Long> resultHandler) throws org.apache.thrift.TException;

  }

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

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

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

    public void registerHandler() throws rpc_management_exception, org.apache.thrift.TException
    {
      sendRegisterHandler();
      recvRegisterHandler();
    }

    public void sendRegisterHandler() throws org.apache.thrift.TException
    {
      register_handler_args args = new register_handler_args();
      sendBase("register_handler", args);
    }

    public void recvRegisterHandler() throws rpc_management_exception, org.apache.thrift.TException
    {
      register_handler_result result = new register_handler_result();
      receiveBase(result, "register_handler");
      if (result.ex != null) {
        throw result.ex;
      }
      return;
    }

    public void deregisterHandler() throws rpc_management_exception, org.apache.thrift.TException
    {
      sendDeregisterHandler();
      recvDeregisterHandler();
    }

    public void sendDeregisterHandler() throws org.apache.thrift.TException
    {
      deregister_handler_args args = new deregister_handler_args();
      sendBase("deregister_handler", args);
    }

    public void recvDeregisterHandler() throws rpc_management_exception, org.apache.thrift.TException
    {
      deregister_handler_result result = new deregister_handler_result();
      receiveBase(result, "deregister_handler");
      if (result.ex != null) {
        throw result.ex;
      }
      return;
    }

    public long createAtomicMultilog(java.lang.String name, java.util.List<rpc_column> schema, rpc_storage_mode mode) throws rpc_management_exception, org.apache.thrift.TException
    {
      sendCreateAtomicMultilog(name, schema, mode);
      return recvCreateAtomicMultilog();
    }

    public void sendCreateAtomicMultilog(java.lang.String name, java.util.List<rpc_column> schema, rpc_storage_mode mode) throws org.apache.thrift.TException
    {
      create_atomic_multilog_args args = new create_atomic_multilog_args();
      args.setName(name);
      args.setSchema(schema);
      args.setMode(mode);
      sendBase("create_atomic_multilog", args);
    }

    public long recvCreateAtomicMultilog() throws rpc_management_exception, org.apache.thrift.TException
    {
      create_atomic_multilog_result result = new create_atomic_multilog_result();
      receiveBase(result, "create_atomic_multilog");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.ex != null) {
        throw result.ex;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "create_atomic_multilog failed: unknown result");
    }

    public rpc_atomic_multilog_info loadAtomicMultilog(java.lang.String name) throws rpc_management_exception, org.apache.thrift.TException
    {
      sendLoadAtomicMultilog(name);
      return recvLoadAtomicMultilog();
    }

    public void sendLoadAtomicMultilog(java.lang.String name) throws org.apache.thrift.TException
    {
      load_atomic_multilog_args args = new load_atomic_multilog_args();
      args.setName(name);
      sendBase("load_atomic_multilog", args);
    }

    public rpc_atomic_multilog_info recvLoadAtomicMultilog() throws rpc_management_exception, org.apache.thrift.TException
    {
      load_atomic_multilog_result result = new load_atomic_multilog_result();
      receiveBase(result, "load_atomic_multilog");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.ex != null) {
        throw result.ex;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "load_atomic_multilog failed: unknown result");
    }

    public rpc_atomic_multilog_info getAtomicMultilogInfo(java.lang.String name) throws rpc_management_exception, org.apache.thrift.TException
    {
      sendGetAtomicMultilogInfo(name);
      return recvGetAtomicMultilogInfo();
    }

    public void sendGetAtomicMultilogInfo(java.lang.String name) throws org.apache.thrift.TException
    {
      get_atomic_multilog_info_args args = new get_atomic_multilog_info_args();
      args.setName(name);
      sendBase("get_atomic_multilog_info", args);
    }

    public rpc_atomic_multilog_info recvGetAtomicMultilogInfo() throws rpc_management_exception, org.apache.thrift.TException
    {
      get_atomic_multilog_info_result result = new get_atomic_multilog_info_result();
      receiveBase(result, "get_atomic_multilog_info");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.ex != null) {
        throw result.ex;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_atomic_multilog_info failed: unknown result");
    }

    public void removeAtomicMultilog(long mid) throws rpc_management_exception, org.apache.thrift.TException
    {
      sendRemoveAtomicMultilog(mid);
      recvRemoveAtomicMultilog();
    }

    public void sendRemoveAtomicMultilog(long mid) throws org.apache.thrift.TException
    {
      remove_atomic_multilog_args args = new remove_atomic_multilog_args();
      args.setMid(mid);
      sendBase("remove_atomic_multilog", args);
    }

    public void recvRemoveAtomicMultilog() throws rpc_management_exception, org.apache.thrift.TException
    {
      remove_atomic_multilog_result result = new remove_atomic_multilog_result();
      receiveBase(result, "remove_atomic_multilog");
      if (result.ex != null) {
        throw result.ex;
      }
      return;
    }

    public void addIndex(long mid, java.lang.String field_name, double bucket_size) throws rpc_management_exception, org.apache.thrift.TException
    {
      sendAddIndex(mid, field_name, bucket_size);
      recvAddIndex();
    }

    public void sendAddIndex(long mid, java.lang.String field_name, double bucket_size) throws org.apache.thrift.TException
    {
      add_index_args args = new add_index_args();
      args.setMid(mid);
      args.setFieldName(field_name);
      args.setBucketSize(bucket_size);
      sendBase("add_index", args);
    }

    public void recvAddIndex() throws rpc_management_exception, org.apache.thrift.TException
    {
      add_index_result result = new add_index_result();
      receiveBase(result, "add_index");
      if (result.ex != null) {
        throw result.ex;
      }
      return;
    }

    public void removeIndex(long mid, java.lang.String field_name) throws rpc_management_exception, org.apache.thrift.TException
    {
      sendRemoveIndex(mid, field_name);
      recvRemoveIndex();
    }

    public void sendRemoveIndex(long mid, java.lang.String field_name) throws org.apache.thrift.TException
    {
      remove_index_args args = new remove_index_args();
      args.setMid(mid);
      args.setFieldName(field_name);
      sendBase("remove_index", args);
    }

    public void recvRemoveIndex() throws rpc_management_exception, org.apache.thrift.TException
    {
      remove_index_result result = new remove_index_result();
      receiveBase(result, "remove_index");
      if (result.ex != null) {
        throw result.ex;
      }
      return;
    }

    public void addFilter(long mid, java.lang.String filter_id, java.lang.String filter_ex) throws rpc_management_exception, org.apache.thrift.TException
    {
      sendAddFilter(mid, filter_id, filter_ex);
      recvAddFilter();
    }

    public void sendAddFilter(long mid, java.lang.String filter_id, java.lang.String filter_ex) throws org.apache.thrift.TException
    {
      add_filter_args args = new add_filter_args();
      args.setMid(mid);
      args.setFilterId(filter_id);
      args.setFilterEx(filter_ex);
      sendBase("add_filter", args);
    }

    public void recvAddFilter() throws rpc_management_exception, org.apache.thrift.TException
    {
      add_filter_result result = new add_filter_result();
      receiveBase(result, "add_filter");
      if (result.ex != null) {
        throw result.ex;
      }
      return;
    }

    public void removeFilter(long mid, java.lang.String filter_id) throws rpc_management_exception, org.apache.thrift.TException
    {
      sendRemoveFilter(mid, filter_id);
      recvRemoveFilter();
    }

    public void sendRemoveFilter(long mid, java.lang.String filter_id) throws org.apache.thrift.TException
    {
      remove_filter_args args = new remove_filter_args();
      args.setMid(mid);
      args.setFilterId(filter_id);
      sendBase("remove_filter", args);
    }

    public void recvRemoveFilter() throws rpc_management_exception, org.apache.thrift.TException
    {
      remove_filter_result result = new remove_filter_result();
      receiveBase(result, "remove_filter");
      if (result.ex != null) {
        throw result.ex;
      }
      return;
    }

    public void addAggregate(long mid, java.lang.String aggregate_name, java.lang.String filter_id, java.lang.String aggregate_expr) throws rpc_management_exception, org.apache.thrift.TException
    {
      sendAddAggregate(mid, aggregate_name, filter_id, aggregate_expr);
      recvAddAggregate();
    }

    public void sendAddAggregate(long mid, java.lang.String aggregate_name, java.lang.String filter_id, java.lang.String aggregate_expr) throws org.apache.thrift.TException
    {
      add_aggregate_args args = new add_aggregate_args();
      args.setMid(mid);
      args.setAggregateName(aggregate_name);
      args.setFilterId(filter_id);
      args.setAggregateExpr(aggregate_expr);
      sendBase("add_aggregate", args);
    }

    public void recvAddAggregate() throws rpc_management_exception, org.apache.thrift.TException
    {
      add_aggregate_result result = new add_aggregate_result();
      receiveBase(result, "add_aggregate");
      if (result.ex != null) {
        throw result.ex;
      }
      return;
    }

    public void removeAggregate(long mid, java.lang.String aggregate_name) throws rpc_management_exception, org.apache.thrift.TException
    {
      sendRemoveAggregate(mid, aggregate_name);
      recvRemoveAggregate();
    }

    public void sendRemoveAggregate(long mid, java.lang.String aggregate_name) throws org.apache.thrift.TException
    {
      remove_aggregate_args args = new remove_aggregate_args();
      args.setMid(mid);
      args.setAggregateName(aggregate_name);
      sendBase("remove_aggregate", args);
    }

    public void recvRemoveAggregate() throws rpc_management_exception, org.apache.thrift.TException
    {
      remove_aggregate_result result = new remove_aggregate_result();
      receiveBase(result, "remove_aggregate");
      if (result.ex != null) {
        throw result.ex;
      }
      return;
    }

    public void addTrigger(long mid, java.lang.String trigger_id, java.lang.String trigger_expr) throws rpc_management_exception, org.apache.thrift.TException
    {
      sendAddTrigger(mid, trigger_id, trigger_expr);
      recvAddTrigger();
    }

    public void sendAddTrigger(long mid, java.lang.String trigger_id, java.lang.String trigger_expr) throws org.apache.thrift.TException
    {
      add_trigger_args args = new add_trigger_args();
      args.setMid(mid);
      args.setTriggerId(trigger_id);
      args.setTriggerExpr(trigger_expr);
      sendBase("add_trigger", args);
    }

    public void recvAddTrigger() throws rpc_management_exception, org.apache.thrift.TException
    {
      add_trigger_result result = new add_trigger_result();
      receiveBase(result, "add_trigger");
      if (result.ex != null) {
        throw result.ex;
      }
      return;
    }

    public void removeTrigger(long mid, java.lang.String trigger_id) throws rpc_management_exception, org.apache.thrift.TException
    {
      sendRemoveTrigger(mid, trigger_id);
      recvRemoveTrigger();
    }

    public void sendRemoveTrigger(long mid, java.lang.String trigger_id) throws org.apache.thrift.TException
    {
      remove_trigger_args args = new remove_trigger_args();
      args.setMid(mid);
      args.setTriggerId(trigger_id);
      sendBase("remove_trigger", args);
    }

    public void recvRemoveTrigger() throws rpc_management_exception, org.apache.thrift.TException
    {
      remove_trigger_result result = new remove_trigger_result();
      receiveBase(result, "remove_trigger");
      if (result.ex != null) {
        throw result.ex;
      }
      return;
    }

    public void archive(long mid, long offset) throws rpc_management_exception, org.apache.thrift.TException
    {
      sendArchive(mid, offset);
      recvArchive();
    }

    public void sendArchive(long mid, long offset) throws org.apache.thrift.TException
    {
      archive_args args = new archive_args();
      args.setMid(mid);
      args.setOffset(offset);
      sendBase("archive", args);
    }

    public void recvArchive() throws rpc_management_exception, org.apache.thrift.TException
    {
      archive_result result = new archive_result();
      receiveBase(result, "archive");
      if (result.ex != null) {
        throw result.ex;
      }
      return;
    }

    public long append(long mid, java.nio.ByteBuffer data) throws org.apache.thrift.TException
    {
      sendAppend(mid, data);
      return recvAppend();
    }

    public void sendAppend(long mid, java.nio.ByteBuffer data) throws org.apache.thrift.TException
    {
      append_args args = new append_args();
      args.setMid(mid);
      args.setData(data);
      sendBase("append", args);
    }

    public long recvAppend() throws org.apache.thrift.TException
    {
      append_result result = new append_result();
      receiveBase(result, "append");
      if (result.isSetSuccess()) {
        return result.success;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "append failed: unknown result");
    }

    public long appendBatch(long mid, rpc_record_batch batch) throws org.apache.thrift.TException
    {
      sendAppendBatch(mid, batch);
      return recvAppendBatch();
    }

    public void sendAppendBatch(long mid, rpc_record_batch batch) throws org.apache.thrift.TException
    {
      append_batch_args args = new append_batch_args();
      args.setMid(mid);
      args.setBatch(batch);
      sendBase("append_batch", args);
    }

    public long recvAppendBatch() throws org.apache.thrift.TException
    {
      append_batch_result result = new append_batch_result();
      receiveBase(result, "append_batch");
      if (result.isSetSuccess()) {
        return result.success;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "append_batch failed: unknown result");
    }

    public java.nio.ByteBuffer read(long mid, long offset, long nrecords) throws org.apache.thrift.TException
    {
      sendRead(mid, offset, nrecords);
      return recvRead();
    }

    public void sendRead(long mid, long offset, long nrecords) throws org.apache.thrift.TException
    {
      read_args args = new read_args();
      args.setMid(mid);
      args.setOffset(offset);
      args.setNrecords(nrecords);
      sendBase("read", args);
    }

    public java.nio.ByteBuffer recvRead() throws org.apache.thrift.TException
    {
      read_result result = new read_result();
      receiveBase(result, "read");
      if (result.isSetSuccess()) {
        return result.success;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "read failed: unknown result");
    }

    public java.lang.String queryAggregate(long mid, java.lang.String aggregate_name, long beg_ms, long end_ms) throws rpc_invalid_operation, org.apache.thrift.TException
    {
      sendQueryAggregate(mid, aggregate_name, beg_ms, end_ms);
      return recvQueryAggregate();
    }

    public void sendQueryAggregate(long mid, java.lang.String aggregate_name, long beg_ms, long end_ms) throws org.apache.thrift.TException
    {
      query_aggregate_args args = new query_aggregate_args();
      args.setMid(mid);
      args.setAggregateName(aggregate_name);
      args.setBegMs(beg_ms);
      args.setEndMs(end_ms);
      sendBase("query_aggregate", args);
    }

    public java.lang.String recvQueryAggregate() throws rpc_invalid_operation, org.apache.thrift.TException
    {
      query_aggregate_result result = new query_aggregate_result();
      receiveBase(result, "query_aggregate");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.ex != null) {
        throw result.ex;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "query_aggregate failed: unknown result");
    }

    public java.lang.String adhocAggregate(long mid, java.lang.String aggregate_expr, java.lang.String filter_ex) throws rpc_invalid_operation, org.apache.thrift.TException
    {
      sendAdhocAggregate(mid, aggregate_expr, filter_ex);
      return recvAdhocAggregate();
    }

    public void sendAdhocAggregate(long mid, java.lang.String aggregate_expr, java.lang.String filter_ex) throws org.apache.thrift.TException
    {
      adhoc_aggregate_args args = new adhoc_aggregate_args();
      args.setMid(mid);
      args.setAggregateExpr(aggregate_expr);
      args.setFilterEx(filter_ex);
      sendBase("adhoc_aggregate", args);
    }

    public java.lang.String recvAdhocAggregate() throws rpc_invalid_operation, org.apache.thrift.TException
    {
      adhoc_aggregate_result result = new adhoc_aggregate_result();
      receiveBase(result, "adhoc_aggregate");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.ex != null) {
        throw result.ex;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "adhoc_aggregate failed: unknown result");
    }

    public rpc_iterator_handle adhocFilter(long mid, java.lang.String filter_ex) throws rpc_invalid_operation, org.apache.thrift.TException
    {
      sendAdhocFilter(mid, filter_ex);
      return recvAdhocFilter();
    }

    public void sendAdhocFilter(long mid, java.lang.String filter_ex) throws org.apache.thrift.TException
    {
      adhoc_filter_args args = new adhoc_filter_args();
      args.setMid(mid);
      args.setFilterEx(filter_ex);
      sendBase("adhoc_filter", args);
    }

    public rpc_iterator_handle recvAdhocFilter() throws rpc_invalid_operation, org.apache.thrift.TException
    {
      adhoc_filter_result result = new adhoc_filter_result();
      receiveBase(result, "adhoc_filter");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.ex != null) {
        throw result.ex;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "adhoc_filter failed: unknown result");
    }

    public rpc_iterator_handle predefFilter(long mid, java.lang.String filter_id, long beg_ms, long end_ms) throws rpc_invalid_operation, org.apache.thrift.TException
    {
      sendPredefFilter(mid, filter_id, beg_ms, end_ms);
      return recvPredefFilter();
    }

    public void sendPredefFilter(long mid, java.lang.String filter_id, long beg_ms, long end_ms) throws org.apache.thrift.TException
    {
      predef_filter_args args = new predef_filter_args();
      args.setMid(mid);
      args.setFilterId(filter_id);
      args.setBegMs(beg_ms);
      args.setEndMs(end_ms);
      sendBase("predef_filter", args);
    }

    public rpc_iterator_handle recvPredefFilter() throws rpc_invalid_operation, org.apache.thrift.TException
    {
      predef_filter_result result = new predef_filter_result();
      receiveBase(result, "predef_filter");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.ex != null) {
        throw result.ex;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "predef_filter failed: unknown result");
    }

    public rpc_iterator_handle combinedFilter(long mid, java.lang.String filter_id, java.lang.String filter_ex, long beg_ms, long end_ms) throws rpc_invalid_operation, org.apache.thrift.TException
    {
      sendCombinedFilter(mid, filter_id, filter_ex, beg_ms, end_ms);
      return recvCombinedFilter();
    }

    public void sendCombinedFilter(long mid, java.lang.String filter_id, java.lang.String filter_ex, long beg_ms, long end_ms) throws org.apache.thrift.TException
    {
      combined_filter_args args = new combined_filter_args();
      args.setMid(mid);
      args.setFilterId(filter_id);
      args.setFilterEx(filter_ex);
      args.setBegMs(beg_ms);
      args.setEndMs(end_ms);
      sendBase("combined_filter", args);
    }

    public rpc_iterator_handle recvCombinedFilter() throws rpc_invalid_operation, org.apache.thrift.TException
    {
      combined_filter_result result = new combined_filter_result();
      receiveBase(result, "combined_filter");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.ex != null) {
        throw result.ex;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "combined_filter failed: unknown result");
    }

    public rpc_iterator_handle alertsByTime(long mid, long beg_ms, long end_ms) throws rpc_invalid_operation, org.apache.thrift.TException
    {
      sendAlertsByTime(mid, beg_ms, end_ms);
      return recvAlertsByTime();
    }

    public void sendAlertsByTime(long mid, long beg_ms, long end_ms) throws org.apache.thrift.TException
    {
      alerts_by_time_args args = new alerts_by_time_args();
      args.setMid(mid);
      args.setBegMs(beg_ms);
      args.setEndMs(end_ms);
      sendBase("alerts_by_time", args);
    }

    public rpc_iterator_handle recvAlertsByTime() throws rpc_invalid_operation, org.apache.thrift.TException
    {
      alerts_by_time_result result = new alerts_by_time_result();
      receiveBase(result, "alerts_by_time");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.ex != null) {
        throw result.ex;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "alerts_by_time failed: unknown result");
    }

    public rpc_iterator_handle alertsByTriggerAndTime(long mid, java.lang.String trigger_id, long beg_ms, long end_ms) throws rpc_invalid_operation, org.apache.thrift.TException
    {
      sendAlertsByTriggerAndTime(mid, trigger_id, beg_ms, end_ms);
      return recvAlertsByTriggerAndTime();
    }

    public void sendAlertsByTriggerAndTime(long mid, java.lang.String trigger_id, long beg_ms, long end_ms) throws org.apache.thrift.TException
    {
      alerts_by_trigger_and_time_args args = new alerts_by_trigger_and_time_args();
      args.setMid(mid);
      args.setTriggerId(trigger_id);
      args.setBegMs(beg_ms);
      args.setEndMs(end_ms);
      sendBase("alerts_by_trigger_and_time", args);
    }

    public rpc_iterator_handle recvAlertsByTriggerAndTime() throws rpc_invalid_operation, org.apache.thrift.TException
    {
      alerts_by_trigger_and_time_result result = new alerts_by_trigger_and_time_result();
      receiveBase(result, "alerts_by_trigger_and_time");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.ex != null) {
        throw result.ex;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "alerts_by_trigger_and_time failed: unknown result");
    }

    public rpc_iterator_handle getMore(long mid, rpc_iterator_descriptor desc) throws rpc_invalid_operation, org.apache.thrift.TException
    {
      sendGetMore(mid, desc);
      return recvGetMore();
    }

    public void sendGetMore(long mid, rpc_iterator_descriptor desc) throws org.apache.thrift.TException
    {
      get_more_args args = new get_more_args();
      args.setMid(mid);
      args.setDesc(desc);
      sendBase("get_more", args);
    }

    public rpc_iterator_handle recvGetMore() throws rpc_invalid_operation, org.apache.thrift.TException
    {
      get_more_result result = new get_more_result();
      receiveBase(result, "get_more");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.ex != null) {
        throw result.ex;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_more failed: unknown result");
    }

    public long numRecords(long mid) throws org.apache.thrift.TException
    {
      sendNumRecords(mid);
      return recvNumRecords();
    }

    public void sendNumRecords(long mid) throws org.apache.thrift.TException
    {
      num_records_args args = new num_records_args();
      args.setMid(mid);
      sendBase("num_records", args);
    }

    public long recvNumRecords() throws org.apache.thrift.TException
    {
      num_records_result result = new num_records_result();
      receiveBase(result, "num_records");
      if (result.isSetSuccess()) {
        return result.success;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "num_records 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<AsyncClient> {
      private org.apache.thrift.async.TAsyncClientManager clientManager;
      private org.apache.thrift.protocol.TProtocolFactory protocolFactory;
      public Factory(org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.protocol.TProtocolFactory protocolFactory) {
        this.clientManager = clientManager;
        this.protocolFactory = protocolFactory;
      }
      public AsyncClient getAsyncClient(org.apache.thrift.transport.TNonblockingTransport transport) {
        return new AsyncClient(protocolFactory, clientManager, transport);
      }
    }

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

    public void registerHandler(org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      register_handler_call method_call = new register_handler_call(resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class register_handler_call extends org.apache.thrift.async.TAsyncMethodCall<Void> {
      public register_handler_call(org.apache.thrift.async.AsyncMethodCallback<Void> 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("register_handler", org.apache.thrift.protocol.TMessageType.CALL, 0));
        register_handler_args args = new register_handler_args();
        args.write(prot);
        prot.writeMessageEnd();
      }

      public Void getResult() throws rpc_management_exception, org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new java.lang.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 null;
      }
    }

    public void deregisterHandler(org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      deregister_handler_call method_call = new deregister_handler_call(resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class deregister_handler_call extends org.apache.thrift.async.TAsyncMethodCall<Void> {
      public deregister_handler_call(org.apache.thrift.async.AsyncMethodCallback<Void> 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("deregister_handler", org.apache.thrift.protocol.TMessageType.CALL, 0));
        deregister_handler_args args = new deregister_handler_args();
        args.write(prot);
        prot.writeMessageEnd();
      }

      public Void getResult() throws rpc_management_exception, org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new java.lang.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 null;
      }
    }

    public void createAtomicMultilog(java.lang.String name, java.util.List<rpc_column> schema, rpc_storage_mode mode, org.apache.thrift.async.AsyncMethodCallback<java.lang.Long> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      create_atomic_multilog_call method_call = new create_atomic_multilog_call(name, schema, mode, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class create_atomic_multilog_call extends org.apache.thrift.async.TAsyncMethodCall<java.lang.Long> {
      private java.lang.String name;
      private java.util.List<rpc_column> schema;
      private rpc_storage_mode mode;
      public create_atomic_multilog_call(java.lang.String name, java.util.List<rpc_column> schema, rpc_storage_mode mode, org.apache.thrift.async.AsyncMethodCallback<java.lang.Long> 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.name = name;
        this.schema = schema;
        this.mode = mode;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("create_atomic_multilog", org.apache.thrift.protocol.TMessageType.CALL, 0));
        create_atomic_multilog_args args = new create_atomic_multilog_args();
        args.setName(name);
        args.setSchema(schema);
        args.setMode(mode);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public java.lang.Long getResult() throws rpc_management_exception, org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new java.lang.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)).recvCreateAtomicMultilog();
      }
    }

    public void loadAtomicMultilog(java.lang.String name, org.apache.thrift.async.AsyncMethodCallback<rpc_atomic_multilog_info> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      load_atomic_multilog_call method_call = new load_atomic_multilog_call(name, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class load_atomic_multilog_call extends org.apache.thrift.async.TAsyncMethodCall<rpc_atomic_multilog_info> {
      private java.lang.String name;
      public load_atomic_multilog_call(java.lang.String name, org.apache.thrift.async.AsyncMethodCallback<rpc_atomic_multilog_info> 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.name = name;
      }

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

      public rpc_atomic_multilog_info getResult() throws rpc_management_exception, org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new java.lang.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)).recvLoadAtomicMultilog();
      }
    }

    public void getAtomicMultilogInfo(java.lang.String name, org.apache.thrift.async.AsyncMethodCallback<rpc_atomic_multilog_info> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      get_atomic_multilog_info_call method_call = new get_atomic_multilog_info_call(name, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class get_atomic_multilog_info_call extends org.apache.thrift.async.TAsyncMethodCall<rpc_atomic_multilog_info> {
      private java.lang.String name;
      public get_atomic_multilog_info_call(java.lang.String name, org.apache.thrift.async.AsyncMethodCallback<rpc_atomic_multilog_info> 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.name = name;
      }

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

      public rpc_atomic_multilog_info getResult() throws rpc_management_exception, org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new java.lang.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)).recvGetAtomicMultilogInfo();
      }
    }

    public void removeAtomicMultilog(long mid, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      remove_atomic_multilog_call method_call = new remove_atomic_multilog_call(mid, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

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

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

      public Void getResult() throws rpc_management_exception, org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new java.lang.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 null;
      }
    }

    public void addIndex(long mid, java.lang.String field_name, double bucket_size, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      add_index_call method_call = new add_index_call(mid, field_name, bucket_size, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class add_index_call extends org.apache.thrift.async.TAsyncMethodCall<Void> {
      private long mid;
      private java.lang.String field_name;
      private double bucket_size;
      public add_index_call(long mid, java.lang.String field_name, double bucket_size, org.apache.thrift.async.AsyncMethodCallback<Void> 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.mid = mid;
        this.field_name = field_name;
        this.bucket_size = bucket_size;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("add_index", org.apache.thrift.protocol.TMessageType.CALL, 0));
        add_index_args args = new add_index_args();
        args.setMid(mid);
        args.setFieldName(field_name);
        args.setBucketSize(bucket_size);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public Void getResult() throws rpc_management_exception, org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new java.lang.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 null;
      }
    }

    public void removeIndex(long mid, java.lang.String field_name, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      remove_index_call method_call = new remove_index_call(mid, field_name, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class remove_index_call extends org.apache.thrift.async.TAsyncMethodCall<Void> {
      private long mid;
      private java.lang.String field_name;
      public remove_index_call(long mid, java.lang.String field_name, org.apache.thrift.async.AsyncMethodCallback<Void> 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.mid = mid;
        this.field_name = field_name;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("remove_index", org.apache.thrift.protocol.TMessageType.CALL, 0));
        remove_index_args args = new remove_index_args();
        args.setMid(mid);
        args.setFieldName(field_name);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public Void getResult() throws rpc_management_exception, org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new java.lang.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 null;
      }
    }

    public void addFilter(long mid, java.lang.String filter_id, java.lang.String filter_ex, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      add_filter_call method_call = new add_filter_call(mid, filter_id, filter_ex, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class add_filter_call extends org.apache.thrift.async.TAsyncMethodCall<Void> {
      private long mid;
      private java.lang.String filter_id;
      private java.lang.String filter_ex;
      public add_filter_call(long mid, java.lang.String filter_id, java.lang.String filter_ex, org.apache.thrift.async.AsyncMethodCallback<Void> 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.mid = mid;
        this.filter_id = filter_id;
        this.filter_ex = filter_ex;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("add_filter", org.apache.thrift.protocol.TMessageType.CALL, 0));
        add_filter_args args = new add_filter_args();
        args.setMid(mid);
        args.setFilterId(filter_id);
        args.setFilterEx(filter_ex);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public Void getResult() throws rpc_management_exception, org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new java.lang.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 null;
      }
    }

    public void removeFilter(long mid, java.lang.String filter_id, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      remove_filter_call method_call = new remove_filter_call(mid, filter_id, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class remove_filter_call extends org.apache.thrift.async.TAsyncMethodCall<Void> {
      private long mid;
      private java.lang.String filter_id;
      public remove_filter_call(long mid, java.lang.String filter_id, org.apache.thrift.async.AsyncMethodCallback<Void> 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.mid = mid;
        this.filter_id = filter_id;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("remove_filter", org.apache.thrift.protocol.TMessageType.CALL, 0));
        remove_filter_args args = new remove_filter_args();
        args.setMid(mid);
        args.setFilterId(filter_id);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public Void getResult() throws rpc_management_exception, org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new java.lang.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 null;
      }
    }

    public void addAggregate(long mid, java.lang.String aggregate_name, java.lang.String filter_id, java.lang.String aggregate_expr, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      add_aggregate_call method_call = new add_aggregate_call(mid, aggregate_name, filter_id, aggregate_expr, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class add_aggregate_call extends org.apache.thrift.async.TAsyncMethodCall<Void> {
      private long mid;
      private java.lang.String aggregate_name;
      private java.lang.String filter_id;
      private java.lang.String aggregate_expr;
      public add_aggregate_call(long mid, java.lang.String aggregate_name, java.lang.String filter_id, java.lang.String aggregate_expr, org.apache.thrift.async.AsyncMethodCallback<Void> 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.mid = mid;
        this.aggregate_name = aggregate_name;
        this.filter_id = filter_id;
        this.aggregate_expr = aggregate_expr;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("add_aggregate", org.apache.thrift.protocol.TMessageType.CALL, 0));
        add_aggregate_args args = new add_aggregate_args();
        args.setMid(mid);
        args.setAggregateName(aggregate_name);
        args.setFilterId(filter_id);
        args.setAggregateExpr(aggregate_expr);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public Void getResult() throws rpc_management_exception, org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new java.lang.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 null;
      }
    }

    public void removeAggregate(long mid, java.lang.String aggregate_name, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      remove_aggregate_call method_call = new remove_aggregate_call(mid, aggregate_name, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class remove_aggregate_call extends org.apache.thrift.async.TAsyncMethodCall<Void> {
      private long mid;
      private java.lang.String aggregate_name;
      public remove_aggregate_call(long mid, java.lang.String aggregate_name, org.apache.thrift.async.AsyncMethodCallback<Void> 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.mid = mid;
        this.aggregate_name = aggregate_name;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("remove_aggregate", org.apache.thrift.protocol.TMessageType.CALL, 0));
        remove_aggregate_args args = new remove_aggregate_args();
        args.setMid(mid);
        args.setAggregateName(aggregate_name);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public Void getResult() throws rpc_management_exception, org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new java.lang.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 null;
      }
    }

    public void addTrigger(long mid, java.lang.String trigger_id, java.lang.String trigger_expr, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      add_trigger_call method_call = new add_trigger_call(mid, trigger_id, trigger_expr, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class add_trigger_call extends org.apache.thrift.async.TAsyncMethodCall<Void> {
      private long mid;
      private java.lang.String trigger_id;
      private java.lang.String trigger_expr;
      public add_trigger_call(long mid, java.lang.String trigger_id, java.lang.String trigger_expr, org.apache.thrift.async.AsyncMethodCallback<Void> 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.mid = mid;
        this.trigger_id = trigger_id;
        this.trigger_expr = trigger_expr;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("add_trigger", org.apache.thrift.protocol.TMessageType.CALL, 0));
        add_trigger_args args = new add_trigger_args();
        args.setMid(mid);
        args.setTriggerId(trigger_id);
        args.setTriggerExpr(trigger_expr);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public Void getResult() throws rpc_management_exception, org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new java.lang.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 null;
      }
    }

    public void removeTrigger(long mid, java.lang.String trigger_id, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      remove_trigger_call method_call = new remove_trigger_call(mid, trigger_id, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class remove_trigger_call extends org.apache.thrift.async.TAsyncMethodCall<Void> {
      private long mid;
      private java.lang.String trigger_id;
      public remove_trigger_call(long mid, java.lang.String trigger_id, org.apache.thrift.async.AsyncMethodCallback<Void> 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.mid = mid;
        this.trigger_id = trigger_id;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("remove_trigger", org.apache.thrift.protocol.TMessageType.CALL, 0));
        remove_trigger_args args = new remove_trigger_args();
        args.setMid(mid);
        args.setTriggerId(trigger_id);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public Void getResult() throws rpc_management_exception, org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new java.lang.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 null;
      }
    }

    public void archive(long mid, long offset, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      archive_call method_call = new archive_call(mid, offset, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class archive_call extends org.apache.thrift.async.TAsyncMethodCall<Void> {
      private long mid;
      private long offset;
      public archive_call(long mid, long offset, org.apache.thrift.async.AsyncMethodCallback<Void> 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.mid = mid;
        this.offset = offset;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("archive", org.apache.thrift.protocol.TMessageType.CALL, 0));
        archive_args args = new archive_args();
        args.setMid(mid);
        args.setOffset(offset);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public Void getResult() throws rpc_management_exception, org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new java.lang.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 null;
      }
    }

    public void append(long mid, java.nio.ByteBuffer data, org.apache.thrift.async.AsyncMethodCallback<java.lang.Long> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      append_call method_call = new append_call(mid, data, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class append_call extends org.apache.thrift.async.TAsyncMethodCall<java.lang.Long> {
      private long mid;
      private java.nio.ByteBuffer data;
      public append_call(long mid, java.nio.ByteBuffer data, org.apache.thrift.async.AsyncMethodCallback<java.lang.Long> 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.mid = mid;
        this.data = data;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("append", org.apache.thrift.protocol.TMessageType.CALL, 0));
        append_args args = new append_args();
        args.setMid(mid);
        args.setData(data);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public java.lang.Long getResult() throws org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new java.lang.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)).recvAppend();
      }
    }

    public void appendBatch(long mid, rpc_record_batch batch, org.apache.thrift.async.AsyncMethodCallback<java.lang.Long> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      append_batch_call method_call = new append_batch_call(mid, batch, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class append_batch_call extends org.apache.thrift.async.TAsyncMethodCall<java.lang.Long> {
      private long mid;
      private rpc_record_batch batch;
      public append_batch_call(long mid, rpc_record_batch batch, org.apache.thrift.async.AsyncMethodCallback<java.lang.Long> 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.mid = mid;
        this.batch = batch;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("append_batch", org.apache.thrift.protocol.TMessageType.CALL, 0));
        append_batch_args args = new append_batch_args();
        args.setMid(mid);
        args.setBatch(batch);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public java.lang.Long getResult() throws org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new java.lang.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)).recvAppendBatch();
      }
    }

    public void read(long mid, long offset, long nrecords, org.apache.thrift.async.AsyncMethodCallback<java.nio.ByteBuffer> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      read_call method_call = new read_call(mid, offset, nrecords, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class read_call extends org.apache.thrift.async.TAsyncMethodCall<java.nio.ByteBuffer> {
      private long mid;
      private long offset;
      private long nrecords;
      public read_call(long mid, long offset, long nrecords, org.apache.thrift.async.AsyncMethodCallback<java.nio.ByteBuffer> 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.mid = mid;
        this.offset = offset;
        this.nrecords = nrecords;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("read", org.apache.thrift.protocol.TMessageType.CALL, 0));
        read_args args = new read_args();
        args.setMid(mid);
        args.setOffset(offset);
        args.setNrecords(nrecords);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public java.nio.ByteBuffer getResult() throws org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new java.lang.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)).recvRead();
      }
    }

    public void queryAggregate(long mid, java.lang.String aggregate_name, long beg_ms, long end_ms, org.apache.thrift.async.AsyncMethodCallback<java.lang.String> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      query_aggregate_call method_call = new query_aggregate_call(mid, aggregate_name, beg_ms, end_ms, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class query_aggregate_call extends org.apache.thrift.async.TAsyncMethodCall<java.lang.String> {
      private long mid;
      private java.lang.String aggregate_name;
      private long beg_ms;
      private long end_ms;
      public query_aggregate_call(long mid, java.lang.String aggregate_name, long beg_ms, long end_ms, org.apache.thrift.async.AsyncMethodCallback<java.lang.String> 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.mid = mid;
        this.aggregate_name = aggregate_name;
        this.beg_ms = beg_ms;
        this.end_ms = end_ms;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("query_aggregate", org.apache.thrift.protocol.TMessageType.CALL, 0));
        query_aggregate_args args = new query_aggregate_args();
        args.setMid(mid);
        args.setAggregateName(aggregate_name);
        args.setBegMs(beg_ms);
        args.setEndMs(end_ms);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public java.lang.String getResult() throws rpc_invalid_operation, org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new java.lang.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)).recvQueryAggregate();
      }
    }

    public void adhocAggregate(long mid, java.lang.String aggregate_expr, java.lang.String filter_ex, org.apache.thrift.async.AsyncMethodCallback<java.lang.String> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      adhoc_aggregate_call method_call = new adhoc_aggregate_call(mid, aggregate_expr, filter_ex, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class adhoc_aggregate_call extends org.apache.thrift.async.TAsyncMethodCall<java.lang.String> {
      private long mid;
      private java.lang.String aggregate_expr;
      private java.lang.String filter_ex;
      public adhoc_aggregate_call(long mid, java.lang.String aggregate_expr, java.lang.String filter_ex, org.apache.thrift.async.AsyncMethodCallback<java.lang.String> 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.mid = mid;
        this.aggregate_expr = aggregate_expr;
        this.filter_ex = filter_ex;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("adhoc_aggregate", org.apache.thrift.protocol.TMessageType.CALL, 0));
        adhoc_aggregate_args args = new adhoc_aggregate_args();
        args.setMid(mid);
        args.setAggregateExpr(aggregate_expr);
        args.setFilterEx(filter_ex);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public java.lang.String getResult() throws rpc_invalid_operation, org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new java.lang.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)).recvAdhocAggregate();
      }
    }

    public void adhocFilter(long mid, java.lang.String filter_ex, org.apache.thrift.async.AsyncMethodCallback<rpc_iterator_handle> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      adhoc_filter_call method_call = new adhoc_filter_call(mid, filter_ex, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class adhoc_filter_call extends org.apache.thrift.async.TAsyncMethodCall<rpc_iterator_handle> {
      private long mid;
      private java.lang.String filter_ex;
      public adhoc_filter_call(long mid, java.lang.String filter_ex, org.apache.thrift.async.AsyncMethodCallback<rpc_iterator_handle> 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.mid = mid;
        this.filter_ex = filter_ex;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("adhoc_filter", org.apache.thrift.protocol.TMessageType.CALL, 0));
        adhoc_filter_args args = new adhoc_filter_args();
        args.setMid(mid);
        args.setFilterEx(filter_ex);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public rpc_iterator_handle getResult() throws rpc_invalid_operation, org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new java.lang.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)).recvAdhocFilter();
      }
    }

    public void predefFilter(long mid, java.lang.String filter_id, long beg_ms, long end_ms, org.apache.thrift.async.AsyncMethodCallback<rpc_iterator_handle> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      predef_filter_call method_call = new predef_filter_call(mid, filter_id, beg_ms, end_ms, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class predef_filter_call extends org.apache.thrift.async.TAsyncMethodCall<rpc_iterator_handle> {
      private long mid;
      private java.lang.String filter_id;
      private long beg_ms;
      private long end_ms;
      public predef_filter_call(long mid, java.lang.String filter_id, long beg_ms, long end_ms, org.apache.thrift.async.AsyncMethodCallback<rpc_iterator_handle> 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.mid = mid;
        this.filter_id = filter_id;
        this.beg_ms = beg_ms;
        this.end_ms = end_ms;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("predef_filter", org.apache.thrift.protocol.TMessageType.CALL, 0));
        predef_filter_args args = new predef_filter_args();
        args.setMid(mid);
        args.setFilterId(filter_id);
        args.setBegMs(beg_ms);
        args.setEndMs(end_ms);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public rpc_iterator_handle getResult() throws rpc_invalid_operation, org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new java.lang.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)).recvPredefFilter();
      }
    }

    public void combinedFilter(long mid, java.lang.String filter_id, java.lang.String filter_ex, long beg_ms, long end_ms, org.apache.thrift.async.AsyncMethodCallback<rpc_iterator_handle> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      combined_filter_call method_call = new combined_filter_call(mid, filter_id, filter_ex, beg_ms, end_ms, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class combined_filter_call extends org.apache.thrift.async.TAsyncMethodCall<rpc_iterator_handle> {
      private long mid;
      private java.lang.String filter_id;
      private java.lang.String filter_ex;
      private long beg_ms;
      private long end_ms;
      public combined_filter_call(long mid, java.lang.String filter_id, java.lang.String filter_ex, long beg_ms, long end_ms, org.apache.thrift.async.AsyncMethodCallback<rpc_iterator_handle> 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.mid = mid;
        this.filter_id = filter_id;
        this.filter_ex = filter_ex;
        this.beg_ms = beg_ms;
        this.end_ms = end_ms;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("combined_filter", org.apache.thrift.protocol.TMessageType.CALL, 0));
        combined_filter_args args = new combined_filter_args();
        args.setMid(mid);
        args.setFilterId(filter_id);
        args.setFilterEx(filter_ex);
        args.setBegMs(beg_ms);
        args.setEndMs(end_ms);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public rpc_iterator_handle getResult() throws rpc_invalid_operation, org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new java.lang.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)).recvCombinedFilter();
      }
    }

    public void alertsByTime(long mid, long beg_ms, long end_ms, org.apache.thrift.async.AsyncMethodCallback<rpc_iterator_handle> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      alerts_by_time_call method_call = new alerts_by_time_call(mid, beg_ms, end_ms, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class alerts_by_time_call extends org.apache.thrift.async.TAsyncMethodCall<rpc_iterator_handle> {
      private long mid;
      private long beg_ms;
      private long end_ms;
      public alerts_by_time_call(long mid, long beg_ms, long end_ms, org.apache.thrift.async.AsyncMethodCallback<rpc_iterator_handle> 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.mid = mid;
        this.beg_ms = beg_ms;
        this.end_ms = end_ms;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("alerts_by_time", org.apache.thrift.protocol.TMessageType.CALL, 0));
        alerts_by_time_args args = new alerts_by_time_args();
        args.setMid(mid);
        args.setBegMs(beg_ms);
        args.setEndMs(end_ms);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public rpc_iterator_handle getResult() throws rpc_invalid_operation, org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new java.lang.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)).recvAlertsByTime();
      }
    }

    public void alertsByTriggerAndTime(long mid, java.lang.String trigger_id, long beg_ms, long end_ms, org.apache.thrift.async.AsyncMethodCallback<rpc_iterator_handle> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      alerts_by_trigger_and_time_call method_call = new alerts_by_trigger_and_time_call(mid, trigger_id, beg_ms, end_ms, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class alerts_by_trigger_and_time_call extends org.apache.thrift.async.TAsyncMethodCall<rpc_iterator_handle> {
      private long mid;
      private java.lang.String trigger_id;
      private long beg_ms;
      private long end_ms;
      public alerts_by_trigger_and_time_call(long mid, java.lang.String trigger_id, long beg_ms, long end_ms, org.apache.thrift.async.AsyncMethodCallback<rpc_iterator_handle> 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.mid = mid;
        this.trigger_id = trigger_id;
        this.beg_ms = beg_ms;
        this.end_ms = end_ms;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("alerts_by_trigger_and_time", org.apache.thrift.protocol.TMessageType.CALL, 0));
        alerts_by_trigger_and_time_args args = new alerts_by_trigger_and_time_args();
        args.setMid(mid);
        args.setTriggerId(trigger_id);
        args.setBegMs(beg_ms);
        args.setEndMs(end_ms);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public rpc_iterator_handle getResult() throws rpc_invalid_operation, org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new java.lang.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)).recvAlertsByTriggerAndTime();
      }
    }

    public void getMore(long mid, rpc_iterator_descriptor desc, org.apache.thrift.async.AsyncMethodCallback<rpc_iterator_handle> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      get_more_call method_call = new get_more_call(mid, desc, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class get_more_call extends org.apache.thrift.async.TAsyncMethodCall<rpc_iterator_handle> {
      private long mid;
      private rpc_iterator_descriptor desc;
      public get_more_call(long mid, rpc_iterator_descriptor desc, org.apache.thrift.async.AsyncMethodCallback<rpc_iterator_handle> 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.mid = mid;
        this.desc = desc;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get_more", org.apache.thrift.protocol.TMessageType.CALL, 0));
        get_more_args args = new get_more_args();
        args.setMid(mid);
        args.setDesc(desc);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public rpc_iterator_handle getResult() throws rpc_invalid_operation, org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new java.lang.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)).recvGetMore();
      }
    }

    public void numRecords(long mid, org.apache.thrift.async.AsyncMethodCallback<java.lang.Long> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      num_records_call method_call = new num_records_call(mid, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class num_records_call extends org.apache.thrift.async.TAsyncMethodCall<java.lang.Long> {
      private long mid;
      public num_records_call(long mid, org.apache.thrift.async.AsyncMethodCallback<java.lang.Long> 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.mid = mid;
      }

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

      public java.lang.Long getResult() throws org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new java.lang.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)).recvNumRecords();
      }
    }

  }

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

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

    private static <I extends Iface> java.util.Map<java.lang.String,  org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> getProcessMap(java.util.Map<java.lang.String, org.apache.thrift.ProcessFunction<I, ? extends  org.apache.thrift.TBase>> processMap) {
      processMap.put("register_handler", new register_handler());
      processMap.put("deregister_handler", new deregister_handler());
      processMap.put("create_atomic_multilog", new create_atomic_multilog());
      processMap.put("load_atomic_multilog", new load_atomic_multilog());
      processMap.put("get_atomic_multilog_info", new get_atomic_multilog_info());
      processMap.put("remove_atomic_multilog", new remove_atomic_multilog());
      processMap.put("add_index", new add_index());
      processMap.put("remove_index", new remove_index());
      processMap.put("add_filter", new add_filter());
      processMap.put("remove_filter", new remove_filter());
      processMap.put("add_aggregate", new add_aggregate());
      processMap.put("remove_aggregate", new remove_aggregate());
      processMap.put("add_trigger", new add_trigger());
      processMap.put("remove_trigger", new remove_trigger());
      processMap.put("archive", new archive());
      processMap.put("append", new append());
      processMap.put("append_batch", new append_batch());
      processMap.put("read", new read());
      processMap.put("query_aggregate", new query_aggregate());
      processMap.put("adhoc_aggregate", new adhoc_aggregate());
      processMap.put("adhoc_filter", new adhoc_filter());
      processMap.put("predef_filter", new predef_filter());
      processMap.put("combined_filter", new combined_filter());
      processMap.put("alerts_by_time", new alerts_by_time());
      processMap.put("alerts_by_trigger_and_time", new alerts_by_trigger_and_time());
      processMap.put("get_more", new get_more());
      processMap.put("num_records", new num_records());
      return processMap;
    }

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

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

      protected boolean isOneway() {
        return false;
      }

      @Override
      protected boolean rethrowUnhandledExceptions() {
        return false;
      }

      public register_handler_result getResult(I iface, register_handler_args args) throws org.apache.thrift.TException {
        register_handler_result result = new register_handler_result();
        try {
          iface.registerHandler();
        } catch (rpc_management_exception ex) {
          result.ex = ex;
        }
        return result;
      }
    }

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

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

      protected boolean isOneway() {
        return false;
      }

      @Override
      protected boolean rethrowUnhandledExceptions() {
        return false;
      }

      public deregister_handler_result getResult(I iface, deregister_handler_args args) throws org.apache.thrift.TException {
        deregister_handler_result result = new deregister_handler_result();
        try {
          iface.deregisterHandler();
        } catch (rpc_management_exception ex) {
          result.ex = ex;
        }
        return result;
      }
    }

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

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

      protected boolean isOneway() {
        return false;
      }

      @Override
      protected boolean rethrowUnhandledExceptions() {
        return false;
      }

      public create_atomic_multilog_result getResult(I iface, create_atomic_multilog_args args) throws org.apache.thrift.TException {
        create_atomic_multilog_result result = new create_atomic_multilog_result();
        try {
          result.success = iface.createAtomicMultilog(args.name, args.schema, args.mode);
          result.setSuccessIsSet(true);
        } catch (rpc_management_exception ex) {
          result.ex = ex;
        }
        return result;
      }
    }

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

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

      protected boolean isOneway() {
        return false;
      }

      @Override
      protected boolean rethrowUnhandledExceptions() {
        return false;
      }

      public load_atomic_multilog_result getResult(I iface, load_atomic_multilog_args args) throws org.apache.thrift.TException {
        load_atomic_multilog_result result = new load_atomic_multilog_result();
        try {
          result.success = iface.loadAtomicMultilog(args.name);
        } catch (rpc_management_exception ex) {
          result.ex = ex;
        }
        return result;
      }
    }

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

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

      protected boolean isOneway() {
        return false;
      }

      @Override
      protected boolean rethrowUnhandledExceptions() {
        return false;
      }

      public get_atomic_multilog_info_result getResult(I iface, get_atomic_multilog_info_args args) throws org.apache.thrift.TException {
        get_atomic_multilog_info_result result = new get_atomic_multilog_info_result();
        try {
          result.success = iface.getAtomicMultilogInfo(args.name);
        } catch (rpc_management_exception ex) {
          result.ex = ex;
        }
        return result;
      }
    }

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

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

      protected boolean isOneway() {
        return false;
      }

      @Override
      protected boolean rethrowUnhandledExceptions() {
        return false;
      }

      public remove_atomic_multilog_result getResult(I iface, remove_atomic_multilog_args args) throws org.apache.thrift.TException {
        remove_atomic_multilog_result result = new remove_atomic_multilog_result();
        try {
          iface.removeAtomicMultilog(args.mid);
        } catch (rpc_management_exception ex) {
          result.ex = ex;
        }
        return result;
      }
    }

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

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

      protected boolean isOneway() {
        return false;
      }

      @Override
      protected boolean rethrowUnhandledExceptions() {
        return false;
      }

      public add_index_result getResult(I iface, add_index_args args) throws org.apache.thrift.TException {
        add_index_result result = new add_index_result();
        try {
          iface.addIndex(args.mid, args.field_name, args.bucket_size);
        } catch (rpc_management_exception ex) {
          result.ex = ex;
        }
        return result;
      }
    }

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

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

      protected boolean isOneway() {
        return false;
      }

      @Override
      protected boolean rethrowUnhandledExceptions() {
        return false;
      }

      public remove_index_result getResult(I iface, remove_index_args args) throws org.apache.thrift.TException {
        remove_index_result result = new remove_index_result();
        try {
          iface.removeIndex(args.mid, args.field_name);
        } catch (rpc_management_exception ex) {
          result.ex = ex;
        }
        return result;
      }
    }

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

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

      protected boolean isOneway() {
        return false;
      }

      @Override
      protected boolean rethrowUnhandledExceptions() {
        return false;
      }

      public add_filter_result getResult(I iface, add_filter_args args) throws org.apache.thrift.TException {
        add_filter_result result = new add_filter_result();
        try {
          iface.addFilter(args.mid, args.filter_id, args.filter_ex);
        } catch (rpc_management_exception ex) {
          result.ex = ex;
        }
        return result;
      }
    }

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

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

      protected boolean isOneway() {
        return false;
      }

      @Override
      protected boolean rethrowUnhandledExceptions() {
        return false;
      }

      public remove_filter_result getResult(I iface, remove_filter_args args) throws org.apache.thrift.TException {
        remove_filter_result result = new remove_filter_result();
        try {
          iface.removeFilter(args.mid, args.filter_id);
        } catch (rpc_management_exception ex) {
          result.ex = ex;
        }
        return result;
      }
    }

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

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

      protected boolean isOneway() {
        return false;
      }

      @Override
      protected boolean rethrowUnhandledExceptions() {
        return false;
      }

      public add_aggregate_result getResult(I iface, add_aggregate_args args) throws org.apache.thrift.TException {
        add_aggregate_result result = new add_aggregate_result();
        try {
          iface.addAggregate(args.mid, args.aggregate_name, args.filter_id, args.aggregate_expr);
        } catch (rpc_management_exception ex) {
          result.ex = ex;
        }
        return result;
      }
    }

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

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

      protected boolean isOneway() {
        return false;
      }

      @Override
      protected boolean rethrowUnhandledExceptions() {
        return false;
      }

      public remove_aggregate_result getResult(I iface, remove_aggregate_args args) throws org.apache.thrift.TException {
        remove_aggregate_result result = new remove_aggregate_result();
        try {
          iface.removeAggregate(args.mid, args.aggregate_name);
        } catch (rpc_management_exception ex) {
          result.ex = ex;
        }
        return result;
      }
    }

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

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

      protected boolean isOneway() {
        return false;
      }

      @Override
      protected boolean rethrowUnhandledExceptions() {
        return false;
      }

      public add_trigger_result getResult(I iface, add_trigger_args args) throws org.apache.thrift.TException {
        add_trigger_result result = new add_trigger_result();
        try {
          iface.addTrigger(args.mid, args.trigger_id, args.trigger_expr);
        } catch (rpc_management_exception ex) {
          result.ex = ex;
        }
        return result;
      }
    }

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

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

      protected boolean isOneway() {
        return false;
      }

      @Override
      protected boolean rethrowUnhandledExceptions() {
        return false;
      }

      public remove_trigger_result getResult(I iface, remove_trigger_args args) throws org.apache.thrift.TException {
        remove_trigger_result result = new remove_trigger_result();
        try {
          iface.removeTrigger(args.mid, args.trigger_id);
        } catch (rpc_management_exception ex) {
          result.ex = ex;
        }
        return result;
      }
    }

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

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

      protected boolean isOneway() {
        return false;
      }

      @Override
      protected boolean rethrowUnhandledExceptions() {
        return false;
      }

      public archive_result getResult(I iface, archive_args args) throws org.apache.thrift.TException {
        archive_result result = new archive_result();
        try {
          iface.archive(args.mid, args.offset);
        } catch (rpc_management_exception ex) {
          result.ex = ex;
        }
        return result;
      }
    }

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

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

      protected boolean isOneway() {
        return false;
      }

      @Override
      protected boolean rethrowUnhandledExceptions() {
        return false;
      }

      public append_result getResult(I iface, append_args args) throws org.apache.thrift.TException {
        append_result result = new append_result();
        result.success = iface.append(args.mid, args.data);
        result.setSuccessIsSet(true);
        return result;
      }
    }

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

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

      protected boolean isOneway() {
        return false;
      }

      @Override
      protected boolean rethrowUnhandledExceptions() {
        return false;
      }

      public append_batch_result getResult(I iface, append_batch_args args) throws org.apache.thrift.TException {
        append_batch_result result = new append_batch_result();
        result.success = iface.appendBatch(args.mid, args.batch);
        result.setSuccessIsSet(true);
        return result;
      }
    }

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

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

      protected boolean isOneway() {
        return false;
      }

      @Override
      protected boolean rethrowUnhandledExceptions() {
        return false;
      }

      public read_result getResult(I iface, read_args args) throws org.apache.thrift.TException {
        read_result result = new read_result();
        result.success = iface.read(args.mid, args.offset, args.nrecords);
        return result;
      }
    }

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

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

      protected boolean isOneway() {
        return false;
      }

      @Override
      protected boolean rethrowUnhandledExceptions() {
        return false;
      }

      public query_aggregate_result getResult(I iface, query_aggregate_args args) throws org.apache.thrift.TException {
        query_aggregate_result result = new query_aggregate_result();
        try {
          result.success = iface.queryAggregate(args.mid, args.aggregate_name, args.beg_ms, args.end_ms);
        } catch (rpc_invalid_operation ex) {
          result.ex = ex;
        }
        return result;
      }
    }

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

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

      protected boolean isOneway() {
        return false;
      }

      @Override
      protected boolean rethrowUnhandledExceptions() {
        return false;
      }

      public adhoc_aggregate_result getResult(I iface, adhoc_aggregate_args args) throws org.apache.thrift.TException {
        adhoc_aggregate_result result = new adhoc_aggregate_result();
        try {
          result.success = iface.adhocAggregate(args.mid, args.aggregate_expr, args.filter_ex);
        } catch (rpc_invalid_operation ex) {
          result.ex = ex;
        }
        return result;
      }
    }

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

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

      protected boolean isOneway() {
        return false;
      }

      @Override
      protected boolean rethrowUnhandledExceptions() {
        return false;
      }

      public adhoc_filter_result getResult(I iface, adhoc_filter_args args) throws org.apache.thrift.TException {
        adhoc_filter_result result = new adhoc_filter_result();
        try {
          result.success = iface.adhocFilter(args.mid, args.filter_ex);
        } catch (rpc_invalid_operation ex) {
          result.ex = ex;
        }
        return result;
      }
    }

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

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

      protected boolean isOneway() {
        return false;
      }

      @Override
      protected boolean rethrowUnhandledExceptions() {
        return false;
      }

      public predef_filter_result getResult(I iface, predef_filter_args args) throws org.apache.thrift.TException {
        predef_filter_result result = new predef_filter_result();
        try {
          result.success = iface.predefFilter(args.mid, args.filter_id, args.beg_ms, args.end_ms);
        } catch (rpc_invalid_operation ex) {
          result.ex = ex;
        }
        return result;
      }
    }

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

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

      protected boolean isOneway() {
        return false;
      }

      @Override
      protected boolean rethrowUnhandledExceptions() {
        return false;
      }

      public combined_filter_result getResult(I iface, combined_filter_args args) throws org.apache.thrift.TException {
        combined_filter_result result = new combined_filter_result();
        try {
          result.success = iface.combinedFilter(args.mid, args.filter_id, args.filter_ex, args.beg_ms, args.end_ms);
        } catch (rpc_invalid_operation ex) {
          result.ex = ex;
        }
        return result;
      }
    }

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

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

      protected boolean isOneway() {
        return false;
      }

      @Override
      protected boolean rethrowUnhandledExceptions() {
        return false;
      }

      public alerts_by_time_result getResult(I iface, alerts_by_time_args args) throws org.apache.thrift.TException {
        alerts_by_time_result result = new alerts_by_time_result();
        try {
          result.success = iface.alertsByTime(args.mid, args.beg_ms, args.end_ms);
        } catch (rpc_invalid_operation ex) {
          result.ex = ex;
        }
        return result;
      }
    }

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

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

      protected boolean isOneway() {
        return false;
      }

      @Override
      protected boolean rethrowUnhandledExceptions() {
        return false;
      }

      public alerts_by_trigger_and_time_result getResult(I iface, alerts_by_trigger_and_time_args args) throws org.apache.thrift.TException {
        alerts_by_trigger_and_time_result result = new alerts_by_trigger_and_time_result();
        try {
          result.success = iface.alertsByTriggerAndTime(args.mid, args.trigger_id, args.beg_ms, args.end_ms);
        } catch (rpc_invalid_operation ex) {
          result.ex = ex;
        }
        return result;
      }
    }

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

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

      protected boolean isOneway() {
        return false;
      }

      @Override
      protected boolean rethrowUnhandledExceptions() {
        return false;
      }

      public get_more_result getResult(I iface, get_more_args args) throws org.apache.thrift.TException {
        get_more_result result = new get_more_result();
        try {
          result.success = iface.getMore(args.mid, args.desc);
        } catch (rpc_invalid_operation ex) {
          result.ex = ex;
        }
        return result;
      }
    }

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

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

      protected boolean isOneway() {
        return false;
      }

      @Override
      protected boolean rethrowUnhandledExceptions() {
        return false;
      }

      public num_records_result getResult(I iface, num_records_args args) throws org.apache.thrift.TException {
        num_records_result result = new num_records_result();
        result.success = iface.numRecords(args.mid);
        result.setSuccessIsSet(true);
        return result;
      }
    }

  }

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

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

    private static <I extends AsyncIface> java.util.Map<java.lang.String,  org.apache.thrift.AsyncProcessFunction<I, ? extends  org.apache.thrift.TBase,?>> getProcessMap(java.util.Map<java.lang.String,  org.apache.thrift.AsyncProcessFunction<I, ? extends  org.apache.thrift.TBase, ?>> processMap) {
      processMap.put("register_handler", new register_handler());
      processMap.put("deregister_handler", new deregister_handler());
      processMap.put("create_atomic_multilog", new create_atomic_multilog());
      processMap.put("load_atomic_multilog", new load_atomic_multilog());
      processMap.put("get_atomic_multilog_info", new get_atomic_multilog_info());
      processMap.put("remove_atomic_multilog", new remove_atomic_multilog());
      processMap.put("add_index", new add_index());
      processMap.put("remove_index", new remove_index());
      processMap.put("add_filter", new add_filter());
      processMap.put("remove_filter", new remove_filter());
      processMap.put("add_aggregate", new add_aggregate());
      processMap.put("remove_aggregate", new remove_aggregate());
      processMap.put("add_trigger", new add_trigger());
      processMap.put("remove_trigger", new remove_trigger());
      processMap.put("archive", new archive());
      processMap.put("append", new append());
      processMap.put("append_batch", new append_batch());
      processMap.put("read", new read());
      processMap.put("query_aggregate", new query_aggregate());
      processMap.put("adhoc_aggregate", new adhoc_aggregate());
      processMap.put("adhoc_filter", new adhoc_filter());
      processMap.put("predef_filter", new predef_filter());
      processMap.put("combined_filter", new combined_filter());
      processMap.put("alerts_by_time", new alerts_by_time());
      processMap.put("alerts_by_trigger_and_time", new alerts_by_trigger_and_time());
      processMap.put("get_more", new get_more());
      processMap.put("num_records", new num_records());
      return processMap;
    }

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

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

      public org.apache.thrift.async.AsyncMethodCallback<Void> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
        final org.apache.thrift.AsyncProcessFunction fcall = this;
        return new org.apache.thrift.async.AsyncMethodCallback<Void>() { 
          public void onComplete(Void o) {
            register_handler_result result = new register_handler_result();
            try {
              fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
            } catch (org.apache.thrift.transport.TTransportException e) {
              _LOGGER.error("TTransportException writing to internal frame buffer", e);
              fb.close();
            } catch (java.lang.Exception e) {
              _LOGGER.error("Exception writing to internal frame buffer", e);
              onError(e);
            }
          }
          public void onError(java.lang.Exception e) {
            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
            org.apache.thrift.TSerializable msg;
            register_handler_result result = new register_handler_result();
            if (e instanceof rpc_management_exception) {
              result.ex = (rpc_management_exception) e;
              result.setExIsSet(true);
              msg = result;
            } else if (e instanceof org.apache.thrift.transport.TTransportException) {
              _LOGGER.error("TTransportException inside handler", e);
              fb.close();
              return;
            } else if (e instanceof org.apache.thrift.TApplicationException) {
              _LOGGER.error("TApplicationException inside handler", e);
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = (org.apache.thrift.TApplicationException)e;
            } else {
              _LOGGER.error("Exception inside handler", e);
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
            }
            try {
              fcall.sendResponse(fb,msg,msgType,seqid);
            } catch (java.lang.Exception ex) {
              _LOGGER.error("Exception writing to internal frame buffer", ex);
              fb.close();
            }
          }
        };
      }

      protected boolean isOneway() {
        return false;
      }

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

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

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

      public org.apache.thrift.async.AsyncMethodCallback<Void> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
        final org.apache.thrift.AsyncProcessFunction fcall = this;
        return new org.apache.thrift.async.AsyncMethodCallback<Void>() { 
          public void onComplete(Void o) {
            deregister_handler_result result = new deregister_handler_result();
            try {
              fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
            } catch (org.apache.thrift.transport.TTransportException e) {
              _LOGGER.error("TTransportException writing to internal frame buffer", e);
              fb.close();
            } catch (java.lang.Exception e) {
              _LOGGER.error("Exception writing to internal frame buffer", e);
              onError(e);
            }
          }
          public void onError(java.lang.Exception e) {
            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
            org.apache.thrift.TSerializable msg;
            deregister_handler_result result = new deregister_handler_result();
            if (e instanceof rpc_management_exception) {
              result.ex = (rpc_management_exception) e;
              result.setExIsSet(true);
              msg = result;
            } else if (e instanceof org.apache.thrift.transport.TTransportException) {
              _LOGGER.error("TTransportException inside handler", e);
              fb.close();
              return;
            } else if (e instanceof org.apache.thrift.TApplicationException) {
              _LOGGER.error("TApplicationException inside handler", e);
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = (org.apache.thrift.TApplicationException)e;
            } else {
              _LOGGER.error("Exception inside handler", e);
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
            }
            try {
              fcall.sendResponse(fb,msg,msgType,seqid);
            } catch (java.lang.Exception ex) {
              _LOGGER.error("Exception writing to internal frame buffer", ex);
              fb.close();
            }
          }
        };
      }

      protected boolean isOneway() {
        return false;
      }

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

    public static class create_atomic_multilog<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, create_atomic_multilog_args, java.lang.Long> {
      public create_atomic_multilog() {
        super("create_atomic_multilog");
      }

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

      public org.apache.thrift.async.AsyncMethodCallback<java.lang.Long> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
        final org.apache.thrift.AsyncProcessFunction fcall = this;
        return new org.apache.thrift.async.AsyncMethodCallback<java.lang.Long>() { 
          public void onComplete(java.lang.Long o) {
            create_atomic_multilog_result result = new create_atomic_multilog_result();
            result.success = o;
            result.setSuccessIsSet(true);
            try {
              fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
            } catch (org.apache.thrift.transport.TTransportException e) {
              _LOGGER.error("TTransportException writing to internal frame buffer", e);
              fb.close();
            } catch (java.lang.Exception e) {
              _LOGGER.error("Exception writing to internal frame buffer", e);
              onError(e);
            }
          }
          public void onError(java.lang.Exception e) {
            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
            org.apache.thrift.TSerializable msg;
            create_atomic_multilog_result result = new create_atomic_multilog_result();
            if (e instanceof rpc_management_exception) {
              result.ex = (rpc_management_exception) e;
              result.setExIsSet(true);
              msg = result;
            } else if (e instanceof org.apache.thrift.transport.TTransportException) {
              _LOGGER.error("TTransportException inside handler", e);
              fb.close();
              return;
            } else if (e instanceof org.apache.thrift.TApplicationException) {
              _LOGGER.error("TApplicationException inside handler", e);
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = (org.apache.thrift.TApplicationException)e;
            } else {
              _LOGGER.error("Exception inside handler", e);
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
            }
            try {
              fcall.sendResponse(fb,msg,msgType,seqid);
            } catch (java.lang.Exception ex) {
              _LOGGER.error("Exception writing to internal frame buffer", ex);
              fb.close();
            }
          }
        };
      }

      protected boolean isOneway() {
        return false;
      }

      public void start(I iface, create_atomic_multilog_args args, org.apache.thrift.async.AsyncMethodCallback<java.lang.Long> resultHandler) throws org.apache.thrift.TException {
        iface.createAtomicMultilog(args.name, args.schema, args.mode,resultHandler);
      }
    }

    public static class load_atomic_multilog<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, load_atomic_multilog_args, rpc_atomic_multilog_info> {
      public load_atomic_multilog() {
        super("load_atomic_multilog");
      }

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

      public org.apache.thrift.async.AsyncMethodCallback<rpc_atomic_multilog_info> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
        final org.apache.thrift.AsyncProcessFunction fcall = this;
        return new org.apache.thrift.async.AsyncMethodCallback<rpc_atomic_multilog_info>() { 
          public void onComplete(rpc_atomic_multilog_info o) {
            load_atomic_multilog_result result = new load_atomic_multilog_result();
            result.success = o;
            try {
              fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
            } catch (org.apache.thrift.transport.TTransportException e) {
              _LOGGER.error("TTransportException writing to internal frame buffer", e);
              fb.close();
            } catch (java.lang.Exception e) {
              _LOGGER.error("Exception writing to internal frame buffer", e);
              onError(e);
            }
          }
          public void onError(java.lang.Exception e) {
            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
            org.apache.thrift.TSerializable msg;
            load_atomic_multilog_result result = new load_atomic_multilog_result();
            if (e instanceof rpc_management_exception) {
              result.ex = (rpc_management_exception) e;
              result.setExIsSet(true);
              msg = result;
            } else if (e instanceof org.apache.thrift.transport.TTransportException) {
              _LOGGER.error("TTransportException inside handler", e);
              fb.close();
              return;
            } else if (e instanceof org.apache.thrift.TApplicationException) {
              _LOGGER.error("TApplicationException inside handler", e);
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = (org.apache.thrift.TApplicationException)e;
            } else {
              _LOGGER.error("Exception inside handler", e);
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
            }
            try {
              fcall.sendResponse(fb,msg,msgType,seqid);
            } catch (java.lang.Exception ex) {
              _LOGGER.error("Exception writing to internal frame buffer", ex);
              fb.close();
            }
          }
        };
      }

      protected boolean isOneway() {
        return false;
      }

      public void start(I iface, load_atomic_multilog_args args, org.apache.thrift.async.AsyncMethodCallback<rpc_atomic_multilog_info> resultHandler) throws org.apache.thrift.TException {
        iface.loadAtomicMultilog(args.name,resultHandler);
      }
    }

    public static class get_atomic_multilog_info<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, get_atomic_multilog_info_args, rpc_atomic_multilog_info> {
      public get_atomic_multilog_info() {
        super("get_atomic_multilog_info");
      }

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

      public org.apache.thrift.async.AsyncMethodCallback<rpc_atomic_multilog_info> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
        final org.apache.thrift.AsyncProcessFunction fcall = this;
        return new org.apache.thrift.async.AsyncMethodCallback<rpc_atomic_multilog_info>() { 
          public void onComplete(rpc_atomic_multilog_info o) {
            get_atomic_multilog_info_result result = new get_atomic_multilog_info_result();
            result.success = o;
            try {
              fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
            } catch (org.apache.thrift.transport.TTransportException e) {
              _LOGGER.error("TTransportException writing to internal frame buffer", e);
              fb.close();
            } catch (java.lang.Exception e) {
              _LOGGER.error("Exception writing to internal frame buffer", e);
              onError(e);
            }
          }
          public void onError(java.lang.Exception e) {
            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
            org.apache.thrift.TSerializable msg;
            get_atomic_multilog_info_result result = new get_atomic_multilog_info_result();
            if (e instanceof rpc_management_exception) {
              result.ex = (rpc_management_exception) e;
              result.setExIsSet(true);
              msg = result;
            } else if (e instanceof org.apache.thrift.transport.TTransportException) {
              _LOGGER.error("TTransportException inside handler", e);
              fb.close();
              return;
            } else if (e instanceof org.apache.thrift.TApplicationException) {
              _LOGGER.error("TApplicationException inside handler", e);
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = (org.apache.thrift.TApplicationException)e;
            } else {
              _LOGGER.error("Exception inside handler", e);
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
            }
            try {
              fcall.sendResponse(fb,msg,msgType,seqid);
            } catch (java.lang.Exception ex) {
              _LOGGER.error("Exception writing to internal frame buffer", ex);
              fb.close();
            }
          }
        };
      }

      protected boolean isOneway() {
        return false;
      }

      public void start(I iface, get_atomic_multilog_info_args args, org.apache.thrift.async.AsyncMethodCallback<rpc_atomic_multilog_info> resultHandler) throws org.apache.thrift.TException {
        iface.getAtomicMultilogInfo(args.name,resultHandler);
      }
    }

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

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

      public org.apache.thrift.async.AsyncMethodCallback<Void> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
        final org.apache.thrift.AsyncProcessFunction fcall = this;
        return new org.apache.thrift.async.AsyncMethodCallback<Void>() { 
          public void onComplete(Void o) {
            remove_atomic_multilog_result result = new remove_atomic_multilog_result();
            try {
              fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
            } catch (org.apache.thrift.transport.TTransportException e) {
              _LOGGER.error("TTransportException writing to internal frame buffer", e);
              fb.close();
            } catch (java.lang.Exception e) {
              _LOGGER.error("Exception writing to internal frame buffer", e);
              onError(e);
            }
          }
          public void onError(java.lang.Exception e) {
            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
            org.apache.thrift.TSerializable msg;
            remove_atomic_multilog_result result = new remove_atomic_multilog_result();
            if (e instanceof rpc_management_exception) {
              result.ex = (rpc_management_exception) e;
              result.setExIsSet(true);
              msg = result;
            } else if (e instanceof org.apache.thrift.transport.TTransportException) {
              _LOGGER.error("TTransportException inside handler", e);
              fb.close();
              return;
            } else if (e instanceof org.apache.thrift.TApplicationException) {
              _LOGGER.error("TApplicationException inside handler", e);
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = (org.apache.thrift.TApplicationException)e;
            } else {
              _LOGGER.error("Exception inside handler", e);
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
            }
            try {
              fcall.sendResponse(fb,msg,msgType,seqid);
            } catch (java.lang.Exception ex) {
              _LOGGER.error("Exception writing to internal frame buffer", ex);
              fb.close();
            }
          }
        };
      }

      protected boolean isOneway() {
        return false;
      }

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

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

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

      public org.apache.thrift.async.AsyncMethodCallback<Void> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
        final org.apache.thrift.AsyncProcessFunction fcall = this;
        return new org.apache.thrift.async.AsyncMethodCallback<Void>() { 
          public void onComplete(Void o) {
            add_index_result result = new add_index_result();
            try {
              fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
            } catch (org.apache.thrift.transport.TTransportException e) {
              _LOGGER.error("TTransportException writing to internal frame buffer", e);
              fb.close();
            } catch (java.lang.Exception e) {
              _LOGGER.error("Exception writing to internal frame buffer", e);
              onError(e);
            }
          }
          public void onError(java.lang.Exception e) {
            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
            org.apache.thrift.TSerializable msg;
            add_index_result result = new add_index_result();
            if (e instanceof rpc_management_exception) {
              result.ex = (rpc_management_exception) e;
              result.setExIsSet(true);
              msg = result;
            } else if (e instanceof org.apache.thrift.transport.TTransportException) {
              _LOGGER.error("TTransportException inside handler", e);
              fb.close();
              return;
            } else if (e instanceof org.apache.thrift.TApplicationException) {
              _LOGGER.error("TApplicationException inside handler", e);
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = (org.apache.thrift.TApplicationException)e;
            } else {
              _LOGGER.error("Exception inside handler", e);
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
            }
            try {
              fcall.sendResponse(fb,msg,msgType,seqid);
            } catch (java.lang.Exception ex) {
              _LOGGER.error("Exception writing to internal frame buffer", ex);
              fb.close();
            }
          }
        };
      }

      protected boolean isOneway() {
        return false;
      }

      public void start(I iface, add_index_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException {
        iface.addIndex(args.mid, args.field_name, args.bucket_size,resultHandler);
      }
    }

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

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

      public org.apache.thrift.async.AsyncMethodCallback<Void> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
        final org.apache.thrift.AsyncProcessFunction fcall = this;
        return new org.apache.thrift.async.AsyncMethodCallback<Void>() { 
          public void onComplete(Void o) {
            remove_index_result result = new remove_index_result();
            try {
              fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
            } catch (org.apache.thrift.transport.TTransportException e) {
              _LOGGER.error("TTransportException writing to internal frame buffer", e);
              fb.close();
            } catch (java.lang.Exception e) {
              _LOGGER.error("Exception writing to internal frame buffer", e);
              onError(e);
            }
          }
          public void onError(java.lang.Exception e) {
            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
            org.apache.thrift.TSerializable msg;
            remove_index_result result = new remove_index_result();
            if (e instanceof rpc_management_exception) {
              result.ex = (rpc_management_exception) e;
              result.setExIsSet(true);
              msg = result;
            } else if (e instanceof org.apache.thrift.transport.TTransportException) {
              _LOGGER.error("TTransportException inside handler", e);
              fb.close();
              return;
            } else if (e instanceof org.apache.thrift.TApplicationException) {
              _LOGGER.error("TApplicationException inside handler", e);
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = (org.apache.thrift.TApplicationException)e;
            } else {
              _LOGGER.error("Exception inside handler", e);
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
            }
            try {
              fcall.sendResponse(fb,msg,msgType,seqid);
            } catch (java.lang.Exception ex) {
              _LOGGER.error("Exception writing to internal frame buffer", ex);
              fb.close();
            }
          }
        };
      }

      protected boolean isOneway() {
        return false;
      }

      public void start(I iface, remove_index_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException {
        iface.removeIndex(args.mid, args.field_name,resultHandler);
      }
    }

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

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

      public org.apache.thrift.async.AsyncMethodCallback<Void> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
        final org.apache.thrift.AsyncProcessFunction fcall = this;
        return new org.apache.thrift.async.AsyncMethodCallback<Void>() { 
          public void onComplete(Void o) {
            add_filter_result result = new add_filter_result();
            try {
              fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
            } catch (org.apache.thrift.transport.TTransportException e) {
              _LOGGER.error("TTransportException writing to internal frame buffer", e);
              fb.close();
            } catch (java.lang.Exception e) {
              _LOGGER.error("Exception writing to internal frame buffer", e);
              onError(e);
            }
          }
          public void onError(java.lang.Exception e) {
            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
            org.apache.thrift.TSerializable msg;
            add_filter_result result = new add_filter_result();
            if (e instanceof rpc_management_exception) {
              result.ex = (rpc_management_exception) e;
              result.setExIsSet(true);
              msg = result;
            } else if (e instanceof org.apache.thrift.transport.TTransportException) {
              _LOGGER.error("TTransportException inside handler", e);
              fb.close();
              return;
            } else if (e instanceof org.apache.thrift.TApplicationException) {
              _LOGGER.error("TApplicationException inside handler", e);
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = (org.apache.thrift.TApplicationException)e;
            } else {
              _LOGGER.error("Exception inside handler", e);
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
            }
            try {
              fcall.sendResponse(fb,msg,msgType,seqid);
            } catch (java.lang.Exception ex) {
              _LOGGER.error("Exception writing to internal frame buffer", ex);
              fb.close();
            }
          }
        };
      }

      protected boolean isOneway() {
        return false;
      }

      public void start(I iface, add_filter_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException {
        iface.addFilter(args.mid, args.filter_id, args.filter_ex,resultHandler);
      }
    }

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

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

      public org.apache.thrift.async.AsyncMethodCallback<Void> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
        final org.apache.thrift.AsyncProcessFunction fcall = this;
        return new org.apache.thrift.async.AsyncMethodCallback<Void>() { 
          public void onComplete(Void o) {
            remove_filter_result result = new remove_filter_result();
            try {
              fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
            } catch (org.apache.thrift.transport.TTransportException e) {
              _LOGGER.error("TTransportException writing to internal frame buffer", e);
              fb.close();
            } catch (java.lang.Exception e) {
              _LOGGER.error("Exception writing to internal frame buffer", e);
              onError(e);
            }
          }
          public void onError(java.lang.Exception e) {
            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
            org.apache.thrift.TSerializable msg;
            remove_filter_result result = new remove_filter_result();
            if (e instanceof rpc_management_exception) {
              result.ex = (rpc_management_exception) e;
              result.setExIsSet(true);
              msg = result;
            } else if (e instanceof org.apache.thrift.transport.TTransportException) {
              _LOGGER.error("TTransportException inside handler", e);
              fb.close();
              return;
            } else if (e instanceof org.apache.thrift.TApplicationException) {
              _LOGGER.error("TApplicationException inside handler", e);
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = (org.apache.thrift.TApplicationException)e;
            } else {
              _LOGGER.error("Exception inside handler", e);
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
            }
            try {
              fcall.sendResponse(fb,msg,msgType,seqid);
            } catch (java.lang.Exception ex) {
              _LOGGER.error("Exception writing to internal frame buffer", ex);
              fb.close();
            }
          }
        };
      }

      protected boolean isOneway() {
        return false;
      }

      public void start(I iface, remove_filter_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException {
        iface.removeFilter(args.mid, args.filter_id,resultHandler);
      }
    }

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

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

      public org.apache.thrift.async.AsyncMethodCallback<Void> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
        final org.apache.thrift.AsyncProcessFunction fcall = this;
        return new org.apache.thrift.async.AsyncMethodCallback<Void>() { 
          public void onComplete(Void o) {
            add_aggregate_result result = new add_aggregate_result();
            try {
              fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
            } catch (org.apache.thrift.transport.TTransportException e) {
              _LOGGER.error("TTransportException writing to internal frame buffer", e);
              fb.close();
            } catch (java.lang.Exception e) {
              _LOGGER.error("Exception writing to internal frame buffer", e);
              onError(e);
            }
          }
          public void onError(java.lang.Exception e) {
            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
            org.apache.thrift.TSerializable msg;
            add_aggregate_result result = new add_aggregate_result();
            if (e instanceof rpc_management_exception) {
              result.ex = (rpc_management_exception) e;
              result.setExIsSet(true);
              msg = result;
            } else if (e instanceof org.apache.thrift.transport.TTransportException) {
              _LOGGER.error("TTransportException inside handler", e);
              fb.close();
              return;
            } else if (e instanceof org.apache.thrift.TApplicationException) {
              _LOGGER.error("TApplicationException inside handler", e);
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = (org.apache.thrift.TApplicationException)e;
            } else {
              _LOGGER.error("Exception inside handler", e);
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
            }
            try {
              fcall.sendResponse(fb,msg,msgType,seqid);
            } catch (java.lang.Exception ex) {
              _LOGGER.error("Exception writing to internal frame buffer", ex);
              fb.close();
            }
          }
        };
      }

      protected boolean isOneway() {
        return false;
      }

      public void start(I iface, add_aggregate_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException {
        iface.addAggregate(args.mid, args.aggregate_name, args.filter_id, args.aggregate_expr,resultHandler);
      }
    }

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

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

      public org.apache.thrift.async.AsyncMethodCallback<Void> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
        final org.apache.thrift.AsyncProcessFunction fcall = this;
        return new org.apache.thrift.async.AsyncMethodCallback<Void>() { 
          public void onComplete(Void o) {
            remove_aggregate_result result = new remove_aggregate_result();
            try {
              fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
            } catch (org.apache.thrift.transport.TTransportException e) {
              _LOGGER.error("TTransportException writing to internal frame buffer", e);
              fb.close();
            } catch (java.lang.Exception e) {
              _LOGGER.error("Exception writing to internal frame buffer", e);
              onError(e);
            }
          }
          public void onError(java.lang.Exception e) {
            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
            org.apache.thrift.TSerializable msg;
            remove_aggregate_result result = new remove_aggregate_result();
            if (e instanceof rpc_management_exception) {
              result.ex = (rpc_management_exception) e;
              result.setExIsSet(true);
              msg = result;
            } else if (e instanceof org.apache.thrift.transport.TTransportException) {
              _LOGGER.error("TTransportException inside handler", e);
              fb.close();
              return;
            } else if (e instanceof org.apache.thrift.TApplicationException) {
              _LOGGER.error("TApplicationException inside handler", e);
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = (org.apache.thrift.TApplicationException)e;
            } else {
              _LOGGER.error("Exception inside handler", e);
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
            }
            try {
              fcall.sendResponse(fb,msg,msgType,seqid);
            } catch (java.lang.Exception ex) {
              _LOGGER.error("Exception writing to internal frame buffer", ex);
              fb.close();
            }
          }
        };
      }

      protected boolean isOneway() {
        return false;
      }

      public void start(I iface, remove_aggregate_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException {
        iface.removeAggregate(args.mid, args.aggregate_name,resultHandler);
      }
    }

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

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

      public org.apache.thrift.async.AsyncMethodCallback<Void> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
        final org.apache.thrift.AsyncProcessFunction fcall = this;
        return new org.apache.thrift.async.AsyncMethodCallback<Void>() { 
          public void onComplete(Void o) {
            add_trigger_result result = new add_trigger_result();
            try {
              fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
            } catch (org.apache.thrift.transport.TTransportException e) {
              _LOGGER.error("TTransportException writing to internal frame buffer", e);
              fb.close();
            } catch (java.lang.Exception e) {
              _LOGGER.error("Exception writing to internal frame buffer", e);
              onError(e);
            }
          }
          public void onError(java.lang.Exception e) {
            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
            org.apache.thrift.TSerializable msg;
            add_trigger_result result = new add_trigger_result();
            if (e instanceof rpc_management_exception) {
              result.ex = (rpc_management_exception) e;
              result.setExIsSet(true);
              msg = result;
            } else if (e instanceof org.apache.thrift.transport.TTransportException) {
              _LOGGER.error("TTransportException inside handler", e);
              fb.close();
              return;
            } else if (e instanceof org.apache.thrift.TApplicationException) {
              _LOGGER.error("TApplicationException inside handler", e);
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = (org.apache.thrift.TApplicationException)e;
            } else {
              _LOGGER.error("Exception inside handler", e);
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
            }
            try {
              fcall.sendResponse(fb,msg,msgType,seqid);
            } catch (java.lang.Exception ex) {
              _LOGGER.error("Exception writing to internal frame buffer", ex);
              fb.close();
            }
          }
        };
      }

      protected boolean isOneway() {
        return false;
      }

      public void start(I iface, add_trigger_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException {
        iface.addTrigger(args.mid, args.trigger_id, args.trigger_expr,resultHandler);
      }
    }

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

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

      public org.apache.thrift.async.AsyncMethodCallback<Void> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
        final org.apache.thrift.AsyncProcessFunction fcall = this;
        return new org.apache.thrift.async.AsyncMethodCallback<Void>() { 
          public void onComplete(Void o) {
            remove_trigger_result result = new remove_trigger_result();
            try {
              fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
            } catch (org.apache.thrift.transport.TTransportException e) {
              _LOGGER.error("TTransportException writing to internal frame buffer", e);
              fb.close();
            } catch (java.lang.Exception e) {
              _LOGGER.error("Exception writing to internal frame buffer", e);
              onError(e);
            }
          }
          public void onError(java.lang.Exception e) {
            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
            org.apache.thrift.TSerializable msg;
            remove_trigger_result result = new remove_trigger_result();
            if (e instanceof rpc_management_exception) {
              result.ex = (rpc_management_exception) e;
              result.setExIsSet(true);
              msg = result;
            } else if (e instanceof org.apache.thrift.transport.TTransportException) {
              _LOGGER.error("TTransportException inside handler", e);
              fb.close();
              return;
            } else if (e instanceof org.apache.thrift.TApplicationException) {
              _LOGGER.error("TApplicationException inside handler", e);
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = (org.apache.thrift.TApplicationException)e;
            } else {
              _LOGGER.error("Exception inside handler", e);
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
            }
            try {
              fcall.sendResponse(fb,msg,msgType,seqid);
            } catch (java.lang.Exception ex) {
              _LOGGER.error("Exception writing to internal frame buffer", ex);
              fb.close();
            }
          }
        };
      }

      protected boolean isOneway() {
        return false;
      }

      public void start(I iface, remove_trigger_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException {
        iface.removeTrigger(args.mid, args.trigger_id,resultHandler);
      }
    }

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

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

      public org.apache.thrift.async.AsyncMethodCallback<Void> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
        final org.apache.thrift.AsyncProcessFunction fcall = this;
        return new org.apache.thrift.async.AsyncMethodCallback<Void>() { 
          public void onComplete(Void o) {
            archive_result result = new archive_result();
            try {
              fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
            } catch (org.apache.thrift.transport.TTransportException e) {
              _LOGGER.error("TTransportException writing to internal frame buffer", e);
              fb.close();
            } catch (java.lang.Exception e) {
              _LOGGER.error("Exception writing to internal frame buffer", e);
              onError(e);
            }
          }
          public void onError(java.lang.Exception e) {
            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
            org.apache.thrift.TSerializable msg;
            archive_result result = new archive_result();
            if (e instanceof rpc_management_exception) {
              result.ex = (rpc_management_exception) e;
              result.setExIsSet(true);
              msg = result;
            } else if (e instanceof org.apache.thrift.transport.TTransportException) {
              _LOGGER.error("TTransportException inside handler", e);
              fb.close();
              return;
            } else if (e instanceof org.apache.thrift.TApplicationException) {
              _LOGGER.error("TApplicationException inside handler", e);
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = (org.apache.thrift.TApplicationException)e;
            } else {
              _LOGGER.error("Exception inside handler", e);
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
            }
            try {
              fcall.sendResponse(fb,msg,msgType,seqid);
            } catch (java.lang.Exception ex) {
              _LOGGER.error("Exception writing to internal frame buffer", ex);
              fb.close();
            }
          }
        };
      }

      protected boolean isOneway() {
        return false;
      }

      public void start(I iface, archive_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException {
        iface.archive(args.mid, args.offset,resultHandler);
      }
    }

    public static class append<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, append_args, java.lang.Long> {
      public append() {
        super("append");
      }

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

      public org.apache.thrift.async.AsyncMethodCallback<java.lang.Long> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
        final org.apache.thrift.AsyncProcessFunction fcall = this;
        return new org.apache.thrift.async.AsyncMethodCallback<java.lang.Long>() { 
          public void onComplete(java.lang.Long o) {
            append_result result = new append_result();
            result.success = o;
            result.setSuccessIsSet(true);
            try {
              fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
            } catch (org.apache.thrift.transport.TTransportException e) {
              _LOGGER.error("TTransportException writing to internal frame buffer", e);
              fb.close();
            } catch (java.lang.Exception e) {
              _LOGGER.error("Exception writing to internal frame buffer", e);
              onError(e);
            }
          }
          public void onError(java.lang.Exception e) {
            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
            org.apache.thrift.TSerializable msg;
            append_result result = new append_result();
            if (e instanceof org.apache.thrift.transport.TTransportException) {
              _LOGGER.error("TTransportException inside handler", e);
              fb.close();
              return;
            } else if (e instanceof org.apache.thrift.TApplicationException) {
              _LOGGER.error("TApplicationException inside handler", e);
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = (org.apache.thrift.TApplicationException)e;
            } else {
              _LOGGER.error("Exception inside handler", e);
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
            }
            try {
              fcall.sendResponse(fb,msg,msgType,seqid);
            } catch (java.lang.Exception ex) {
              _LOGGER.error("Exception writing to internal frame buffer", ex);
              fb.close();
            }
          }
        };
      }

      protected boolean isOneway() {
        return false;
      }

      public void start(I iface, append_args args, org.apache.thrift.async.AsyncMethodCallback<java.lang.Long> resultHandler) throws org.apache.thrift.TException {
        iface.append(args.mid, args.data,resultHandler);
      }
    }

    public static class append_batch<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, append_batch_args, java.lang.Long> {
      public append_batch() {
        super("append_batch");
      }

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

      public org.apache.thrift.async.AsyncMethodCallback<java.lang.Long> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
        final org.apache.thrift.AsyncProcessFunction fcall = this;
        return new org.apache.thrift.async.AsyncMethodCallback<java.lang.Long>() { 
          public void onComplete(java.lang.Long o) {
            append_batch_result result = new append_batch_result();
            result.success = o;
            result.setSuccessIsSet(true);
            try {
              fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
            } catch (org.apache.thrift.transport.TTransportException e) {
              _LOGGER.error("TTransportException writing to internal frame buffer", e);
              fb.close();
            } catch (java.lang.Exception e) {
              _LOGGER.error("Exception writing to internal frame buffer", e);
              onError(e);
            }
          }
          public void onError(java.lang.Exception e) {
            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
            org.apache.thrift.TSerializable msg;
            append_batch_result result = new append_batch_result();
            if (e instanceof org.apache.thrift.transport.TTransportException) {
              _LOGGER.error("TTransportException inside handler", e);
              fb.close();
              return;
            } else if (e instanceof org.apache.thrift.TApplicationException) {
              _LOGGER.error("TApplicationException inside handler", e);
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = (org.apache.thrift.TApplicationException)e;
            } else {
              _LOGGER.error("Exception inside handler", e);
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
            }
            try {
              fcall.sendResponse(fb,msg,msgType,seqid);
            } catch (java.lang.Exception ex) {
              _LOGGER.error("Exception writing to internal frame buffer", ex);
              fb.close();
            }
          }
        };
      }

      protected boolean isOneway() {
        return false;
      }

      public void start(I iface, append_batch_args args, org.apache.thrift.async.AsyncMethodCallback<java.lang.Long> resultHandler) throws org.apache.thrift.TException {
        iface.appendBatch(args.mid, args.batch,resultHandler);
      }
    }

    public static class read<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, read_args, java.nio.ByteBuffer> {
      public read() {
        super("read");
      }

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

      public org.apache.thrift.async.AsyncMethodCallback<java.nio.ByteBuffer> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
        final org.apache.thrift.AsyncProcessFunction fcall = this;
        return new org.apache.thrift.async.AsyncMethodCallback<java.nio.ByteBuffer>() { 
          public void onComplete(java.nio.ByteBuffer o) {
            read_result result = new read_result();
            result.success = o;
            try {
              fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
            } catch (org.apache.thrift.transport.TTransportException e) {
              _LOGGER.error("TTransportException writing to internal frame buffer", e);
              fb.close();
            } catch (java.lang.Exception e) {
              _LOGGER.error("Exception writing to internal frame buffer", e);
              onError(e);
            }
          }
          public void onError(java.lang.Exception e) {
            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
            org.apache.thrift.TSerializable msg;
            read_result result = new read_result();
            if (e instanceof org.apache.thrift.transport.TTransportException) {
              _LOGGER.error("TTransportException inside handler", e);
              fb.close();
              return;
            } else if (e instanceof org.apache.thrift.TApplicationException) {
              _LOGGER.error("TApplicationException inside handler", e);
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = (org.apache.thrift.TApplicationException)e;
            } else {
              _LOGGER.error("Exception inside handler", e);
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
            }
            try {
              fcall.sendResponse(fb,msg,msgType,seqid);
            } catch (java.lang.Exception ex) {
              _LOGGER.error("Exception writing to internal frame buffer", ex);
              fb.close();
            }
          }
        };
      }

      protected boolean isOneway() {
        return false;
      }

      public void start(I iface, read_args args, org.apache.thrift.async.AsyncMethodCallback<java.nio.ByteBuffer> resultHandler) throws org.apache.thrift.TException {
        iface.read(args.mid, args.offset, args.nrecords,resultHandler);
      }
    }

    public static class query_aggregate<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, query_aggregate_args, java.lang.String> {
      public query_aggregate() {
        super("query_aggregate");
      }

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

      public org.apache.thrift.async.AsyncMethodCallback<java.lang.String> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
        final org.apache.thrift.AsyncProcessFunction fcall = this;
        return new org.apache.thrift.async.AsyncMethodCallback<java.lang.String>() { 
          public void onComplete(java.lang.String o) {
            query_aggregate_result result = new query_aggregate_result();
            result.success = o;
            try {
              fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
            } catch (org.apache.thrift.transport.TTransportException e) {
              _LOGGER.error("TTransportException writing to internal frame buffer", e);
              fb.close();
            } catch (java.lang.Exception e) {
              _LOGGER.error("Exception writing to internal frame buffer", e);
              onError(e);
            }
          }
          public void onError(java.lang.Exception e) {
            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
            org.apache.thrift.TSerializable msg;
            query_aggregate_result result = new query_aggregate_result();
            if (e instanceof rpc_invalid_operation) {
              result.ex = (rpc_invalid_operation) e;
              result.setExIsSet(true);
              msg = result;
            } else if (e instanceof org.apache.thrift.transport.TTransportException) {
              _LOGGER.error("TTransportException inside handler", e);
              fb.close();
              return;
            } else if (e instanceof org.apache.thrift.TApplicationException) {
              _LOGGER.error("TApplicationException inside handler", e);
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = (org.apache.thrift.TApplicationException)e;
            } else {
              _LOGGER.error("Exception inside handler", e);
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
            }
            try {
              fcall.sendResponse(fb,msg,msgType,seqid);
            } catch (java.lang.Exception ex) {
              _LOGGER.error("Exception writing to internal frame buffer", ex);
              fb.close();
            }
          }
        };
      }

      protected boolean isOneway() {
        return false;
      }

      public void start(I iface, query_aggregate_args args, org.apache.thrift.async.AsyncMethodCallback<java.lang.String> resultHandler) throws org.apache.thrift.TException {
        iface.queryAggregate(args.mid, args.aggregate_name, args.beg_ms, args.end_ms,resultHandler);
      }
    }

    public static class adhoc_aggregate<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, adhoc_aggregate_args, java.lang.String> {
      public adhoc_aggregate() {
        super("adhoc_aggregate");
      }

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

      public org.apache.thrift.async.AsyncMethodCallback<java.lang.String> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
        final org.apache.thrift.AsyncProcessFunction fcall = this;
        return new org.apache.thrift.async.AsyncMethodCallback<java.lang.String>() { 
          public void onComplete(java.lang.String o) {
            adhoc_aggregate_result result = new adhoc_aggregate_result();
            result.success = o;
            try {
              fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
            } catch (org.apache.thrift.transport.TTransportException e) {
              _LOGGER.error("TTransportException writing to internal frame buffer", e);
              fb.close();
            } catch (java.lang.Exception e) {
              _LOGGER.error("Exception writing to internal frame buffer", e);
              onError(e);
            }
          }
          public void onError(java.lang.Exception e) {
            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
            org.apache.thrift.TSerializable msg;
            adhoc_aggregate_result result = new adhoc_aggregate_result();
            if (e instanceof rpc_invalid_operation) {
              result.ex = (rpc_invalid_operation) e;
              result.setExIsSet(true);
              msg = result;
            } else if (e instanceof org.apache.thrift.transport.TTransportException) {
              _LOGGER.error("TTransportException inside handler", e);
              fb.close();
              return;
            } else if (e instanceof org.apache.thrift.TApplicationException) {
              _LOGGER.error("TApplicationException inside handler", e);
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = (org.apache.thrift.TApplicationException)e;
            } else {
              _LOGGER.error("Exception inside handler", e);
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
            }
            try {
              fcall.sendResponse(fb,msg,msgType,seqid);
            } catch (java.lang.Exception ex) {
              _LOGGER.error("Exception writing to internal frame buffer", ex);
              fb.close();
            }
          }
        };
      }

      protected boolean isOneway() {
        return false;
      }

      public void start(I iface, adhoc_aggregate_args args, org.apache.thrift.async.AsyncMethodCallback<java.lang.String> resultHandler) throws org.apache.thrift.TException {
        iface.adhocAggregate(args.mid, args.aggregate_expr, args.filter_ex,resultHandler);
      }
    }

    public static class adhoc_filter<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, adhoc_filter_args, rpc_iterator_handle> {
      public adhoc_filter() {
        super("adhoc_filter");
      }

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

      public org.apache.thrift.async.AsyncMethodCallback<rpc_iterator_handle> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
        final org.apache.thrift.AsyncProcessFunction fcall = this;
        return new org.apache.thrift.async.AsyncMethodCallback<rpc_iterator_handle>() { 
          public void onComplete(rpc_iterator_handle o) {
            adhoc_filter_result result = new adhoc_filter_result();
            result.success = o;
            try {
              fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
            } catch (org.apache.thrift.transport.TTransportException e) {
              _LOGGER.error("TTransportException writing to internal frame buffer", e);
              fb.close();
            } catch (java.lang.Exception e) {
              _LOGGER.error("Exception writing to internal frame buffer", e);
              onError(e);
            }
          }
          public void onError(java.lang.Exception e) {
            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
            org.apache.thrift.TSerializable msg;
            adhoc_filter_result result = new adhoc_filter_result();
            if (e instanceof rpc_invalid_operation) {
              result.ex = (rpc_invalid_operation) e;
              result.setExIsSet(true);
              msg = result;
            } else if (e instanceof org.apache.thrift.transport.TTransportException) {
              _LOGGER.error("TTransportException inside handler", e);
              fb.close();
              return;
            } else if (e instanceof org.apache.thrift.TApplicationException) {
              _LOGGER.error("TApplicationException inside handler", e);
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = (org.apache.thrift.TApplicationException)e;
            } else {
              _LOGGER.error("Exception inside handler", e);
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
            }
            try {
              fcall.sendResponse(fb,msg,msgType,seqid);
            } catch (java.lang.Exception ex) {
              _LOGGER.error("Exception writing to internal frame buffer", ex);
              fb.close();
            }
          }
        };
      }

      protected boolean isOneway() {
        return false;
      }

      public void start(I iface, adhoc_filter_args args, org.apache.thrift.async.AsyncMethodCallback<rpc_iterator_handle> resultHandler) throws org.apache.thrift.TException {
        iface.adhocFilter(args.mid, args.filter_ex,resultHandler);
      }
    }

    public static class predef_filter<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, predef_filter_args, rpc_iterator_handle> {
      public predef_filter() {
        super("predef_filter");
      }

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

      public org.apache.thrift.async.AsyncMethodCallback<rpc_iterator_handle> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
        final org.apache.thrift.AsyncProcessFunction fcall = this;
        return new org.apache.thrift.async.AsyncMethodCallback<rpc_iterator_handle>() { 
          public void onComplete(rpc_iterator_handle o) {
            predef_filter_result result = new predef_filter_result();
            result.success = o;
            try {
              fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
            } catch (org.apache.thrift.transport.TTransportException e) {
              _LOGGER.error("TTransportException writing to internal frame buffer", e);
              fb.close();
            } catch (java.lang.Exception e) {
              _LOGGER.error("Exception writing to internal frame buffer", e);
              onError(e);
            }
          }
          public void onError(java.lang.Exception e) {
            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
            org.apache.thrift.TSerializable msg;
            predef_filter_result result = new predef_filter_result();
            if (e instanceof rpc_invalid_operation) {
              result.ex = (rpc_invalid_operation) e;
              result.setExIsSet(true);
              msg = result;
            } else if (e instanceof org.apache.thrift.transport.TTransportException) {
              _LOGGER.error("TTransportException inside handler", e);
              fb.close();
              return;
            } else if (e instanceof org.apache.thrift.TApplicationException) {
              _LOGGER.error("TApplicationException inside handler", e);
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = (org.apache.thrift.TApplicationException)e;
            } else {
              _LOGGER.error("Exception inside handler", e);
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
            }
            try {
              fcall.sendResponse(fb,msg,msgType,seqid);
            } catch (java.lang.Exception ex) {
              _LOGGER.error("Exception writing to internal frame buffer", ex);
              fb.close();
            }
          }
        };
      }

      protected boolean isOneway() {
        return false;
      }

      public void start(I iface, predef_filter_args args, org.apache.thrift.async.AsyncMethodCallback<rpc_iterator_handle> resultHandler) throws org.apache.thrift.TException {
        iface.predefFilter(args.mid, args.filter_id, args.beg_ms, args.end_ms,resultHandler);
      }
    }

    public static class combined_filter<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, combined_filter_args, rpc_iterator_handle> {
      public combined_filter() {
        super("combined_filter");
      }

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

      public org.apache.thrift.async.AsyncMethodCallback<rpc_iterator_handle> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
        final org.apache.thrift.AsyncProcessFunction fcall = this;
        return new org.apache.thrift.async.AsyncMethodCallback<rpc_iterator_handle>() { 
          public void onComplete(rpc_iterator_handle o) {
            combined_filter_result result = new combined_filter_result();
            result.success = o;
            try {
              fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
            } catch (org.apache.thrift.transport.TTransportException e) {
              _LOGGER.error("TTransportException writing to internal frame buffer", e);
              fb.close();
            } catch (java.lang.Exception e) {
              _LOGGER.error("Exception writing to internal frame buffer", e);
              onError(e);
            }
          }
          public void onError(java.lang.Exception e) {
            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
            org.apache.thrift.TSerializable msg;
            combined_filter_result result = new combined_filter_result();
            if (e instanceof rpc_invalid_operation) {
              result.ex = (rpc_invalid_operation) e;
              result.setExIsSet(true);
              msg = result;
            } else if (e instanceof org.apache.thrift.transport.TTransportException) {
              _LOGGER.error("TTransportException inside handler", e);
              fb.close();
              return;
            } else if (e instanceof org.apache.thrift.TApplicationException) {
              _LOGGER.error("TApplicationException inside handler", e);
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = (org.apache.thrift.TApplicationException)e;
            } else {
              _LOGGER.error("Exception inside handler", e);
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
            }
            try {
              fcall.sendResponse(fb,msg,msgType,seqid);
            } catch (java.lang.Exception ex) {
              _LOGGER.error("Exception writing to internal frame buffer", ex);
              fb.close();
            }
          }
        };
      }

      protected boolean isOneway() {
        return false;
      }

      public void start(I iface, combined_filter_args args, org.apache.thrift.async.AsyncMethodCallback<rpc_iterator_handle> resultHandler) throws org.apache.thrift.TException {
        iface.combinedFilter(args.mid, args.filter_id, args.filter_ex, args.beg_ms, args.end_ms,resultHandler);
      }
    }

    public static class alerts_by_time<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, alerts_by_time_args, rpc_iterator_handle> {
      public alerts_by_time() {
        super("alerts_by_time");
      }

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

      public org.apache.thrift.async.AsyncMethodCallback<rpc_iterator_handle> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
        final org.apache.thrift.AsyncProcessFunction fcall = this;
        return new org.apache.thrift.async.AsyncMethodCallback<rpc_iterator_handle>() { 
          public void onComplete(rpc_iterator_handle o) {
            alerts_by_time_result result = new alerts_by_time_result();
            result.success = o;
            try {
              fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
            } catch (org.apache.thrift.transport.TTransportException e) {
              _LOGGER.error("TTransportException writing to internal frame buffer", e);
              fb.close();
            } catch (java.lang.Exception e) {
              _LOGGER.error("Exception writing to internal frame buffer", e);
              onError(e);
            }
          }
          public void onError(java.lang.Exception e) {
            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
            org.apache.thrift.TSerializable msg;
            alerts_by_time_result result = new alerts_by_time_result();
            if (e instanceof rpc_invalid_operation) {
              result.ex = (rpc_invalid_operation) e;
              result.setExIsSet(true);
              msg = result;
            } else if (e instanceof org.apache.thrift.transport.TTransportException) {
              _LOGGER.error("TTransportException inside handler", e);
              fb.close();
              return;
            } else if (e instanceof org.apache.thrift.TApplicationException) {
              _LOGGER.error("TApplicationException inside handler", e);
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = (org.apache.thrift.TApplicationException)e;
            } else {
              _LOGGER.error("Exception inside handler", e);
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
            }
            try {
              fcall.sendResponse(fb,msg,msgType,seqid);
            } catch (java.lang.Exception ex) {
              _LOGGER.error("Exception writing to internal frame buffer", ex);
              fb.close();
            }
          }
        };
      }

      protected boolean isOneway() {
        return false;
      }

      public void start(I iface, alerts_by_time_args args, org.apache.thrift.async.AsyncMethodCallback<rpc_iterator_handle> resultHandler) throws org.apache.thrift.TException {
        iface.alertsByTime(args.mid, args.beg_ms, args.end_ms,resultHandler);
      }
    }

    public static class alerts_by_trigger_and_time<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, alerts_by_trigger_and_time_args, rpc_iterator_handle> {
      public alerts_by_trigger_and_time() {
        super("alerts_by_trigger_and_time");
      }

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

      public org.apache.thrift.async.AsyncMethodCallback<rpc_iterator_handle> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
        final org.apache.thrift.AsyncProcessFunction fcall = this;
        return new org.apache.thrift.async.AsyncMethodCallback<rpc_iterator_handle>() { 
          public void onComplete(rpc_iterator_handle o) {
            alerts_by_trigger_and_time_result result = new alerts_by_trigger_and_time_result();
            result.success = o;
            try {
              fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
            } catch (org.apache.thrift.transport.TTransportException e) {
              _LOGGER.error("TTransportException writing to internal frame buffer", e);
              fb.close();
            } catch (java.lang.Exception e) {
              _LOGGER.error("Exception writing to internal frame buffer", e);
              onError(e);
            }
          }
          public void onError(java.lang.Exception e) {
            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
            org.apache.thrift.TSerializable msg;
            alerts_by_trigger_and_time_result result = new alerts_by_trigger_and_time_result();
            if (e instanceof rpc_invalid_operation) {
              result.ex = (rpc_invalid_operation) e;
              result.setExIsSet(true);
              msg = result;
            } else if (e instanceof org.apache.thrift.transport.TTransportException) {
              _LOGGER.error("TTransportException inside handler", e);
              fb.close();
              return;
            } else if (e instanceof org.apache.thrift.TApplicationException) {
              _LOGGER.error("TApplicationException inside handler", e);
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = (org.apache.thrift.TApplicationException)e;
            } else {
              _LOGGER.error("Exception inside handler", e);
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
            }
            try {
              fcall.sendResponse(fb,msg,msgType,seqid);
            } catch (java.lang.Exception ex) {
              _LOGGER.error("Exception writing to internal frame buffer", ex);
              fb.close();
            }
          }
        };
      }

      protected boolean isOneway() {
        return false;
      }

      public void start(I iface, alerts_by_trigger_and_time_args args, org.apache.thrift.async.AsyncMethodCallback<rpc_iterator_handle> resultHandler) throws org.apache.thrift.TException {
        iface.alertsByTriggerAndTime(args.mid, args.trigger_id, args.beg_ms, args.end_ms,resultHandler);
      }
    }

    public static class get_more<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, get_more_args, rpc_iterator_handle> {
      public get_more() {
        super("get_more");
      }

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

      public org.apache.thrift.async.AsyncMethodCallback<rpc_iterator_handle> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
        final org.apache.thrift.AsyncProcessFunction fcall = this;
        return new org.apache.thrift.async.AsyncMethodCallback<rpc_iterator_handle>() { 
          public void onComplete(rpc_iterator_handle o) {
            get_more_result result = new get_more_result();
            result.success = o;
            try {
              fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
            } catch (org.apache.thrift.transport.TTransportException e) {
              _LOGGER.error("TTransportException writing to internal frame buffer", e);
              fb.close();
            } catch (java.lang.Exception e) {
              _LOGGER.error("Exception writing to internal frame buffer", e);
              onError(e);
            }
          }
          public void onError(java.lang.Exception e) {
            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
            org.apache.thrift.TSerializable msg;
            get_more_result result = new get_more_result();
            if (e instanceof rpc_invalid_operation) {
              result.ex = (rpc_invalid_operation) e;
              result.setExIsSet(true);
              msg = result;
            } else if (e instanceof org.apache.thrift.transport.TTransportException) {
              _LOGGER.error("TTransportException inside handler", e);
              fb.close();
              return;
            } else if (e instanceof org.apache.thrift.TApplicationException) {
              _LOGGER.error("TApplicationException inside handler", e);
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = (org.apache.thrift.TApplicationException)e;
            } else {
              _LOGGER.error("Exception inside handler", e);
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
            }
            try {
              fcall.sendResponse(fb,msg,msgType,seqid);
            } catch (java.lang.Exception ex) {
              _LOGGER.error("Exception writing to internal frame buffer", ex);
              fb.close();
            }
          }
        };
      }

      protected boolean isOneway() {
        return false;
      }

      public void start(I iface, get_more_args args, org.apache.thrift.async.AsyncMethodCallback<rpc_iterator_handle> resultHandler) throws org.apache.thrift.TException {
        iface.getMore(args.mid, args.desc,resultHandler);
      }
    }

    public static class num_records<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, num_records_args, java.lang.Long> {
      public num_records() {
        super("num_records");
      }

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

      public org.apache.thrift.async.AsyncMethodCallback<java.lang.Long> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
        final org.apache.thrift.AsyncProcessFunction fcall = this;
        return new org.apache.thrift.async.AsyncMethodCallback<java.lang.Long>() { 
          public void onComplete(java.lang.Long o) {
            num_records_result result = new num_records_result();
            result.success = o;
            result.setSuccessIsSet(true);
            try {
              fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
            } catch (org.apache.thrift.transport.TTransportException e) {
              _LOGGER.error("TTransportException writing to internal frame buffer", e);
              fb.close();
            } catch (java.lang.Exception e) {
              _LOGGER.error("Exception writing to internal frame buffer", e);
              onError(e);
            }
          }
          public void onError(java.lang.Exception e) {
            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
            org.apache.thrift.TSerializable msg;
            num_records_result result = new num_records_result();
            if (e instanceof org.apache.thrift.transport.TTransportException) {
              _LOGGER.error("TTransportException inside handler", e);
              fb.close();
              return;
            } else if (e instanceof org.apache.thrift.TApplicationException) {
              _LOGGER.error("TApplicationException inside handler", e);
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = (org.apache.thrift.TApplicationException)e;
            } else {
              _LOGGER.error("Exception inside handler", e);
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
            }
            try {
              fcall.sendResponse(fb,msg,msgType,seqid);
            } catch (java.lang.Exception ex) {
              _LOGGER.error("Exception writing to internal frame buffer", ex);
              fb.close();
            }
          }
        };
      }

      protected boolean isOneway() {
        return false;
      }

      public void start(I iface, num_records_args args, org.apache.thrift.async.AsyncMethodCallback<java.lang.Long> resultHandler) throws org.apache.thrift.TException {
        iface.numRecords(args.mid,resultHandler);
      }
    }

  }

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


    private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new register_handler_argsStandardSchemeFactory();
    private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new register_handler_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 java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();

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

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByName(java.lang.String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final java.lang.String _fieldName;

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

      public short getThriftFieldId() {
        return _thriftId;
      }

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

    public register_handler_args() {
    }

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

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

    @Override
    public void clear() {
    }

    public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
      switch (field) {
      }
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.Object getFieldValue(_Fields field) {
      switch (field) {
      }
      throw new java.lang.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 java.lang.IllegalArgumentException();
      }

      switch (field) {
      }
      throw new java.lang.IllegalStateException();
    }

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

    public boolean equals(register_handler_args that) {
      if (that == null)
        return false;
      if (this == that)
        return true;

      return true;
    }

    @Override
    public int hashCode() {
      int hashCode = 1;

      return hashCode;
    }

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

      int lastComparison = 0;

      return 0;
    }

    @org.apache.thrift.annotation.Nullable
    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

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

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

    @Override
    public java.lang.String toString() {
      java.lang.StringBuilder sb = new java.lang.StringBuilder("register_handler_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, java.lang.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 register_handler_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public register_handler_argsStandardScheme getScheme() {
        return new register_handler_argsStandardScheme();
      }
    }

    private static class register_handler_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<register_handler_args> {

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

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

    }

    private static class register_handler_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public register_handler_argsTupleScheme getScheme() {
        return new register_handler_argsTupleScheme();
      }
    }

    private static class register_handler_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<register_handler_args> {

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

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

    private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
      return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
    }
  }

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

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

    private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new register_handler_resultStandardSchemeFactory();
    private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new register_handler_resultTupleSchemeFactory();

    private @org.apache.thrift.annotation.Nullable rpc_management_exception ex; // 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 {
      EX((short)1, "ex");

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

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

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // EX
            return EX;
          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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByName(java.lang.String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final java.lang.String _fieldName;

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

      public short getThriftFieldId() {
        return _thriftId;
      }

      public java.lang.String getFieldName() {
        return _fieldName;
      }
    }

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

    public register_handler_result() {
    }

    public register_handler_result(
      rpc_management_exception ex)
    {
      this();
      this.ex = ex;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public register_handler_result(register_handler_result other) {
      if (other.isSetEx()) {
        this.ex = new rpc_management_exception(other.ex);
      }
    }

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

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

    @org.apache.thrift.annotation.Nullable
    public rpc_management_exception getEx() {
      return this.ex;
    }

    public register_handler_result setEx(@org.apache.thrift.annotation.Nullable rpc_management_exception ex) {
      this.ex = ex;
      return this;
    }

    public void unsetEx() {
      this.ex = null;
    }

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

    public void setExIsSet(boolean value) {
      if (!value) {
        this.ex = null;
      }
    }

    public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
      switch (field) {
      case EX:
        if (value == null) {
          unsetEx();
        } else {
          setEx((rpc_management_exception)value);
        }
        break;

      }
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.Object getFieldValue(_Fields field) {
      switch (field) {
      case EX:
        return getEx();

      }
      throw new java.lang.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 java.lang.IllegalArgumentException();
      }

      switch (field) {
      case EX:
        return isSetEx();
      }
      throw new java.lang.IllegalStateException();
    }

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

    public boolean equals(register_handler_result that) {
      if (that == null)
        return false;
      if (this == that)
        return true;

      boolean this_present_ex = true && this.isSetEx();
      boolean that_present_ex = true && that.isSetEx();
      if (this_present_ex || that_present_ex) {
        if (!(this_present_ex && that_present_ex))
          return false;
        if (!this.ex.equals(that.ex))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      int hashCode = 1;

      hashCode = hashCode * 8191 + ((isSetEx()) ? 131071 : 524287);
      if (isSetEx())
        hashCode = hashCode * 8191 + ex.hashCode();

      return hashCode;
    }

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

      int lastComparison = 0;

      lastComparison = java.lang.Boolean.valueOf(isSetEx()).compareTo(other.isSetEx());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetEx()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ex, other.ex);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    @org.apache.thrift.annotation.Nullable
    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

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

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

    @Override
    public java.lang.String toString() {
      java.lang.StringBuilder sb = new java.lang.StringBuilder("register_handler_result(");
      boolean first = true;

      sb.append("ex:");
      if (this.ex == null) {
        sb.append("null");
      } else {
        sb.append(this.ex);
      }
      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, java.lang.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 register_handler_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public register_handler_resultStandardScheme getScheme() {
        return new register_handler_resultStandardScheme();
      }
    }

    private static class register_handler_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<register_handler_result> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, register_handler_result struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TField schemeField;
        iprot.readStructBegin();
        while (true)
        {
          schemeField = iprot.readFieldBegin();
          if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { 
            break;
          }
          switch (schemeField.id) {
            case 1: // EX
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                if (struct.ex == null) {
                  struct.ex = new rpc_management_exception();
                }
                struct.ex.read(iprot);
                struct.setExIsSet(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, register_handler_result struct) throws org.apache.thrift.TException {
        struct.validate();

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

    }

    private static class register_handler_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public register_handler_resultTupleScheme getScheme() {
        return new register_handler_resultTupleScheme();
      }
    }

    private static class register_handler_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<register_handler_result> {

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

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, register_handler_result struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet incoming = iprot.readBitSet(1);
        if (incoming.get(0)) {
          if (struct.ex == null) {
            struct.ex = new rpc_management_exception();
          }
          struct.ex.read(iprot);
          struct.setExIsSet(true);
        }
      }
    }

    private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
      return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
    }
  }

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


    private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new deregister_handler_argsStandardSchemeFactory();
    private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new deregister_handler_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 java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();

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

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByName(java.lang.String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final java.lang.String _fieldName;

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

      public short getThriftFieldId() {
        return _thriftId;
      }

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

    public deregister_handler_args() {
    }

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

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

    @Override
    public void clear() {
    }

    public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
      switch (field) {
      }
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.Object getFieldValue(_Fields field) {
      switch (field) {
      }
      throw new java.lang.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 java.lang.IllegalArgumentException();
      }

      switch (field) {
      }
      throw new java.lang.IllegalStateException();
    }

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

    public boolean equals(deregister_handler_args that) {
      if (that == null)
        return false;
      if (this == that)
        return true;

      return true;
    }

    @Override
    public int hashCode() {
      int hashCode = 1;

      return hashCode;
    }

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

      int lastComparison = 0;

      return 0;
    }

    @org.apache.thrift.annotation.Nullable
    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

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

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

    @Override
    public java.lang.String toString() {
      java.lang.StringBuilder sb = new java.lang.StringBuilder("deregister_handler_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, java.lang.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 deregister_handler_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public deregister_handler_argsStandardScheme getScheme() {
        return new deregister_handler_argsStandardScheme();
      }
    }

    private static class deregister_handler_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<deregister_handler_args> {

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

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

    }

    private static class deregister_handler_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public deregister_handler_argsTupleScheme getScheme() {
        return new deregister_handler_argsTupleScheme();
      }
    }

    private static class deregister_handler_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<deregister_handler_args> {

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

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

    private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
      return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
    }
  }

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

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

    private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new deregister_handler_resultStandardSchemeFactory();
    private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new deregister_handler_resultTupleSchemeFactory();

    private @org.apache.thrift.annotation.Nullable rpc_management_exception ex; // 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 {
      EX((short)1, "ex");

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

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

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // EX
            return EX;
          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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByName(java.lang.String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final java.lang.String _fieldName;

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

      public short getThriftFieldId() {
        return _thriftId;
      }

      public java.lang.String getFieldName() {
        return _fieldName;
      }
    }

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

    public deregister_handler_result() {
    }

    public deregister_handler_result(
      rpc_management_exception ex)
    {
      this();
      this.ex = ex;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public deregister_handler_result(deregister_handler_result other) {
      if (other.isSetEx()) {
        this.ex = new rpc_management_exception(other.ex);
      }
    }

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

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

    @org.apache.thrift.annotation.Nullable
    public rpc_management_exception getEx() {
      return this.ex;
    }

    public deregister_handler_result setEx(@org.apache.thrift.annotation.Nullable rpc_management_exception ex) {
      this.ex = ex;
      return this;
    }

    public void unsetEx() {
      this.ex = null;
    }

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

    public void setExIsSet(boolean value) {
      if (!value) {
        this.ex = null;
      }
    }

    public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
      switch (field) {
      case EX:
        if (value == null) {
          unsetEx();
        } else {
          setEx((rpc_management_exception)value);
        }
        break;

      }
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.Object getFieldValue(_Fields field) {
      switch (field) {
      case EX:
        return getEx();

      }
      throw new java.lang.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 java.lang.IllegalArgumentException();
      }

      switch (field) {
      case EX:
        return isSetEx();
      }
      throw new java.lang.IllegalStateException();
    }

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

    public boolean equals(deregister_handler_result that) {
      if (that == null)
        return false;
      if (this == that)
        return true;

      boolean this_present_ex = true && this.isSetEx();
      boolean that_present_ex = true && that.isSetEx();
      if (this_present_ex || that_present_ex) {
        if (!(this_present_ex && that_present_ex))
          return false;
        if (!this.ex.equals(that.ex))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      int hashCode = 1;

      hashCode = hashCode * 8191 + ((isSetEx()) ? 131071 : 524287);
      if (isSetEx())
        hashCode = hashCode * 8191 + ex.hashCode();

      return hashCode;
    }

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

      int lastComparison = 0;

      lastComparison = java.lang.Boolean.valueOf(isSetEx()).compareTo(other.isSetEx());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetEx()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ex, other.ex);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    @org.apache.thrift.annotation.Nullable
    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

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

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

    @Override
    public java.lang.String toString() {
      java.lang.StringBuilder sb = new java.lang.StringBuilder("deregister_handler_result(");
      boolean first = true;

      sb.append("ex:");
      if (this.ex == null) {
        sb.append("null");
      } else {
        sb.append(this.ex);
      }
      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, java.lang.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 deregister_handler_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public deregister_handler_resultStandardScheme getScheme() {
        return new deregister_handler_resultStandardScheme();
      }
    }

    private static class deregister_handler_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<deregister_handler_result> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, deregister_handler_result struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TField schemeField;
        iprot.readStructBegin();
        while (true)
        {
          schemeField = iprot.readFieldBegin();
          if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { 
            break;
          }
          switch (schemeField.id) {
            case 1: // EX
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                if (struct.ex == null) {
                  struct.ex = new rpc_management_exception();
                }
                struct.ex.read(iprot);
                struct.setExIsSet(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, deregister_handler_result struct) throws org.apache.thrift.TException {
        struct.validate();

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

    }

    private static class deregister_handler_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public deregister_handler_resultTupleScheme getScheme() {
        return new deregister_handler_resultTupleScheme();
      }
    }

    private static class deregister_handler_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<deregister_handler_result> {

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

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, deregister_handler_result struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet incoming = iprot.readBitSet(1);
        if (incoming.get(0)) {
          if (struct.ex == null) {
            struct.ex = new rpc_management_exception();
          }
          struct.ex.read(iprot);
          struct.setExIsSet(true);
        }
      }
    }

    private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
      return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
    }
  }

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

    private static final org.apache.thrift.protocol.TField NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("name", org.apache.thrift.protocol.TType.STRING, (short)1);
    private static final org.apache.thrift.protocol.TField SCHEMA_FIELD_DESC = new org.apache.thrift.protocol.TField("schema", org.apache.thrift.protocol.TType.LIST, (short)2);
    private static final org.apache.thrift.protocol.TField MODE_FIELD_DESC = new org.apache.thrift.protocol.TField("mode", org.apache.thrift.protocol.TType.I32, (short)3);

    private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new create_atomic_multilog_argsStandardSchemeFactory();
    private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new create_atomic_multilog_argsTupleSchemeFactory();

    private @org.apache.thrift.annotation.Nullable java.lang.String name; // required
    private @org.apache.thrift.annotation.Nullable java.util.List<rpc_column> schema; // required
    private @org.apache.thrift.annotation.Nullable rpc_storage_mode mode; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      NAME((short)1, "name"),
      SCHEMA((short)2, "schema"),
      /**
       * 
       * @see rpc_storage_mode
       */
      MODE((short)3, "mode");

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

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

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // NAME
            return NAME;
          case 2: // SCHEMA
            return SCHEMA;
          case 3: // MODE
            return MODE;
          default:
            return null;
        }
      }

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

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByName(java.lang.String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final java.lang.String _fieldName;

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

      public short getThriftFieldId() {
        return _thriftId;
      }

      public java.lang.String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
      tmpMap.put(_Fields.SCHEMA, new org.apache.thrift.meta_data.FieldMetaData("schema", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.LIST          , "rpc_schema")));
      tmpMap.put(_Fields.MODE, new org.apache.thrift.meta_data.FieldMetaData("mode", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, rpc_storage_mode.class)));
      metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(create_atomic_multilog_args.class, metaDataMap);
    }

    public create_atomic_multilog_args() {
    }

    public create_atomic_multilog_args(
      java.lang.String name,
      java.util.List<rpc_column> schema,
      rpc_storage_mode mode)
    {
      this();
      this.name = name;
      this.schema = schema;
      this.mode = mode;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public create_atomic_multilog_args(create_atomic_multilog_args other) {
      if (other.isSetName()) {
        this.name = other.name;
      }
      if (other.isSetSchema()) {
        java.util.List<rpc_column> __this__schema = new java.util.ArrayList<rpc_column>(other.schema.size());
        for (rpc_column other_element : other.schema) {
          __this__schema.add(new rpc_column(other_element));
        }
        this.schema = __this__schema;
      }
      if (other.isSetMode()) {
        this.mode = other.mode;
      }
    }

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

    @Override
    public void clear() {
      this.name = null;
      if (this.schema != null) {
        this.schema.clear();
      }
      this.mode = null;
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.String getName() {
      return this.name;
    }

    public create_atomic_multilog_args setName(@org.apache.thrift.annotation.Nullable java.lang.String name) {
      this.name = name;
      return this;
    }

    public void unsetName() {
      this.name = null;
    }

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

    public void setNameIsSet(boolean value) {
      if (!value) {
        this.name = null;
      }
    }

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

    @org.apache.thrift.annotation.Nullable
    public java.util.Iterator<rpc_column> getSchemaIterator() {
      return (this.schema == null) ? null : this.schema.iterator();
    }

    public void addToSchema(rpc_column elem) {
      if (this.schema == null) {
        this.schema = new java.util.ArrayList<rpc_column>();
      }
      this.schema.add(elem);
    }

    @org.apache.thrift.annotation.Nullable
    public java.util.List<rpc_column> getSchema() {
      return this.schema;
    }

    public create_atomic_multilog_args setSchema(@org.apache.thrift.annotation.Nullable java.util.List<rpc_column> schema) {
      this.schema = schema;
      return this;
    }

    public void unsetSchema() {
      this.schema = null;
    }

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

    public void setSchemaIsSet(boolean value) {
      if (!value) {
        this.schema = null;
      }
    }

    /**
     * 
     * @see rpc_storage_mode
     */
    @org.apache.thrift.annotation.Nullable
    public rpc_storage_mode getMode() {
      return this.mode;
    }

    /**
     * 
     * @see rpc_storage_mode
     */
    public create_atomic_multilog_args setMode(@org.apache.thrift.annotation.Nullable rpc_storage_mode mode) {
      this.mode = mode;
      return this;
    }

    public void unsetMode() {
      this.mode = null;
    }

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

    public void setModeIsSet(boolean value) {
      if (!value) {
        this.mode = null;
      }
    }

    public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
      switch (field) {
      case NAME:
        if (value == null) {
          unsetName();
        } else {
          setName((java.lang.String)value);
        }
        break;

      case SCHEMA:
        if (value == null) {
          unsetSchema();
        } else {
          setSchema((java.util.List<rpc_column>)value);
        }
        break;

      case MODE:
        if (value == null) {
          unsetMode();
        } else {
          setMode((rpc_storage_mode)value);
        }
        break;

      }
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.Object getFieldValue(_Fields field) {
      switch (field) {
      case NAME:
        return getName();

      case SCHEMA:
        return getSchema();

      case MODE:
        return getMode();

      }
      throw new java.lang.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 java.lang.IllegalArgumentException();
      }

      switch (field) {
      case NAME:
        return isSetName();
      case SCHEMA:
        return isSetSchema();
      case MODE:
        return isSetMode();
      }
      throw new java.lang.IllegalStateException();
    }

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

    public boolean equals(create_atomic_multilog_args that) {
      if (that == null)
        return false;
      if (this == that)
        return true;

      boolean this_present_name = true && this.isSetName();
      boolean that_present_name = true && that.isSetName();
      if (this_present_name || that_present_name) {
        if (!(this_present_name && that_present_name))
          return false;
        if (!this.name.equals(that.name))
          return false;
      }

      boolean this_present_schema = true && this.isSetSchema();
      boolean that_present_schema = true && that.isSetSchema();
      if (this_present_schema || that_present_schema) {
        if (!(this_present_schema && that_present_schema))
          return false;
        if (!this.schema.equals(that.schema))
          return false;
      }

      boolean this_present_mode = true && this.isSetMode();
      boolean that_present_mode = true && that.isSetMode();
      if (this_present_mode || that_present_mode) {
        if (!(this_present_mode && that_present_mode))
          return false;
        if (!this.mode.equals(that.mode))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      int hashCode = 1;

      hashCode = hashCode * 8191 + ((isSetName()) ? 131071 : 524287);
      if (isSetName())
        hashCode = hashCode * 8191 + name.hashCode();

      hashCode = hashCode * 8191 + ((isSetSchema()) ? 131071 : 524287);
      if (isSetSchema())
        hashCode = hashCode * 8191 + schema.hashCode();

      hashCode = hashCode * 8191 + ((isSetMode()) ? 131071 : 524287);
      if (isSetMode())
        hashCode = hashCode * 8191 + mode.getValue();

      return hashCode;
    }

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

      int lastComparison = 0;

      lastComparison = java.lang.Boolean.valueOf(isSetName()).compareTo(other.isSetName());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetName()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, other.name);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = java.lang.Boolean.valueOf(isSetSchema()).compareTo(other.isSetSchema());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSchema()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.schema, other.schema);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = java.lang.Boolean.valueOf(isSetMode()).compareTo(other.isSetMode());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetMode()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.mode, other.mode);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    @org.apache.thrift.annotation.Nullable
    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

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

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

    @Override
    public java.lang.String toString() {
      java.lang.StringBuilder sb = new java.lang.StringBuilder("create_atomic_multilog_args(");
      boolean first = true;

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

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

    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, java.lang.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 create_atomic_multilog_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public create_atomic_multilog_argsStandardScheme getScheme() {
        return new create_atomic_multilog_argsStandardScheme();
      }
    }

    private static class create_atomic_multilog_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<create_atomic_multilog_args> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, create_atomic_multilog_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: // NAME
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.name = iprot.readString();
                struct.setNameIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // SCHEMA
              if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
                {
                  org.apache.thrift.protocol.TList _list16 = iprot.readListBegin();
                  if (struct.schema == null) {
                    struct.schema = new java.util.ArrayList<rpc_column>(_list16.size);
                  }
                  @org.apache.thrift.annotation.Nullable rpc_column _elem17 = new rpc_column();
                  for (int _i18 = 0; _i18 < _list16.size; ++_i18)
                  {
                    if (_elem17 == null) {
                      _elem17 = new rpc_column();
                    }
                    _elem17.read(iprot);
                    struct.schema.add(_elem17);
                    _elem17 = null;
                  }
                  iprot.readListEnd();
                }
                struct.setSchemaIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 3: // MODE
              if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
                struct.mode = confluo.rpc.rpc_storage_mode.findByValue(iprot.readI32());
                struct.setModeIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            default:
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
          }
          iprot.readFieldEnd();
        }
        iprot.readStructEnd();

        // check for required fields of primitive type, which can't be checked in the validate method
        struct.validate();
      }

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

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.name != null) {
          oprot.writeFieldBegin(NAME_FIELD_DESC);
          oprot.writeString(struct.name);
          oprot.writeFieldEnd();
        }
        if (struct.schema != null) {
          oprot.writeFieldBegin(SCHEMA_FIELD_DESC);
          {
            oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.schema.size()));
            for (rpc_column _iter19 : struct.schema)
            {
              _iter19.write(oprot);
            }
            oprot.writeListEnd();
          }
          oprot.writeFieldEnd();
        }
        if (struct.mode != null) {
          oprot.writeFieldBegin(MODE_FIELD_DESC);
          oprot.writeI32(struct.mode.getValue());
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class create_atomic_multilog_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public create_atomic_multilog_argsTupleScheme getScheme() {
        return new create_atomic_multilog_argsTupleScheme();
      }
    }

    private static class create_atomic_multilog_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<create_atomic_multilog_args> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, create_atomic_multilog_args struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet optionals = new java.util.BitSet();
        if (struct.isSetName()) {
          optionals.set(0);
        }
        if (struct.isSetSchema()) {
          optionals.set(1);
        }
        if (struct.isSetMode()) {
          optionals.set(2);
        }
        oprot.writeBitSet(optionals, 3);
        if (struct.isSetName()) {
          oprot.writeString(struct.name);
        }
        if (struct.isSetSchema()) {
          {
            oprot.writeI32(struct.schema.size());
            for (rpc_column _iter20 : struct.schema)
            {
              _iter20.write(oprot);
            }
          }
        }
        if (struct.isSetMode()) {
          oprot.writeI32(struct.mode.getValue());
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, create_atomic_multilog_args struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet incoming = iprot.readBitSet(3);
        if (incoming.get(0)) {
          struct.name = iprot.readString();
          struct.setNameIsSet(true);
        }
        if (incoming.get(1)) {
          {
            org.apache.thrift.protocol.TList _list21 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
            if (struct.schema == null) {
              struct.schema = new java.util.ArrayList<rpc_column>(_list21.size);
            }
            @org.apache.thrift.annotation.Nullable rpc_column _elem22 = new rpc_column();
            for (int _i23 = 0; _i23 < _list21.size; ++_i23)
            {
              if (_elem22 == null) {
                _elem22 = new rpc_column();
              }
              _elem22.read(iprot);
              struct.schema.add(_elem22);
              _elem22 = null;
            }
          }
          struct.setSchemaIsSet(true);
        }
        if (incoming.get(2)) {
          struct.mode = confluo.rpc.rpc_storage_mode.findByValue(iprot.readI32());
          struct.setModeIsSet(true);
        }
      }
    }

    private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
      return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
    }
  }

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

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

    private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new create_atomic_multilog_resultStandardSchemeFactory();
    private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new create_atomic_multilog_resultTupleSchemeFactory();

    private long success; // required
    private @org.apache.thrift.annotation.Nullable rpc_management_exception ex; // 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"),
      EX((short)1, "ex");

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

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

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          case 1: // EX
            return EX;
          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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByName(java.lang.String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final java.lang.String _fieldName;

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

      public short getThriftFieldId() {
        return _thriftId;
      }

      public java.lang.String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    private static final int __SUCCESS_ISSET_ID = 0;
    private byte __isset_bitfield = 0;
    public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.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.I64)));
      tmpMap.put(_Fields.EX, new org.apache.thrift.meta_data.FieldMetaData("ex", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, rpc_management_exception.class)));
      metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(create_atomic_multilog_result.class, metaDataMap);
    }

    public create_atomic_multilog_result() {
    }

    public create_atomic_multilog_result(
      long success,
      rpc_management_exception ex)
    {
      this();
      this.success = success;
      setSuccessIsSet(true);
      this.ex = ex;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public create_atomic_multilog_result(create_atomic_multilog_result other) {
      __isset_bitfield = other.__isset_bitfield;
      this.success = other.success;
      if (other.isSetEx()) {
        this.ex = new rpc_management_exception(other.ex);
      }
    }

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

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

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

    public create_atomic_multilog_result setSuccess(long success) {
      this.success = success;
      setSuccessIsSet(true);
      return this;
    }

    public void unsetSuccess() {
      __isset_bitfield = org.apache.thrift.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 org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID);
    }

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

    @org.apache.thrift.annotation.Nullable
    public rpc_management_exception getEx() {
      return this.ex;
    }

    public create_atomic_multilog_result setEx(@org.apache.thrift.annotation.Nullable rpc_management_exception ex) {
      this.ex = ex;
      return this;
    }

    public void unsetEx() {
      this.ex = null;
    }

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

    public void setExIsSet(boolean value) {
      if (!value) {
        this.ex = null;
      }
    }

    public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((java.lang.Long)value);
        }
        break;

      case EX:
        if (value == null) {
          unsetEx();
        } else {
          setEx((rpc_management_exception)value);
        }
        break;

      }
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      case EX:
        return getEx();

      }
      throw new java.lang.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 java.lang.IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      case EX:
        return isSetEx();
      }
      throw new java.lang.IllegalStateException();
    }

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

    public boolean equals(create_atomic_multilog_result that) {
      if (that == null)
        return false;
      if (this == that)
        return true;

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

      boolean this_present_ex = true && this.isSetEx();
      boolean that_present_ex = true && that.isSetEx();
      if (this_present_ex || that_present_ex) {
        if (!(this_present_ex && that_present_ex))
          return false;
        if (!this.ex.equals(that.ex))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      int hashCode = 1;

      hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(success);

      hashCode = hashCode * 8191 + ((isSetEx()) ? 131071 : 524287);
      if (isSetEx())
        hashCode = hashCode * 8191 + ex.hashCode();

      return hashCode;
    }

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

      int lastComparison = 0;

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

    @org.apache.thrift.annotation.Nullable
    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

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

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

    @Override
    public java.lang.String toString() {
      java.lang.StringBuilder sb = new java.lang.StringBuilder("create_atomic_multilog_result(");
      boolean first = true;

      sb.append("success:");
      sb.append(this.success);
      first = false;
      if (!first) sb.append(", ");
      sb.append("ex:");
      if (this.ex == null) {
        sb.append("null");
      } else {
        sb.append(this.ex);
      }
      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, java.lang.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 create_atomic_multilog_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public create_atomic_multilog_resultStandardScheme getScheme() {
        return new create_atomic_multilog_resultStandardScheme();
      }
    }

    private static class create_atomic_multilog_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<create_atomic_multilog_result> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, create_atomic_multilog_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.I64) {
                struct.success = iprot.readI64();
                struct.setSuccessIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 1: // EX
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                if (struct.ex == null) {
                  struct.ex = new rpc_management_exception();
                }
                struct.ex.read(iprot);
                struct.setExIsSet(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, create_atomic_multilog_result struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.isSetSuccess()) {
          oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
          oprot.writeI64(struct.success);
          oprot.writeFieldEnd();
        }
        if (struct.ex != null) {
          oprot.writeFieldBegin(EX_FIELD_DESC);
          struct.ex.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class create_atomic_multilog_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public create_atomic_multilog_resultTupleScheme getScheme() {
        return new create_atomic_multilog_resultTupleScheme();
      }
    }

    private static class create_atomic_multilog_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<create_atomic_multilog_result> {

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

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, create_atomic_multilog_result struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet incoming = iprot.readBitSet(2);
        if (incoming.get(0)) {
          struct.success = iprot.readI64();
          struct.setSuccessIsSet(true);
        }
        if (incoming.get(1)) {
          if (struct.ex == null) {
            struct.ex = new rpc_management_exception();
          }
          struct.ex.read(iprot);
          struct.setExIsSet(true);
        }
      }
    }

    private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
      return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
    }
  }

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

    private static final org.apache.thrift.protocol.TField NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("name", org.apache.thrift.protocol.TType.STRING, (short)1);

    private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new load_atomic_multilog_argsStandardSchemeFactory();
    private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new load_atomic_multilog_argsTupleSchemeFactory();

    private @org.apache.thrift.annotation.Nullable java.lang.String name; // 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 {
      NAME((short)1, "name");

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

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

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // NAME
            return 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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByName(java.lang.String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final java.lang.String _fieldName;

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

      public short getThriftFieldId() {
        return _thriftId;
      }

      public java.lang.String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
      metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(load_atomic_multilog_args.class, metaDataMap);
    }

    public load_atomic_multilog_args() {
    }

    public load_atomic_multilog_args(
      java.lang.String name)
    {
      this();
      this.name = name;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public load_atomic_multilog_args(load_atomic_multilog_args other) {
      if (other.isSetName()) {
        this.name = other.name;
      }
    }

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

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

    @org.apache.thrift.annotation.Nullable
    public java.lang.String getName() {
      return this.name;
    }

    public load_atomic_multilog_args setName(@org.apache.thrift.annotation.Nullable java.lang.String name) {
      this.name = name;
      return this;
    }

    public void unsetName() {
      this.name = null;
    }

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

    public void setNameIsSet(boolean value) {
      if (!value) {
        this.name = null;
      }
    }

    public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
      switch (field) {
      case NAME:
        if (value == null) {
          unsetName();
        } else {
          setName((java.lang.String)value);
        }
        break;

      }
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.Object getFieldValue(_Fields field) {
      switch (field) {
      case NAME:
        return getName();

      }
      throw new java.lang.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 java.lang.IllegalArgumentException();
      }

      switch (field) {
      case NAME:
        return isSetName();
      }
      throw new java.lang.IllegalStateException();
    }

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

    public boolean equals(load_atomic_multilog_args that) {
      if (that == null)
        return false;
      if (this == that)
        return true;

      boolean this_present_name = true && this.isSetName();
      boolean that_present_name = true && that.isSetName();
      if (this_present_name || that_present_name) {
        if (!(this_present_name && that_present_name))
          return false;
        if (!this.name.equals(that.name))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      int hashCode = 1;

      hashCode = hashCode * 8191 + ((isSetName()) ? 131071 : 524287);
      if (isSetName())
        hashCode = hashCode * 8191 + name.hashCode();

      return hashCode;
    }

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

      int lastComparison = 0;

      lastComparison = java.lang.Boolean.valueOf(isSetName()).compareTo(other.isSetName());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetName()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, other.name);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    @org.apache.thrift.annotation.Nullable
    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

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

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

    @Override
    public java.lang.String toString() {
      java.lang.StringBuilder sb = new java.lang.StringBuilder("load_atomic_multilog_args(");
      boolean first = true;

      sb.append("name:");
      if (this.name == null) {
        sb.append("null");
      } else {
        sb.append(this.name);
      }
      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, java.lang.ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private static class load_atomic_multilog_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public load_atomic_multilog_argsStandardScheme getScheme() {
        return new load_atomic_multilog_argsStandardScheme();
      }
    }

    private static class load_atomic_multilog_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<load_atomic_multilog_args> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, load_atomic_multilog_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: // NAME
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.name = iprot.readString();
                struct.setNameIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            default:
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
          }
          iprot.readFieldEnd();
        }
        iprot.readStructEnd();

        // check for required fields of primitive type, which can't be checked in the validate method
        struct.validate();
      }

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

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

    }

    private static class load_atomic_multilog_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public load_atomic_multilog_argsTupleScheme getScheme() {
        return new load_atomic_multilog_argsTupleScheme();
      }
    }

    private static class load_atomic_multilog_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<load_atomic_multilog_args> {

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

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

    private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
      return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
    }
  }

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

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

    private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new load_atomic_multilog_resultStandardSchemeFactory();
    private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new load_atomic_multilog_resultTupleSchemeFactory();

    private @org.apache.thrift.annotation.Nullable rpc_atomic_multilog_info success; // required
    private @org.apache.thrift.annotation.Nullable rpc_management_exception ex; // 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"),
      EX((short)1, "ex");

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

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

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          case 1: // EX
            return EX;
          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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByName(java.lang.String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final java.lang.String _fieldName;

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

      public short getThriftFieldId() {
        return _thriftId;
      }

      public java.lang.String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.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, rpc_atomic_multilog_info.class)));
      tmpMap.put(_Fields.EX, new org.apache.thrift.meta_data.FieldMetaData("ex", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, rpc_management_exception.class)));
      metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(load_atomic_multilog_result.class, metaDataMap);
    }

    public load_atomic_multilog_result() {
    }

    public load_atomic_multilog_result(
      rpc_atomic_multilog_info success,
      rpc_management_exception ex)
    {
      this();
      this.success = success;
      this.ex = ex;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public load_atomic_multilog_result(load_atomic_multilog_result other) {
      if (other.isSetSuccess()) {
        this.success = new rpc_atomic_multilog_info(other.success);
      }
      if (other.isSetEx()) {
        this.ex = new rpc_management_exception(other.ex);
      }
    }

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

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

    @org.apache.thrift.annotation.Nullable
    public rpc_atomic_multilog_info getSuccess() {
      return this.success;
    }

    public load_atomic_multilog_result setSuccess(@org.apache.thrift.annotation.Nullable rpc_atomic_multilog_info 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;
      }
    }

    @org.apache.thrift.annotation.Nullable
    public rpc_management_exception getEx() {
      return this.ex;
    }

    public load_atomic_multilog_result setEx(@org.apache.thrift.annotation.Nullable rpc_management_exception ex) {
      this.ex = ex;
      return this;
    }

    public void unsetEx() {
      this.ex = null;
    }

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

    public void setExIsSet(boolean value) {
      if (!value) {
        this.ex = null;
      }
    }

    public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((rpc_atomic_multilog_info)value);
        }
        break;

      case EX:
        if (value == null) {
          unsetEx();
        } else {
          setEx((rpc_management_exception)value);
        }
        break;

      }
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      case EX:
        return getEx();

      }
      throw new java.lang.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 java.lang.IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      case EX:
        return isSetEx();
      }
      throw new java.lang.IllegalStateException();
    }

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

    public boolean equals(load_atomic_multilog_result that) {
      if (that == null)
        return false;
      if (this == that)
        return true;

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

      boolean this_present_ex = true && this.isSetEx();
      boolean that_present_ex = true && that.isSetEx();
      if (this_present_ex || that_present_ex) {
        if (!(this_present_ex && that_present_ex))
          return false;
        if (!this.ex.equals(that.ex))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      int hashCode = 1;

      hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287);
      if (isSetSuccess())
        hashCode = hashCode * 8191 + success.hashCode();

      hashCode = hashCode * 8191 + ((isSetEx()) ? 131071 : 524287);
      if (isSetEx())
        hashCode = hashCode * 8191 + ex.hashCode();

      return hashCode;
    }

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

      int lastComparison = 0;

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

    @org.apache.thrift.annotation.Nullable
    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

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

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

    @Override
    public java.lang.String toString() {
      java.lang.StringBuilder sb = new java.lang.StringBuilder("load_atomic_multilog_result(");
      boolean first = true;

      sb.append("success:");
      if (this.success == null) {
        sb.append("null");
      } else {
        sb.append(this.success);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("ex:");
      if (this.ex == null) {
        sb.append("null");
      } else {
        sb.append(this.ex);
      }
      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, java.lang.ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private static class load_atomic_multilog_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public load_atomic_multilog_resultStandardScheme getScheme() {
        return new load_atomic_multilog_resultStandardScheme();
      }
    }

    private static class load_atomic_multilog_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<load_atomic_multilog_result> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, load_atomic_multilog_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) {
                if (struct.success == null) {
                  struct.success = new rpc_atomic_multilog_info();
                }
                struct.success.read(iprot);
                struct.setSuccessIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 1: // EX
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                if (struct.ex == null) {
                  struct.ex = new rpc_management_exception();
                }
                struct.ex.read(iprot);
                struct.setExIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            default:
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
          }
          iprot.readFieldEnd();
        }
        iprot.readStructEnd();

        // check for required fields of primitive type, which can't be checked in the validate method
        struct.validate();
      }

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

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

    }

    private static class load_atomic_multilog_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public load_atomic_multilog_resultTupleScheme getScheme() {
        return new load_atomic_multilog_resultTupleScheme();
      }
    }

    private static class load_atomic_multilog_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<load_atomic_multilog_result> {

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

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, load_atomic_multilog_result struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet incoming = iprot.readBitSet(2);
        if (incoming.get(0)) {
          if (struct.success == null) {
            struct.success = new rpc_atomic_multilog_info();
          }
          struct.success.read(iprot);
          struct.setSuccessIsSet(true);
        }
        if (incoming.get(1)) {
          if (struct.ex == null) {
            struct.ex = new rpc_management_exception();
          }
          struct.ex.read(iprot);
          struct.setExIsSet(true);
        }
      }
    }

    private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
      return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
    }
  }

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

    private static final org.apache.thrift.protocol.TField NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("name", org.apache.thrift.protocol.TType.STRING, (short)1);

    private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new get_atomic_multilog_info_argsStandardSchemeFactory();
    private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new get_atomic_multilog_info_argsTupleSchemeFactory();

    private @org.apache.thrift.annotation.Nullable java.lang.String name; // 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 {
      NAME((short)1, "name");

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

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

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // NAME
            return 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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByName(java.lang.String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final java.lang.String _fieldName;

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

      public short getThriftFieldId() {
        return _thriftId;
      }

      public java.lang.String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
      metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_atomic_multilog_info_args.class, metaDataMap);
    }

    public get_atomic_multilog_info_args() {
    }

    public get_atomic_multilog_info_args(
      java.lang.String name)
    {
      this();
      this.name = name;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public get_atomic_multilog_info_args(get_atomic_multilog_info_args other) {
      if (other.isSetName()) {
        this.name = other.name;
      }
    }

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

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

    @org.apache.thrift.annotation.Nullable
    public java.lang.String getName() {
      return this.name;
    }

    public get_atomic_multilog_info_args setName(@org.apache.thrift.annotation.Nullable java.lang.String name) {
      this.name = name;
      return this;
    }

    public void unsetName() {
      this.name = null;
    }

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

    public void setNameIsSet(boolean value) {
      if (!value) {
        this.name = null;
      }
    }

    public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
      switch (field) {
      case NAME:
        if (value == null) {
          unsetName();
        } else {
          setName((java.lang.String)value);
        }
        break;

      }
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.Object getFieldValue(_Fields field) {
      switch (field) {
      case NAME:
        return getName();

      }
      throw new java.lang.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 java.lang.IllegalArgumentException();
      }

      switch (field) {
      case NAME:
        return isSetName();
      }
      throw new java.lang.IllegalStateException();
    }

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

    public boolean equals(get_atomic_multilog_info_args that) {
      if (that == null)
        return false;
      if (this == that)
        return true;

      boolean this_present_name = true && this.isSetName();
      boolean that_present_name = true && that.isSetName();
      if (this_present_name || that_present_name) {
        if (!(this_present_name && that_present_name))
          return false;
        if (!this.name.equals(that.name))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      int hashCode = 1;

      hashCode = hashCode * 8191 + ((isSetName()) ? 131071 : 524287);
      if (isSetName())
        hashCode = hashCode * 8191 + name.hashCode();

      return hashCode;
    }

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

      int lastComparison = 0;

      lastComparison = java.lang.Boolean.valueOf(isSetName()).compareTo(other.isSetName());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetName()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, other.name);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    @org.apache.thrift.annotation.Nullable
    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

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

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

    @Override
    public java.lang.String toString() {
      java.lang.StringBuilder sb = new java.lang.StringBuilder("get_atomic_multilog_info_args(");
      boolean first = true;

      sb.append("name:");
      if (this.name == null) {
        sb.append("null");
      } else {
        sb.append(this.name);
      }
      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, java.lang.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 get_atomic_multilog_info_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public get_atomic_multilog_info_argsStandardScheme getScheme() {
        return new get_atomic_multilog_info_argsStandardScheme();
      }
    }

    private static class get_atomic_multilog_info_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<get_atomic_multilog_info_args> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, get_atomic_multilog_info_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: // NAME
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.name = iprot.readString();
                struct.setNameIsSet(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, get_atomic_multilog_info_args struct) throws org.apache.thrift.TException {
        struct.validate();

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

    }

    private static class get_atomic_multilog_info_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public get_atomic_multilog_info_argsTupleScheme getScheme() {
        return new get_atomic_multilog_info_argsTupleScheme();
      }
    }

    private static class get_atomic_multilog_info_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<get_atomic_multilog_info_args> {

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

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

    private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
      return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
    }
  }

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

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

    private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new get_atomic_multilog_info_resultStandardSchemeFactory();
    private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new get_atomic_multilog_info_resultTupleSchemeFactory();

    private @org.apache.thrift.annotation.Nullable rpc_atomic_multilog_info success; // required
    private @org.apache.thrift.annotation.Nullable rpc_management_exception ex; // 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"),
      EX((short)1, "ex");

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

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

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          case 1: // EX
            return EX;
          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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByName(java.lang.String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final java.lang.String _fieldName;

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

      public short getThriftFieldId() {
        return _thriftId;
      }

      public java.lang.String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.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, rpc_atomic_multilog_info.class)));
      tmpMap.put(_Fields.EX, new org.apache.thrift.meta_data.FieldMetaData("ex", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, rpc_management_exception.class)));
      metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_atomic_multilog_info_result.class, metaDataMap);
    }

    public get_atomic_multilog_info_result() {
    }

    public get_atomic_multilog_info_result(
      rpc_atomic_multilog_info success,
      rpc_management_exception ex)
    {
      this();
      this.success = success;
      this.ex = ex;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public get_atomic_multilog_info_result(get_atomic_multilog_info_result other) {
      if (other.isSetSuccess()) {
        this.success = new rpc_atomic_multilog_info(other.success);
      }
      if (other.isSetEx()) {
        this.ex = new rpc_management_exception(other.ex);
      }
    }

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

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

    @org.apache.thrift.annotation.Nullable
    public rpc_atomic_multilog_info getSuccess() {
      return this.success;
    }

    public get_atomic_multilog_info_result setSuccess(@org.apache.thrift.annotation.Nullable rpc_atomic_multilog_info 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;
      }
    }

    @org.apache.thrift.annotation.Nullable
    public rpc_management_exception getEx() {
      return this.ex;
    }

    public get_atomic_multilog_info_result setEx(@org.apache.thrift.annotation.Nullable rpc_management_exception ex) {
      this.ex = ex;
      return this;
    }

    public void unsetEx() {
      this.ex = null;
    }

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

    public void setExIsSet(boolean value) {
      if (!value) {
        this.ex = null;
      }
    }

    public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((rpc_atomic_multilog_info)value);
        }
        break;

      case EX:
        if (value == null) {
          unsetEx();
        } else {
          setEx((rpc_management_exception)value);
        }
        break;

      }
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      case EX:
        return getEx();

      }
      throw new java.lang.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 java.lang.IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      case EX:
        return isSetEx();
      }
      throw new java.lang.IllegalStateException();
    }

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

    public boolean equals(get_atomic_multilog_info_result that) {
      if (that == null)
        return false;
      if (this == that)
        return true;

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

      boolean this_present_ex = true && this.isSetEx();
      boolean that_present_ex = true && that.isSetEx();
      if (this_present_ex || that_present_ex) {
        if (!(this_present_ex && that_present_ex))
          return false;
        if (!this.ex.equals(that.ex))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      int hashCode = 1;

      hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287);
      if (isSetSuccess())
        hashCode = hashCode * 8191 + success.hashCode();

      hashCode = hashCode * 8191 + ((isSetEx()) ? 131071 : 524287);
      if (isSetEx())
        hashCode = hashCode * 8191 + ex.hashCode();

      return hashCode;
    }

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

      int lastComparison = 0;

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

    @org.apache.thrift.annotation.Nullable
    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

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

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

    @Override
    public java.lang.String toString() {
      java.lang.StringBuilder sb = new java.lang.StringBuilder("get_atomic_multilog_info_result(");
      boolean first = true;

      sb.append("success:");
      if (this.success == null) {
        sb.append("null");
      } else {
        sb.append(this.success);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("ex:");
      if (this.ex == null) {
        sb.append("null");
      } else {
        sb.append(this.ex);
      }
      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, java.lang.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 get_atomic_multilog_info_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public get_atomic_multilog_info_resultStandardScheme getScheme() {
        return new get_atomic_multilog_info_resultStandardScheme();
      }
    }

    private static class get_atomic_multilog_info_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<get_atomic_multilog_info_result> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, get_atomic_multilog_info_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) {
                if (struct.success == null) {
                  struct.success = new rpc_atomic_multilog_info();
                }
                struct.success.read(iprot);
                struct.setSuccessIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 1: // EX
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                if (struct.ex == null) {
                  struct.ex = new rpc_management_exception();
                }
                struct.ex.read(iprot);
                struct.setExIsSet(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, get_atomic_multilog_info_result struct) throws org.apache.thrift.TException {
        struct.validate();

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

    }

    private static class get_atomic_multilog_info_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public get_atomic_multilog_info_resultTupleScheme getScheme() {
        return new get_atomic_multilog_info_resultTupleScheme();
      }
    }

    private static class get_atomic_multilog_info_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<get_atomic_multilog_info_result> {

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

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, get_atomic_multilog_info_result struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet incoming = iprot.readBitSet(2);
        if (incoming.get(0)) {
          if (struct.success == null) {
            struct.success = new rpc_atomic_multilog_info();
          }
          struct.success.read(iprot);
          struct.setSuccessIsSet(true);
        }
        if (incoming.get(1)) {
          if (struct.ex == null) {
            struct.ex = new rpc_management_exception();
          }
          struct.ex.read(iprot);
          struct.setExIsSet(true);
        }
      }
    }

    private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
      return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
    }
  }

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

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

    private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new remove_atomic_multilog_argsStandardSchemeFactory();
    private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new remove_atomic_multilog_argsTupleSchemeFactory();

    private long mid; // 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 {
      MID((short)1, "mid");

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

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

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // MID
            return MID;
          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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByName(java.lang.String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final java.lang.String _fieldName;

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

      public short getThriftFieldId() {
        return _thriftId;
      }

      public java.lang.String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    private static final int __MID_ISSET_ID = 0;
    private byte __isset_bitfield = 0;
    public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.MID, new org.apache.thrift.meta_data.FieldMetaData("mid", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(remove_atomic_multilog_args.class, metaDataMap);
    }

    public remove_atomic_multilog_args() {
    }

    public remove_atomic_multilog_args(
      long mid)
    {
      this();
      this.mid = mid;
      setMidIsSet(true);
    }

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

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

    @Override
    public void clear() {
      setMidIsSet(false);
      this.mid = 0;
    }

    public long getMid() {
      return this.mid;
    }

    public remove_atomic_multilog_args setMid(long mid) {
      this.mid = mid;
      setMidIsSet(true);
      return this;
    }

    public void unsetMid() {
      __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __MID_ISSET_ID);
    }

    /** Returns true if field mid is set (has been assigned a value) and false otherwise */
    public boolean isSetMid() {
      return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __MID_ISSET_ID);
    }

    public void setMidIsSet(boolean value) {
      __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __MID_ISSET_ID, value);
    }

    public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
      switch (field) {
      case MID:
        if (value == null) {
          unsetMid();
        } else {
          setMid((java.lang.Long)value);
        }
        break;

      }
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.Object getFieldValue(_Fields field) {
      switch (field) {
      case MID:
        return getMid();

      }
      throw new java.lang.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 java.lang.IllegalArgumentException();
      }

      switch (field) {
      case MID:
        return isSetMid();
      }
      throw new java.lang.IllegalStateException();
    }

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

    public boolean equals(remove_atomic_multilog_args that) {
      if (that == null)
        return false;
      if (this == that)
        return true;

      boolean this_present_mid = true;
      boolean that_present_mid = true;
      if (this_present_mid || that_present_mid) {
        if (!(this_present_mid && that_present_mid))
          return false;
        if (this.mid != that.mid)
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      int hashCode = 1;

      hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(mid);

      return hashCode;
    }

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

      int lastComparison = 0;

      lastComparison = java.lang.Boolean.valueOf(isSetMid()).compareTo(other.isSetMid());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetMid()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.mid, other.mid);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    @org.apache.thrift.annotation.Nullable
    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

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

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

    @Override
    public java.lang.String toString() {
      java.lang.StringBuilder sb = new java.lang.StringBuilder("remove_atomic_multilog_args(");
      boolean first = true;

      sb.append("mid:");
      sb.append(this.mid);
      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, java.lang.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 remove_atomic_multilog_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public remove_atomic_multilog_argsStandardScheme getScheme() {
        return new remove_atomic_multilog_argsStandardScheme();
      }
    }

    private static class remove_atomic_multilog_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<remove_atomic_multilog_args> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, remove_atomic_multilog_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: // MID
              if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
                struct.mid = iprot.readI64();
                struct.setMidIsSet(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, remove_atomic_multilog_args struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        oprot.writeFieldBegin(MID_FIELD_DESC);
        oprot.writeI64(struct.mid);
        oprot.writeFieldEnd();
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class remove_atomic_multilog_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public remove_atomic_multilog_argsTupleScheme getScheme() {
        return new remove_atomic_multilog_argsTupleScheme();
      }
    }

    private static class remove_atomic_multilog_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<remove_atomic_multilog_args> {

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

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

    private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
      return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
    }
  }

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

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

    private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new remove_atomic_multilog_resultStandardSchemeFactory();
    private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new remove_atomic_multilog_resultTupleSchemeFactory();

    private @org.apache.thrift.annotation.Nullable rpc_management_exception ex; // 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 {
      EX((short)1, "ex");

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

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

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // EX
            return EX;
          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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByName(java.lang.String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final java.lang.String _fieldName;

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

      public short getThriftFieldId() {
        return _thriftId;
      }

      public java.lang.String getFieldName() {
        return _fieldName;
      }
    }

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

    public remove_atomic_multilog_result() {
    }

    public remove_atomic_multilog_result(
      rpc_management_exception ex)
    {
      this();
      this.ex = ex;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public remove_atomic_multilog_result(remove_atomic_multilog_result other) {
      if (other.isSetEx()) {
        this.ex = new rpc_management_exception(other.ex);
      }
    }

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

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

    @org.apache.thrift.annotation.Nullable
    public rpc_management_exception getEx() {
      return this.ex;
    }

    public remove_atomic_multilog_result setEx(@org.apache.thrift.annotation.Nullable rpc_management_exception ex) {
      this.ex = ex;
      return this;
    }

    public void unsetEx() {
      this.ex = null;
    }

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

    public void setExIsSet(boolean value) {
      if (!value) {
        this.ex = null;
      }
    }

    public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
      switch (field) {
      case EX:
        if (value == null) {
          unsetEx();
        } else {
          setEx((rpc_management_exception)value);
        }
        break;

      }
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.Object getFieldValue(_Fields field) {
      switch (field) {
      case EX:
        return getEx();

      }
      throw new java.lang.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 java.lang.IllegalArgumentException();
      }

      switch (field) {
      case EX:
        return isSetEx();
      }
      throw new java.lang.IllegalStateException();
    }

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

    public boolean equals(remove_atomic_multilog_result that) {
      if (that == null)
        return false;
      if (this == that)
        return true;

      boolean this_present_ex = true && this.isSetEx();
      boolean that_present_ex = true && that.isSetEx();
      if (this_present_ex || that_present_ex) {
        if (!(this_present_ex && that_present_ex))
          return false;
        if (!this.ex.equals(that.ex))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      int hashCode = 1;

      hashCode = hashCode * 8191 + ((isSetEx()) ? 131071 : 524287);
      if (isSetEx())
        hashCode = hashCode * 8191 + ex.hashCode();

      return hashCode;
    }

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

      int lastComparison = 0;

      lastComparison = java.lang.Boolean.valueOf(isSetEx()).compareTo(other.isSetEx());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetEx()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ex, other.ex);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    @org.apache.thrift.annotation.Nullable
    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

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

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

    @Override
    public java.lang.String toString() {
      java.lang.StringBuilder sb = new java.lang.StringBuilder("remove_atomic_multilog_result(");
      boolean first = true;

      sb.append("ex:");
      if (this.ex == null) {
        sb.append("null");
      } else {
        sb.append(this.ex);
      }
      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, java.lang.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 remove_atomic_multilog_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public remove_atomic_multilog_resultStandardScheme getScheme() {
        return new remove_atomic_multilog_resultStandardScheme();
      }
    }

    private static class remove_atomic_multilog_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<remove_atomic_multilog_result> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, remove_atomic_multilog_result struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TField schemeField;
        iprot.readStructBegin();
        while (true)
        {
          schemeField = iprot.readFieldBegin();
          if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { 
            break;
          }
          switch (schemeField.id) {
            case 1: // EX
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                if (struct.ex == null) {
                  struct.ex = new rpc_management_exception();
                }
                struct.ex.read(iprot);
                struct.setExIsSet(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, remove_atomic_multilog_result struct) throws org.apache.thrift.TException {
        struct.validate();

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

    }

    private static class remove_atomic_multilog_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public remove_atomic_multilog_resultTupleScheme getScheme() {
        return new remove_atomic_multilog_resultTupleScheme();
      }
    }

    private static class remove_atomic_multilog_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<remove_atomic_multilog_result> {

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

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, remove_atomic_multilog_result struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet incoming = iprot.readBitSet(1);
        if (incoming.get(0)) {
          if (struct.ex == null) {
            struct.ex = new rpc_management_exception();
          }
          struct.ex.read(iprot);
          struct.setExIsSet(true);
        }
      }
    }

    private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
      return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
    }
  }

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

    private static final org.apache.thrift.protocol.TField MID_FIELD_DESC = new org.apache.thrift.protocol.TField("mid", org.apache.thrift.protocol.TType.I64, (short)1);
    private static final org.apache.thrift.protocol.TField FIELD_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("field_name", org.apache.thrift.protocol.TType.STRING, (short)2);
    private static final org.apache.thrift.protocol.TField BUCKET_SIZE_FIELD_DESC = new org.apache.thrift.protocol.TField("bucket_size", org.apache.thrift.protocol.TType.DOUBLE, (short)3);

    private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new add_index_argsStandardSchemeFactory();
    private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new add_index_argsTupleSchemeFactory();

    private long mid; // required
    private @org.apache.thrift.annotation.Nullable java.lang.String field_name; // required
    private double bucket_size; // 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 {
      MID((short)1, "mid"),
      FIELD_NAME((short)2, "field_name"),
      BUCKET_SIZE((short)3, "bucket_size");

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

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

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // MID
            return MID;
          case 2: // FIELD_NAME
            return FIELD_NAME;
          case 3: // BUCKET_SIZE
            return BUCKET_SIZE;
          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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByName(java.lang.String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final java.lang.String _fieldName;

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

      public short getThriftFieldId() {
        return _thriftId;
      }

      public java.lang.String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    private static final int __MID_ISSET_ID = 0;
    private static final int __BUCKET_SIZE_ISSET_ID = 1;
    private byte __isset_bitfield = 0;
    public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.MID, new org.apache.thrift.meta_data.FieldMetaData("mid", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      tmpMap.put(_Fields.FIELD_NAME, new org.apache.thrift.meta_data.FieldMetaData("field_name", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
      tmpMap.put(_Fields.BUCKET_SIZE, new org.apache.thrift.meta_data.FieldMetaData("bucket_size", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
      metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(add_index_args.class, metaDataMap);
    }

    public add_index_args() {
    }

    public add_index_args(
      long mid,
      java.lang.String field_name,
      double bucket_size)
    {
      this();
      this.mid = mid;
      setMidIsSet(true);
      this.field_name = field_name;
      this.bucket_size = bucket_size;
      setBucketSizeIsSet(true);
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public add_index_args(add_index_args other) {
      __isset_bitfield = other.__isset_bitfield;
      this.mid = other.mid;
      if (other.isSetFieldName()) {
        this.field_name = other.field_name;
      }
      this.bucket_size = other.bucket_size;
    }

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

    @Override
    public void clear() {
      setMidIsSet(false);
      this.mid = 0;
      this.field_name = null;
      setBucketSizeIsSet(false);
      this.bucket_size = 0.0;
    }

    public long getMid() {
      return this.mid;
    }

    public add_index_args setMid(long mid) {
      this.mid = mid;
      setMidIsSet(true);
      return this;
    }

    public void unsetMid() {
      __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __MID_ISSET_ID);
    }

    /** Returns true if field mid is set (has been assigned a value) and false otherwise */
    public boolean isSetMid() {
      return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __MID_ISSET_ID);
    }

    public void setMidIsSet(boolean value) {
      __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __MID_ISSET_ID, value);
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.String getFieldName() {
      return this.field_name;
    }

    public add_index_args setFieldName(@org.apache.thrift.annotation.Nullable java.lang.String field_name) {
      this.field_name = field_name;
      return this;
    }

    public void unsetFieldName() {
      this.field_name = null;
    }

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

    public void setFieldNameIsSet(boolean value) {
      if (!value) {
        this.field_name = null;
      }
    }

    public double getBucketSize() {
      return this.bucket_size;
    }

    public add_index_args setBucketSize(double bucket_size) {
      this.bucket_size = bucket_size;
      setBucketSizeIsSet(true);
      return this;
    }

    public void unsetBucketSize() {
      __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __BUCKET_SIZE_ISSET_ID);
    }

    /** Returns true if field bucket_size is set (has been assigned a value) and false otherwise */
    public boolean isSetBucketSize() {
      return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __BUCKET_SIZE_ISSET_ID);
    }

    public void setBucketSizeIsSet(boolean value) {
      __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __BUCKET_SIZE_ISSET_ID, value);
    }

    public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
      switch (field) {
      case MID:
        if (value == null) {
          unsetMid();
        } else {
          setMid((java.lang.Long)value);
        }
        break;

      case FIELD_NAME:
        if (value == null) {
          unsetFieldName();
        } else {
          setFieldName((java.lang.String)value);
        }
        break;

      case BUCKET_SIZE:
        if (value == null) {
          unsetBucketSize();
        } else {
          setBucketSize((java.lang.Double)value);
        }
        break;

      }
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.Object getFieldValue(_Fields field) {
      switch (field) {
      case MID:
        return getMid();

      case FIELD_NAME:
        return getFieldName();

      case BUCKET_SIZE:
        return getBucketSize();

      }
      throw new java.lang.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 java.lang.IllegalArgumentException();
      }

      switch (field) {
      case MID:
        return isSetMid();
      case FIELD_NAME:
        return isSetFieldName();
      case BUCKET_SIZE:
        return isSetBucketSize();
      }
      throw new java.lang.IllegalStateException();
    }

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

    public boolean equals(add_index_args that) {
      if (that == null)
        return false;
      if (this == that)
        return true;

      boolean this_present_mid = true;
      boolean that_present_mid = true;
      if (this_present_mid || that_present_mid) {
        if (!(this_present_mid && that_present_mid))
          return false;
        if (this.mid != that.mid)
          return false;
      }

      boolean this_present_field_name = true && this.isSetFieldName();
      boolean that_present_field_name = true && that.isSetFieldName();
      if (this_present_field_name || that_present_field_name) {
        if (!(this_present_field_name && that_present_field_name))
          return false;
        if (!this.field_name.equals(that.field_name))
          return false;
      }

      boolean this_present_bucket_size = true;
      boolean that_present_bucket_size = true;
      if (this_present_bucket_size || that_present_bucket_size) {
        if (!(this_present_bucket_size && that_present_bucket_size))
          return false;
        if (this.bucket_size != that.bucket_size)
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      int hashCode = 1;

      hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(mid);

      hashCode = hashCode * 8191 + ((isSetFieldName()) ? 131071 : 524287);
      if (isSetFieldName())
        hashCode = hashCode * 8191 + field_name.hashCode();

      hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(bucket_size);

      return hashCode;
    }

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

      int lastComparison = 0;

      lastComparison = java.lang.Boolean.valueOf(isSetMid()).compareTo(other.isSetMid());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetMid()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.mid, other.mid);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = java.lang.Boolean.valueOf(isSetFieldName()).compareTo(other.isSetFieldName());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetFieldName()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.field_name, other.field_name);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = java.lang.Boolean.valueOf(isSetBucketSize()).compareTo(other.isSetBucketSize());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetBucketSize()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.bucket_size, other.bucket_size);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    @org.apache.thrift.annotation.Nullable
    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

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

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

    @Override
    public java.lang.String toString() {
      java.lang.StringBuilder sb = new java.lang.StringBuilder("add_index_args(");
      boolean first = true;

      sb.append("mid:");
      sb.append(this.mid);
      first = false;
      if (!first) sb.append(", ");
      sb.append("field_name:");
      if (this.field_name == null) {
        sb.append("null");
      } else {
        sb.append(this.field_name);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("bucket_size:");
      sb.append(this.bucket_size);
      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, java.lang.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 add_index_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public add_index_argsStandardScheme getScheme() {
        return new add_index_argsStandardScheme();
      }
    }

    private static class add_index_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<add_index_args> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, add_index_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: // MID
              if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
                struct.mid = iprot.readI64();
                struct.setMidIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // FIELD_NAME
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.field_name = iprot.readString();
                struct.setFieldNameIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 3: // BUCKET_SIZE
              if (schemeField.type == org.apache.thrift.protocol.TType.DOUBLE) {
                struct.bucket_size = iprot.readDouble();
                struct.setBucketSizeIsSet(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, add_index_args struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        oprot.writeFieldBegin(MID_FIELD_DESC);
        oprot.writeI64(struct.mid);
        oprot.writeFieldEnd();
        if (struct.field_name != null) {
          oprot.writeFieldBegin(FIELD_NAME_FIELD_DESC);
          oprot.writeString(struct.field_name);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldBegin(BUCKET_SIZE_FIELD_DESC);
        oprot.writeDouble(struct.bucket_size);
        oprot.writeFieldEnd();
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class add_index_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public add_index_argsTupleScheme getScheme() {
        return new add_index_argsTupleScheme();
      }
    }

    private static class add_index_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<add_index_args> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, add_index_args struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet optionals = new java.util.BitSet();
        if (struct.isSetMid()) {
          optionals.set(0);
        }
        if (struct.isSetFieldName()) {
          optionals.set(1);
        }
        if (struct.isSetBucketSize()) {
          optionals.set(2);
        }
        oprot.writeBitSet(optionals, 3);
        if (struct.isSetMid()) {
          oprot.writeI64(struct.mid);
        }
        if (struct.isSetFieldName()) {
          oprot.writeString(struct.field_name);
        }
        if (struct.isSetBucketSize()) {
          oprot.writeDouble(struct.bucket_size);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, add_index_args struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet incoming = iprot.readBitSet(3);
        if (incoming.get(0)) {
          struct.mid = iprot.readI64();
          struct.setMidIsSet(true);
        }
        if (incoming.get(1)) {
          struct.field_name = iprot.readString();
          struct.setFieldNameIsSet(true);
        }
        if (incoming.get(2)) {
          struct.bucket_size = iprot.readDouble();
          struct.setBucketSizeIsSet(true);
        }
      }
    }

    private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
      return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
    }
  }

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

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

    private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new add_index_resultStandardSchemeFactory();
    private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new add_index_resultTupleSchemeFactory();

    private @org.apache.thrift.annotation.Nullable rpc_management_exception ex; // 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 {
      EX((short)1, "ex");

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

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

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // EX
            return EX;
          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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByName(java.lang.String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final java.lang.String _fieldName;

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

      public short getThriftFieldId() {
        return _thriftId;
      }

      public java.lang.String getFieldName() {
        return _fieldName;
      }
    }

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

    public add_index_result() {
    }

    public add_index_result(
      rpc_management_exception ex)
    {
      this();
      this.ex = ex;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public add_index_result(add_index_result other) {
      if (other.isSetEx()) {
        this.ex = new rpc_management_exception(other.ex);
      }
    }

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

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

    @org.apache.thrift.annotation.Nullable
    public rpc_management_exception getEx() {
      return this.ex;
    }

    public add_index_result setEx(@org.apache.thrift.annotation.Nullable rpc_management_exception ex) {
      this.ex = ex;
      return this;
    }

    public void unsetEx() {
      this.ex = null;
    }

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

    public void setExIsSet(boolean value) {
      if (!value) {
        this.ex = null;
      }
    }

    public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
      switch (field) {
      case EX:
        if (value == null) {
          unsetEx();
        } else {
          setEx((rpc_management_exception)value);
        }
        break;

      }
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.Object getFieldValue(_Fields field) {
      switch (field) {
      case EX:
        return getEx();

      }
      throw new java.lang.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 java.lang.IllegalArgumentException();
      }

      switch (field) {
      case EX:
        return isSetEx();
      }
      throw new java.lang.IllegalStateException();
    }

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

    public boolean equals(add_index_result that) {
      if (that == null)
        return false;
      if (this == that)
        return true;

      boolean this_present_ex = true && this.isSetEx();
      boolean that_present_ex = true && that.isSetEx();
      if (this_present_ex || that_present_ex) {
        if (!(this_present_ex && that_present_ex))
          return false;
        if (!this.ex.equals(that.ex))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      int hashCode = 1;

      hashCode = hashCode * 8191 + ((isSetEx()) ? 131071 : 524287);
      if (isSetEx())
        hashCode = hashCode * 8191 + ex.hashCode();

      return hashCode;
    }

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

      int lastComparison = 0;

      lastComparison = java.lang.Boolean.valueOf(isSetEx()).compareTo(other.isSetEx());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetEx()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ex, other.ex);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    @org.apache.thrift.annotation.Nullable
    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

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

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

    @Override
    public java.lang.String toString() {
      java.lang.StringBuilder sb = new java.lang.StringBuilder("add_index_result(");
      boolean first = true;

      sb.append("ex:");
      if (this.ex == null) {
        sb.append("null");
      } else {
        sb.append(this.ex);
      }
      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, java.lang.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 add_index_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public add_index_resultStandardScheme getScheme() {
        return new add_index_resultStandardScheme();
      }
    }

    private static class add_index_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<add_index_result> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, add_index_result struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TField schemeField;
        iprot.readStructBegin();
        while (true)
        {
          schemeField = iprot.readFieldBegin();
          if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { 
            break;
          }
          switch (schemeField.id) {
            case 1: // EX
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                if (struct.ex == null) {
                  struct.ex = new rpc_management_exception();
                }
                struct.ex.read(iprot);
                struct.setExIsSet(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, add_index_result struct) throws org.apache.thrift.TException {
        struct.validate();

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

    }

    private static class add_index_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public add_index_resultTupleScheme getScheme() {
        return new add_index_resultTupleScheme();
      }
    }

    private static class add_index_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<add_index_result> {

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

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, add_index_result struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet incoming = iprot.readBitSet(1);
        if (incoming.get(0)) {
          if (struct.ex == null) {
            struct.ex = new rpc_management_exception();
          }
          struct.ex.read(iprot);
          struct.setExIsSet(true);
        }
      }
    }

    private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
      return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
    }
  }

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

    private static final org.apache.thrift.protocol.TField MID_FIELD_DESC = new org.apache.thrift.protocol.TField("mid", org.apache.thrift.protocol.TType.I64, (short)1);
    private static final org.apache.thrift.protocol.TField FIELD_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("field_name", org.apache.thrift.protocol.TType.STRING, (short)2);

    private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new remove_index_argsStandardSchemeFactory();
    private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new remove_index_argsTupleSchemeFactory();

    private long mid; // required
    private @org.apache.thrift.annotation.Nullable java.lang.String field_name; // 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 {
      MID((short)1, "mid"),
      FIELD_NAME((short)2, "field_name");

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

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

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // MID
            return MID;
          case 2: // FIELD_NAME
            return FIELD_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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByName(java.lang.String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final java.lang.String _fieldName;

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

      public short getThriftFieldId() {
        return _thriftId;
      }

      public java.lang.String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    private static final int __MID_ISSET_ID = 0;
    private byte __isset_bitfield = 0;
    public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.MID, new org.apache.thrift.meta_data.FieldMetaData("mid", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      tmpMap.put(_Fields.FIELD_NAME, new org.apache.thrift.meta_data.FieldMetaData("field_name", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
      metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(remove_index_args.class, metaDataMap);
    }

    public remove_index_args() {
    }

    public remove_index_args(
      long mid,
      java.lang.String field_name)
    {
      this();
      this.mid = mid;
      setMidIsSet(true);
      this.field_name = field_name;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public remove_index_args(remove_index_args other) {
      __isset_bitfield = other.__isset_bitfield;
      this.mid = other.mid;
      if (other.isSetFieldName()) {
        this.field_name = other.field_name;
      }
    }

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

    @Override
    public void clear() {
      setMidIsSet(false);
      this.mid = 0;
      this.field_name = null;
    }

    public long getMid() {
      return this.mid;
    }

    public remove_index_args setMid(long mid) {
      this.mid = mid;
      setMidIsSet(true);
      return this;
    }

    public void unsetMid() {
      __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __MID_ISSET_ID);
    }

    /** Returns true if field mid is set (has been assigned a value) and false otherwise */
    public boolean isSetMid() {
      return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __MID_ISSET_ID);
    }

    public void setMidIsSet(boolean value) {
      __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __MID_ISSET_ID, value);
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.String getFieldName() {
      return this.field_name;
    }

    public remove_index_args setFieldName(@org.apache.thrift.annotation.Nullable java.lang.String field_name) {
      this.field_name = field_name;
      return this;
    }

    public void unsetFieldName() {
      this.field_name = null;
    }

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

    public void setFieldNameIsSet(boolean value) {
      if (!value) {
        this.field_name = null;
      }
    }

    public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
      switch (field) {
      case MID:
        if (value == null) {
          unsetMid();
        } else {
          setMid((java.lang.Long)value);
        }
        break;

      case FIELD_NAME:
        if (value == null) {
          unsetFieldName();
        } else {
          setFieldName((java.lang.String)value);
        }
        break;

      }
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.Object getFieldValue(_Fields field) {
      switch (field) {
      case MID:
        return getMid();

      case FIELD_NAME:
        return getFieldName();

      }
      throw new java.lang.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 java.lang.IllegalArgumentException();
      }

      switch (field) {
      case MID:
        return isSetMid();
      case FIELD_NAME:
        return isSetFieldName();
      }
      throw new java.lang.IllegalStateException();
    }

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

    public boolean equals(remove_index_args that) {
      if (that == null)
        return false;
      if (this == that)
        return true;

      boolean this_present_mid = true;
      boolean that_present_mid = true;
      if (this_present_mid || that_present_mid) {
        if (!(this_present_mid && that_present_mid))
          return false;
        if (this.mid != that.mid)
          return false;
      }

      boolean this_present_field_name = true && this.isSetFieldName();
      boolean that_present_field_name = true && that.isSetFieldName();
      if (this_present_field_name || that_present_field_name) {
        if (!(this_present_field_name && that_present_field_name))
          return false;
        if (!this.field_name.equals(that.field_name))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      int hashCode = 1;

      hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(mid);

      hashCode = hashCode * 8191 + ((isSetFieldName()) ? 131071 : 524287);
      if (isSetFieldName())
        hashCode = hashCode * 8191 + field_name.hashCode();

      return hashCode;
    }

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

      int lastComparison = 0;

      lastComparison = java.lang.Boolean.valueOf(isSetMid()).compareTo(other.isSetMid());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetMid()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.mid, other.mid);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = java.lang.Boolean.valueOf(isSetFieldName()).compareTo(other.isSetFieldName());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetFieldName()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.field_name, other.field_name);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    @org.apache.thrift.annotation.Nullable
    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

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

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

    @Override
    public java.lang.String toString() {
      java.lang.StringBuilder sb = new java.lang.StringBuilder("remove_index_args(");
      boolean first = true;

      sb.append("mid:");
      sb.append(this.mid);
      first = false;
      if (!first) sb.append(", ");
      sb.append("field_name:");
      if (this.field_name == null) {
        sb.append("null");
      } else {
        sb.append(this.field_name);
      }
      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, java.lang.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 remove_index_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public remove_index_argsStandardScheme getScheme() {
        return new remove_index_argsStandardScheme();
      }
    }

    private static class remove_index_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<remove_index_args> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, remove_index_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: // MID
              if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
                struct.mid = iprot.readI64();
                struct.setMidIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // FIELD_NAME
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.field_name = iprot.readString();
                struct.setFieldNameIsSet(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, remove_index_args struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        oprot.writeFieldBegin(MID_FIELD_DESC);
        oprot.writeI64(struct.mid);
        oprot.writeFieldEnd();
        if (struct.field_name != null) {
          oprot.writeFieldBegin(FIELD_NAME_FIELD_DESC);
          oprot.writeString(struct.field_name);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class remove_index_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public remove_index_argsTupleScheme getScheme() {
        return new remove_index_argsTupleScheme();
      }
    }

    private static class remove_index_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<remove_index_args> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, remove_index_args struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet optionals = new java.util.BitSet();
        if (struct.isSetMid()) {
          optionals.set(0);
        }
        if (struct.isSetFieldName()) {
          optionals.set(1);
        }
        oprot.writeBitSet(optionals, 2);
        if (struct.isSetMid()) {
          oprot.writeI64(struct.mid);
        }
        if (struct.isSetFieldName()) {
          oprot.writeString(struct.field_name);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, remove_index_args struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet incoming = iprot.readBitSet(2);
        if (incoming.get(0)) {
          struct.mid = iprot.readI64();
          struct.setMidIsSet(true);
        }
        if (incoming.get(1)) {
          struct.field_name = iprot.readString();
          struct.setFieldNameIsSet(true);
        }
      }
    }

    private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
      return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
    }
  }

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

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

    private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new remove_index_resultStandardSchemeFactory();
    private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new remove_index_resultTupleSchemeFactory();

    private @org.apache.thrift.annotation.Nullable rpc_management_exception ex; // 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 {
      EX((short)1, "ex");

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

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

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // EX
            return EX;
          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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByName(java.lang.String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final java.lang.String _fieldName;

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

      public short getThriftFieldId() {
        return _thriftId;
      }

      public java.lang.String getFieldName() {
        return _fieldName;
      }
    }

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

    public remove_index_result() {
    }

    public remove_index_result(
      rpc_management_exception ex)
    {
      this();
      this.ex = ex;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public remove_index_result(remove_index_result other) {
      if (other.isSetEx()) {
        this.ex = new rpc_management_exception(other.ex);
      }
    }

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

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

    @org.apache.thrift.annotation.Nullable
    public rpc_management_exception getEx() {
      return this.ex;
    }

    public remove_index_result setEx(@org.apache.thrift.annotation.Nullable rpc_management_exception ex) {
      this.ex = ex;
      return this;
    }

    public void unsetEx() {
      this.ex = null;
    }

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

    public void setExIsSet(boolean value) {
      if (!value) {
        this.ex = null;
      }
    }

    public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
      switch (field) {
      case EX:
        if (value == null) {
          unsetEx();
        } else {
          setEx((rpc_management_exception)value);
        }
        break;

      }
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.Object getFieldValue(_Fields field) {
      switch (field) {
      case EX:
        return getEx();

      }
      throw new java.lang.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 java.lang.IllegalArgumentException();
      }

      switch (field) {
      case EX:
        return isSetEx();
      }
      throw new java.lang.IllegalStateException();
    }

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

    public boolean equals(remove_index_result that) {
      if (that == null)
        return false;
      if (this == that)
        return true;

      boolean this_present_ex = true && this.isSetEx();
      boolean that_present_ex = true && that.isSetEx();
      if (this_present_ex || that_present_ex) {
        if (!(this_present_ex && that_present_ex))
          return false;
        if (!this.ex.equals(that.ex))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      int hashCode = 1;

      hashCode = hashCode * 8191 + ((isSetEx()) ? 131071 : 524287);
      if (isSetEx())
        hashCode = hashCode * 8191 + ex.hashCode();

      return hashCode;
    }

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

      int lastComparison = 0;

      lastComparison = java.lang.Boolean.valueOf(isSetEx()).compareTo(other.isSetEx());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetEx()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ex, other.ex);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    @org.apache.thrift.annotation.Nullable
    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

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

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

    @Override
    public java.lang.String toString() {
      java.lang.StringBuilder sb = new java.lang.StringBuilder("remove_index_result(");
      boolean first = true;

      sb.append("ex:");
      if (this.ex == null) {
        sb.append("null");
      } else {
        sb.append(this.ex);
      }
      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, java.lang.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 remove_index_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public remove_index_resultStandardScheme getScheme() {
        return new remove_index_resultStandardScheme();
      }
    }

    private static class remove_index_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<remove_index_result> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, remove_index_result struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TField schemeField;
        iprot.readStructBegin();
        while (true)
        {
          schemeField = iprot.readFieldBegin();
          if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { 
            break;
          }
          switch (schemeField.id) {
            case 1: // EX
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                if (struct.ex == null) {
                  struct.ex = new rpc_management_exception();
                }
                struct.ex.read(iprot);
                struct.setExIsSet(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, remove_index_result struct) throws org.apache.thrift.TException {
        struct.validate();

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

    }

    private static class remove_index_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public remove_index_resultTupleScheme getScheme() {
        return new remove_index_resultTupleScheme();
      }
    }

    private static class remove_index_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<remove_index_result> {

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

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, remove_index_result struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet incoming = iprot.readBitSet(1);
        if (incoming.get(0)) {
          if (struct.ex == null) {
            struct.ex = new rpc_management_exception();
          }
          struct.ex.read(iprot);
          struct.setExIsSet(true);
        }
      }
    }

    private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
      return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
    }
  }

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

    private static final org.apache.thrift.protocol.TField MID_FIELD_DESC = new org.apache.thrift.protocol.TField("mid", org.apache.thrift.protocol.TType.I64, (short)1);
    private static final org.apache.thrift.protocol.TField FILTER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("filter_id", org.apache.thrift.protocol.TType.STRING, (short)2);
    private static final org.apache.thrift.protocol.TField FILTER_EX_FIELD_DESC = new org.apache.thrift.protocol.TField("filter_ex", org.apache.thrift.protocol.TType.STRING, (short)3);

    private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new add_filter_argsStandardSchemeFactory();
    private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new add_filter_argsTupleSchemeFactory();

    private long mid; // required
    private @org.apache.thrift.annotation.Nullable java.lang.String filter_id; // required
    private @org.apache.thrift.annotation.Nullable java.lang.String filter_ex; // 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 {
      MID((short)1, "mid"),
      FILTER_ID((short)2, "filter_id"),
      FILTER_EX((short)3, "filter_ex");

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

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

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // MID
            return MID;
          case 2: // FILTER_ID
            return FILTER_ID;
          case 3: // FILTER_EX
            return FILTER_EX;
          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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByName(java.lang.String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final java.lang.String _fieldName;

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

      public short getThriftFieldId() {
        return _thriftId;
      }

      public java.lang.String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    private static final int __MID_ISSET_ID = 0;
    private byte __isset_bitfield = 0;
    public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.MID, new org.apache.thrift.meta_data.FieldMetaData("mid", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      tmpMap.put(_Fields.FILTER_ID, new org.apache.thrift.meta_data.FieldMetaData("filter_id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
      tmpMap.put(_Fields.FILTER_EX, new org.apache.thrift.meta_data.FieldMetaData("filter_ex", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
      metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(add_filter_args.class, metaDataMap);
    }

    public add_filter_args() {
    }

    public add_filter_args(
      long mid,
      java.lang.String filter_id,
      java.lang.String filter_ex)
    {
      this();
      this.mid = mid;
      setMidIsSet(true);
      this.filter_id = filter_id;
      this.filter_ex = filter_ex;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public add_filter_args(add_filter_args other) {
      __isset_bitfield = other.__isset_bitfield;
      this.mid = other.mid;
      if (other.isSetFilterId()) {
        this.filter_id = other.filter_id;
      }
      if (other.isSetFilterEx()) {
        this.filter_ex = other.filter_ex;
      }
    }

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

    @Override
    public void clear() {
      setMidIsSet(false);
      this.mid = 0;
      this.filter_id = null;
      this.filter_ex = null;
    }

    public long getMid() {
      return this.mid;
    }

    public add_filter_args setMid(long mid) {
      this.mid = mid;
      setMidIsSet(true);
      return this;
    }

    public void unsetMid() {
      __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __MID_ISSET_ID);
    }

    /** Returns true if field mid is set (has been assigned a value) and false otherwise */
    public boolean isSetMid() {
      return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __MID_ISSET_ID);
    }

    public void setMidIsSet(boolean value) {
      __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __MID_ISSET_ID, value);
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.String getFilterId() {
      return this.filter_id;
    }

    public add_filter_args setFilterId(@org.apache.thrift.annotation.Nullable java.lang.String filter_id) {
      this.filter_id = filter_id;
      return this;
    }

    public void unsetFilterId() {
      this.filter_id = null;
    }

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

    public void setFilterIdIsSet(boolean value) {
      if (!value) {
        this.filter_id = null;
      }
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.String getFilterEx() {
      return this.filter_ex;
    }

    public add_filter_args setFilterEx(@org.apache.thrift.annotation.Nullable java.lang.String filter_ex) {
      this.filter_ex = filter_ex;
      return this;
    }

    public void unsetFilterEx() {
      this.filter_ex = null;
    }

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

    public void setFilterExIsSet(boolean value) {
      if (!value) {
        this.filter_ex = null;
      }
    }

    public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
      switch (field) {
      case MID:
        if (value == null) {
          unsetMid();
        } else {
          setMid((java.lang.Long)value);
        }
        break;

      case FILTER_ID:
        if (value == null) {
          unsetFilterId();
        } else {
          setFilterId((java.lang.String)value);
        }
        break;

      case FILTER_EX:
        if (value == null) {
          unsetFilterEx();
        } else {
          setFilterEx((java.lang.String)value);
        }
        break;

      }
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.Object getFieldValue(_Fields field) {
      switch (field) {
      case MID:
        return getMid();

      case FILTER_ID:
        return getFilterId();

      case FILTER_EX:
        return getFilterEx();

      }
      throw new java.lang.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 java.lang.IllegalArgumentException();
      }

      switch (field) {
      case MID:
        return isSetMid();
      case FILTER_ID:
        return isSetFilterId();
      case FILTER_EX:
        return isSetFilterEx();
      }
      throw new java.lang.IllegalStateException();
    }

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

    public boolean equals(add_filter_args that) {
      if (that == null)
        return false;
      if (this == that)
        return true;

      boolean this_present_mid = true;
      boolean that_present_mid = true;
      if (this_present_mid || that_present_mid) {
        if (!(this_present_mid && that_present_mid))
          return false;
        if (this.mid != that.mid)
          return false;
      }

      boolean this_present_filter_id = true && this.isSetFilterId();
      boolean that_present_filter_id = true && that.isSetFilterId();
      if (this_present_filter_id || that_present_filter_id) {
        if (!(this_present_filter_id && that_present_filter_id))
          return false;
        if (!this.filter_id.equals(that.filter_id))
          return false;
      }

      boolean this_present_filter_ex = true && this.isSetFilterEx();
      boolean that_present_filter_ex = true && that.isSetFilterEx();
      if (this_present_filter_ex || that_present_filter_ex) {
        if (!(this_present_filter_ex && that_present_filter_ex))
          return false;
        if (!this.filter_ex.equals(that.filter_ex))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      int hashCode = 1;

      hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(mid);

      hashCode = hashCode * 8191 + ((isSetFilterId()) ? 131071 : 524287);
      if (isSetFilterId())
        hashCode = hashCode * 8191 + filter_id.hashCode();

      hashCode = hashCode * 8191 + ((isSetFilterEx()) ? 131071 : 524287);
      if (isSetFilterEx())
        hashCode = hashCode * 8191 + filter_ex.hashCode();

      return hashCode;
    }

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

      int lastComparison = 0;

      lastComparison = java.lang.Boolean.valueOf(isSetMid()).compareTo(other.isSetMid());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetMid()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.mid, other.mid);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = java.lang.Boolean.valueOf(isSetFilterId()).compareTo(other.isSetFilterId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetFilterId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.filter_id, other.filter_id);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = java.lang.Boolean.valueOf(isSetFilterEx()).compareTo(other.isSetFilterEx());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetFilterEx()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.filter_ex, other.filter_ex);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    @org.apache.thrift.annotation.Nullable
    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

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

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

    @Override
    public java.lang.String toString() {
      java.lang.StringBuilder sb = new java.lang.StringBuilder("add_filter_args(");
      boolean first = true;

      sb.append("mid:");
      sb.append(this.mid);
      first = false;
      if (!first) sb.append(", ");
      sb.append("filter_id:");
      if (this.filter_id == null) {
        sb.append("null");
      } else {
        sb.append(this.filter_id);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("filter_ex:");
      if (this.filter_ex == null) {
        sb.append("null");
      } else {
        sb.append(this.filter_ex);
      }
      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, java.lang.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 add_filter_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public add_filter_argsStandardScheme getScheme() {
        return new add_filter_argsStandardScheme();
      }
    }

    private static class add_filter_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<add_filter_args> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, add_filter_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: // MID
              if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
                struct.mid = iprot.readI64();
                struct.setMidIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // FILTER_ID
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.filter_id = iprot.readString();
                struct.setFilterIdIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 3: // FILTER_EX
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.filter_ex = iprot.readString();
                struct.setFilterExIsSet(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, add_filter_args struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        oprot.writeFieldBegin(MID_FIELD_DESC);
        oprot.writeI64(struct.mid);
        oprot.writeFieldEnd();
        if (struct.filter_id != null) {
          oprot.writeFieldBegin(FILTER_ID_FIELD_DESC);
          oprot.writeString(struct.filter_id);
          oprot.writeFieldEnd();
        }
        if (struct.filter_ex != null) {
          oprot.writeFieldBegin(FILTER_EX_FIELD_DESC);
          oprot.writeString(struct.filter_ex);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class add_filter_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public add_filter_argsTupleScheme getScheme() {
        return new add_filter_argsTupleScheme();
      }
    }

    private static class add_filter_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<add_filter_args> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, add_filter_args struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet optionals = new java.util.BitSet();
        if (struct.isSetMid()) {
          optionals.set(0);
        }
        if (struct.isSetFilterId()) {
          optionals.set(1);
        }
        if (struct.isSetFilterEx()) {
          optionals.set(2);
        }
        oprot.writeBitSet(optionals, 3);
        if (struct.isSetMid()) {
          oprot.writeI64(struct.mid);
        }
        if (struct.isSetFilterId()) {
          oprot.writeString(struct.filter_id);
        }
        if (struct.isSetFilterEx()) {
          oprot.writeString(struct.filter_ex);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, add_filter_args struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet incoming = iprot.readBitSet(3);
        if (incoming.get(0)) {
          struct.mid = iprot.readI64();
          struct.setMidIsSet(true);
        }
        if (incoming.get(1)) {
          struct.filter_id = iprot.readString();
          struct.setFilterIdIsSet(true);
        }
        if (incoming.get(2)) {
          struct.filter_ex = iprot.readString();
          struct.setFilterExIsSet(true);
        }
      }
    }

    private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
      return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
    }
  }

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

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

    private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new add_filter_resultStandardSchemeFactory();
    private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new add_filter_resultTupleSchemeFactory();

    private @org.apache.thrift.annotation.Nullable rpc_management_exception ex; // 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 {
      EX((short)1, "ex");

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

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

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // EX
            return EX;
          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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByName(java.lang.String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final java.lang.String _fieldName;

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

      public short getThriftFieldId() {
        return _thriftId;
      }

      public java.lang.String getFieldName() {
        return _fieldName;
      }
    }

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

    public add_filter_result() {
    }

    public add_filter_result(
      rpc_management_exception ex)
    {
      this();
      this.ex = ex;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public add_filter_result(add_filter_result other) {
      if (other.isSetEx()) {
        this.ex = new rpc_management_exception(other.ex);
      }
    }

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

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

    @org.apache.thrift.annotation.Nullable
    public rpc_management_exception getEx() {
      return this.ex;
    }

    public add_filter_result setEx(@org.apache.thrift.annotation.Nullable rpc_management_exception ex) {
      this.ex = ex;
      return this;
    }

    public void unsetEx() {
      this.ex = null;
    }

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

    public void setExIsSet(boolean value) {
      if (!value) {
        this.ex = null;
      }
    }

    public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
      switch (field) {
      case EX:
        if (value == null) {
          unsetEx();
        } else {
          setEx((rpc_management_exception)value);
        }
        break;

      }
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.Object getFieldValue(_Fields field) {
      switch (field) {
      case EX:
        return getEx();

      }
      throw new java.lang.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 java.lang.IllegalArgumentException();
      }

      switch (field) {
      case EX:
        return isSetEx();
      }
      throw new java.lang.IllegalStateException();
    }

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

    public boolean equals(add_filter_result that) {
      if (that == null)
        return false;
      if (this == that)
        return true;

      boolean this_present_ex = true && this.isSetEx();
      boolean that_present_ex = true && that.isSetEx();
      if (this_present_ex || that_present_ex) {
        if (!(this_present_ex && that_present_ex))
          return false;
        if (!this.ex.equals(that.ex))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      int hashCode = 1;

      hashCode = hashCode * 8191 + ((isSetEx()) ? 131071 : 524287);
      if (isSetEx())
        hashCode = hashCode * 8191 + ex.hashCode();

      return hashCode;
    }

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

      int lastComparison = 0;

      lastComparison = java.lang.Boolean.valueOf(isSetEx()).compareTo(other.isSetEx());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetEx()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ex, other.ex);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    @org.apache.thrift.annotation.Nullable
    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

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

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

    @Override
    public java.lang.String toString() {
      java.lang.StringBuilder sb = new java.lang.StringBuilder("add_filter_result(");
      boolean first = true;

      sb.append("ex:");
      if (this.ex == null) {
        sb.append("null");
      } else {
        sb.append(this.ex);
      }
      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, java.lang.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 add_filter_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public add_filter_resultStandardScheme getScheme() {
        return new add_filter_resultStandardScheme();
      }
    }

    private static class add_filter_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<add_filter_result> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, add_filter_result struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TField schemeField;
        iprot.readStructBegin();
        while (true)
        {
          schemeField = iprot.readFieldBegin();
          if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { 
            break;
          }
          switch (schemeField.id) {
            case 1: // EX
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                if (struct.ex == null) {
                  struct.ex = new rpc_management_exception();
                }
                struct.ex.read(iprot);
                struct.setExIsSet(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, add_filter_result struct) throws org.apache.thrift.TException {
        struct.validate();

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

    }

    private static class add_filter_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public add_filter_resultTupleScheme getScheme() {
        return new add_filter_resultTupleScheme();
      }
    }

    private static class add_filter_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<add_filter_result> {

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

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, add_filter_result struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet incoming = iprot.readBitSet(1);
        if (incoming.get(0)) {
          if (struct.ex == null) {
            struct.ex = new rpc_management_exception();
          }
          struct.ex.read(iprot);
          struct.setExIsSet(true);
        }
      }
    }

    private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
      return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
    }
  }

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

    private static final org.apache.thrift.protocol.TField MID_FIELD_DESC = new org.apache.thrift.protocol.TField("mid", org.apache.thrift.protocol.TType.I64, (short)1);
    private static final org.apache.thrift.protocol.TField FILTER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("filter_id", org.apache.thrift.protocol.TType.STRING, (short)2);

    private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new remove_filter_argsStandardSchemeFactory();
    private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new remove_filter_argsTupleSchemeFactory();

    private long mid; // required
    private @org.apache.thrift.annotation.Nullable java.lang.String filter_id; // required

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

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

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

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // MID
            return MID;
          case 2: // FILTER_ID
            return FILTER_ID;
          default:
            return null;
        }
      }

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

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByName(java.lang.String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final java.lang.String _fieldName;

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

      public short getThriftFieldId() {
        return _thriftId;
      }

      public java.lang.String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    private static final int __MID_ISSET_ID = 0;
    private byte __isset_bitfield = 0;
    public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.MID, new org.apache.thrift.meta_data.FieldMetaData("mid", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      tmpMap.put(_Fields.FILTER_ID, new org.apache.thrift.meta_data.FieldMetaData("filter_id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
      metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(remove_filter_args.class, metaDataMap);
    }

    public remove_filter_args() {
    }

    public remove_filter_args(
      long mid,
      java.lang.String filter_id)
    {
      this();
      this.mid = mid;
      setMidIsSet(true);
      this.filter_id = filter_id;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public remove_filter_args(remove_filter_args other) {
      __isset_bitfield = other.__isset_bitfield;
      this.mid = other.mid;
      if (other.isSetFilterId()) {
        this.filter_id = other.filter_id;
      }
    }

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

    @Override
    public void clear() {
      setMidIsSet(false);
      this.mid = 0;
      this.filter_id = null;
    }

    public long getMid() {
      return this.mid;
    }

    public remove_filter_args setMid(long mid) {
      this.mid = mid;
      setMidIsSet(true);
      return this;
    }

    public void unsetMid() {
      __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __MID_ISSET_ID);
    }

    /** Returns true if field mid is set (has been assigned a value) and false otherwise */
    public boolean isSetMid() {
      return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __MID_ISSET_ID);
    }

    public void setMidIsSet(boolean value) {
      __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __MID_ISSET_ID, value);
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.String getFilterId() {
      return this.filter_id;
    }

    public remove_filter_args setFilterId(@org.apache.thrift.annotation.Nullable java.lang.String filter_id) {
      this.filter_id = filter_id;
      return this;
    }

    public void unsetFilterId() {
      this.filter_id = null;
    }

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

    public void setFilterIdIsSet(boolean value) {
      if (!value) {
        this.filter_id = null;
      }
    }

    public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
      switch (field) {
      case MID:
        if (value == null) {
          unsetMid();
        } else {
          setMid((java.lang.Long)value);
        }
        break;

      case FILTER_ID:
        if (value == null) {
          unsetFilterId();
        } else {
          setFilterId((java.lang.String)value);
        }
        break;

      }
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.Object getFieldValue(_Fields field) {
      switch (field) {
      case MID:
        return getMid();

      case FILTER_ID:
        return getFilterId();

      }
      throw new java.lang.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 java.lang.IllegalArgumentException();
      }

      switch (field) {
      case MID:
        return isSetMid();
      case FILTER_ID:
        return isSetFilterId();
      }
      throw new java.lang.IllegalStateException();
    }

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

    public boolean equals(remove_filter_args that) {
      if (that == null)
        return false;
      if (this == that)
        return true;

      boolean this_present_mid = true;
      boolean that_present_mid = true;
      if (this_present_mid || that_present_mid) {
        if (!(this_present_mid && that_present_mid))
          return false;
        if (this.mid != that.mid)
          return false;
      }

      boolean this_present_filter_id = true && this.isSetFilterId();
      boolean that_present_filter_id = true && that.isSetFilterId();
      if (this_present_filter_id || that_present_filter_id) {
        if (!(this_present_filter_id && that_present_filter_id))
          return false;
        if (!this.filter_id.equals(that.filter_id))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      int hashCode = 1;

      hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(mid);

      hashCode = hashCode * 8191 + ((isSetFilterId()) ? 131071 : 524287);
      if (isSetFilterId())
        hashCode = hashCode * 8191 + filter_id.hashCode();

      return hashCode;
    }

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

      int lastComparison = 0;

      lastComparison = java.lang.Boolean.valueOf(isSetMid()).compareTo(other.isSetMid());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetMid()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.mid, other.mid);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = java.lang.Boolean.valueOf(isSetFilterId()).compareTo(other.isSetFilterId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetFilterId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.filter_id, other.filter_id);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    @org.apache.thrift.annotation.Nullable
    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

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

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

    @Override
    public java.lang.String toString() {
      java.lang.StringBuilder sb = new java.lang.StringBuilder("remove_filter_args(");
      boolean first = true;

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

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

    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, java.lang.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 remove_filter_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public remove_filter_argsStandardScheme getScheme() {
        return new remove_filter_argsStandardScheme();
      }
    }

    private static class remove_filter_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<remove_filter_args> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, remove_filter_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: // MID
              if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
                struct.mid = iprot.readI64();
                struct.setMidIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // FILTER_ID
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.filter_id = iprot.readString();
                struct.setFilterIdIsSet(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, remove_filter_args struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        oprot.writeFieldBegin(MID_FIELD_DESC);
        oprot.writeI64(struct.mid);
        oprot.writeFieldEnd();
        if (struct.filter_id != null) {
          oprot.writeFieldBegin(FILTER_ID_FIELD_DESC);
          oprot.writeString(struct.filter_id);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class remove_filter_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public remove_filter_argsTupleScheme getScheme() {
        return new remove_filter_argsTupleScheme();
      }
    }

    private static class remove_filter_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<remove_filter_args> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, remove_filter_args struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet optionals = new java.util.BitSet();
        if (struct.isSetMid()) {
          optionals.set(0);
        }
        if (struct.isSetFilterId()) {
          optionals.set(1);
        }
        oprot.writeBitSet(optionals, 2);
        if (struct.isSetMid()) {
          oprot.writeI64(struct.mid);
        }
        if (struct.isSetFilterId()) {
          oprot.writeString(struct.filter_id);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, remove_filter_args struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet incoming = iprot.readBitSet(2);
        if (incoming.get(0)) {
          struct.mid = iprot.readI64();
          struct.setMidIsSet(true);
        }
        if (incoming.get(1)) {
          struct.filter_id = iprot.readString();
          struct.setFilterIdIsSet(true);
        }
      }
    }

    private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
      return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
    }
  }

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

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

    private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new remove_filter_resultStandardSchemeFactory();
    private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new remove_filter_resultTupleSchemeFactory();

    private @org.apache.thrift.annotation.Nullable rpc_management_exception ex; // 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 {
      EX((short)1, "ex");

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

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

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // EX
            return EX;
          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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByName(java.lang.String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final java.lang.String _fieldName;

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

      public short getThriftFieldId() {
        return _thriftId;
      }

      public java.lang.String getFieldName() {
        return _fieldName;
      }
    }

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

    public remove_filter_result() {
    }

    public remove_filter_result(
      rpc_management_exception ex)
    {
      this();
      this.ex = ex;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public remove_filter_result(remove_filter_result other) {
      if (other.isSetEx()) {
        this.ex = new rpc_management_exception(other.ex);
      }
    }

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

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

    @org.apache.thrift.annotation.Nullable
    public rpc_management_exception getEx() {
      return this.ex;
    }

    public remove_filter_result setEx(@org.apache.thrift.annotation.Nullable rpc_management_exception ex) {
      this.ex = ex;
      return this;
    }

    public void unsetEx() {
      this.ex = null;
    }

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

    public void setExIsSet(boolean value) {
      if (!value) {
        this.ex = null;
      }
    }

    public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
      switch (field) {
      case EX:
        if (value == null) {
          unsetEx();
        } else {
          setEx((rpc_management_exception)value);
        }
        break;

      }
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.Object getFieldValue(_Fields field) {
      switch (field) {
      case EX:
        return getEx();

      }
      throw new java.lang.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 java.lang.IllegalArgumentException();
      }

      switch (field) {
      case EX:
        return isSetEx();
      }
      throw new java.lang.IllegalStateException();
    }

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

    public boolean equals(remove_filter_result that) {
      if (that == null)
        return false;
      if (this == that)
        return true;

      boolean this_present_ex = true && this.isSetEx();
      boolean that_present_ex = true && that.isSetEx();
      if (this_present_ex || that_present_ex) {
        if (!(this_present_ex && that_present_ex))
          return false;
        if (!this.ex.equals(that.ex))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      int hashCode = 1;

      hashCode = hashCode * 8191 + ((isSetEx()) ? 131071 : 524287);
      if (isSetEx())
        hashCode = hashCode * 8191 + ex.hashCode();

      return hashCode;
    }

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

      int lastComparison = 0;

      lastComparison = java.lang.Boolean.valueOf(isSetEx()).compareTo(other.isSetEx());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetEx()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ex, other.ex);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    @org.apache.thrift.annotation.Nullable
    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

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

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

    @Override
    public java.lang.String toString() {
      java.lang.StringBuilder sb = new java.lang.StringBuilder("remove_filter_result(");
      boolean first = true;

      sb.append("ex:");
      if (this.ex == null) {
        sb.append("null");
      } else {
        sb.append(this.ex);
      }
      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, java.lang.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 remove_filter_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public remove_filter_resultStandardScheme getScheme() {
        return new remove_filter_resultStandardScheme();
      }
    }

    private static class remove_filter_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<remove_filter_result> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, remove_filter_result struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TField schemeField;
        iprot.readStructBegin();
        while (true)
        {
          schemeField = iprot.readFieldBegin();
          if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { 
            break;
          }
          switch (schemeField.id) {
            case 1: // EX
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                if (struct.ex == null) {
                  struct.ex = new rpc_management_exception();
                }
                struct.ex.read(iprot);
                struct.setExIsSet(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, remove_filter_result struct) throws org.apache.thrift.TException {
        struct.validate();

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

    }

    private static class remove_filter_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public remove_filter_resultTupleScheme getScheme() {
        return new remove_filter_resultTupleScheme();
      }
    }

    private static class remove_filter_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<remove_filter_result> {

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

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, remove_filter_result struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet incoming = iprot.readBitSet(1);
        if (incoming.get(0)) {
          if (struct.ex == null) {
            struct.ex = new rpc_management_exception();
          }
          struct.ex.read(iprot);
          struct.setExIsSet(true);
        }
      }
    }

    private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
      return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
    }
  }

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

    private static final org.apache.thrift.protocol.TField MID_FIELD_DESC = new org.apache.thrift.protocol.TField("mid", org.apache.thrift.protocol.TType.I64, (short)1);
    private static final org.apache.thrift.protocol.TField AGGREGATE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("aggregate_name", org.apache.thrift.protocol.TType.STRING, (short)2);
    private static final org.apache.thrift.protocol.TField FILTER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("filter_id", org.apache.thrift.protocol.TType.STRING, (short)3);
    private static final org.apache.thrift.protocol.TField AGGREGATE_EXPR_FIELD_DESC = new org.apache.thrift.protocol.TField("aggregate_expr", org.apache.thrift.protocol.TType.STRING, (short)4);

    private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new add_aggregate_argsStandardSchemeFactory();
    private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new add_aggregate_argsTupleSchemeFactory();

    private long mid; // required
    private @org.apache.thrift.annotation.Nullable java.lang.String aggregate_name; // required
    private @org.apache.thrift.annotation.Nullable java.lang.String filter_id; // required
    private @org.apache.thrift.annotation.Nullable java.lang.String aggregate_expr; // 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 {
      MID((short)1, "mid"),
      AGGREGATE_NAME((short)2, "aggregate_name"),
      FILTER_ID((short)3, "filter_id"),
      AGGREGATE_EXPR((short)4, "aggregate_expr");

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

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

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // MID
            return MID;
          case 2: // AGGREGATE_NAME
            return AGGREGATE_NAME;
          case 3: // FILTER_ID
            return FILTER_ID;
          case 4: // AGGREGATE_EXPR
            return AGGREGATE_EXPR;
          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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByName(java.lang.String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final java.lang.String _fieldName;

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

      public short getThriftFieldId() {
        return _thriftId;
      }

      public java.lang.String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    private static final int __MID_ISSET_ID = 0;
    private byte __isset_bitfield = 0;
    public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.MID, new org.apache.thrift.meta_data.FieldMetaData("mid", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      tmpMap.put(_Fields.AGGREGATE_NAME, new org.apache.thrift.meta_data.FieldMetaData("aggregate_name", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
      tmpMap.put(_Fields.FILTER_ID, new org.apache.thrift.meta_data.FieldMetaData("filter_id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
      tmpMap.put(_Fields.AGGREGATE_EXPR, new org.apache.thrift.meta_data.FieldMetaData("aggregate_expr", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
      metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(add_aggregate_args.class, metaDataMap);
    }

    public add_aggregate_args() {
    }

    public add_aggregate_args(
      long mid,
      java.lang.String aggregate_name,
      java.lang.String filter_id,
      java.lang.String aggregate_expr)
    {
      this();
      this.mid = mid;
      setMidIsSet(true);
      this.aggregate_name = aggregate_name;
      this.filter_id = filter_id;
      this.aggregate_expr = aggregate_expr;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public add_aggregate_args(add_aggregate_args other) {
      __isset_bitfield = other.__isset_bitfield;
      this.mid = other.mid;
      if (other.isSetAggregateName()) {
        this.aggregate_name = other.aggregate_name;
      }
      if (other.isSetFilterId()) {
        this.filter_id = other.filter_id;
      }
      if (other.isSetAggregateExpr()) {
        this.aggregate_expr = other.aggregate_expr;
      }
    }

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

    @Override
    public void clear() {
      setMidIsSet(false);
      this.mid = 0;
      this.aggregate_name = null;
      this.filter_id = null;
      this.aggregate_expr = null;
    }

    public long getMid() {
      return this.mid;
    }

    public add_aggregate_args setMid(long mid) {
      this.mid = mid;
      setMidIsSet(true);
      return this;
    }

    public void unsetMid() {
      __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __MID_ISSET_ID);
    }

    /** Returns true if field mid is set (has been assigned a value) and false otherwise */
    public boolean isSetMid() {
      return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __MID_ISSET_ID);
    }

    public void setMidIsSet(boolean value) {
      __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __MID_ISSET_ID, value);
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.String getAggregateName() {
      return this.aggregate_name;
    }

    public add_aggregate_args setAggregateName(@org.apache.thrift.annotation.Nullable java.lang.String aggregate_name) {
      this.aggregate_name = aggregate_name;
      return this;
    }

    public void unsetAggregateName() {
      this.aggregate_name = null;
    }

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

    public void setAggregateNameIsSet(boolean value) {
      if (!value) {
        this.aggregate_name = null;
      }
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.String getFilterId() {
      return this.filter_id;
    }

    public add_aggregate_args setFilterId(@org.apache.thrift.annotation.Nullable java.lang.String filter_id) {
      this.filter_id = filter_id;
      return this;
    }

    public void unsetFilterId() {
      this.filter_id = null;
    }

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

    public void setFilterIdIsSet(boolean value) {
      if (!value) {
        this.filter_id = null;
      }
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.String getAggregateExpr() {
      return this.aggregate_expr;
    }

    public add_aggregate_args setAggregateExpr(@org.apache.thrift.annotation.Nullable java.lang.String aggregate_expr) {
      this.aggregate_expr = aggregate_expr;
      return this;
    }

    public void unsetAggregateExpr() {
      this.aggregate_expr = null;
    }

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

    public void setAggregateExprIsSet(boolean value) {
      if (!value) {
        this.aggregate_expr = null;
      }
    }

    public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
      switch (field) {
      case MID:
        if (value == null) {
          unsetMid();
        } else {
          setMid((java.lang.Long)value);
        }
        break;

      case AGGREGATE_NAME:
        if (value == null) {
          unsetAggregateName();
        } else {
          setAggregateName((java.lang.String)value);
        }
        break;

      case FILTER_ID:
        if (value == null) {
          unsetFilterId();
        } else {
          setFilterId((java.lang.String)value);
        }
        break;

      case AGGREGATE_EXPR:
        if (value == null) {
          unsetAggregateExpr();
        } else {
          setAggregateExpr((java.lang.String)value);
        }
        break;

      }
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.Object getFieldValue(_Fields field) {
      switch (field) {
      case MID:
        return getMid();

      case AGGREGATE_NAME:
        return getAggregateName();

      case FILTER_ID:
        return getFilterId();

      case AGGREGATE_EXPR:
        return getAggregateExpr();

      }
      throw new java.lang.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 java.lang.IllegalArgumentException();
      }

      switch (field) {
      case MID:
        return isSetMid();
      case AGGREGATE_NAME:
        return isSetAggregateName();
      case FILTER_ID:
        return isSetFilterId();
      case AGGREGATE_EXPR:
        return isSetAggregateExpr();
      }
      throw new java.lang.IllegalStateException();
    }

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

    public boolean equals(add_aggregate_args that) {
      if (that == null)
        return false;
      if (this == that)
        return true;

      boolean this_present_mid = true;
      boolean that_present_mid = true;
      if (this_present_mid || that_present_mid) {
        if (!(this_present_mid && that_present_mid))
          return false;
        if (this.mid != that.mid)
          return false;
      }

      boolean this_present_aggregate_name = true && this.isSetAggregateName();
      boolean that_present_aggregate_name = true && that.isSetAggregateName();
      if (this_present_aggregate_name || that_present_aggregate_name) {
        if (!(this_present_aggregate_name && that_present_aggregate_name))
          return false;
        if (!this.aggregate_name.equals(that.aggregate_name))
          return false;
      }

      boolean this_present_filter_id = true && this.isSetFilterId();
      boolean that_present_filter_id = true && that.isSetFilterId();
      if (this_present_filter_id || that_present_filter_id) {
        if (!(this_present_filter_id && that_present_filter_id))
          return false;
        if (!this.filter_id.equals(that.filter_id))
          return false;
      }

      boolean this_present_aggregate_expr = true && this.isSetAggregateExpr();
      boolean that_present_aggregate_expr = true && that.isSetAggregateExpr();
      if (this_present_aggregate_expr || that_present_aggregate_expr) {
        if (!(this_present_aggregate_expr && that_present_aggregate_expr))
          return false;
        if (!this.aggregate_expr.equals(that.aggregate_expr))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      int hashCode = 1;

      hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(mid);

      hashCode = hashCode * 8191 + ((isSetAggregateName()) ? 131071 : 524287);
      if (isSetAggregateName())
        hashCode = hashCode * 8191 + aggregate_name.hashCode();

      hashCode = hashCode * 8191 + ((isSetFilterId()) ? 131071 : 524287);
      if (isSetFilterId())
        hashCode = hashCode * 8191 + filter_id.hashCode();

      hashCode = hashCode * 8191 + ((isSetAggregateExpr()) ? 131071 : 524287);
      if (isSetAggregateExpr())
        hashCode = hashCode * 8191 + aggregate_expr.hashCode();

      return hashCode;
    }

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

      int lastComparison = 0;

      lastComparison = java.lang.Boolean.valueOf(isSetMid()).compareTo(other.isSetMid());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetMid()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.mid, other.mid);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = java.lang.Boolean.valueOf(isSetAggregateName()).compareTo(other.isSetAggregateName());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetAggregateName()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.aggregate_name, other.aggregate_name);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = java.lang.Boolean.valueOf(isSetFilterId()).compareTo(other.isSetFilterId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetFilterId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.filter_id, other.filter_id);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = java.lang.Boolean.valueOf(isSetAggregateExpr()).compareTo(other.isSetAggregateExpr());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetAggregateExpr()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.aggregate_expr, other.aggregate_expr);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    @org.apache.thrift.annotation.Nullable
    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

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

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

    @Override
    public java.lang.String toString() {
      java.lang.StringBuilder sb = new java.lang.StringBuilder("add_aggregate_args(");
      boolean first = true;

      sb.append("mid:");
      sb.append(this.mid);
      first = false;
      if (!first) sb.append(", ");
      sb.append("aggregate_name:");
      if (this.aggregate_name == null) {
        sb.append("null");
      } else {
        sb.append(this.aggregate_name);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("filter_id:");
      if (this.filter_id == null) {
        sb.append("null");
      } else {
        sb.append(this.filter_id);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("aggregate_expr:");
      if (this.aggregate_expr == null) {
        sb.append("null");
      } else {
        sb.append(this.aggregate_expr);
      }
      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, java.lang.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 add_aggregate_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public add_aggregate_argsStandardScheme getScheme() {
        return new add_aggregate_argsStandardScheme();
      }
    }

    private static class add_aggregate_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<add_aggregate_args> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, add_aggregate_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: // MID
              if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
                struct.mid = iprot.readI64();
                struct.setMidIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // AGGREGATE_NAME
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.aggregate_name = iprot.readString();
                struct.setAggregateNameIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 3: // FILTER_ID
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.filter_id = iprot.readString();
                struct.setFilterIdIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 4: // AGGREGATE_EXPR
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.aggregate_expr = iprot.readString();
                struct.setAggregateExprIsSet(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, add_aggregate_args struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        oprot.writeFieldBegin(MID_FIELD_DESC);
        oprot.writeI64(struct.mid);
        oprot.writeFieldEnd();
        if (struct.aggregate_name != null) {
          oprot.writeFieldBegin(AGGREGATE_NAME_FIELD_DESC);
          oprot.writeString(struct.aggregate_name);
          oprot.writeFieldEnd();
        }
        if (struct.filter_id != null) {
          oprot.writeFieldBegin(FILTER_ID_FIELD_DESC);
          oprot.writeString(struct.filter_id);
          oprot.writeFieldEnd();
        }
        if (struct.aggregate_expr != null) {
          oprot.writeFieldBegin(AGGREGATE_EXPR_FIELD_DESC);
          oprot.writeString(struct.aggregate_expr);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class add_aggregate_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public add_aggregate_argsTupleScheme getScheme() {
        return new add_aggregate_argsTupleScheme();
      }
    }

    private static class add_aggregate_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<add_aggregate_args> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, add_aggregate_args struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet optionals = new java.util.BitSet();
        if (struct.isSetMid()) {
          optionals.set(0);
        }
        if (struct.isSetAggregateName()) {
          optionals.set(1);
        }
        if (struct.isSetFilterId()) {
          optionals.set(2);
        }
        if (struct.isSetAggregateExpr()) {
          optionals.set(3);
        }
        oprot.writeBitSet(optionals, 4);
        if (struct.isSetMid()) {
          oprot.writeI64(struct.mid);
        }
        if (struct.isSetAggregateName()) {
          oprot.writeString(struct.aggregate_name);
        }
        if (struct.isSetFilterId()) {
          oprot.writeString(struct.filter_id);
        }
        if (struct.isSetAggregateExpr()) {
          oprot.writeString(struct.aggregate_expr);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, add_aggregate_args struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet incoming = iprot.readBitSet(4);
        if (incoming.get(0)) {
          struct.mid = iprot.readI64();
          struct.setMidIsSet(true);
        }
        if (incoming.get(1)) {
          struct.aggregate_name = iprot.readString();
          struct.setAggregateNameIsSet(true);
        }
        if (incoming.get(2)) {
          struct.filter_id = iprot.readString();
          struct.setFilterIdIsSet(true);
        }
        if (incoming.get(3)) {
          struct.aggregate_expr = iprot.readString();
          struct.setAggregateExprIsSet(true);
        }
      }
    }

    private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
      return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
    }
  }

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

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

    private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new add_aggregate_resultStandardSchemeFactory();
    private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new add_aggregate_resultTupleSchemeFactory();

    private @org.apache.thrift.annotation.Nullable rpc_management_exception ex; // 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 {
      EX((short)1, "ex");

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

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

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // EX
            return EX;
          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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByName(java.lang.String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final java.lang.String _fieldName;

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

      public short getThriftFieldId() {
        return _thriftId;
      }

      public java.lang.String getFieldName() {
        return _fieldName;
      }
    }

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

    public add_aggregate_result() {
    }

    public add_aggregate_result(
      rpc_management_exception ex)
    {
      this();
      this.ex = ex;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public add_aggregate_result(add_aggregate_result other) {
      if (other.isSetEx()) {
        this.ex = new rpc_management_exception(other.ex);
      }
    }

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

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

    @org.apache.thrift.annotation.Nullable
    public rpc_management_exception getEx() {
      return this.ex;
    }

    public add_aggregate_result setEx(@org.apache.thrift.annotation.Nullable rpc_management_exception ex) {
      this.ex = ex;
      return this;
    }

    public void unsetEx() {
      this.ex = null;
    }

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

    public void setExIsSet(boolean value) {
      if (!value) {
        this.ex = null;
      }
    }

    public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
      switch (field) {
      case EX:
        if (value == null) {
          unsetEx();
        } else {
          setEx((rpc_management_exception)value);
        }
        break;

      }
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.Object getFieldValue(_Fields field) {
      switch (field) {
      case EX:
        return getEx();

      }
      throw new java.lang.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 java.lang.IllegalArgumentException();
      }

      switch (field) {
      case EX:
        return isSetEx();
      }
      throw new java.lang.IllegalStateException();
    }

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

    public boolean equals(add_aggregate_result that) {
      if (that == null)
        return false;
      if (this == that)
        return true;

      boolean this_present_ex = true && this.isSetEx();
      boolean that_present_ex = true && that.isSetEx();
      if (this_present_ex || that_present_ex) {
        if (!(this_present_ex && that_present_ex))
          return false;
        if (!this.ex.equals(that.ex))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      int hashCode = 1;

      hashCode = hashCode * 8191 + ((isSetEx()) ? 131071 : 524287);
      if (isSetEx())
        hashCode = hashCode * 8191 + ex.hashCode();

      return hashCode;
    }

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

      int lastComparison = 0;

      lastComparison = java.lang.Boolean.valueOf(isSetEx()).compareTo(other.isSetEx());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetEx()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ex, other.ex);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    @org.apache.thrift.annotation.Nullable
    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

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

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

    @Override
    public java.lang.String toString() {
      java.lang.StringBuilder sb = new java.lang.StringBuilder("add_aggregate_result(");
      boolean first = true;

      sb.append("ex:");
      if (this.ex == null) {
        sb.append("null");
      } else {
        sb.append(this.ex);
      }
      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, java.lang.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 add_aggregate_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public add_aggregate_resultStandardScheme getScheme() {
        return new add_aggregate_resultStandardScheme();
      }
    }

    private static class add_aggregate_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<add_aggregate_result> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, add_aggregate_result struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TField schemeField;
        iprot.readStructBegin();
        while (true)
        {
          schemeField = iprot.readFieldBegin();
          if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { 
            break;
          }
          switch (schemeField.id) {
            case 1: // EX
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                if (struct.ex == null) {
                  struct.ex = new rpc_management_exception();
                }
                struct.ex.read(iprot);
                struct.setExIsSet(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, add_aggregate_result struct) throws org.apache.thrift.TException {
        struct.validate();

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

    }

    private static class add_aggregate_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public add_aggregate_resultTupleScheme getScheme() {
        return new add_aggregate_resultTupleScheme();
      }
    }

    private static class add_aggregate_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<add_aggregate_result> {

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

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, add_aggregate_result struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet incoming = iprot.readBitSet(1);
        if (incoming.get(0)) {
          if (struct.ex == null) {
            struct.ex = new rpc_management_exception();
          }
          struct.ex.read(iprot);
          struct.setExIsSet(true);
        }
      }
    }

    private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
      return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
    }
  }

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

    private static final org.apache.thrift.protocol.TField MID_FIELD_DESC = new org.apache.thrift.protocol.TField("mid", org.apache.thrift.protocol.TType.I64, (short)1);
    private static final org.apache.thrift.protocol.TField AGGREGATE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("aggregate_name", org.apache.thrift.protocol.TType.STRING, (short)2);

    private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new remove_aggregate_argsStandardSchemeFactory();
    private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new remove_aggregate_argsTupleSchemeFactory();

    private long mid; // required
    private @org.apache.thrift.annotation.Nullable java.lang.String aggregate_name; // 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 {
      MID((short)1, "mid"),
      AGGREGATE_NAME((short)2, "aggregate_name");

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

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

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // MID
            return MID;
          case 2: // AGGREGATE_NAME
            return AGGREGATE_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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByName(java.lang.String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final java.lang.String _fieldName;

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

      public short getThriftFieldId() {
        return _thriftId;
      }

      public java.lang.String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    private static final int __MID_ISSET_ID = 0;
    private byte __isset_bitfield = 0;
    public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.MID, new org.apache.thrift.meta_data.FieldMetaData("mid", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      tmpMap.put(_Fields.AGGREGATE_NAME, new org.apache.thrift.meta_data.FieldMetaData("aggregate_name", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
      metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(remove_aggregate_args.class, metaDataMap);
    }

    public remove_aggregate_args() {
    }

    public remove_aggregate_args(
      long mid,
      java.lang.String aggregate_name)
    {
      this();
      this.mid = mid;
      setMidIsSet(true);
      this.aggregate_name = aggregate_name;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public remove_aggregate_args(remove_aggregate_args other) {
      __isset_bitfield = other.__isset_bitfield;
      this.mid = other.mid;
      if (other.isSetAggregateName()) {
        this.aggregate_name = other.aggregate_name;
      }
    }

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

    @Override
    public void clear() {
      setMidIsSet(false);
      this.mid = 0;
      this.aggregate_name = null;
    }

    public long getMid() {
      return this.mid;
    }

    public remove_aggregate_args setMid(long mid) {
      this.mid = mid;
      setMidIsSet(true);
      return this;
    }

    public void unsetMid() {
      __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __MID_ISSET_ID);
    }

    /** Returns true if field mid is set (has been assigned a value) and false otherwise */
    public boolean isSetMid() {
      return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __MID_ISSET_ID);
    }

    public void setMidIsSet(boolean value) {
      __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __MID_ISSET_ID, value);
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.String getAggregateName() {
      return this.aggregate_name;
    }

    public remove_aggregate_args setAggregateName(@org.apache.thrift.annotation.Nullable java.lang.String aggregate_name) {
      this.aggregate_name = aggregate_name;
      return this;
    }

    public void unsetAggregateName() {
      this.aggregate_name = null;
    }

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

    public void setAggregateNameIsSet(boolean value) {
      if (!value) {
        this.aggregate_name = null;
      }
    }

    public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
      switch (field) {
      case MID:
        if (value == null) {
          unsetMid();
        } else {
          setMid((java.lang.Long)value);
        }
        break;

      case AGGREGATE_NAME:
        if (value == null) {
          unsetAggregateName();
        } else {
          setAggregateName((java.lang.String)value);
        }
        break;

      }
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.Object getFieldValue(_Fields field) {
      switch (field) {
      case MID:
        return getMid();

      case AGGREGATE_NAME:
        return getAggregateName();

      }
      throw new java.lang.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 java.lang.IllegalArgumentException();
      }

      switch (field) {
      case MID:
        return isSetMid();
      case AGGREGATE_NAME:
        return isSetAggregateName();
      }
      throw new java.lang.IllegalStateException();
    }

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

    public boolean equals(remove_aggregate_args that) {
      if (that == null)
        return false;
      if (this == that)
        return true;

      boolean this_present_mid = true;
      boolean that_present_mid = true;
      if (this_present_mid || that_present_mid) {
        if (!(this_present_mid && that_present_mid))
          return false;
        if (this.mid != that.mid)
          return false;
      }

      boolean this_present_aggregate_name = true && this.isSetAggregateName();
      boolean that_present_aggregate_name = true && that.isSetAggregateName();
      if (this_present_aggregate_name || that_present_aggregate_name) {
        if (!(this_present_aggregate_name && that_present_aggregate_name))
          return false;
        if (!this.aggregate_name.equals(that.aggregate_name))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      int hashCode = 1;

      hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(mid);

      hashCode = hashCode * 8191 + ((isSetAggregateName()) ? 131071 : 524287);
      if (isSetAggregateName())
        hashCode = hashCode * 8191 + aggregate_name.hashCode();

      return hashCode;
    }

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

      int lastComparison = 0;

      lastComparison = java.lang.Boolean.valueOf(isSetMid()).compareTo(other.isSetMid());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetMid()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.mid, other.mid);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = java.lang.Boolean.valueOf(isSetAggregateName()).compareTo(other.isSetAggregateName());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetAggregateName()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.aggregate_name, other.aggregate_name);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    @org.apache.thrift.annotation.Nullable
    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

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

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

    @Override
    public java.lang.String toString() {
      java.lang.StringBuilder sb = new java.lang.StringBuilder("remove_aggregate_args(");
      boolean first = true;

      sb.append("mid:");
      sb.append(this.mid);
      first = false;
      if (!first) sb.append(", ");
      sb.append("aggregate_name:");
      if (this.aggregate_name == null) {
        sb.append("null");
      } else {
        sb.append(this.aggregate_name);
      }
      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, java.lang.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 remove_aggregate_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public remove_aggregate_argsStandardScheme getScheme() {
        return new remove_aggregate_argsStandardScheme();
      }
    }

    private static class remove_aggregate_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<remove_aggregate_args> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, remove_aggregate_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: // MID
              if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
                struct.mid = iprot.readI64();
                struct.setMidIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // AGGREGATE_NAME
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.aggregate_name = iprot.readString();
                struct.setAggregateNameIsSet(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, remove_aggregate_args struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        oprot.writeFieldBegin(MID_FIELD_DESC);
        oprot.writeI64(struct.mid);
        oprot.writeFieldEnd();
        if (struct.aggregate_name != null) {
          oprot.writeFieldBegin(AGGREGATE_NAME_FIELD_DESC);
          oprot.writeString(struct.aggregate_name);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class remove_aggregate_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public remove_aggregate_argsTupleScheme getScheme() {
        return new remove_aggregate_argsTupleScheme();
      }
    }

    private static class remove_aggregate_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<remove_aggregate_args> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, remove_aggregate_args struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet optionals = new java.util.BitSet();
        if (struct.isSetMid()) {
          optionals.set(0);
        }
        if (struct.isSetAggregateName()) {
          optionals.set(1);
        }
        oprot.writeBitSet(optionals, 2);
        if (struct.isSetMid()) {
          oprot.writeI64(struct.mid);
        }
        if (struct.isSetAggregateName()) {
          oprot.writeString(struct.aggregate_name);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, remove_aggregate_args struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet incoming = iprot.readBitSet(2);
        if (incoming.get(0)) {
          struct.mid = iprot.readI64();
          struct.setMidIsSet(true);
        }
        if (incoming.get(1)) {
          struct.aggregate_name = iprot.readString();
          struct.setAggregateNameIsSet(true);
        }
      }
    }

    private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
      return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
    }
  }

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

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

    private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new remove_aggregate_resultStandardSchemeFactory();
    private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new remove_aggregate_resultTupleSchemeFactory();

    private @org.apache.thrift.annotation.Nullable rpc_management_exception ex; // 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 {
      EX((short)1, "ex");

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

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

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // EX
            return EX;
          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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByName(java.lang.String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final java.lang.String _fieldName;

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

      public short getThriftFieldId() {
        return _thriftId;
      }

      public java.lang.String getFieldName() {
        return _fieldName;
      }
    }

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

    public remove_aggregate_result() {
    }

    public remove_aggregate_result(
      rpc_management_exception ex)
    {
      this();
      this.ex = ex;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public remove_aggregate_result(remove_aggregate_result other) {
      if (other.isSetEx()) {
        this.ex = new rpc_management_exception(other.ex);
      }
    }

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

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

    @org.apache.thrift.annotation.Nullable
    public rpc_management_exception getEx() {
      return this.ex;
    }

    public remove_aggregate_result setEx(@org.apache.thrift.annotation.Nullable rpc_management_exception ex) {
      this.ex = ex;
      return this;
    }

    public void unsetEx() {
      this.ex = null;
    }

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

    public void setExIsSet(boolean value) {
      if (!value) {
        this.ex = null;
      }
    }

    public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
      switch (field) {
      case EX:
        if (value == null) {
          unsetEx();
        } else {
          setEx((rpc_management_exception)value);
        }
        break;

      }
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.Object getFieldValue(_Fields field) {
      switch (field) {
      case EX:
        return getEx();

      }
      throw new java.lang.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 java.lang.IllegalArgumentException();
      }

      switch (field) {
      case EX:
        return isSetEx();
      }
      throw new java.lang.IllegalStateException();
    }

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

    public boolean equals(remove_aggregate_result that) {
      if (that == null)
        return false;
      if (this == that)
        return true;

      boolean this_present_ex = true && this.isSetEx();
      boolean that_present_ex = true && that.isSetEx();
      if (this_present_ex || that_present_ex) {
        if (!(this_present_ex && that_present_ex))
          return false;
        if (!this.ex.equals(that.ex))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      int hashCode = 1;

      hashCode = hashCode * 8191 + ((isSetEx()) ? 131071 : 524287);
      if (isSetEx())
        hashCode = hashCode * 8191 + ex.hashCode();

      return hashCode;
    }

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

      int lastComparison = 0;

      lastComparison = java.lang.Boolean.valueOf(isSetEx()).compareTo(other.isSetEx());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetEx()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ex, other.ex);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    @org.apache.thrift.annotation.Nullable
    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

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

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

    @Override
    public java.lang.String toString() {
      java.lang.StringBuilder sb = new java.lang.StringBuilder("remove_aggregate_result(");
      boolean first = true;

      sb.append("ex:");
      if (this.ex == null) {
        sb.append("null");
      } else {
        sb.append(this.ex);
      }
      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, java.lang.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 remove_aggregate_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public remove_aggregate_resultStandardScheme getScheme() {
        return new remove_aggregate_resultStandardScheme();
      }
    }

    private static class remove_aggregate_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<remove_aggregate_result> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, remove_aggregate_result struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TField schemeField;
        iprot.readStructBegin();
        while (true)
        {
          schemeField = iprot.readFieldBegin();
          if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { 
            break;
          }
          switch (schemeField.id) {
            case 1: // EX
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                if (struct.ex == null) {
                  struct.ex = new rpc_management_exception();
                }
                struct.ex.read(iprot);
                struct.setExIsSet(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, remove_aggregate_result struct) throws org.apache.thrift.TException {
        struct.validate();

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

    }

    private static class remove_aggregate_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public remove_aggregate_resultTupleScheme getScheme() {
        return new remove_aggregate_resultTupleScheme();
      }
    }

    private static class remove_aggregate_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<remove_aggregate_result> {

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

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, remove_aggregate_result struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet incoming = iprot.readBitSet(1);
        if (incoming.get(0)) {
          if (struct.ex == null) {
            struct.ex = new rpc_management_exception();
          }
          struct.ex.read(iprot);
          struct.setExIsSet(true);
        }
      }
    }

    private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
      return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
    }
  }

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

    private static final org.apache.thrift.protocol.TField MID_FIELD_DESC = new org.apache.thrift.protocol.TField("mid", org.apache.thrift.protocol.TType.I64, (short)1);
    private static final org.apache.thrift.protocol.TField TRIGGER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("trigger_id", org.apache.thrift.protocol.TType.STRING, (short)2);
    private static final org.apache.thrift.protocol.TField TRIGGER_EXPR_FIELD_DESC = new org.apache.thrift.protocol.TField("trigger_expr", org.apache.thrift.protocol.TType.STRING, (short)3);

    private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new add_trigger_argsStandardSchemeFactory();
    private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new add_trigger_argsTupleSchemeFactory();

    private long mid; // required
    private @org.apache.thrift.annotation.Nullable java.lang.String trigger_id; // required
    private @org.apache.thrift.annotation.Nullable java.lang.String trigger_expr; // 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 {
      MID((short)1, "mid"),
      TRIGGER_ID((short)2, "trigger_id"),
      TRIGGER_EXPR((short)3, "trigger_expr");

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

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

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // MID
            return MID;
          case 2: // TRIGGER_ID
            return TRIGGER_ID;
          case 3: // TRIGGER_EXPR
            return TRIGGER_EXPR;
          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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByName(java.lang.String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final java.lang.String _fieldName;

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

      public short getThriftFieldId() {
        return _thriftId;
      }

      public java.lang.String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    private static final int __MID_ISSET_ID = 0;
    private byte __isset_bitfield = 0;
    public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.MID, new org.apache.thrift.meta_data.FieldMetaData("mid", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      tmpMap.put(_Fields.TRIGGER_ID, new org.apache.thrift.meta_data.FieldMetaData("trigger_id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
      tmpMap.put(_Fields.TRIGGER_EXPR, new org.apache.thrift.meta_data.FieldMetaData("trigger_expr", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
      metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(add_trigger_args.class, metaDataMap);
    }

    public add_trigger_args() {
    }

    public add_trigger_args(
      long mid,
      java.lang.String trigger_id,
      java.lang.String trigger_expr)
    {
      this();
      this.mid = mid;
      setMidIsSet(true);
      this.trigger_id = trigger_id;
      this.trigger_expr = trigger_expr;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public add_trigger_args(add_trigger_args other) {
      __isset_bitfield = other.__isset_bitfield;
      this.mid = other.mid;
      if (other.isSetTriggerId()) {
        this.trigger_id = other.trigger_id;
      }
      if (other.isSetTriggerExpr()) {
        this.trigger_expr = other.trigger_expr;
      }
    }

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

    @Override
    public void clear() {
      setMidIsSet(false);
      this.mid = 0;
      this.trigger_id = null;
      this.trigger_expr = null;
    }

    public long getMid() {
      return this.mid;
    }

    public add_trigger_args setMid(long mid) {
      this.mid = mid;
      setMidIsSet(true);
      return this;
    }

    public void unsetMid() {
      __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __MID_ISSET_ID);
    }

    /** Returns true if field mid is set (has been assigned a value) and false otherwise */
    public boolean isSetMid() {
      return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __MID_ISSET_ID);
    }

    public void setMidIsSet(boolean value) {
      __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __MID_ISSET_ID, value);
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.String getTriggerId() {
      return this.trigger_id;
    }

    public add_trigger_args setTriggerId(@org.apache.thrift.annotation.Nullable java.lang.String trigger_id) {
      this.trigger_id = trigger_id;
      return this;
    }

    public void unsetTriggerId() {
      this.trigger_id = null;
    }

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

    public void setTriggerIdIsSet(boolean value) {
      if (!value) {
        this.trigger_id = null;
      }
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.String getTriggerExpr() {
      return this.trigger_expr;
    }

    public add_trigger_args setTriggerExpr(@org.apache.thrift.annotation.Nullable java.lang.String trigger_expr) {
      this.trigger_expr = trigger_expr;
      return this;
    }

    public void unsetTriggerExpr() {
      this.trigger_expr = null;
    }

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

    public void setTriggerExprIsSet(boolean value) {
      if (!value) {
        this.trigger_expr = null;
      }
    }

    public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
      switch (field) {
      case MID:
        if (value == null) {
          unsetMid();
        } else {
          setMid((java.lang.Long)value);
        }
        break;

      case TRIGGER_ID:
        if (value == null) {
          unsetTriggerId();
        } else {
          setTriggerId((java.lang.String)value);
        }
        break;

      case TRIGGER_EXPR:
        if (value == null) {
          unsetTriggerExpr();
        } else {
          setTriggerExpr((java.lang.String)value);
        }
        break;

      }
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.Object getFieldValue(_Fields field) {
      switch (field) {
      case MID:
        return getMid();

      case TRIGGER_ID:
        return getTriggerId();

      case TRIGGER_EXPR:
        return getTriggerExpr();

      }
      throw new java.lang.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 java.lang.IllegalArgumentException();
      }

      switch (field) {
      case MID:
        return isSetMid();
      case TRIGGER_ID:
        return isSetTriggerId();
      case TRIGGER_EXPR:
        return isSetTriggerExpr();
      }
      throw new java.lang.IllegalStateException();
    }

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

    public boolean equals(add_trigger_args that) {
      if (that == null)
        return false;
      if (this == that)
        return true;

      boolean this_present_mid = true;
      boolean that_present_mid = true;
      if (this_present_mid || that_present_mid) {
        if (!(this_present_mid && that_present_mid))
          return false;
        if (this.mid != that.mid)
          return false;
      }

      boolean this_present_trigger_id = true && this.isSetTriggerId();
      boolean that_present_trigger_id = true && that.isSetTriggerId();
      if (this_present_trigger_id || that_present_trigger_id) {
        if (!(this_present_trigger_id && that_present_trigger_id))
          return false;
        if (!this.trigger_id.equals(that.trigger_id))
          return false;
      }

      boolean this_present_trigger_expr = true && this.isSetTriggerExpr();
      boolean that_present_trigger_expr = true && that.isSetTriggerExpr();
      if (this_present_trigger_expr || that_present_trigger_expr) {
        if (!(this_present_trigger_expr && that_present_trigger_expr))
          return false;
        if (!this.trigger_expr.equals(that.trigger_expr))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      int hashCode = 1;

      hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(mid);

      hashCode = hashCode * 8191 + ((isSetTriggerId()) ? 131071 : 524287);
      if (isSetTriggerId())
        hashCode = hashCode * 8191 + trigger_id.hashCode();

      hashCode = hashCode * 8191 + ((isSetTriggerExpr()) ? 131071 : 524287);
      if (isSetTriggerExpr())
        hashCode = hashCode * 8191 + trigger_expr.hashCode();

      return hashCode;
    }

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

      int lastComparison = 0;

      lastComparison = java.lang.Boolean.valueOf(isSetMid()).compareTo(other.isSetMid());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetMid()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.mid, other.mid);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = java.lang.Boolean.valueOf(isSetTriggerId()).compareTo(other.isSetTriggerId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetTriggerId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.trigger_id, other.trigger_id);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = java.lang.Boolean.valueOf(isSetTriggerExpr()).compareTo(other.isSetTriggerExpr());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetTriggerExpr()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.trigger_expr, other.trigger_expr);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    @org.apache.thrift.annotation.Nullable
    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

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

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

    @Override
    public java.lang.String toString() {
      java.lang.StringBuilder sb = new java.lang.StringBuilder("add_trigger_args(");
      boolean first = true;

      sb.append("mid:");
      sb.append(this.mid);
      first = false;
      if (!first) sb.append(", ");
      sb.append("trigger_id:");
      if (this.trigger_id == null) {
        sb.append("null");
      } else {
        sb.append(this.trigger_id);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("trigger_expr:");
      if (this.trigger_expr == null) {
        sb.append("null");
      } else {
        sb.append(this.trigger_expr);
      }
      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, java.lang.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 add_trigger_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public add_trigger_argsStandardScheme getScheme() {
        return new add_trigger_argsStandardScheme();
      }
    }

    private static class add_trigger_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<add_trigger_args> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, add_trigger_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: // MID
              if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
                struct.mid = iprot.readI64();
                struct.setMidIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // TRIGGER_ID
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.trigger_id = iprot.readString();
                struct.setTriggerIdIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 3: // TRIGGER_EXPR
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.trigger_expr = iprot.readString();
                struct.setTriggerExprIsSet(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, add_trigger_args struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        oprot.writeFieldBegin(MID_FIELD_DESC);
        oprot.writeI64(struct.mid);
        oprot.writeFieldEnd();
        if (struct.trigger_id != null) {
          oprot.writeFieldBegin(TRIGGER_ID_FIELD_DESC);
          oprot.writeString(struct.trigger_id);
          oprot.writeFieldEnd();
        }
        if (struct.trigger_expr != null) {
          oprot.writeFieldBegin(TRIGGER_EXPR_FIELD_DESC);
          oprot.writeString(struct.trigger_expr);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class add_trigger_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public add_trigger_argsTupleScheme getScheme() {
        return new add_trigger_argsTupleScheme();
      }
    }

    private static class add_trigger_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<add_trigger_args> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, add_trigger_args struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet optionals = new java.util.BitSet();
        if (struct.isSetMid()) {
          optionals.set(0);
        }
        if (struct.isSetTriggerId()) {
          optionals.set(1);
        }
        if (struct.isSetTriggerExpr()) {
          optionals.set(2);
        }
        oprot.writeBitSet(optionals, 3);
        if (struct.isSetMid()) {
          oprot.writeI64(struct.mid);
        }
        if (struct.isSetTriggerId()) {
          oprot.writeString(struct.trigger_id);
        }
        if (struct.isSetTriggerExpr()) {
          oprot.writeString(struct.trigger_expr);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, add_trigger_args struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet incoming = iprot.readBitSet(3);
        if (incoming.get(0)) {
          struct.mid = iprot.readI64();
          struct.setMidIsSet(true);
        }
        if (incoming.get(1)) {
          struct.trigger_id = iprot.readString();
          struct.setTriggerIdIsSet(true);
        }
        if (incoming.get(2)) {
          struct.trigger_expr = iprot.readString();
          struct.setTriggerExprIsSet(true);
        }
      }
    }

    private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
      return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
    }
  }

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

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

    private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new add_trigger_resultStandardSchemeFactory();
    private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new add_trigger_resultTupleSchemeFactory();

    private @org.apache.thrift.annotation.Nullable rpc_management_exception ex; // 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 {
      EX((short)1, "ex");

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

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

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // EX
            return EX;
          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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByName(java.lang.String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final java.lang.String _fieldName;

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

      public short getThriftFieldId() {
        return _thriftId;
      }

      public java.lang.String getFieldName() {
        return _fieldName;
      }
    }

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

    public add_trigger_result() {
    }

    public add_trigger_result(
      rpc_management_exception ex)
    {
      this();
      this.ex = ex;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public add_trigger_result(add_trigger_result other) {
      if (other.isSetEx()) {
        this.ex = new rpc_management_exception(other.ex);
      }
    }

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

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

    @org.apache.thrift.annotation.Nullable
    public rpc_management_exception getEx() {
      return this.ex;
    }

    public add_trigger_result setEx(@org.apache.thrift.annotation.Nullable rpc_management_exception ex) {
      this.ex = ex;
      return this;
    }

    public void unsetEx() {
      this.ex = null;
    }

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

    public void setExIsSet(boolean value) {
      if (!value) {
        this.ex = null;
      }
    }

    public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
      switch (field) {
      case EX:
        if (value == null) {
          unsetEx();
        } else {
          setEx((rpc_management_exception)value);
        }
        break;

      }
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.Object getFieldValue(_Fields field) {
      switch (field) {
      case EX:
        return getEx();

      }
      throw new java.lang.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 java.lang.IllegalArgumentException();
      }

      switch (field) {
      case EX:
        return isSetEx();
      }
      throw new java.lang.IllegalStateException();
    }

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

    public boolean equals(add_trigger_result that) {
      if (that == null)
        return false;
      if (this == that)
        return true;

      boolean this_present_ex = true && this.isSetEx();
      boolean that_present_ex = true && that.isSetEx();
      if (this_present_ex || that_present_ex) {
        if (!(this_present_ex && that_present_ex))
          return false;
        if (!this.ex.equals(that.ex))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      int hashCode = 1;

      hashCode = hashCode * 8191 + ((isSetEx()) ? 131071 : 524287);
      if (isSetEx())
        hashCode = hashCode * 8191 + ex.hashCode();

      return hashCode;
    }

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

      int lastComparison = 0;

      lastComparison = java.lang.Boolean.valueOf(isSetEx()).compareTo(other.isSetEx());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetEx()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ex, other.ex);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    @org.apache.thrift.annotation.Nullable
    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

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

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

    @Override
    public java.lang.String toString() {
      java.lang.StringBuilder sb = new java.lang.StringBuilder("add_trigger_result(");
      boolean first = true;

      sb.append("ex:");
      if (this.ex == null) {
        sb.append("null");
      } else {
        sb.append(this.ex);
      }
      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, java.lang.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 add_trigger_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public add_trigger_resultStandardScheme getScheme() {
        return new add_trigger_resultStandardScheme();
      }
    }

    private static class add_trigger_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<add_trigger_result> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, add_trigger_result struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TField schemeField;
        iprot.readStructBegin();
        while (true)
        {
          schemeField = iprot.readFieldBegin();
          if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { 
            break;
          }
          switch (schemeField.id) {
            case 1: // EX
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                if (struct.ex == null) {
                  struct.ex = new rpc_management_exception();
                }
                struct.ex.read(iprot);
                struct.setExIsSet(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, add_trigger_result struct) throws org.apache.thrift.TException {
        struct.validate();

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

    }

    private static class add_trigger_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public add_trigger_resultTupleScheme getScheme() {
        return new add_trigger_resultTupleScheme();
      }
    }

    private static class add_trigger_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<add_trigger_result> {

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

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, add_trigger_result struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet incoming = iprot.readBitSet(1);
        if (incoming.get(0)) {
          if (struct.ex == null) {
            struct.ex = new rpc_management_exception();
          }
          struct.ex.read(iprot);
          struct.setExIsSet(true);
        }
      }
    }

    private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
      return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
    }
  }

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

    private static final org.apache.thrift.protocol.TField MID_FIELD_DESC = new org.apache.thrift.protocol.TField("mid", org.apache.thrift.protocol.TType.I64, (short)1);
    private static final org.apache.thrift.protocol.TField TRIGGER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("trigger_id", org.apache.thrift.protocol.TType.STRING, (short)2);

    private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new remove_trigger_argsStandardSchemeFactory();
    private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new remove_trigger_argsTupleSchemeFactory();

    private long mid; // required
    private @org.apache.thrift.annotation.Nullable java.lang.String trigger_id; // required

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

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

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

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // MID
            return MID;
          case 2: // TRIGGER_ID
            return TRIGGER_ID;
          default:
            return null;
        }
      }

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

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByName(java.lang.String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final java.lang.String _fieldName;

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

      public short getThriftFieldId() {
        return _thriftId;
      }

      public java.lang.String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    private static final int __MID_ISSET_ID = 0;
    private byte __isset_bitfield = 0;
    public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.MID, new org.apache.thrift.meta_data.FieldMetaData("mid", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      tmpMap.put(_Fields.TRIGGER_ID, new org.apache.thrift.meta_data.FieldMetaData("trigger_id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
      metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(remove_trigger_args.class, metaDataMap);
    }

    public remove_trigger_args() {
    }

    public remove_trigger_args(
      long mid,
      java.lang.String trigger_id)
    {
      this();
      this.mid = mid;
      setMidIsSet(true);
      this.trigger_id = trigger_id;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public remove_trigger_args(remove_trigger_args other) {
      __isset_bitfield = other.__isset_bitfield;
      this.mid = other.mid;
      if (other.isSetTriggerId()) {
        this.trigger_id = other.trigger_id;
      }
    }

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

    @Override
    public void clear() {
      setMidIsSet(false);
      this.mid = 0;
      this.trigger_id = null;
    }

    public long getMid() {
      return this.mid;
    }

    public remove_trigger_args setMid(long mid) {
      this.mid = mid;
      setMidIsSet(true);
      return this;
    }

    public void unsetMid() {
      __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __MID_ISSET_ID);
    }

    /** Returns true if field mid is set (has been assigned a value) and false otherwise */
    public boolean isSetMid() {
      return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __MID_ISSET_ID);
    }

    public void setMidIsSet(boolean value) {
      __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __MID_ISSET_ID, value);
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.String getTriggerId() {
      return this.trigger_id;
    }

    public remove_trigger_args setTriggerId(@org.apache.thrift.annotation.Nullable java.lang.String trigger_id) {
      this.trigger_id = trigger_id;
      return this;
    }

    public void unsetTriggerId() {
      this.trigger_id = null;
    }

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

    public void setTriggerIdIsSet(boolean value) {
      if (!value) {
        this.trigger_id = null;
      }
    }

    public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
      switch (field) {
      case MID:
        if (value == null) {
          unsetMid();
        } else {
          setMid((java.lang.Long)value);
        }
        break;

      case TRIGGER_ID:
        if (value == null) {
          unsetTriggerId();
        } else {
          setTriggerId((java.lang.String)value);
        }
        break;

      }
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.Object getFieldValue(_Fields field) {
      switch (field) {
      case MID:
        return getMid();

      case TRIGGER_ID:
        return getTriggerId();

      }
      throw new java.lang.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 java.lang.IllegalArgumentException();
      }

      switch (field) {
      case MID:
        return isSetMid();
      case TRIGGER_ID:
        return isSetTriggerId();
      }
      throw new java.lang.IllegalStateException();
    }

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

    public boolean equals(remove_trigger_args that) {
      if (that == null)
        return false;
      if (this == that)
        return true;

      boolean this_present_mid = true;
      boolean that_present_mid = true;
      if (this_present_mid || that_present_mid) {
        if (!(this_present_mid && that_present_mid))
          return false;
        if (this.mid != that.mid)
          return false;
      }

      boolean this_present_trigger_id = true && this.isSetTriggerId();
      boolean that_present_trigger_id = true && that.isSetTriggerId();
      if (this_present_trigger_id || that_present_trigger_id) {
        if (!(this_present_trigger_id && that_present_trigger_id))
          return false;
        if (!this.trigger_id.equals(that.trigger_id))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      int hashCode = 1;

      hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(mid);

      hashCode = hashCode * 8191 + ((isSetTriggerId()) ? 131071 : 524287);
      if (isSetTriggerId())
        hashCode = hashCode * 8191 + trigger_id.hashCode();

      return hashCode;
    }

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

      int lastComparison = 0;

      lastComparison = java.lang.Boolean.valueOf(isSetMid()).compareTo(other.isSetMid());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetMid()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.mid, other.mid);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = java.lang.Boolean.valueOf(isSetTriggerId()).compareTo(other.isSetTriggerId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetTriggerId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.trigger_id, other.trigger_id);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    @org.apache.thrift.annotation.Nullable
    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

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

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

    @Override
    public java.lang.String toString() {
      java.lang.StringBuilder sb = new java.lang.StringBuilder("remove_trigger_args(");
      boolean first = true;

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

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

    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, java.lang.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 remove_trigger_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public remove_trigger_argsStandardScheme getScheme() {
        return new remove_trigger_argsStandardScheme();
      }
    }

    private static class remove_trigger_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<remove_trigger_args> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, remove_trigger_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: // MID
              if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
                struct.mid = iprot.readI64();
                struct.setMidIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // TRIGGER_ID
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.trigger_id = iprot.readString();
                struct.setTriggerIdIsSet(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, remove_trigger_args struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        oprot.writeFieldBegin(MID_FIELD_DESC);
        oprot.writeI64(struct.mid);
        oprot.writeFieldEnd();
        if (struct.trigger_id != null) {
          oprot.writeFieldBegin(TRIGGER_ID_FIELD_DESC);
          oprot.writeString(struct.trigger_id);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class remove_trigger_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public remove_trigger_argsTupleScheme getScheme() {
        return new remove_trigger_argsTupleScheme();
      }
    }

    private static class remove_trigger_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<remove_trigger_args> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, remove_trigger_args struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet optionals = new java.util.BitSet();
        if (struct.isSetMid()) {
          optionals.set(0);
        }
        if (struct.isSetTriggerId()) {
          optionals.set(1);
        }
        oprot.writeBitSet(optionals, 2);
        if (struct.isSetMid()) {
          oprot.writeI64(struct.mid);
        }
        if (struct.isSetTriggerId()) {
          oprot.writeString(struct.trigger_id);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, remove_trigger_args struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet incoming = iprot.readBitSet(2);
        if (incoming.get(0)) {
          struct.mid = iprot.readI64();
          struct.setMidIsSet(true);
        }
        if (incoming.get(1)) {
          struct.trigger_id = iprot.readString();
          struct.setTriggerIdIsSet(true);
        }
      }
    }

    private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
      return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
    }
  }

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

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

    private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new remove_trigger_resultStandardSchemeFactory();
    private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new remove_trigger_resultTupleSchemeFactory();

    private @org.apache.thrift.annotation.Nullable rpc_management_exception ex; // 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 {
      EX((short)1, "ex");

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

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

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // EX
            return EX;
          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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByName(java.lang.String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final java.lang.String _fieldName;

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

      public short getThriftFieldId() {
        return _thriftId;
      }

      public java.lang.String getFieldName() {
        return _fieldName;
      }
    }

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

    public remove_trigger_result() {
    }

    public remove_trigger_result(
      rpc_management_exception ex)
    {
      this();
      this.ex = ex;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public remove_trigger_result(remove_trigger_result other) {
      if (other.isSetEx()) {
        this.ex = new rpc_management_exception(other.ex);
      }
    }

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

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

    @org.apache.thrift.annotation.Nullable
    public rpc_management_exception getEx() {
      return this.ex;
    }

    public remove_trigger_result setEx(@org.apache.thrift.annotation.Nullable rpc_management_exception ex) {
      this.ex = ex;
      return this;
    }

    public void unsetEx() {
      this.ex = null;
    }

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

    public void setExIsSet(boolean value) {
      if (!value) {
        this.ex = null;
      }
    }

    public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
      switch (field) {
      case EX:
        if (value == null) {
          unsetEx();
        } else {
          setEx((rpc_management_exception)value);
        }
        break;

      }
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.Object getFieldValue(_Fields field) {
      switch (field) {
      case EX:
        return getEx();

      }
      throw new java.lang.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 java.lang.IllegalArgumentException();
      }

      switch (field) {
      case EX:
        return isSetEx();
      }
      throw new java.lang.IllegalStateException();
    }

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

    public boolean equals(remove_trigger_result that) {
      if (that == null)
        return false;
      if (this == that)
        return true;

      boolean this_present_ex = true && this.isSetEx();
      boolean that_present_ex = true && that.isSetEx();
      if (this_present_ex || that_present_ex) {
        if (!(this_present_ex && that_present_ex))
          return false;
        if (!this.ex.equals(that.ex))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      int hashCode = 1;

      hashCode = hashCode * 8191 + ((isSetEx()) ? 131071 : 524287);
      if (isSetEx())
        hashCode = hashCode * 8191 + ex.hashCode();

      return hashCode;
    }

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

      int lastComparison = 0;

      lastComparison = java.lang.Boolean.valueOf(isSetEx()).compareTo(other.isSetEx());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetEx()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ex, other.ex);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    @org.apache.thrift.annotation.Nullable
    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

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

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

    @Override
    public java.lang.String toString() {
      java.lang.StringBuilder sb = new java.lang.StringBuilder("remove_trigger_result(");
      boolean first = true;

      sb.append("ex:");
      if (this.ex == null) {
        sb.append("null");
      } else {
        sb.append(this.ex);
      }
      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, java.lang.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 remove_trigger_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public remove_trigger_resultStandardScheme getScheme() {
        return new remove_trigger_resultStandardScheme();
      }
    }

    private static class remove_trigger_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<remove_trigger_result> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, remove_trigger_result struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TField schemeField;
        iprot.readStructBegin();
        while (true)
        {
          schemeField = iprot.readFieldBegin();
          if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { 
            break;
          }
          switch (schemeField.id) {
            case 1: // EX
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                if (struct.ex == null) {
                  struct.ex = new rpc_management_exception();
                }
                struct.ex.read(iprot);
                struct.setExIsSet(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, remove_trigger_result struct) throws org.apache.thrift.TException {
        struct.validate();

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

    }

    private static class remove_trigger_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public remove_trigger_resultTupleScheme getScheme() {
        return new remove_trigger_resultTupleScheme();
      }
    }

    private static class remove_trigger_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<remove_trigger_result> {

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

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, remove_trigger_result struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet incoming = iprot.readBitSet(1);
        if (incoming.get(0)) {
          if (struct.ex == null) {
            struct.ex = new rpc_management_exception();
          }
          struct.ex.read(iprot);
          struct.setExIsSet(true);
        }
      }
    }

    private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
      return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
    }
  }

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

    private static final org.apache.thrift.protocol.TField MID_FIELD_DESC = new org.apache.thrift.protocol.TField("mid", org.apache.thrift.protocol.TType.I64, (short)1);
    private static final org.apache.thrift.protocol.TField OFFSET_FIELD_DESC = new org.apache.thrift.protocol.TField("offset", org.apache.thrift.protocol.TType.I64, (short)2);

    private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new archive_argsStandardSchemeFactory();
    private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new archive_argsTupleSchemeFactory();

    private long mid; // required
    private long offset; // 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 {
      MID((short)1, "mid"),
      OFFSET((short)2, "offset");

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

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

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // MID
            return MID;
          case 2: // OFFSET
            return OFFSET;
          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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByName(java.lang.String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final java.lang.String _fieldName;

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

      public short getThriftFieldId() {
        return _thriftId;
      }

      public java.lang.String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    private static final int __MID_ISSET_ID = 0;
    private static final int __OFFSET_ISSET_ID = 1;
    private byte __isset_bitfield = 0;
    public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.MID, new org.apache.thrift.meta_data.FieldMetaData("mid", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      tmpMap.put(_Fields.OFFSET, new org.apache.thrift.meta_data.FieldMetaData("offset", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(archive_args.class, metaDataMap);
    }

    public archive_args() {
    }

    public archive_args(
      long mid,
      long offset)
    {
      this();
      this.mid = mid;
      setMidIsSet(true);
      this.offset = offset;
      setOffsetIsSet(true);
    }

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

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

    @Override
    public void clear() {
      setMidIsSet(false);
      this.mid = 0;
      setOffsetIsSet(false);
      this.offset = 0;
    }

    public long getMid() {
      return this.mid;
    }

    public archive_args setMid(long mid) {
      this.mid = mid;
      setMidIsSet(true);
      return this;
    }

    public void unsetMid() {
      __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __MID_ISSET_ID);
    }

    /** Returns true if field mid is set (has been assigned a value) and false otherwise */
    public boolean isSetMid() {
      return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __MID_ISSET_ID);
    }

    public void setMidIsSet(boolean value) {
      __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __MID_ISSET_ID, value);
    }

    public long getOffset() {
      return this.offset;
    }

    public archive_args setOffset(long offset) {
      this.offset = offset;
      setOffsetIsSet(true);
      return this;
    }

    public void unsetOffset() {
      __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __OFFSET_ISSET_ID);
    }

    /** Returns true if field offset is set (has been assigned a value) and false otherwise */
    public boolean isSetOffset() {
      return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __OFFSET_ISSET_ID);
    }

    public void setOffsetIsSet(boolean value) {
      __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __OFFSET_ISSET_ID, value);
    }

    public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
      switch (field) {
      case MID:
        if (value == null) {
          unsetMid();
        } else {
          setMid((java.lang.Long)value);
        }
        break;

      case OFFSET:
        if (value == null) {
          unsetOffset();
        } else {
          setOffset((java.lang.Long)value);
        }
        break;

      }
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.Object getFieldValue(_Fields field) {
      switch (field) {
      case MID:
        return getMid();

      case OFFSET:
        return getOffset();

      }
      throw new java.lang.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 java.lang.IllegalArgumentException();
      }

      switch (field) {
      case MID:
        return isSetMid();
      case OFFSET:
        return isSetOffset();
      }
      throw new java.lang.IllegalStateException();
    }

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

    public boolean equals(archive_args that) {
      if (that == null)
        return false;
      if (this == that)
        return true;

      boolean this_present_mid = true;
      boolean that_present_mid = true;
      if (this_present_mid || that_present_mid) {
        if (!(this_present_mid && that_present_mid))
          return false;
        if (this.mid != that.mid)
          return false;
      }

      boolean this_present_offset = true;
      boolean that_present_offset = true;
      if (this_present_offset || that_present_offset) {
        if (!(this_present_offset && that_present_offset))
          return false;
        if (this.offset != that.offset)
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      int hashCode = 1;

      hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(mid);

      hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(offset);

      return hashCode;
    }

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

      int lastComparison = 0;

      lastComparison = java.lang.Boolean.valueOf(isSetMid()).compareTo(other.isSetMid());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetMid()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.mid, other.mid);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = java.lang.Boolean.valueOf(isSetOffset()).compareTo(other.isSetOffset());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetOffset()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.offset, other.offset);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    @org.apache.thrift.annotation.Nullable
    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

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

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

    @Override
    public java.lang.String toString() {
      java.lang.StringBuilder sb = new java.lang.StringBuilder("archive_args(");
      boolean first = true;

      sb.append("mid:");
      sb.append(this.mid);
      first = false;
      if (!first) sb.append(", ");
      sb.append("offset:");
      sb.append(this.offset);
      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, java.lang.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 archive_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public archive_argsStandardScheme getScheme() {
        return new archive_argsStandardScheme();
      }
    }

    private static class archive_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<archive_args> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, archive_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: // MID
              if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
                struct.mid = iprot.readI64();
                struct.setMidIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // OFFSET
              if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
                struct.offset = iprot.readI64();
                struct.setOffsetIsSet(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, archive_args struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        oprot.writeFieldBegin(MID_FIELD_DESC);
        oprot.writeI64(struct.mid);
        oprot.writeFieldEnd();
        oprot.writeFieldBegin(OFFSET_FIELD_DESC);
        oprot.writeI64(struct.offset);
        oprot.writeFieldEnd();
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class archive_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public archive_argsTupleScheme getScheme() {
        return new archive_argsTupleScheme();
      }
    }

    private static class archive_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<archive_args> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, archive_args struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet optionals = new java.util.BitSet();
        if (struct.isSetMid()) {
          optionals.set(0);
        }
        if (struct.isSetOffset()) {
          optionals.set(1);
        }
        oprot.writeBitSet(optionals, 2);
        if (struct.isSetMid()) {
          oprot.writeI64(struct.mid);
        }
        if (struct.isSetOffset()) {
          oprot.writeI64(struct.offset);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, archive_args struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet incoming = iprot.readBitSet(2);
        if (incoming.get(0)) {
          struct.mid = iprot.readI64();
          struct.setMidIsSet(true);
        }
        if (incoming.get(1)) {
          struct.offset = iprot.readI64();
          struct.setOffsetIsSet(true);
        }
      }
    }

    private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
      return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
    }
  }

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

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

    private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new archive_resultStandardSchemeFactory();
    private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new archive_resultTupleSchemeFactory();

    private @org.apache.thrift.annotation.Nullable rpc_management_exception ex; // 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 {
      EX((short)1, "ex");

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

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

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // EX
            return EX;
          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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByName(java.lang.String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final java.lang.String _fieldName;

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

      public short getThriftFieldId() {
        return _thriftId;
      }

      public java.lang.String getFieldName() {
        return _fieldName;
      }
    }

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

    public archive_result() {
    }

    public archive_result(
      rpc_management_exception ex)
    {
      this();
      this.ex = ex;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public archive_result(archive_result other) {
      if (other.isSetEx()) {
        this.ex = new rpc_management_exception(other.ex);
      }
    }

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

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

    @org.apache.thrift.annotation.Nullable
    public rpc_management_exception getEx() {
      return this.ex;
    }

    public archive_result setEx(@org.apache.thrift.annotation.Nullable rpc_management_exception ex) {
      this.ex = ex;
      return this;
    }

    public void unsetEx() {
      this.ex = null;
    }

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

    public void setExIsSet(boolean value) {
      if (!value) {
        this.ex = null;
      }
    }

    public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
      switch (field) {
      case EX:
        if (value == null) {
          unsetEx();
        } else {
          setEx((rpc_management_exception)value);
        }
        break;

      }
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.Object getFieldValue(_Fields field) {
      switch (field) {
      case EX:
        return getEx();

      }
      throw new java.lang.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 java.lang.IllegalArgumentException();
      }

      switch (field) {
      case EX:
        return isSetEx();
      }
      throw new java.lang.IllegalStateException();
    }

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

    public boolean equals(archive_result that) {
      if (that == null)
        return false;
      if (this == that)
        return true;

      boolean this_present_ex = true && this.isSetEx();
      boolean that_present_ex = true && that.isSetEx();
      if (this_present_ex || that_present_ex) {
        if (!(this_present_ex && that_present_ex))
          return false;
        if (!this.ex.equals(that.ex))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      int hashCode = 1;

      hashCode = hashCode * 8191 + ((isSetEx()) ? 131071 : 524287);
      if (isSetEx())
        hashCode = hashCode * 8191 + ex.hashCode();

      return hashCode;
    }

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

      int lastComparison = 0;

      lastComparison = java.lang.Boolean.valueOf(isSetEx()).compareTo(other.isSetEx());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetEx()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ex, other.ex);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    @org.apache.thrift.annotation.Nullable
    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

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

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

    @Override
    public java.lang.String toString() {
      java.lang.StringBuilder sb = new java.lang.StringBuilder("archive_result(");
      boolean first = true;

      sb.append("ex:");
      if (this.ex == null) {
        sb.append("null");
      } else {
        sb.append(this.ex);
      }
      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, java.lang.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 archive_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public archive_resultStandardScheme getScheme() {
        return new archive_resultStandardScheme();
      }
    }

    private static class archive_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<archive_result> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, archive_result struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TField schemeField;
        iprot.readStructBegin();
        while (true)
        {
          schemeField = iprot.readFieldBegin();
          if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { 
            break;
          }
          switch (schemeField.id) {
            case 1: // EX
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                if (struct.ex == null) {
                  struct.ex = new rpc_management_exception();
                }
                struct.ex.read(iprot);
                struct.setExIsSet(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, archive_result struct) throws org.apache.thrift.TException {
        struct.validate();

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

    }

    private static class archive_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public archive_resultTupleScheme getScheme() {
        return new archive_resultTupleScheme();
      }
    }

    private static class archive_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<archive_result> {

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

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, archive_result struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet incoming = iprot.readBitSet(1);
        if (incoming.get(0)) {
          if (struct.ex == null) {
            struct.ex = new rpc_management_exception();
          }
          struct.ex.read(iprot);
          struct.setExIsSet(true);
        }
      }
    }

    private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
      return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
    }
  }

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

    private static final org.apache.thrift.protocol.TField MID_FIELD_DESC = new org.apache.thrift.protocol.TField("mid", org.apache.thrift.protocol.TType.I64, (short)1);
    private static final org.apache.thrift.protocol.TField DATA_FIELD_DESC = new org.apache.thrift.protocol.TField("data", org.apache.thrift.protocol.TType.STRING, (short)2);

    private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new append_argsStandardSchemeFactory();
    private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new append_argsTupleSchemeFactory();

    private long mid; // required
    private @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer data; // 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 {
      MID((short)1, "mid"),
      DATA((short)2, "data");

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

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

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // MID
            return MID;
          case 2: // DATA
            return DATA;
          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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByName(java.lang.String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final java.lang.String _fieldName;

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

      public short getThriftFieldId() {
        return _thriftId;
      }

      public java.lang.String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    private static final int __MID_ISSET_ID = 0;
    private byte __isset_bitfield = 0;
    public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.MID, new org.apache.thrift.meta_data.FieldMetaData("mid", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      tmpMap.put(_Fields.DATA, new org.apache.thrift.meta_data.FieldMetaData("data", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING          , true)));
      metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(append_args.class, metaDataMap);
    }

    public append_args() {
    }

    public append_args(
      long mid,
      java.nio.ByteBuffer data)
    {
      this();
      this.mid = mid;
      setMidIsSet(true);
      this.data = org.apache.thrift.TBaseHelper.copyBinary(data);
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public append_args(append_args other) {
      __isset_bitfield = other.__isset_bitfield;
      this.mid = other.mid;
      if (other.isSetData()) {
        this.data = org.apache.thrift.TBaseHelper.copyBinary(other.data);
      }
    }

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

    @Override
    public void clear() {
      setMidIsSet(false);
      this.mid = 0;
      this.data = null;
    }

    public long getMid() {
      return this.mid;
    }

    public append_args setMid(long mid) {
      this.mid = mid;
      setMidIsSet(true);
      return this;
    }

    public void unsetMid() {
      __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __MID_ISSET_ID);
    }

    /** Returns true if field mid is set (has been assigned a value) and false otherwise */
    public boolean isSetMid() {
      return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __MID_ISSET_ID);
    }

    public void setMidIsSet(boolean value) {
      __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __MID_ISSET_ID, value);
    }

    public byte[] getData() {
      setData(org.apache.thrift.TBaseHelper.rightSize(data));
      return data == null ? null : data.array();
    }

    public java.nio.ByteBuffer bufferForData() {
      return org.apache.thrift.TBaseHelper.copyBinary(data);
    }

    public append_args setData(byte[] data) {
      this.data = data == null ? (java.nio.ByteBuffer)null     : java.nio.ByteBuffer.wrap(data.clone());
      return this;
    }

    public append_args setData(@org.apache.thrift.annotation.Nullable java.nio.ByteBuffer data) {
      this.data = org.apache.thrift.TBaseHelper.copyBinary(data);
      return this;
    }

    public void unsetData() {
      this.data = null;
    }

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

    public void setDataIsSet(boolean value) {
      if (!value) {
        this.data = null;
      }
    }

    public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
      switch (field) {
      case MID:
        if (value == null) {
          unsetMid();
        } else {
          setMid((java.lang.Long)value);
        }
        break;

      case DATA:
        if (value == null) {
          unsetData();
        } else {
          if (value instanceof byte[]) {
            setData((byte[])value);
          } else {
            setData((java.nio.ByteBuffer)value);
          }
        }
        break;

      }
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.Object getFieldValue(_Fields field) {
      switch (field) {
      case MID:
        return getMid();

      case DATA:
        return getData();

      }
      throw new java.lang.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 java.lang.IllegalArgumentException();
      }

      switch (field) {
      case MID:
        return isSetMid();
      case DATA:
        return isSetData();
      }
      throw new java.lang.IllegalStateException();
    }

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

    public boolean equals(append_args that) {
      if (that == null)
        return false;
      if (this == that)
        return true;

      boolean this_present_mid = true;
      boolean that_present_mid = true;
      if (this_present_mid || that_present_mid) {
        if (!(this_present_mid && that_present_mid))
          return false;
        if (this.mid != that.mid)
          return false;
      }

      boolean this_present_data = true && this.isSetData();
      boolean that_present_data = true && that.isSetData();
      if (this_present_data || that_present_data) {
        if (!(this_present_data && that_present_data))
          return false;
        if (!this.data.equals(that.data))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      int hashCode = 1;

      hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(mid);

      hashCode = hashCode * 8191 + ((isSetData()) ? 131071 : 524287);
      if (isSetData())
        hashCode = hashCode * 8191 + data.hashCode();

      return hashCode;
    }

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

      int lastComparison = 0;

      lastComparison = java.lang.Boolean.valueOf(isSetMid()).compareTo(other.isSetMid());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetMid()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.mid, other.mid);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = java.lang.Boolean.valueOf(isSetData()).compareTo(other.isSetData());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetData()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.data, other.data);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    @org.apache.thrift.annotation.Nullable
    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

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

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

    @Override
    public java.lang.String toString() {
      java.lang.StringBuilder sb = new java.lang.StringBuilder("append_args(");
      boolean first = true;

      sb.append("mid:");
      sb.append(this.mid);
      first = false;
      if (!first) sb.append(", ");
      sb.append("data:");
      if (this.data == null) {
        sb.append("null");
      } else {
        org.apache.thrift.TBaseHelper.toString(this.data, sb);
      }
      first = false;
      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, java.lang.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 append_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public append_argsStandardScheme getScheme() {
        return new append_argsStandardScheme();
      }
    }

    private static class append_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<append_args> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, append_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: // MID
              if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
                struct.mid = iprot.readI64();
                struct.setMidIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // DATA
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.data = iprot.readBinary();
                struct.setDataIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            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, append_args struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        oprot.writeFieldBegin(MID_FIELD_DESC);
        oprot.writeI64(struct.mid);
        oprot.writeFieldEnd();
        if (struct.data != null) {
          oprot.writeFieldBegin(DATA_FIELD_DESC);
          oprot.writeBinary(struct.data);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class append_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public append_argsTupleScheme getScheme() {
        return new append_argsTupleScheme();
      }
    }

    private static class append_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<append_args> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, append_args struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet optionals = new java.util.BitSet();
        if (struct.isSetMid()) {
          optionals.set(0);
        }
        if (struct.isSetData()) {
          optionals.set(1);
        }
        oprot.writeBitSet(optionals, 2);
        if (struct.isSetMid()) {
          oprot.writeI64(struct.mid);
        }
        if (struct.isSetData()) {
          oprot.writeBinary(struct.data);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, append_args struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet incoming = iprot.readBitSet(2);
        if (incoming.get(0)) {
          struct.mid = iprot.readI64();
          struct.setMidIsSet(true);
        }
        if (incoming.get(1)) {
          struct.data = iprot.readBinary();
          struct.setDataIsSet(true);
        }
      }
    }

    private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
      return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
    }
  }

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

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

    private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new append_resultStandardSchemeFactory();
    private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new append_resultTupleSchemeFactory();

    private long 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 java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();

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

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByName(java.lang.String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final java.lang.String _fieldName;

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

      public short getThriftFieldId() {
        return _thriftId;
      }

      public java.lang.String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    private static final int __SUCCESS_ISSET_ID = 0;
    private byte __isset_bitfield = 0;
    public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.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.I64)));
      metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(append_result.class, metaDataMap);
    }

    public append_result() {
    }

    public append_result(
      long success)
    {
      this();
      this.success = success;
      setSuccessIsSet(true);
    }

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

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

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

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

    public append_result setSuccess(long success) {
      this.success = success;
      setSuccessIsSet(true);
      return this;
    }

    public void unsetSuccess() {
      __isset_bitfield = org.apache.thrift.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 org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID);
    }

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

    public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((java.lang.Long)value);
        }
        break;

      }
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      }
      throw new java.lang.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 java.lang.IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      }
      throw new java.lang.IllegalStateException();
    }

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

    public boolean equals(append_result that) {
      if (that == null)
        return false;
      if (this == that)
        return true;

      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() {
      int hashCode = 1;

      hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(success);

      return hashCode;
    }

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

      int lastComparison = 0;

      lastComparison = java.lang.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;
    }

    @org.apache.thrift.annotation.Nullable
    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

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

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

    @Override
    public java.lang.String toString() {
      java.lang.StringBuilder sb = new java.lang.StringBuilder("append_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, java.lang.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 append_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public append_resultStandardScheme getScheme() {
        return new append_resultStandardScheme();
      }
    }

    private static class append_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<append_result> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, append_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.I64) {
                struct.success = iprot.readI64();
                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, append_result struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.isSetSuccess()) {
          oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
          oprot.writeI64(struct.success);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class append_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public append_resultTupleScheme getScheme() {
        return new append_resultTupleScheme();
      }
    }

    private static class append_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<append_result> {

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

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

    private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
      return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
    }
  }

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

    private static final org.apache.thrift.protocol.TField MID_FIELD_DESC = new org.apache.thrift.protocol.TField("mid", org.apache.thrift.protocol.TType.I64, (short)1);
    private static final org.apache.thrift.protocol.TField BATCH_FIELD_DESC = new org.apache.thrift.protocol.TField("batch", org.apache.thrift.protocol.TType.STRUCT, (short)2);

    private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new append_batch_argsStandardSchemeFactory();
    private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new append_batch_argsTupleSchemeFactory();

    private long mid; // required
    private @org.apache.thrift.annotation.Nullable rpc_record_batch batch; // 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 {
      MID((short)1, "mid"),
      BATCH((short)2, "batch");

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

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

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // MID
            return MID;
          case 2: // BATCH
            return BATCH;
          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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByName(java.lang.String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final java.lang.String _fieldName;

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

      public short getThriftFieldId() {
        return _thriftId;
      }

      public java.lang.String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    private static final int __MID_ISSET_ID = 0;
    private byte __isset_bitfield = 0;
    public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.MID, new org.apache.thrift.meta_data.FieldMetaData("mid", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      tmpMap.put(_Fields.BATCH, new org.apache.thrift.meta_data.FieldMetaData("batch", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, rpc_record_batch.class)));
      metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(append_batch_args.class, metaDataMap);
    }

    public append_batch_args() {
    }

    public append_batch_args(
      long mid,
      rpc_record_batch batch)
    {
      this();
      this.mid = mid;
      setMidIsSet(true);
      this.batch = batch;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public append_batch_args(append_batch_args other) {
      __isset_bitfield = other.__isset_bitfield;
      this.mid = other.mid;
      if (other.isSetBatch()) {
        this.batch = new rpc_record_batch(other.batch);
      }
    }

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

    @Override
    public void clear() {
      setMidIsSet(false);
      this.mid = 0;
      if (this.batch != null) {
        this.batch.clear();
      }
    }

    public long getMid() {
      return this.mid;
    }

    public append_batch_args setMid(long mid) {
      this.mid = mid;
      setMidIsSet(true);
      return this;
    }

    public void unsetMid() {
      __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __MID_ISSET_ID);
    }

    /** Returns true if field mid is set (has been assigned a value) and false otherwise */
    public boolean isSetMid() {
      return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __MID_ISSET_ID);
    }

    public void setMidIsSet(boolean value) {
      __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __MID_ISSET_ID, value);
    }

    @org.apache.thrift.annotation.Nullable
    public rpc_record_batch getBatch() {
      return this.batch;
    }

    public append_batch_args setBatch(@org.apache.thrift.annotation.Nullable rpc_record_batch batch) {
      this.batch = batch;
      return this;
    }

    public void unsetBatch() {
      this.batch = null;
    }

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

    public void setBatchIsSet(boolean value) {
      if (!value) {
        this.batch = null;
      }
    }

    public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
      switch (field) {
      case MID:
        if (value == null) {
          unsetMid();
        } else {
          setMid((java.lang.Long)value);
        }
        break;

      case BATCH:
        if (value == null) {
          unsetBatch();
        } else {
          setBatch((rpc_record_batch)value);
        }
        break;

      }
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.Object getFieldValue(_Fields field) {
      switch (field) {
      case MID:
        return getMid();

      case BATCH:
        return getBatch();

      }
      throw new java.lang.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 java.lang.IllegalArgumentException();
      }

      switch (field) {
      case MID:
        return isSetMid();
      case BATCH:
        return isSetBatch();
      }
      throw new java.lang.IllegalStateException();
    }

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

    public boolean equals(append_batch_args that) {
      if (that == null)
        return false;
      if (this == that)
        return true;

      boolean this_present_mid = true;
      boolean that_present_mid = true;
      if (this_present_mid || that_present_mid) {
        if (!(this_present_mid && that_present_mid))
          return false;
        if (this.mid != that.mid)
          return false;
      }

      boolean this_present_batch = true && this.isSetBatch();
      boolean that_present_batch = true && that.isSetBatch();
      if (this_present_batch || that_present_batch) {
        if (!(this_present_batch && that_present_batch))
          return false;
        if (!this.batch.equals(that.batch))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      int hashCode = 1;

      hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(mid);

      hashCode = hashCode * 8191 + ((isSetBatch()) ? 131071 : 524287);
      if (isSetBatch())
        hashCode = hashCode * 8191 + batch.hashCode();

      return hashCode;
    }

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

      int lastComparison = 0;

      lastComparison = java.lang.Boolean.valueOf(isSetMid()).compareTo(other.isSetMid());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetMid()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.mid, other.mid);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = java.lang.Boolean.valueOf(isSetBatch()).compareTo(other.isSetBatch());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetBatch()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.batch, other.batch);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    @org.apache.thrift.annotation.Nullable
    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

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

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

    @Override
    public java.lang.String toString() {
      java.lang.StringBuilder sb = new java.lang.StringBuilder("append_batch_args(");
      boolean first = true;

      sb.append("mid:");
      sb.append(this.mid);
      first = false;
      if (!first) sb.append(", ");
      sb.append("batch:");
      if (this.batch == null) {
        sb.append("null");
      } else {
        sb.append(this.batch);
      }
      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 (batch != null) {
        batch.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, java.lang.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 append_batch_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public append_batch_argsStandardScheme getScheme() {
        return new append_batch_argsStandardScheme();
      }
    }

    private static class append_batch_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<append_batch_args> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, append_batch_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: // MID
              if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
                struct.mid = iprot.readI64();
                struct.setMidIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // BATCH
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                if (struct.batch == null) {
                  struct.batch = new rpc_record_batch();
                }
                struct.batch.read(iprot);
                struct.setBatchIsSet(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, append_batch_args struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        oprot.writeFieldBegin(MID_FIELD_DESC);
        oprot.writeI64(struct.mid);
        oprot.writeFieldEnd();
        if (struct.batch != null) {
          oprot.writeFieldBegin(BATCH_FIELD_DESC);
          struct.batch.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class append_batch_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public append_batch_argsTupleScheme getScheme() {
        return new append_batch_argsTupleScheme();
      }
    }

    private static class append_batch_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<append_batch_args> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, append_batch_args struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet optionals = new java.util.BitSet();
        if (struct.isSetMid()) {
          optionals.set(0);
        }
        if (struct.isSetBatch()) {
          optionals.set(1);
        }
        oprot.writeBitSet(optionals, 2);
        if (struct.isSetMid()) {
          oprot.writeI64(struct.mid);
        }
        if (struct.isSetBatch()) {
          struct.batch.write(oprot);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, append_batch_args struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet incoming = iprot.readBitSet(2);
        if (incoming.get(0)) {
          struct.mid = iprot.readI64();
          struct.setMidIsSet(true);
        }
        if (incoming.get(1)) {
          if (struct.batch == null) {
            struct.batch = new rpc_record_batch();
          }
          struct.batch.read(iprot);
          struct.setBatchIsSet(true);
        }
      }
    }

    private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
      return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
    }
  }

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

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

    private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new append_batch_resultStandardSchemeFactory();
    private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new append_batch_resultTupleSchemeFactory();

    private long 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 java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();

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

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByName(java.lang.String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final java.lang.String _fieldName;

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

      public short getThriftFieldId() {
        return _thriftId;
      }

      public java.lang.String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    private static final int __SUCCESS_ISSET_ID = 0;
    private byte __isset_bitfield = 0;
    public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.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.I64)));
      metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(append_batch_result.class, metaDataMap);
    }

    public append_batch_result() {
    }

    public append_batch_result(
      long success)
    {
      this();
      this.success = success;
      setSuccessIsSet(true);
    }

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

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

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

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

    public append_batch_result setSuccess(long success) {
      this.success = success;
      setSuccessIsSet(true);
      return this;
    }

    public void unsetSuccess() {
      __isset_bitfield = org.apache.thrift.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 org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID);
    }

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

    public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((java.lang.Long)value);
        }
        break;

      }
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      }
      throw new java.lang.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 java.lang.IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      }
      throw new java.lang.IllegalStateException();
    }

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

    public boolean equals(append_batch_result that) {
      if (that == null)
        return false;
      if (this == that)
        return true;

      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() {
      int hashCode = 1;

      hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(success);

      return hashCode;
    }

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

      int lastComparison = 0;

      lastComparison = java.lang.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;
    }

    @org.apache.thrift.annotation.Nullable
    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

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

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

    @Override
    public java.lang.String toString() {
      java.lang.StringBuilder sb = new java.lang.StringBuilder("append_batch_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, java.lang.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 append_batch_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public append_batch_resultStandardScheme getScheme() {
        return new append_batch_resultStandardScheme();
      }
    }

    private static class append_batch_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<append_batch_result> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, append_batch_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.I64) {
                struct.success = iprot.readI64();
                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, append_batch_result struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.isSetSuccess()) {
          oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
          oprot.writeI64(struct.success);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class append_batch_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public append_batch_resultTupleScheme getScheme() {
        return new append_batch_resultTupleScheme();
      }
    }

    private static class append_batch_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<append_batch_result> {

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

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

    private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
      return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
    }
  }

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

    private static final org.apache.thrift.protocol.TField MID_FIELD_DESC = new org.apache.thrift.protocol.TField("mid", org.apache.thrift.protocol.TType.I64, (short)1);
    private static final org.apache.thrift.protocol.TField OFFSET_FIELD_DESC = new org.apache.thrift.protocol.TField("offset", org.apache.thrift.protocol.TType.I64, (short)2);
    private static final org.apache.thrift.protocol.TField NRECORDS_FIELD_DESC = new org.apache.thrift.protocol.TField("nrecords", org.apache.thrift.protocol.TType.I64, (short)3);

    private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new read_argsStandardSchemeFactory();
    private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new read_argsTupleSchemeFactory();

    private long mid; // required
    private long offset; // required
    private long nrecords; // 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 {
      MID((short)1, "mid"),
      OFFSET((short)2, "offset"),
      NRECORDS((short)3, "nrecords");

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

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

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // MID
            return MID;
          case 2: // OFFSET
            return OFFSET;
          case 3: // NRECORDS
            return NRECORDS;
          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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByName(java.lang.String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final java.lang.String _fieldName;

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

      public short getThriftFieldId() {
        return _thriftId;
      }

      public java.lang.String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    private static final int __MID_ISSET_ID = 0;
    private static final int __OFFSET_ISSET_ID = 1;
    private static final int __NRECORDS_ISSET_ID = 2;
    private byte __isset_bitfield = 0;
    public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.MID, new org.apache.thrift.meta_data.FieldMetaData("mid", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      tmpMap.put(_Fields.OFFSET, new org.apache.thrift.meta_data.FieldMetaData("offset", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      tmpMap.put(_Fields.NRECORDS, new org.apache.thrift.meta_data.FieldMetaData("nrecords", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(read_args.class, metaDataMap);
    }

    public read_args() {
    }

    public read_args(
      long mid,
      long offset,
      long nrecords)
    {
      this();
      this.mid = mid;
      setMidIsSet(true);
      this.offset = offset;
      setOffsetIsSet(true);
      this.nrecords = nrecords;
      setNrecordsIsSet(true);
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public read_args(read_args other) {
      __isset_bitfield = other.__isset_bitfield;
      this.mid = other.mid;
      this.offset = other.offset;
      this.nrecords = other.nrecords;
    }

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

    @Override
    public void clear() {
      setMidIsSet(false);
      this.mid = 0;
      setOffsetIsSet(false);
      this.offset = 0;
      setNrecordsIsSet(false);
      this.nrecords = 0;
    }

    public long getMid() {
      return this.mid;
    }

    public read_args setMid(long mid) {
      this.mid = mid;
      setMidIsSet(true);
      return this;
    }

    public void unsetMid() {
      __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __MID_ISSET_ID);
    }

    /** Returns true if field mid is set (has been assigned a value) and false otherwise */
    public boolean isSetMid() {
      return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __MID_ISSET_ID);
    }

    public void setMidIsSet(boolean value) {
      __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __MID_ISSET_ID, value);
    }

    public long getOffset() {
      return this.offset;
    }

    public read_args setOffset(long offset) {
      this.offset = offset;
      setOffsetIsSet(true);
      return this;
    }

    public void unsetOffset() {
      __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __OFFSET_ISSET_ID);
    }

    /** Returns true if field offset is set (has been assigned a value) and false otherwise */
    public boolean isSetOffset() {
      return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __OFFSET_ISSET_ID);
    }

    public void setOffsetIsSet(boolean value) {
      __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __OFFSET_ISSET_ID, value);
    }

    public long getNrecords() {
      return this.nrecords;
    }

    public read_args setNrecords(long nrecords) {
      this.nrecords = nrecords;
      setNrecordsIsSet(true);
      return this;
    }

    public void unsetNrecords() {
      __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __NRECORDS_ISSET_ID);
    }

    /** Returns true if field nrecords is set (has been assigned a value) and false otherwise */
    public boolean isSetNrecords() {
      return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __NRECORDS_ISSET_ID);
    }

    public void setNrecordsIsSet(boolean value) {
      __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __NRECORDS_ISSET_ID, value);
    }

    public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
      switch (field) {
      case MID:
        if (value == null) {
          unsetMid();
        } else {
          setMid((java.lang.Long)value);
        }
        break;

      case OFFSET:
        if (value == null) {
          unsetOffset();
        } else {
          setOffset((java.lang.Long)value);
        }
        break;

      case NRECORDS:
        if (value == null) {
          unsetNrecords();
        } else {
          setNrecords((java.lang.Long)value);
        }
        break;

      }
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.Object getFieldValue(_Fields field) {
      switch (field) {
      case MID:
        return getMid();

      case OFFSET:
        return getOffset();

      case NRECORDS:
        return getNrecords();

      }
      throw new java.lang.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 java.lang.IllegalArgumentException();
      }

      switch (field) {
      case MID:
        return isSetMid();
      case OFFSET:
        return isSetOffset();
      case NRECORDS:
        return isSetNrecords();
      }
      throw new java.lang.IllegalStateException();
    }

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

    public boolean equals(read_args that) {
      if (that == null)
        return false;
      if (this == that)
        return true;

      boolean this_present_mid = true;
      boolean that_present_mid = true;
      if (this_present_mid || that_present_mid) {
        if (!(this_present_mid && that_present_mid))
          return false;
        if (this.mid != that.mid)
          return false;
      }

      boolean this_present_offset = true;
      boolean that_present_offset = true;
      if (this_present_offset || that_present_offset) {
        if (!(this_present_offset && that_present_offset))
          return false;
        if (this.offset != that.offset)
          return false;
      }

      boolean this_present_nrecords = true;
      boolean that_present_nrecords = true;
      if (this_present_nrecords || that_present_nrecords) {
        if (!(this_present_nrecords && that_present_nrecords))
          return false;
        if (this.nrecords != that.nrecords)
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      int hashCode = 1;

      hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(mid);

      hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(offset);

      hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(nrecords);

      return hashCode;
    }

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

      int lastComparison = 0;

      lastComparison = java.lang.Boolean.valueOf(isSetMid()).compareTo(other.isSetMid());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetMid()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.mid, other.mid);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = java.lang.Boolean.valueOf(isSetOffset()).compareTo(other.isSetOffset());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetOffset()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.offset, other.offset);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = java.lang.Boolean.valueOf(isSetNrecords()).compareTo(other.isSetNrecords());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetNrecords()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.nrecords, other.nrecords);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    @org.apache.thrift.annotation.Nullable
    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

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

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

    @Override
    public java.lang.String toString() {
      java.lang.StringBuilder sb = new java.lang.StringBuilder("read_args(");
      boolean first = true;

      sb.append("mid:");
      sb.append(this.mid);
      first = false;
      if (!first) sb.append(", ");
      sb.append("offset:");
      sb.append(this.offset);
      first = false;
      if (!first) sb.append(", ");
      sb.append("nrecords:");
      sb.append(this.nrecords);
      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, java.lang.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 read_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public read_argsStandardScheme getScheme() {
        return new read_argsStandardScheme();
      }
    }

    private static class read_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<read_args> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, read_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: // MID
              if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
                struct.mid = iprot.readI64();
                struct.setMidIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // OFFSET
              if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
                struct.offset = iprot.readI64();
                struct.setOffsetIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 3: // NRECORDS
              if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
                struct.nrecords = iprot.readI64();
                struct.setNrecordsIsSet(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, read_args struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        oprot.writeFieldBegin(MID_FIELD_DESC);
        oprot.writeI64(struct.mid);
        oprot.writeFieldEnd();
        oprot.writeFieldBegin(OFFSET_FIELD_DESC);
        oprot.writeI64(struct.offset);
        oprot.writeFieldEnd();
        oprot.writeFieldBegin(NRECORDS_FIELD_DESC);
        oprot.writeI64(struct.nrecords);
        oprot.writeFieldEnd();
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class read_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public read_argsTupleScheme getScheme() {
        return new read_argsTupleScheme();
      }
    }

    private static class read_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<read_args> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, read_args struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet optionals = new java.util.BitSet();
        if (struct.isSetMid()) {
          optionals.set(0);
        }
        if (struct.isSetOffset()) {
          optionals.set(1);
        }
        if (struct.isSetNrecords()) {
          optionals.set(2);
        }
        oprot.writeBitSet(optionals, 3);
        if (struct.isSetMid()) {
          oprot.writeI64(struct.mid);
        }
        if (struct.isSetOffset()) {
          oprot.writeI64(struct.offset);
        }
        if (struct.isSetNrecords()) {
          oprot.writeI64(struct.nrecords);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, read_args struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet incoming = iprot.readBitSet(3);
        if (incoming.get(0)) {
          struct.mid = iprot.readI64();
          struct.setMidIsSet(true);
        }
        if (incoming.get(1)) {
          struct.offset = iprot.readI64();
          struct.setOffsetIsSet(true);
        }
        if (incoming.get(2)) {
          struct.nrecords = iprot.readI64();
          struct.setNrecordsIsSet(true);
        }
      }
    }

    private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
      return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
    }
  }

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

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

    private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new read_resultStandardSchemeFactory();
    private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new read_resultTupleSchemeFactory();

    private @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer 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 java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();

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

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByName(java.lang.String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final java.lang.String _fieldName;

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

      public short getThriftFieldId() {
        return _thriftId;
      }

      public java.lang.String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.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.STRING          , true)));
      metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(read_result.class, metaDataMap);
    }

    public read_result() {
    }

    public read_result(
      java.nio.ByteBuffer success)
    {
      this();
      this.success = org.apache.thrift.TBaseHelper.copyBinary(success);
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public read_result(read_result other) {
      if (other.isSetSuccess()) {
        this.success = org.apache.thrift.TBaseHelper.copyBinary(other.success);
      }
    }

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

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

    public byte[] getSuccess() {
      setSuccess(org.apache.thrift.TBaseHelper.rightSize(success));
      return success == null ? null : success.array();
    }

    public java.nio.ByteBuffer bufferForSuccess() {
      return org.apache.thrift.TBaseHelper.copyBinary(success);
    }

    public read_result setSuccess(byte[] success) {
      this.success = success == null ? (java.nio.ByteBuffer)null     : java.nio.ByteBuffer.wrap(success.clone());
      return this;
    }

    public read_result setSuccess(@org.apache.thrift.annotation.Nullable java.nio.ByteBuffer success) {
      this.success = org.apache.thrift.TBaseHelper.copyBinary(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, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          if (value instanceof byte[]) {
            setSuccess((byte[])value);
          } else {
            setSuccess((java.nio.ByteBuffer)value);
          }
        }
        break;

      }
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      }
      throw new java.lang.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 java.lang.IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      }
      throw new java.lang.IllegalStateException();
    }

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

    public boolean equals(read_result that) {
      if (that == null)
        return false;
      if (this == that)
        return true;

      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() {
      int hashCode = 1;

      hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287);
      if (isSetSuccess())
        hashCode = hashCode * 8191 + success.hashCode();

      return hashCode;
    }

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

      int lastComparison = 0;

      lastComparison = java.lang.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;
    }

    @org.apache.thrift.annotation.Nullable
    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

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

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

    @Override
    public java.lang.String toString() {
      java.lang.StringBuilder sb = new java.lang.StringBuilder("read_result(");
      boolean first = true;

      sb.append("success:");
      if (this.success == null) {
        sb.append("null");
      } else {
        org.apache.thrift.TBaseHelper.toString(this.success, sb);
      }
      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, java.lang.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 read_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public read_resultStandardScheme getScheme() {
        return new read_resultStandardScheme();
      }
    }

    private static class read_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<read_result> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, read_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.STRING) {
                struct.success = iprot.readBinary();
                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, read_result struct) throws org.apache.thrift.TException {
        struct.validate();

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

    }

    private static class read_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public read_resultTupleScheme getScheme() {
        return new read_resultTupleScheme();
      }
    }

    private static class read_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<read_result> {

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

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

    private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
      return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
    }
  }

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

    private static final org.apache.thrift.protocol.TField MID_FIELD_DESC = new org.apache.thrift.protocol.TField("mid", org.apache.thrift.protocol.TType.I64, (short)1);
    private static final org.apache.thrift.protocol.TField AGGREGATE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("aggregate_name", org.apache.thrift.protocol.TType.STRING, (short)2);
    private static final org.apache.thrift.protocol.TField BEG_MS_FIELD_DESC = new org.apache.thrift.protocol.TField("beg_ms", org.apache.thrift.protocol.TType.I64, (short)3);
    private static final org.apache.thrift.protocol.TField END_MS_FIELD_DESC = new org.apache.thrift.protocol.TField("end_ms", org.apache.thrift.protocol.TType.I64, (short)4);

    private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new query_aggregate_argsStandardSchemeFactory();
    private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new query_aggregate_argsTupleSchemeFactory();

    private long mid; // required
    private @org.apache.thrift.annotation.Nullable java.lang.String aggregate_name; // required
    private long beg_ms; // required
    private long end_ms; // 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 {
      MID((short)1, "mid"),
      AGGREGATE_NAME((short)2, "aggregate_name"),
      BEG_MS((short)3, "beg_ms"),
      END_MS((short)4, "end_ms");

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

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

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // MID
            return MID;
          case 2: // AGGREGATE_NAME
            return AGGREGATE_NAME;
          case 3: // BEG_MS
            return BEG_MS;
          case 4: // END_MS
            return END_MS;
          default:
            return null;
        }
      }

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

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByName(java.lang.String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final java.lang.String _fieldName;

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

      public short getThriftFieldId() {
        return _thriftId;
      }

      public java.lang.String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    private static final int __MID_ISSET_ID = 0;
    private static final int __BEG_MS_ISSET_ID = 1;
    private static final int __END_MS_ISSET_ID = 2;
    private byte __isset_bitfield = 0;
    public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.MID, new org.apache.thrift.meta_data.FieldMetaData("mid", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      tmpMap.put(_Fields.AGGREGATE_NAME, new org.apache.thrift.meta_data.FieldMetaData("aggregate_name", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
      tmpMap.put(_Fields.BEG_MS, new org.apache.thrift.meta_data.FieldMetaData("beg_ms", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      tmpMap.put(_Fields.END_MS, new org.apache.thrift.meta_data.FieldMetaData("end_ms", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(query_aggregate_args.class, metaDataMap);
    }

    public query_aggregate_args() {
    }

    public query_aggregate_args(
      long mid,
      java.lang.String aggregate_name,
      long beg_ms,
      long end_ms)
    {
      this();
      this.mid = mid;
      setMidIsSet(true);
      this.aggregate_name = aggregate_name;
      this.beg_ms = beg_ms;
      setBegMsIsSet(true);
      this.end_ms = end_ms;
      setEndMsIsSet(true);
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public query_aggregate_args(query_aggregate_args other) {
      __isset_bitfield = other.__isset_bitfield;
      this.mid = other.mid;
      if (other.isSetAggregateName()) {
        this.aggregate_name = other.aggregate_name;
      }
      this.beg_ms = other.beg_ms;
      this.end_ms = other.end_ms;
    }

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

    @Override
    public void clear() {
      setMidIsSet(false);
      this.mid = 0;
      this.aggregate_name = null;
      setBegMsIsSet(false);
      this.beg_ms = 0;
      setEndMsIsSet(false);
      this.end_ms = 0;
    }

    public long getMid() {
      return this.mid;
    }

    public query_aggregate_args setMid(long mid) {
      this.mid = mid;
      setMidIsSet(true);
      return this;
    }

    public void unsetMid() {
      __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __MID_ISSET_ID);
    }

    /** Returns true if field mid is set (has been assigned a value) and false otherwise */
    public boolean isSetMid() {
      return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __MID_ISSET_ID);
    }

    public void setMidIsSet(boolean value) {
      __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __MID_ISSET_ID, value);
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.String getAggregateName() {
      return this.aggregate_name;
    }

    public query_aggregate_args setAggregateName(@org.apache.thrift.annotation.Nullable java.lang.String aggregate_name) {
      this.aggregate_name = aggregate_name;
      return this;
    }

    public void unsetAggregateName() {
      this.aggregate_name = null;
    }

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

    public void setAggregateNameIsSet(boolean value) {
      if (!value) {
        this.aggregate_name = null;
      }
    }

    public long getBegMs() {
      return this.beg_ms;
    }

    public query_aggregate_args setBegMs(long beg_ms) {
      this.beg_ms = beg_ms;
      setBegMsIsSet(true);
      return this;
    }

    public void unsetBegMs() {
      __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __BEG_MS_ISSET_ID);
    }

    /** Returns true if field beg_ms is set (has been assigned a value) and false otherwise */
    public boolean isSetBegMs() {
      return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __BEG_MS_ISSET_ID);
    }

    public void setBegMsIsSet(boolean value) {
      __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __BEG_MS_ISSET_ID, value);
    }

    public long getEndMs() {
      return this.end_ms;
    }

    public query_aggregate_args setEndMs(long end_ms) {
      this.end_ms = end_ms;
      setEndMsIsSet(true);
      return this;
    }

    public void unsetEndMs() {
      __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __END_MS_ISSET_ID);
    }

    /** Returns true if field end_ms is set (has been assigned a value) and false otherwise */
    public boolean isSetEndMs() {
      return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __END_MS_ISSET_ID);
    }

    public void setEndMsIsSet(boolean value) {
      __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __END_MS_ISSET_ID, value);
    }

    public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
      switch (field) {
      case MID:
        if (value == null) {
          unsetMid();
        } else {
          setMid((java.lang.Long)value);
        }
        break;

      case AGGREGATE_NAME:
        if (value == null) {
          unsetAggregateName();
        } else {
          setAggregateName((java.lang.String)value);
        }
        break;

      case BEG_MS:
        if (value == null) {
          unsetBegMs();
        } else {
          setBegMs((java.lang.Long)value);
        }
        break;

      case END_MS:
        if (value == null) {
          unsetEndMs();
        } else {
          setEndMs((java.lang.Long)value);
        }
        break;

      }
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.Object getFieldValue(_Fields field) {
      switch (field) {
      case MID:
        return getMid();

      case AGGREGATE_NAME:
        return getAggregateName();

      case BEG_MS:
        return getBegMs();

      case END_MS:
        return getEndMs();

      }
      throw new java.lang.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 java.lang.IllegalArgumentException();
      }

      switch (field) {
      case MID:
        return isSetMid();
      case AGGREGATE_NAME:
        return isSetAggregateName();
      case BEG_MS:
        return isSetBegMs();
      case END_MS:
        return isSetEndMs();
      }
      throw new java.lang.IllegalStateException();
    }

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

    public boolean equals(query_aggregate_args that) {
      if (that == null)
        return false;
      if (this == that)
        return true;

      boolean this_present_mid = true;
      boolean that_present_mid = true;
      if (this_present_mid || that_present_mid) {
        if (!(this_present_mid && that_present_mid))
          return false;
        if (this.mid != that.mid)
          return false;
      }

      boolean this_present_aggregate_name = true && this.isSetAggregateName();
      boolean that_present_aggregate_name = true && that.isSetAggregateName();
      if (this_present_aggregate_name || that_present_aggregate_name) {
        if (!(this_present_aggregate_name && that_present_aggregate_name))
          return false;
        if (!this.aggregate_name.equals(that.aggregate_name))
          return false;
      }

      boolean this_present_beg_ms = true;
      boolean that_present_beg_ms = true;
      if (this_present_beg_ms || that_present_beg_ms) {
        if (!(this_present_beg_ms && that_present_beg_ms))
          return false;
        if (this.beg_ms != that.beg_ms)
          return false;
      }

      boolean this_present_end_ms = true;
      boolean that_present_end_ms = true;
      if (this_present_end_ms || that_present_end_ms) {
        if (!(this_present_end_ms && that_present_end_ms))
          return false;
        if (this.end_ms != that.end_ms)
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      int hashCode = 1;

      hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(mid);

      hashCode = hashCode * 8191 + ((isSetAggregateName()) ? 131071 : 524287);
      if (isSetAggregateName())
        hashCode = hashCode * 8191 + aggregate_name.hashCode();

      hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(beg_ms);

      hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(end_ms);

      return hashCode;
    }

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

      int lastComparison = 0;

      lastComparison = java.lang.Boolean.valueOf(isSetMid()).compareTo(other.isSetMid());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetMid()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.mid, other.mid);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = java.lang.Boolean.valueOf(isSetAggregateName()).compareTo(other.isSetAggregateName());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetAggregateName()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.aggregate_name, other.aggregate_name);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = java.lang.Boolean.valueOf(isSetBegMs()).compareTo(other.isSetBegMs());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetBegMs()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.beg_ms, other.beg_ms);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = java.lang.Boolean.valueOf(isSetEndMs()).compareTo(other.isSetEndMs());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetEndMs()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.end_ms, other.end_ms);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    @org.apache.thrift.annotation.Nullable
    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

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

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

    @Override
    public java.lang.String toString() {
      java.lang.StringBuilder sb = new java.lang.StringBuilder("query_aggregate_args(");
      boolean first = true;

      sb.append("mid:");
      sb.append(this.mid);
      first = false;
      if (!first) sb.append(", ");
      sb.append("aggregate_name:");
      if (this.aggregate_name == null) {
        sb.append("null");
      } else {
        sb.append(this.aggregate_name);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("beg_ms:");
      sb.append(this.beg_ms);
      first = false;
      if (!first) sb.append(", ");
      sb.append("end_ms:");
      sb.append(this.end_ms);
      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, java.lang.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 query_aggregate_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public query_aggregate_argsStandardScheme getScheme() {
        return new query_aggregate_argsStandardScheme();
      }
    }

    private static class query_aggregate_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<query_aggregate_args> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, query_aggregate_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: // MID
              if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
                struct.mid = iprot.readI64();
                struct.setMidIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // AGGREGATE_NAME
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.aggregate_name = iprot.readString();
                struct.setAggregateNameIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 3: // BEG_MS
              if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
                struct.beg_ms = iprot.readI64();
                struct.setBegMsIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 4: // END_MS
              if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
                struct.end_ms = iprot.readI64();
                struct.setEndMsIsSet(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, query_aggregate_args struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        oprot.writeFieldBegin(MID_FIELD_DESC);
        oprot.writeI64(struct.mid);
        oprot.writeFieldEnd();
        if (struct.aggregate_name != null) {
          oprot.writeFieldBegin(AGGREGATE_NAME_FIELD_DESC);
          oprot.writeString(struct.aggregate_name);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldBegin(BEG_MS_FIELD_DESC);
        oprot.writeI64(struct.beg_ms);
        oprot.writeFieldEnd();
        oprot.writeFieldBegin(END_MS_FIELD_DESC);
        oprot.writeI64(struct.end_ms);
        oprot.writeFieldEnd();
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class query_aggregate_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public query_aggregate_argsTupleScheme getScheme() {
        return new query_aggregate_argsTupleScheme();
      }
    }

    private static class query_aggregate_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<query_aggregate_args> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, query_aggregate_args struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet optionals = new java.util.BitSet();
        if (struct.isSetMid()) {
          optionals.set(0);
        }
        if (struct.isSetAggregateName()) {
          optionals.set(1);
        }
        if (struct.isSetBegMs()) {
          optionals.set(2);
        }
        if (struct.isSetEndMs()) {
          optionals.set(3);
        }
        oprot.writeBitSet(optionals, 4);
        if (struct.isSetMid()) {
          oprot.writeI64(struct.mid);
        }
        if (struct.isSetAggregateName()) {
          oprot.writeString(struct.aggregate_name);
        }
        if (struct.isSetBegMs()) {
          oprot.writeI64(struct.beg_ms);
        }
        if (struct.isSetEndMs()) {
          oprot.writeI64(struct.end_ms);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, query_aggregate_args struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet incoming = iprot.readBitSet(4);
        if (incoming.get(0)) {
          struct.mid = iprot.readI64();
          struct.setMidIsSet(true);
        }
        if (incoming.get(1)) {
          struct.aggregate_name = iprot.readString();
          struct.setAggregateNameIsSet(true);
        }
        if (incoming.get(2)) {
          struct.beg_ms = iprot.readI64();
          struct.setBegMsIsSet(true);
        }
        if (incoming.get(3)) {
          struct.end_ms = iprot.readI64();
          struct.setEndMsIsSet(true);
        }
      }
    }

    private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
      return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
    }
  }

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

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

    private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new query_aggregate_resultStandardSchemeFactory();
    private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new query_aggregate_resultTupleSchemeFactory();

    private @org.apache.thrift.annotation.Nullable java.lang.String success; // required
    private @org.apache.thrift.annotation.Nullable rpc_invalid_operation ex; // 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"),
      EX((short)1, "ex");

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

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

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          case 1: // EX
            return EX;
          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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByName(java.lang.String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final java.lang.String _fieldName;

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

      public short getThriftFieldId() {
        return _thriftId;
      }

      public java.lang.String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.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.STRING)));
      tmpMap.put(_Fields.EX, new org.apache.thrift.meta_data.FieldMetaData("ex", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, rpc_invalid_operation.class)));
      metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(query_aggregate_result.class, metaDataMap);
    }

    public query_aggregate_result() {
    }

    public query_aggregate_result(
      java.lang.String success,
      rpc_invalid_operation ex)
    {
      this();
      this.success = success;
      this.ex = ex;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public query_aggregate_result(query_aggregate_result other) {
      if (other.isSetSuccess()) {
        this.success = other.success;
      }
      if (other.isSetEx()) {
        this.ex = new rpc_invalid_operation(other.ex);
      }
    }

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

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

    @org.apache.thrift.annotation.Nullable
    public java.lang.String getSuccess() {
      return this.success;
    }

    public query_aggregate_result setSuccess(@org.apache.thrift.annotation.Nullable java.lang.String 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;
      }
    }

    @org.apache.thrift.annotation.Nullable
    public rpc_invalid_operation getEx() {
      return this.ex;
    }

    public query_aggregate_result setEx(@org.apache.thrift.annotation.Nullable rpc_invalid_operation ex) {
      this.ex = ex;
      return this;
    }

    public void unsetEx() {
      this.ex = null;
    }

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

    public void setExIsSet(boolean value) {
      if (!value) {
        this.ex = null;
      }
    }

    public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((java.lang.String)value);
        }
        break;

      case EX:
        if (value == null) {
          unsetEx();
        } else {
          setEx((rpc_invalid_operation)value);
        }
        break;

      }
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      case EX:
        return getEx();

      }
      throw new java.lang.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 java.lang.IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      case EX:
        return isSetEx();
      }
      throw new java.lang.IllegalStateException();
    }

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

    public boolean equals(query_aggregate_result that) {
      if (that == null)
        return false;
      if (this == that)
        return true;

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

      boolean this_present_ex = true && this.isSetEx();
      boolean that_present_ex = true && that.isSetEx();
      if (this_present_ex || that_present_ex) {
        if (!(this_present_ex && that_present_ex))
          return false;
        if (!this.ex.equals(that.ex))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      int hashCode = 1;

      hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287);
      if (isSetSuccess())
        hashCode = hashCode * 8191 + success.hashCode();

      hashCode = hashCode * 8191 + ((isSetEx()) ? 131071 : 524287);
      if (isSetEx())
        hashCode = hashCode * 8191 + ex.hashCode();

      return hashCode;
    }

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

      int lastComparison = 0;

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

    @org.apache.thrift.annotation.Nullable
    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

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

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

    @Override
    public java.lang.String toString() {
      java.lang.StringBuilder sb = new java.lang.StringBuilder("query_aggregate_result(");
      boolean first = true;

      sb.append("success:");
      if (this.success == null) {
        sb.append("null");
      } else {
        sb.append(this.success);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("ex:");
      if (this.ex == null) {
        sb.append("null");
      } else {
        sb.append(this.ex);
      }
      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, java.lang.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 query_aggregate_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public query_aggregate_resultStandardScheme getScheme() {
        return new query_aggregate_resultStandardScheme();
      }
    }

    private static class query_aggregate_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<query_aggregate_result> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, query_aggregate_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.STRING) {
                struct.success = iprot.readString();
                struct.setSuccessIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 1: // EX
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                if (struct.ex == null) {
                  struct.ex = new rpc_invalid_operation();
                }
                struct.ex.read(iprot);
                struct.setExIsSet(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, query_aggregate_result struct) throws org.apache.thrift.TException {
        struct.validate();

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

    }

    private static class query_aggregate_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public query_aggregate_resultTupleScheme getScheme() {
        return new query_aggregate_resultTupleScheme();
      }
    }

    private static class query_aggregate_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<query_aggregate_result> {

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

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, query_aggregate_result struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet incoming = iprot.readBitSet(2);
        if (incoming.get(0)) {
          struct.success = iprot.readString();
          struct.setSuccessIsSet(true);
        }
        if (incoming.get(1)) {
          if (struct.ex == null) {
            struct.ex = new rpc_invalid_operation();
          }
          struct.ex.read(iprot);
          struct.setExIsSet(true);
        }
      }
    }

    private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
      return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
    }
  }

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

    private static final org.apache.thrift.protocol.TField MID_FIELD_DESC = new org.apache.thrift.protocol.TField("mid", org.apache.thrift.protocol.TType.I64, (short)1);
    private static final org.apache.thrift.protocol.TField AGGREGATE_EXPR_FIELD_DESC = new org.apache.thrift.protocol.TField("aggregate_expr", org.apache.thrift.protocol.TType.STRING, (short)2);
    private static final org.apache.thrift.protocol.TField FILTER_EX_FIELD_DESC = new org.apache.thrift.protocol.TField("filter_ex", org.apache.thrift.protocol.TType.STRING, (short)3);

    private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new adhoc_aggregate_argsStandardSchemeFactory();
    private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new adhoc_aggregate_argsTupleSchemeFactory();

    private long mid; // required
    private @org.apache.thrift.annotation.Nullable java.lang.String aggregate_expr; // required
    private @org.apache.thrift.annotation.Nullable java.lang.String filter_ex; // 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 {
      MID((short)1, "mid"),
      AGGREGATE_EXPR((short)2, "aggregate_expr"),
      FILTER_EX((short)3, "filter_ex");

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

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

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // MID
            return MID;
          case 2: // AGGREGATE_EXPR
            return AGGREGATE_EXPR;
          case 3: // FILTER_EX
            return FILTER_EX;
          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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByName(java.lang.String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final java.lang.String _fieldName;

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

      public short getThriftFieldId() {
        return _thriftId;
      }

      public java.lang.String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    private static final int __MID_ISSET_ID = 0;
    private byte __isset_bitfield = 0;
    public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.MID, new org.apache.thrift.meta_data.FieldMetaData("mid", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      tmpMap.put(_Fields.AGGREGATE_EXPR, new org.apache.thrift.meta_data.FieldMetaData("aggregate_expr", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
      tmpMap.put(_Fields.FILTER_EX, new org.apache.thrift.meta_data.FieldMetaData("filter_ex", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
      metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(adhoc_aggregate_args.class, metaDataMap);
    }

    public adhoc_aggregate_args() {
    }

    public adhoc_aggregate_args(
      long mid,
      java.lang.String aggregate_expr,
      java.lang.String filter_ex)
    {
      this();
      this.mid = mid;
      setMidIsSet(true);
      this.aggregate_expr = aggregate_expr;
      this.filter_ex = filter_ex;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public adhoc_aggregate_args(adhoc_aggregate_args other) {
      __isset_bitfield = other.__isset_bitfield;
      this.mid = other.mid;
      if (other.isSetAggregateExpr()) {
        this.aggregate_expr = other.aggregate_expr;
      }
      if (other.isSetFilterEx()) {
        this.filter_ex = other.filter_ex;
      }
    }

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

    @Override
    public void clear() {
      setMidIsSet(false);
      this.mid = 0;
      this.aggregate_expr = null;
      this.filter_ex = null;
    }

    public long getMid() {
      return this.mid;
    }

    public adhoc_aggregate_args setMid(long mid) {
      this.mid = mid;
      setMidIsSet(true);
      return this;
    }

    public void unsetMid() {
      __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __MID_ISSET_ID);
    }

    /** Returns true if field mid is set (has been assigned a value) and false otherwise */
    public boolean isSetMid() {
      return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __MID_ISSET_ID);
    }

    public void setMidIsSet(boolean value) {
      __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __MID_ISSET_ID, value);
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.String getAggregateExpr() {
      return this.aggregate_expr;
    }

    public adhoc_aggregate_args setAggregateExpr(@org.apache.thrift.annotation.Nullable java.lang.String aggregate_expr) {
      this.aggregate_expr = aggregate_expr;
      return this;
    }

    public void unsetAggregateExpr() {
      this.aggregate_expr = null;
    }

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

    public void setAggregateExprIsSet(boolean value) {
      if (!value) {
        this.aggregate_expr = null;
      }
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.String getFilterEx() {
      return this.filter_ex;
    }

    public adhoc_aggregate_args setFilterEx(@org.apache.thrift.annotation.Nullable java.lang.String filter_ex) {
      this.filter_ex = filter_ex;
      return this;
    }

    public void unsetFilterEx() {
      this.filter_ex = null;
    }

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

    public void setFilterExIsSet(boolean value) {
      if (!value) {
        this.filter_ex = null;
      }
    }

    public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
      switch (field) {
      case MID:
        if (value == null) {
          unsetMid();
        } else {
          setMid((java.lang.Long)value);
        }
        break;

      case AGGREGATE_EXPR:
        if (value == null) {
          unsetAggregateExpr();
        } else {
          setAggregateExpr((java.lang.String)value);
        }
        break;

      case FILTER_EX:
        if (value == null) {
          unsetFilterEx();
        } else {
          setFilterEx((java.lang.String)value);
        }
        break;

      }
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.Object getFieldValue(_Fields field) {
      switch (field) {
      case MID:
        return getMid();

      case AGGREGATE_EXPR:
        return getAggregateExpr();

      case FILTER_EX:
        return getFilterEx();

      }
      throw new java.lang.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 java.lang.IllegalArgumentException();
      }

      switch (field) {
      case MID:
        return isSetMid();
      case AGGREGATE_EXPR:
        return isSetAggregateExpr();
      case FILTER_EX:
        return isSetFilterEx();
      }
      throw new java.lang.IllegalStateException();
    }

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

    public boolean equals(adhoc_aggregate_args that) {
      if (that == null)
        return false;
      if (this == that)
        return true;

      boolean this_present_mid = true;
      boolean that_present_mid = true;
      if (this_present_mid || that_present_mid) {
        if (!(this_present_mid && that_present_mid))
          return false;
        if (this.mid != that.mid)
          return false;
      }

      boolean this_present_aggregate_expr = true && this.isSetAggregateExpr();
      boolean that_present_aggregate_expr = true && that.isSetAggregateExpr();
      if (this_present_aggregate_expr || that_present_aggregate_expr) {
        if (!(this_present_aggregate_expr && that_present_aggregate_expr))
          return false;
        if (!this.aggregate_expr.equals(that.aggregate_expr))
          return false;
      }

      boolean this_present_filter_ex = true && this.isSetFilterEx();
      boolean that_present_filter_ex = true && that.isSetFilterEx();
      if (this_present_filter_ex || that_present_filter_ex) {
        if (!(this_present_filter_ex && that_present_filter_ex))
          return false;
        if (!this.filter_ex.equals(that.filter_ex))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      int hashCode = 1;

      hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(mid);

      hashCode = hashCode * 8191 + ((isSetAggregateExpr()) ? 131071 : 524287);
      if (isSetAggregateExpr())
        hashCode = hashCode * 8191 + aggregate_expr.hashCode();

      hashCode = hashCode * 8191 + ((isSetFilterEx()) ? 131071 : 524287);
      if (isSetFilterEx())
        hashCode = hashCode * 8191 + filter_ex.hashCode();

      return hashCode;
    }

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

      int lastComparison = 0;

      lastComparison = java.lang.Boolean.valueOf(isSetMid()).compareTo(other.isSetMid());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetMid()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.mid, other.mid);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = java.lang.Boolean.valueOf(isSetAggregateExpr()).compareTo(other.isSetAggregateExpr());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetAggregateExpr()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.aggregate_expr, other.aggregate_expr);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = java.lang.Boolean.valueOf(isSetFilterEx()).compareTo(other.isSetFilterEx());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetFilterEx()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.filter_ex, other.filter_ex);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    @org.apache.thrift.annotation.Nullable
    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

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

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

    @Override
    public java.lang.String toString() {
      java.lang.StringBuilder sb = new java.lang.StringBuilder("adhoc_aggregate_args(");
      boolean first = true;

      sb.append("mid:");
      sb.append(this.mid);
      first = false;
      if (!first) sb.append(", ");
      sb.append("aggregate_expr:");
      if (this.aggregate_expr == null) {
        sb.append("null");
      } else {
        sb.append(this.aggregate_expr);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("filter_ex:");
      if (this.filter_ex == null) {
        sb.append("null");
      } else {
        sb.append(this.filter_ex);
      }
      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, java.lang.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 adhoc_aggregate_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public adhoc_aggregate_argsStandardScheme getScheme() {
        return new adhoc_aggregate_argsStandardScheme();
      }
    }

    private static class adhoc_aggregate_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<adhoc_aggregate_args> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, adhoc_aggregate_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: // MID
              if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
                struct.mid = iprot.readI64();
                struct.setMidIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // AGGREGATE_EXPR
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.aggregate_expr = iprot.readString();
                struct.setAggregateExprIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 3: // FILTER_EX
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.filter_ex = iprot.readString();
                struct.setFilterExIsSet(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, adhoc_aggregate_args struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        oprot.writeFieldBegin(MID_FIELD_DESC);
        oprot.writeI64(struct.mid);
        oprot.writeFieldEnd();
        if (struct.aggregate_expr != null) {
          oprot.writeFieldBegin(AGGREGATE_EXPR_FIELD_DESC);
          oprot.writeString(struct.aggregate_expr);
          oprot.writeFieldEnd();
        }
        if (struct.filter_ex != null) {
          oprot.writeFieldBegin(FILTER_EX_FIELD_DESC);
          oprot.writeString(struct.filter_ex);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class adhoc_aggregate_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public adhoc_aggregate_argsTupleScheme getScheme() {
        return new adhoc_aggregate_argsTupleScheme();
      }
    }

    private static class adhoc_aggregate_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<adhoc_aggregate_args> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, adhoc_aggregate_args struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet optionals = new java.util.BitSet();
        if (struct.isSetMid()) {
          optionals.set(0);
        }
        if (struct.isSetAggregateExpr()) {
          optionals.set(1);
        }
        if (struct.isSetFilterEx()) {
          optionals.set(2);
        }
        oprot.writeBitSet(optionals, 3);
        if (struct.isSetMid()) {
          oprot.writeI64(struct.mid);
        }
        if (struct.isSetAggregateExpr()) {
          oprot.writeString(struct.aggregate_expr);
        }
        if (struct.isSetFilterEx()) {
          oprot.writeString(struct.filter_ex);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, adhoc_aggregate_args struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet incoming = iprot.readBitSet(3);
        if (incoming.get(0)) {
          struct.mid = iprot.readI64();
          struct.setMidIsSet(true);
        }
        if (incoming.get(1)) {
          struct.aggregate_expr = iprot.readString();
          struct.setAggregateExprIsSet(true);
        }
        if (incoming.get(2)) {
          struct.filter_ex = iprot.readString();
          struct.setFilterExIsSet(true);
        }
      }
    }

    private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
      return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
    }
  }

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

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

    private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new adhoc_aggregate_resultStandardSchemeFactory();
    private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new adhoc_aggregate_resultTupleSchemeFactory();

    private @org.apache.thrift.annotation.Nullable java.lang.String success; // required
    private @org.apache.thrift.annotation.Nullable rpc_invalid_operation ex; // 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"),
      EX((short)1, "ex");

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

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

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          case 1: // EX
            return EX;
          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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByName(java.lang.String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final java.lang.String _fieldName;

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

      public short getThriftFieldId() {
        return _thriftId;
      }

      public java.lang.String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.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.STRING)));
      tmpMap.put(_Fields.EX, new org.apache.thrift.meta_data.FieldMetaData("ex", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, rpc_invalid_operation.class)));
      metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(adhoc_aggregate_result.class, metaDataMap);
    }

    public adhoc_aggregate_result() {
    }

    public adhoc_aggregate_result(
      java.lang.String success,
      rpc_invalid_operation ex)
    {
      this();
      this.success = success;
      this.ex = ex;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public adhoc_aggregate_result(adhoc_aggregate_result other) {
      if (other.isSetSuccess()) {
        this.success = other.success;
      }
      if (other.isSetEx()) {
        this.ex = new rpc_invalid_operation(other.ex);
      }
    }

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

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

    @org.apache.thrift.annotation.Nullable
    public java.lang.String getSuccess() {
      return this.success;
    }

    public adhoc_aggregate_result setSuccess(@org.apache.thrift.annotation.Nullable java.lang.String 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;
      }
    }

    @org.apache.thrift.annotation.Nullable
    public rpc_invalid_operation getEx() {
      return this.ex;
    }

    public adhoc_aggregate_result setEx(@org.apache.thrift.annotation.Nullable rpc_invalid_operation ex) {
      this.ex = ex;
      return this;
    }

    public void unsetEx() {
      this.ex = null;
    }

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

    public void setExIsSet(boolean value) {
      if (!value) {
        this.ex = null;
      }
    }

    public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((java.lang.String)value);
        }
        break;

      case EX:
        if (value == null) {
          unsetEx();
        } else {
          setEx((rpc_invalid_operation)value);
        }
        break;

      }
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      case EX:
        return getEx();

      }
      throw new java.lang.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 java.lang.IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      case EX:
        return isSetEx();
      }
      throw new java.lang.IllegalStateException();
    }

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

    public boolean equals(adhoc_aggregate_result that) {
      if (that == null)
        return false;
      if (this == that)
        return true;

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

      boolean this_present_ex = true && this.isSetEx();
      boolean that_present_ex = true && that.isSetEx();
      if (this_present_ex || that_present_ex) {
        if (!(this_present_ex && that_present_ex))
          return false;
        if (!this.ex.equals(that.ex))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      int hashCode = 1;

      hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287);
      if (isSetSuccess())
        hashCode = hashCode * 8191 + success.hashCode();

      hashCode = hashCode * 8191 + ((isSetEx()) ? 131071 : 524287);
      if (isSetEx())
        hashCode = hashCode * 8191 + ex.hashCode();

      return hashCode;
    }

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

      int lastComparison = 0;

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

    @org.apache.thrift.annotation.Nullable
    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

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

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

    @Override
    public java.lang.String toString() {
      java.lang.StringBuilder sb = new java.lang.StringBuilder("adhoc_aggregate_result(");
      boolean first = true;

      sb.append("success:");
      if (this.success == null) {
        sb.append("null");
      } else {
        sb.append(this.success);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("ex:");
      if (this.ex == null) {
        sb.append("null");
      } else {
        sb.append(this.ex);
      }
      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, java.lang.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 adhoc_aggregate_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public adhoc_aggregate_resultStandardScheme getScheme() {
        return new adhoc_aggregate_resultStandardScheme();
      }
    }

    private static class adhoc_aggregate_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<adhoc_aggregate_result> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, adhoc_aggregate_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.STRING) {
                struct.success = iprot.readString();
                struct.setSuccessIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 1: // EX
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                if (struct.ex == null) {
                  struct.ex = new rpc_invalid_operation();
                }
                struct.ex.read(iprot);
                struct.setExIsSet(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, adhoc_aggregate_result struct) throws org.apache.thrift.TException {
        struct.validate();

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

    }

    private static class adhoc_aggregate_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public adhoc_aggregate_resultTupleScheme getScheme() {
        return new adhoc_aggregate_resultTupleScheme();
      }
    }

    private static class adhoc_aggregate_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<adhoc_aggregate_result> {

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

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, adhoc_aggregate_result struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet incoming = iprot.readBitSet(2);
        if (incoming.get(0)) {
          struct.success = iprot.readString();
          struct.setSuccessIsSet(true);
        }
        if (incoming.get(1)) {
          if (struct.ex == null) {
            struct.ex = new rpc_invalid_operation();
          }
          struct.ex.read(iprot);
          struct.setExIsSet(true);
        }
      }
    }

    private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
      return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
    }
  }

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

    private static final org.apache.thrift.protocol.TField MID_FIELD_DESC = new org.apache.thrift.protocol.TField("mid", org.apache.thrift.protocol.TType.I64, (short)1);
    private static final org.apache.thrift.protocol.TField FILTER_EX_FIELD_DESC = new org.apache.thrift.protocol.TField("filter_ex", org.apache.thrift.protocol.TType.STRING, (short)2);

    private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new adhoc_filter_argsStandardSchemeFactory();
    private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new adhoc_filter_argsTupleSchemeFactory();

    private long mid; // required
    private @org.apache.thrift.annotation.Nullable java.lang.String filter_ex; // 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 {
      MID((short)1, "mid"),
      FILTER_EX((short)2, "filter_ex");

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

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

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // MID
            return MID;
          case 2: // FILTER_EX
            return FILTER_EX;
          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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByName(java.lang.String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final java.lang.String _fieldName;

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

      public short getThriftFieldId() {
        return _thriftId;
      }

      public java.lang.String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    private static final int __MID_ISSET_ID = 0;
    private byte __isset_bitfield = 0;
    public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.MID, new org.apache.thrift.meta_data.FieldMetaData("mid", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      tmpMap.put(_Fields.FILTER_EX, new org.apache.thrift.meta_data.FieldMetaData("filter_ex", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
      metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(adhoc_filter_args.class, metaDataMap);
    }

    public adhoc_filter_args() {
    }

    public adhoc_filter_args(
      long mid,
      java.lang.String filter_ex)
    {
      this();
      this.mid = mid;
      setMidIsSet(true);
      this.filter_ex = filter_ex;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public adhoc_filter_args(adhoc_filter_args other) {
      __isset_bitfield = other.__isset_bitfield;
      this.mid = other.mid;
      if (other.isSetFilterEx()) {
        this.filter_ex = other.filter_ex;
      }
    }

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

    @Override
    public void clear() {
      setMidIsSet(false);
      this.mid = 0;
      this.filter_ex = null;
    }

    public long getMid() {
      return this.mid;
    }

    public adhoc_filter_args setMid(long mid) {
      this.mid = mid;
      setMidIsSet(true);
      return this;
    }

    public void unsetMid() {
      __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __MID_ISSET_ID);
    }

    /** Returns true if field mid is set (has been assigned a value) and false otherwise */
    public boolean isSetMid() {
      return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __MID_ISSET_ID);
    }

    public void setMidIsSet(boolean value) {
      __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __MID_ISSET_ID, value);
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.String getFilterEx() {
      return this.filter_ex;
    }

    public adhoc_filter_args setFilterEx(@org.apache.thrift.annotation.Nullable java.lang.String filter_ex) {
      this.filter_ex = filter_ex;
      return this;
    }

    public void unsetFilterEx() {
      this.filter_ex = null;
    }

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

    public void setFilterExIsSet(boolean value) {
      if (!value) {
        this.filter_ex = null;
      }
    }

    public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
      switch (field) {
      case MID:
        if (value == null) {
          unsetMid();
        } else {
          setMid((java.lang.Long)value);
        }
        break;

      case FILTER_EX:
        if (value == null) {
          unsetFilterEx();
        } else {
          setFilterEx((java.lang.String)value);
        }
        break;

      }
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.Object getFieldValue(_Fields field) {
      switch (field) {
      case MID:
        return getMid();

      case FILTER_EX:
        return getFilterEx();

      }
      throw new java.lang.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 java.lang.IllegalArgumentException();
      }

      switch (field) {
      case MID:
        return isSetMid();
      case FILTER_EX:
        return isSetFilterEx();
      }
      throw new java.lang.IllegalStateException();
    }

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

    public boolean equals(adhoc_filter_args that) {
      if (that == null)
        return false;
      if (this == that)
        return true;

      boolean this_present_mid = true;
      boolean that_present_mid = true;
      if (this_present_mid || that_present_mid) {
        if (!(this_present_mid && that_present_mid))
          return false;
        if (this.mid != that.mid)
          return false;
      }

      boolean this_present_filter_ex = true && this.isSetFilterEx();
      boolean that_present_filter_ex = true && that.isSetFilterEx();
      if (this_present_filter_ex || that_present_filter_ex) {
        if (!(this_present_filter_ex && that_present_filter_ex))
          return false;
        if (!this.filter_ex.equals(that.filter_ex))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      int hashCode = 1;

      hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(mid);

      hashCode = hashCode * 8191 + ((isSetFilterEx()) ? 131071 : 524287);
      if (isSetFilterEx())
        hashCode = hashCode * 8191 + filter_ex.hashCode();

      return hashCode;
    }

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

      int lastComparison = 0;

      lastComparison = java.lang.Boolean.valueOf(isSetMid()).compareTo(other.isSetMid());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetMid()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.mid, other.mid);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = java.lang.Boolean.valueOf(isSetFilterEx()).compareTo(other.isSetFilterEx());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetFilterEx()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.filter_ex, other.filter_ex);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    @org.apache.thrift.annotation.Nullable
    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

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

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

    @Override
    public java.lang.String toString() {
      java.lang.StringBuilder sb = new java.lang.StringBuilder("adhoc_filter_args(");
      boolean first = true;

      sb.append("mid:");
      sb.append(this.mid);
      first = false;
      if (!first) sb.append(", ");
      sb.append("filter_ex:");
      if (this.filter_ex == null) {
        sb.append("null");
      } else {
        sb.append(this.filter_ex);
      }
      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, java.lang.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 adhoc_filter_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public adhoc_filter_argsStandardScheme getScheme() {
        return new adhoc_filter_argsStandardScheme();
      }
    }

    private static class adhoc_filter_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<adhoc_filter_args> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, adhoc_filter_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: // MID
              if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
                struct.mid = iprot.readI64();
                struct.setMidIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // FILTER_EX
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.filter_ex = iprot.readString();
                struct.setFilterExIsSet(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, adhoc_filter_args struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        oprot.writeFieldBegin(MID_FIELD_DESC);
        oprot.writeI64(struct.mid);
        oprot.writeFieldEnd();
        if (struct.filter_ex != null) {
          oprot.writeFieldBegin(FILTER_EX_FIELD_DESC);
          oprot.writeString(struct.filter_ex);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class adhoc_filter_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public adhoc_filter_argsTupleScheme getScheme() {
        return new adhoc_filter_argsTupleScheme();
      }
    }

    private static class adhoc_filter_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<adhoc_filter_args> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, adhoc_filter_args struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet optionals = new java.util.BitSet();
        if (struct.isSetMid()) {
          optionals.set(0);
        }
        if (struct.isSetFilterEx()) {
          optionals.set(1);
        }
        oprot.writeBitSet(optionals, 2);
        if (struct.isSetMid()) {
          oprot.writeI64(struct.mid);
        }
        if (struct.isSetFilterEx()) {
          oprot.writeString(struct.filter_ex);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, adhoc_filter_args struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet incoming = iprot.readBitSet(2);
        if (incoming.get(0)) {
          struct.mid = iprot.readI64();
          struct.setMidIsSet(true);
        }
        if (incoming.get(1)) {
          struct.filter_ex = iprot.readString();
          struct.setFilterExIsSet(true);
        }
      }
    }

    private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
      return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
    }
  }

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

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

    private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new adhoc_filter_resultStandardSchemeFactory();
    private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new adhoc_filter_resultTupleSchemeFactory();

    private @org.apache.thrift.annotation.Nullable rpc_iterator_handle success; // required
    private @org.apache.thrift.annotation.Nullable rpc_invalid_operation ex; // 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"),
      EX((short)1, "ex");

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

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

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          case 1: // EX
            return EX;
          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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByName(java.lang.String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final java.lang.String _fieldName;

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

      public short getThriftFieldId() {
        return _thriftId;
      }

      public java.lang.String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.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, rpc_iterator_handle.class)));
      tmpMap.put(_Fields.EX, new org.apache.thrift.meta_data.FieldMetaData("ex", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, rpc_invalid_operation.class)));
      metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(adhoc_filter_result.class, metaDataMap);
    }

    public adhoc_filter_result() {
    }

    public adhoc_filter_result(
      rpc_iterator_handle success,
      rpc_invalid_operation ex)
    {
      this();
      this.success = success;
      this.ex = ex;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public adhoc_filter_result(adhoc_filter_result other) {
      if (other.isSetSuccess()) {
        this.success = new rpc_iterator_handle(other.success);
      }
      if (other.isSetEx()) {
        this.ex = new rpc_invalid_operation(other.ex);
      }
    }

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

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

    @org.apache.thrift.annotation.Nullable
    public rpc_iterator_handle getSuccess() {
      return this.success;
    }

    public adhoc_filter_result setSuccess(@org.apache.thrift.annotation.Nullable rpc_iterator_handle 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;
      }
    }

    @org.apache.thrift.annotation.Nullable
    public rpc_invalid_operation getEx() {
      return this.ex;
    }

    public adhoc_filter_result setEx(@org.apache.thrift.annotation.Nullable rpc_invalid_operation ex) {
      this.ex = ex;
      return this;
    }

    public void unsetEx() {
      this.ex = null;
    }

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

    public void setExIsSet(boolean value) {
      if (!value) {
        this.ex = null;
      }
    }

    public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((rpc_iterator_handle)value);
        }
        break;

      case EX:
        if (value == null) {
          unsetEx();
        } else {
          setEx((rpc_invalid_operation)value);
        }
        break;

      }
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      case EX:
        return getEx();

      }
      throw new java.lang.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 java.lang.IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      case EX:
        return isSetEx();
      }
      throw new java.lang.IllegalStateException();
    }

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

    public boolean equals(adhoc_filter_result that) {
      if (that == null)
        return false;
      if (this == that)
        return true;

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

      boolean this_present_ex = true && this.isSetEx();
      boolean that_present_ex = true && that.isSetEx();
      if (this_present_ex || that_present_ex) {
        if (!(this_present_ex && that_present_ex))
          return false;
        if (!this.ex.equals(that.ex))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      int hashCode = 1;

      hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287);
      if (isSetSuccess())
        hashCode = hashCode * 8191 + success.hashCode();

      hashCode = hashCode * 8191 + ((isSetEx()) ? 131071 : 524287);
      if (isSetEx())
        hashCode = hashCode * 8191 + ex.hashCode();

      return hashCode;
    }

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

      int lastComparison = 0;

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

    @org.apache.thrift.annotation.Nullable
    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

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

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

    @Override
    public java.lang.String toString() {
      java.lang.StringBuilder sb = new java.lang.StringBuilder("adhoc_filter_result(");
      boolean first = true;

      sb.append("success:");
      if (this.success == null) {
        sb.append("null");
      } else {
        sb.append(this.success);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("ex:");
      if (this.ex == null) {
        sb.append("null");
      } else {
        sb.append(this.ex);
      }
      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, java.lang.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 adhoc_filter_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public adhoc_filter_resultStandardScheme getScheme() {
        return new adhoc_filter_resultStandardScheme();
      }
    }

    private static class adhoc_filter_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<adhoc_filter_result> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, adhoc_filter_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) {
                if (struct.success == null) {
                  struct.success = new rpc_iterator_handle();
                }
                struct.success.read(iprot);
                struct.setSuccessIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 1: // EX
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                if (struct.ex == null) {
                  struct.ex = new rpc_invalid_operation();
                }
                struct.ex.read(iprot);
                struct.setExIsSet(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, adhoc_filter_result struct) throws org.apache.thrift.TException {
        struct.validate();

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

    }

    private static class adhoc_filter_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public adhoc_filter_resultTupleScheme getScheme() {
        return new adhoc_filter_resultTupleScheme();
      }
    }

    private static class adhoc_filter_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<adhoc_filter_result> {

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

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, adhoc_filter_result struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet incoming = iprot.readBitSet(2);
        if (incoming.get(0)) {
          if (struct.success == null) {
            struct.success = new rpc_iterator_handle();
          }
          struct.success.read(iprot);
          struct.setSuccessIsSet(true);
        }
        if (incoming.get(1)) {
          if (struct.ex == null) {
            struct.ex = new rpc_invalid_operation();
          }
          struct.ex.read(iprot);
          struct.setExIsSet(true);
        }
      }
    }

    private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
      return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
    }
  }

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

    private static final org.apache.thrift.protocol.TField MID_FIELD_DESC = new org.apache.thrift.protocol.TField("mid", org.apache.thrift.protocol.TType.I64, (short)1);
    private static final org.apache.thrift.protocol.TField FILTER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("filter_id", org.apache.thrift.protocol.TType.STRING, (short)2);
    private static final org.apache.thrift.protocol.TField BEG_MS_FIELD_DESC = new org.apache.thrift.protocol.TField("beg_ms", org.apache.thrift.protocol.TType.I64, (short)3);
    private static final org.apache.thrift.protocol.TField END_MS_FIELD_DESC = new org.apache.thrift.protocol.TField("end_ms", org.apache.thrift.protocol.TType.I64, (short)4);

    private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new predef_filter_argsStandardSchemeFactory();
    private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new predef_filter_argsTupleSchemeFactory();

    private long mid; // required
    private @org.apache.thrift.annotation.Nullable java.lang.String filter_id; // required
    private long beg_ms; // required
    private long end_ms; // 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 {
      MID((short)1, "mid"),
      FILTER_ID((short)2, "filter_id"),
      BEG_MS((short)3, "beg_ms"),
      END_MS((short)4, "end_ms");

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

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

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // MID
            return MID;
          case 2: // FILTER_ID
            return FILTER_ID;
          case 3: // BEG_MS
            return BEG_MS;
          case 4: // END_MS
            return END_MS;
          default:
            return null;
        }
      }

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

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByName(java.lang.String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final java.lang.String _fieldName;

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

      public short getThriftFieldId() {
        return _thriftId;
      }

      public java.lang.String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    private static final int __MID_ISSET_ID = 0;
    private static final int __BEG_MS_ISSET_ID = 1;
    private static final int __END_MS_ISSET_ID = 2;
    private byte __isset_bitfield = 0;
    public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.MID, new org.apache.thrift.meta_data.FieldMetaData("mid", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      tmpMap.put(_Fields.FILTER_ID, new org.apache.thrift.meta_data.FieldMetaData("filter_id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
      tmpMap.put(_Fields.BEG_MS, new org.apache.thrift.meta_data.FieldMetaData("beg_ms", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      tmpMap.put(_Fields.END_MS, new org.apache.thrift.meta_data.FieldMetaData("end_ms", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(predef_filter_args.class, metaDataMap);
    }

    public predef_filter_args() {
    }

    public predef_filter_args(
      long mid,
      java.lang.String filter_id,
      long beg_ms,
      long end_ms)
    {
      this();
      this.mid = mid;
      setMidIsSet(true);
      this.filter_id = filter_id;
      this.beg_ms = beg_ms;
      setBegMsIsSet(true);
      this.end_ms = end_ms;
      setEndMsIsSet(true);
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public predef_filter_args(predef_filter_args other) {
      __isset_bitfield = other.__isset_bitfield;
      this.mid = other.mid;
      if (other.isSetFilterId()) {
        this.filter_id = other.filter_id;
      }
      this.beg_ms = other.beg_ms;
      this.end_ms = other.end_ms;
    }

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

    @Override
    public void clear() {
      setMidIsSet(false);
      this.mid = 0;
      this.filter_id = null;
      setBegMsIsSet(false);
      this.beg_ms = 0;
      setEndMsIsSet(false);
      this.end_ms = 0;
    }

    public long getMid() {
      return this.mid;
    }

    public predef_filter_args setMid(long mid) {
      this.mid = mid;
      setMidIsSet(true);
      return this;
    }

    public void unsetMid() {
      __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __MID_ISSET_ID);
    }

    /** Returns true if field mid is set (has been assigned a value) and false otherwise */
    public boolean isSetMid() {
      return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __MID_ISSET_ID);
    }

    public void setMidIsSet(boolean value) {
      __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __MID_ISSET_ID, value);
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.String getFilterId() {
      return this.filter_id;
    }

    public predef_filter_args setFilterId(@org.apache.thrift.annotation.Nullable java.lang.String filter_id) {
      this.filter_id = filter_id;
      return this;
    }

    public void unsetFilterId() {
      this.filter_id = null;
    }

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

    public void setFilterIdIsSet(boolean value) {
      if (!value) {
        this.filter_id = null;
      }
    }

    public long getBegMs() {
      return this.beg_ms;
    }

    public predef_filter_args setBegMs(long beg_ms) {
      this.beg_ms = beg_ms;
      setBegMsIsSet(true);
      return this;
    }

    public void unsetBegMs() {
      __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __BEG_MS_ISSET_ID);
    }

    /** Returns true if field beg_ms is set (has been assigned a value) and false otherwise */
    public boolean isSetBegMs() {
      return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __BEG_MS_ISSET_ID);
    }

    public void setBegMsIsSet(boolean value) {
      __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __BEG_MS_ISSET_ID, value);
    }

    public long getEndMs() {
      return this.end_ms;
    }

    public predef_filter_args setEndMs(long end_ms) {
      this.end_ms = end_ms;
      setEndMsIsSet(true);
      return this;
    }

    public void unsetEndMs() {
      __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __END_MS_ISSET_ID);
    }

    /** Returns true if field end_ms is set (has been assigned a value) and false otherwise */
    public boolean isSetEndMs() {
      return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __END_MS_ISSET_ID);
    }

    public void setEndMsIsSet(boolean value) {
      __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __END_MS_ISSET_ID, value);
    }

    public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
      switch (field) {
      case MID:
        if (value == null) {
          unsetMid();
        } else {
          setMid((java.lang.Long)value);
        }
        break;

      case FILTER_ID:
        if (value == null) {
          unsetFilterId();
        } else {
          setFilterId((java.lang.String)value);
        }
        break;

      case BEG_MS:
        if (value == null) {
          unsetBegMs();
        } else {
          setBegMs((java.lang.Long)value);
        }
        break;

      case END_MS:
        if (value == null) {
          unsetEndMs();
        } else {
          setEndMs((java.lang.Long)value);
        }
        break;

      }
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.Object getFieldValue(_Fields field) {
      switch (field) {
      case MID:
        return getMid();

      case FILTER_ID:
        return getFilterId();

      case BEG_MS:
        return getBegMs();

      case END_MS:
        return getEndMs();

      }
      throw new java.lang.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 java.lang.IllegalArgumentException();
      }

      switch (field) {
      case MID:
        return isSetMid();
      case FILTER_ID:
        return isSetFilterId();
      case BEG_MS:
        return isSetBegMs();
      case END_MS:
        return isSetEndMs();
      }
      throw new java.lang.IllegalStateException();
    }

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

    public boolean equals(predef_filter_args that) {
      if (that == null)
        return false;
      if (this == that)
        return true;

      boolean this_present_mid = true;
      boolean that_present_mid = true;
      if (this_present_mid || that_present_mid) {
        if (!(this_present_mid && that_present_mid))
          return false;
        if (this.mid != that.mid)
          return false;
      }

      boolean this_present_filter_id = true && this.isSetFilterId();
      boolean that_present_filter_id = true && that.isSetFilterId();
      if (this_present_filter_id || that_present_filter_id) {
        if (!(this_present_filter_id && that_present_filter_id))
          return false;
        if (!this.filter_id.equals(that.filter_id))
          return false;
      }

      boolean this_present_beg_ms = true;
      boolean that_present_beg_ms = true;
      if (this_present_beg_ms || that_present_beg_ms) {
        if (!(this_present_beg_ms && that_present_beg_ms))
          return false;
        if (this.beg_ms != that.beg_ms)
          return false;
      }

      boolean this_present_end_ms = true;
      boolean that_present_end_ms = true;
      if (this_present_end_ms || that_present_end_ms) {
        if (!(this_present_end_ms && that_present_end_ms))
          return false;
        if (this.end_ms != that.end_ms)
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      int hashCode = 1;

      hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(mid);

      hashCode = hashCode * 8191 + ((isSetFilterId()) ? 131071 : 524287);
      if (isSetFilterId())
        hashCode = hashCode * 8191 + filter_id.hashCode();

      hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(beg_ms);

      hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(end_ms);

      return hashCode;
    }

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

      int lastComparison = 0;

      lastComparison = java.lang.Boolean.valueOf(isSetMid()).compareTo(other.isSetMid());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetMid()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.mid, other.mid);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = java.lang.Boolean.valueOf(isSetFilterId()).compareTo(other.isSetFilterId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetFilterId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.filter_id, other.filter_id);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = java.lang.Boolean.valueOf(isSetBegMs()).compareTo(other.isSetBegMs());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetBegMs()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.beg_ms, other.beg_ms);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = java.lang.Boolean.valueOf(isSetEndMs()).compareTo(other.isSetEndMs());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetEndMs()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.end_ms, other.end_ms);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    @org.apache.thrift.annotation.Nullable
    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

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

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

    @Override
    public java.lang.String toString() {
      java.lang.StringBuilder sb = new java.lang.StringBuilder("predef_filter_args(");
      boolean first = true;

      sb.append("mid:");
      sb.append(this.mid);
      first = false;
      if (!first) sb.append(", ");
      sb.append("filter_id:");
      if (this.filter_id == null) {
        sb.append("null");
      } else {
        sb.append(this.filter_id);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("beg_ms:");
      sb.append(this.beg_ms);
      first = false;
      if (!first) sb.append(", ");
      sb.append("end_ms:");
      sb.append(this.end_ms);
      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, java.lang.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 predef_filter_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public predef_filter_argsStandardScheme getScheme() {
        return new predef_filter_argsStandardScheme();
      }
    }

    private static class predef_filter_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<predef_filter_args> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, predef_filter_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: // MID
              if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
                struct.mid = iprot.readI64();
                struct.setMidIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // FILTER_ID
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.filter_id = iprot.readString();
                struct.setFilterIdIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 3: // BEG_MS
              if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
                struct.beg_ms = iprot.readI64();
                struct.setBegMsIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 4: // END_MS
              if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
                struct.end_ms = iprot.readI64();
                struct.setEndMsIsSet(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, predef_filter_args struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        oprot.writeFieldBegin(MID_FIELD_DESC);
        oprot.writeI64(struct.mid);
        oprot.writeFieldEnd();
        if (struct.filter_id != null) {
          oprot.writeFieldBegin(FILTER_ID_FIELD_DESC);
          oprot.writeString(struct.filter_id);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldBegin(BEG_MS_FIELD_DESC);
        oprot.writeI64(struct.beg_ms);
        oprot.writeFieldEnd();
        oprot.writeFieldBegin(END_MS_FIELD_DESC);
        oprot.writeI64(struct.end_ms);
        oprot.writeFieldEnd();
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class predef_filter_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public predef_filter_argsTupleScheme getScheme() {
        return new predef_filter_argsTupleScheme();
      }
    }

    private static class predef_filter_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<predef_filter_args> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, predef_filter_args struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet optionals = new java.util.BitSet();
        if (struct.isSetMid()) {
          optionals.set(0);
        }
        if (struct.isSetFilterId()) {
          optionals.set(1);
        }
        if (struct.isSetBegMs()) {
          optionals.set(2);
        }
        if (struct.isSetEndMs()) {
          optionals.set(3);
        }
        oprot.writeBitSet(optionals, 4);
        if (struct.isSetMid()) {
          oprot.writeI64(struct.mid);
        }
        if (struct.isSetFilterId()) {
          oprot.writeString(struct.filter_id);
        }
        if (struct.isSetBegMs()) {
          oprot.writeI64(struct.beg_ms);
        }
        if (struct.isSetEndMs()) {
          oprot.writeI64(struct.end_ms);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, predef_filter_args struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet incoming = iprot.readBitSet(4);
        if (incoming.get(0)) {
          struct.mid = iprot.readI64();
          struct.setMidIsSet(true);
        }
        if (incoming.get(1)) {
          struct.filter_id = iprot.readString();
          struct.setFilterIdIsSet(true);
        }
        if (incoming.get(2)) {
          struct.beg_ms = iprot.readI64();
          struct.setBegMsIsSet(true);
        }
        if (incoming.get(3)) {
          struct.end_ms = iprot.readI64();
          struct.setEndMsIsSet(true);
        }
      }
    }

    private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
      return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
    }
  }

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

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

    private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new predef_filter_resultStandardSchemeFactory();
    private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new predef_filter_resultTupleSchemeFactory();

    private @org.apache.thrift.annotation.Nullable rpc_iterator_handle success; // required
    private @org.apache.thrift.annotation.Nullable rpc_invalid_operation ex; // 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"),
      EX((short)1, "ex");

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

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

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          case 1: // EX
            return EX;
          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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByName(java.lang.String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final java.lang.String _fieldName;

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

      public short getThriftFieldId() {
        return _thriftId;
      }

      public java.lang.String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.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, rpc_iterator_handle.class)));
      tmpMap.put(_Fields.EX, new org.apache.thrift.meta_data.FieldMetaData("ex", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, rpc_invalid_operation.class)));
      metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(predef_filter_result.class, metaDataMap);
    }

    public predef_filter_result() {
    }

    public predef_filter_result(
      rpc_iterator_handle success,
      rpc_invalid_operation ex)
    {
      this();
      this.success = success;
      this.ex = ex;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public predef_filter_result(predef_filter_result other) {
      if (other.isSetSuccess()) {
        this.success = new rpc_iterator_handle(other.success);
      }
      if (other.isSetEx()) {
        this.ex = new rpc_invalid_operation(other.ex);
      }
    }

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

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

    @org.apache.thrift.annotation.Nullable
    public rpc_iterator_handle getSuccess() {
      return this.success;
    }

    public predef_filter_result setSuccess(@org.apache.thrift.annotation.Nullable rpc_iterator_handle 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;
      }
    }

    @org.apache.thrift.annotation.Nullable
    public rpc_invalid_operation getEx() {
      return this.ex;
    }

    public predef_filter_result setEx(@org.apache.thrift.annotation.Nullable rpc_invalid_operation ex) {
      this.ex = ex;
      return this;
    }

    public void unsetEx() {
      this.ex = null;
    }

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

    public void setExIsSet(boolean value) {
      if (!value) {
        this.ex = null;
      }
    }

    public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((rpc_iterator_handle)value);
        }
        break;

      case EX:
        if (value == null) {
          unsetEx();
        } else {
          setEx((rpc_invalid_operation)value);
        }
        break;

      }
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      case EX:
        return getEx();

      }
      throw new java.lang.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 java.lang.IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      case EX:
        return isSetEx();
      }
      throw new java.lang.IllegalStateException();
    }

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

    public boolean equals(predef_filter_result that) {
      if (that == null)
        return false;
      if (this == that)
        return true;

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

      boolean this_present_ex = true && this.isSetEx();
      boolean that_present_ex = true && that.isSetEx();
      if (this_present_ex || that_present_ex) {
        if (!(this_present_ex && that_present_ex))
          return false;
        if (!this.ex.equals(that.ex))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      int hashCode = 1;

      hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287);
      if (isSetSuccess())
        hashCode = hashCode * 8191 + success.hashCode();

      hashCode = hashCode * 8191 + ((isSetEx()) ? 131071 : 524287);
      if (isSetEx())
        hashCode = hashCode * 8191 + ex.hashCode();

      return hashCode;
    }

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

      int lastComparison = 0;

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

    @org.apache.thrift.annotation.Nullable
    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

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

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

    @Override
    public java.lang.String toString() {
      java.lang.StringBuilder sb = new java.lang.StringBuilder("predef_filter_result(");
      boolean first = true;

      sb.append("success:");
      if (this.success == null) {
        sb.append("null");
      } else {
        sb.append(this.success);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("ex:");
      if (this.ex == null) {
        sb.append("null");
      } else {
        sb.append(this.ex);
      }
      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, java.lang.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 predef_filter_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public predef_filter_resultStandardScheme getScheme() {
        return new predef_filter_resultStandardScheme();
      }
    }

    private static class predef_filter_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<predef_filter_result> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, predef_filter_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) {
                if (struct.success == null) {
                  struct.success = new rpc_iterator_handle();
                }
                struct.success.read(iprot);
                struct.setSuccessIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 1: // EX
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                if (struct.ex == null) {
                  struct.ex = new rpc_invalid_operation();
                }
                struct.ex.read(iprot);
                struct.setExIsSet(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, predef_filter_result struct) throws org.apache.thrift.TException {
        struct.validate();

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

    }

    private static class predef_filter_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public predef_filter_resultTupleScheme getScheme() {
        return new predef_filter_resultTupleScheme();
      }
    }

    private static class predef_filter_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<predef_filter_result> {

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

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, predef_filter_result struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet incoming = iprot.readBitSet(2);
        if (incoming.get(0)) {
          if (struct.success == null) {
            struct.success = new rpc_iterator_handle();
          }
          struct.success.read(iprot);
          struct.setSuccessIsSet(true);
        }
        if (incoming.get(1)) {
          if (struct.ex == null) {
            struct.ex = new rpc_invalid_operation();
          }
          struct.ex.read(iprot);
          struct.setExIsSet(true);
        }
      }
    }

    private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
      return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
    }
  }

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

    private static final org.apache.thrift.protocol.TField MID_FIELD_DESC = new org.apache.thrift.protocol.TField("mid", org.apache.thrift.protocol.TType.I64, (short)1);
    private static final org.apache.thrift.protocol.TField FILTER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("filter_id", org.apache.thrift.protocol.TType.STRING, (short)2);
    private static final org.apache.thrift.protocol.TField FILTER_EX_FIELD_DESC = new org.apache.thrift.protocol.TField("filter_ex", org.apache.thrift.protocol.TType.STRING, (short)3);
    private static final org.apache.thrift.protocol.TField BEG_MS_FIELD_DESC = new org.apache.thrift.protocol.TField("beg_ms", org.apache.thrift.protocol.TType.I64, (short)4);
    private static final org.apache.thrift.protocol.TField END_MS_FIELD_DESC = new org.apache.thrift.protocol.TField("end_ms", org.apache.thrift.protocol.TType.I64, (short)5);

    private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new combined_filter_argsStandardSchemeFactory();
    private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new combined_filter_argsTupleSchemeFactory();

    private long mid; // required
    private @org.apache.thrift.annotation.Nullable java.lang.String filter_id; // required
    private @org.apache.thrift.annotation.Nullable java.lang.String filter_ex; // required
    private long beg_ms; // required
    private long end_ms; // 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 {
      MID((short)1, "mid"),
      FILTER_ID((short)2, "filter_id"),
      FILTER_EX((short)3, "filter_ex"),
      BEG_MS((short)4, "beg_ms"),
      END_MS((short)5, "end_ms");

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

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

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // MID
            return MID;
          case 2: // FILTER_ID
            return FILTER_ID;
          case 3: // FILTER_EX
            return FILTER_EX;
          case 4: // BEG_MS
            return BEG_MS;
          case 5: // END_MS
            return END_MS;
          default:
            return null;
        }
      }

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

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByName(java.lang.String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final java.lang.String _fieldName;

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

      public short getThriftFieldId() {
        return _thriftId;
      }

      public java.lang.String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    private static final int __MID_ISSET_ID = 0;
    private static final int __BEG_MS_ISSET_ID = 1;
    private static final int __END_MS_ISSET_ID = 2;
    private byte __isset_bitfield = 0;
    public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.MID, new org.apache.thrift.meta_data.FieldMetaData("mid", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      tmpMap.put(_Fields.FILTER_ID, new org.apache.thrift.meta_data.FieldMetaData("filter_id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
      tmpMap.put(_Fields.FILTER_EX, new org.apache.thrift.meta_data.FieldMetaData("filter_ex", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
      tmpMap.put(_Fields.BEG_MS, new org.apache.thrift.meta_data.FieldMetaData("beg_ms", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      tmpMap.put(_Fields.END_MS, new org.apache.thrift.meta_data.FieldMetaData("end_ms", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(combined_filter_args.class, metaDataMap);
    }

    public combined_filter_args() {
    }

    public combined_filter_args(
      long mid,
      java.lang.String filter_id,
      java.lang.String filter_ex,
      long beg_ms,
      long end_ms)
    {
      this();
      this.mid = mid;
      setMidIsSet(true);
      this.filter_id = filter_id;
      this.filter_ex = filter_ex;
      this.beg_ms = beg_ms;
      setBegMsIsSet(true);
      this.end_ms = end_ms;
      setEndMsIsSet(true);
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public combined_filter_args(combined_filter_args other) {
      __isset_bitfield = other.__isset_bitfield;
      this.mid = other.mid;
      if (other.isSetFilterId()) {
        this.filter_id = other.filter_id;
      }
      if (other.isSetFilterEx()) {
        this.filter_ex = other.filter_ex;
      }
      this.beg_ms = other.beg_ms;
      this.end_ms = other.end_ms;
    }

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

    @Override
    public void clear() {
      setMidIsSet(false);
      this.mid = 0;
      this.filter_id = null;
      this.filter_ex = null;
      setBegMsIsSet(false);
      this.beg_ms = 0;
      setEndMsIsSet(false);
      this.end_ms = 0;
    }

    public long getMid() {
      return this.mid;
    }

    public combined_filter_args setMid(long mid) {
      this.mid = mid;
      setMidIsSet(true);
      return this;
    }

    public void unsetMid() {
      __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __MID_ISSET_ID);
    }

    /** Returns true if field mid is set (has been assigned a value) and false otherwise */
    public boolean isSetMid() {
      return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __MID_ISSET_ID);
    }

    public void setMidIsSet(boolean value) {
      __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __MID_ISSET_ID, value);
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.String getFilterId() {
      return this.filter_id;
    }

    public combined_filter_args setFilterId(@org.apache.thrift.annotation.Nullable java.lang.String filter_id) {
      this.filter_id = filter_id;
      return this;
    }

    public void unsetFilterId() {
      this.filter_id = null;
    }

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

    public void setFilterIdIsSet(boolean value) {
      if (!value) {
        this.filter_id = null;
      }
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.String getFilterEx() {
      return this.filter_ex;
    }

    public combined_filter_args setFilterEx(@org.apache.thrift.annotation.Nullable java.lang.String filter_ex) {
      this.filter_ex = filter_ex;
      return this;
    }

    public void unsetFilterEx() {
      this.filter_ex = null;
    }

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

    public void setFilterExIsSet(boolean value) {
      if (!value) {
        this.filter_ex = null;
      }
    }

    public long getBegMs() {
      return this.beg_ms;
    }

    public combined_filter_args setBegMs(long beg_ms) {
      this.beg_ms = beg_ms;
      setBegMsIsSet(true);
      return this;
    }

    public void unsetBegMs() {
      __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __BEG_MS_ISSET_ID);
    }

    /** Returns true if field beg_ms is set (has been assigned a value) and false otherwise */
    public boolean isSetBegMs() {
      return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __BEG_MS_ISSET_ID);
    }

    public void setBegMsIsSet(boolean value) {
      __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __BEG_MS_ISSET_ID, value);
    }

    public long getEndMs() {
      return this.end_ms;
    }

    public combined_filter_args setEndMs(long end_ms) {
      this.end_ms = end_ms;
      setEndMsIsSet(true);
      return this;
    }

    public void unsetEndMs() {
      __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __END_MS_ISSET_ID);
    }

    /** Returns true if field end_ms is set (has been assigned a value) and false otherwise */
    public boolean isSetEndMs() {
      return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __END_MS_ISSET_ID);
    }

    public void setEndMsIsSet(boolean value) {
      __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __END_MS_ISSET_ID, value);
    }

    public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
      switch (field) {
      case MID:
        if (value == null) {
          unsetMid();
        } else {
          setMid((java.lang.Long)value);
        }
        break;

      case FILTER_ID:
        if (value == null) {
          unsetFilterId();
        } else {
          setFilterId((java.lang.String)value);
        }
        break;

      case FILTER_EX:
        if (value == null) {
          unsetFilterEx();
        } else {
          setFilterEx((java.lang.String)value);
        }
        break;

      case BEG_MS:
        if (value == null) {
          unsetBegMs();
        } else {
          setBegMs((java.lang.Long)value);
        }
        break;

      case END_MS:
        if (value == null) {
          unsetEndMs();
        } else {
          setEndMs((java.lang.Long)value);
        }
        break;

      }
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.Object getFieldValue(_Fields field) {
      switch (field) {
      case MID:
        return getMid();

      case FILTER_ID:
        return getFilterId();

      case FILTER_EX:
        return getFilterEx();

      case BEG_MS:
        return getBegMs();

      case END_MS:
        return getEndMs();

      }
      throw new java.lang.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 java.lang.IllegalArgumentException();
      }

      switch (field) {
      case MID:
        return isSetMid();
      case FILTER_ID:
        return isSetFilterId();
      case FILTER_EX:
        return isSetFilterEx();
      case BEG_MS:
        return isSetBegMs();
      case END_MS:
        return isSetEndMs();
      }
      throw new java.lang.IllegalStateException();
    }

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

    public boolean equals(combined_filter_args that) {
      if (that == null)
        return false;
      if (this == that)
        return true;

      boolean this_present_mid = true;
      boolean that_present_mid = true;
      if (this_present_mid || that_present_mid) {
        if (!(this_present_mid && that_present_mid))
          return false;
        if (this.mid != that.mid)
          return false;
      }

      boolean this_present_filter_id = true && this.isSetFilterId();
      boolean that_present_filter_id = true && that.isSetFilterId();
      if (this_present_filter_id || that_present_filter_id) {
        if (!(this_present_filter_id && that_present_filter_id))
          return false;
        if (!this.filter_id.equals(that.filter_id))
          return false;
      }

      boolean this_present_filter_ex = true && this.isSetFilterEx();
      boolean that_present_filter_ex = true && that.isSetFilterEx();
      if (this_present_filter_ex || that_present_filter_ex) {
        if (!(this_present_filter_ex && that_present_filter_ex))
          return false;
        if (!this.filter_ex.equals(that.filter_ex))
          return false;
      }

      boolean this_present_beg_ms = true;
      boolean that_present_beg_ms = true;
      if (this_present_beg_ms || that_present_beg_ms) {
        if (!(this_present_beg_ms && that_present_beg_ms))
          return false;
        if (this.beg_ms != that.beg_ms)
          return false;
      }

      boolean this_present_end_ms = true;
      boolean that_present_end_ms = true;
      if (this_present_end_ms || that_present_end_ms) {
        if (!(this_present_end_ms && that_present_end_ms))
          return false;
        if (this.end_ms != that.end_ms)
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      int hashCode = 1;

      hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(mid);

      hashCode = hashCode * 8191 + ((isSetFilterId()) ? 131071 : 524287);
      if (isSetFilterId())
        hashCode = hashCode * 8191 + filter_id.hashCode();

      hashCode = hashCode * 8191 + ((isSetFilterEx()) ? 131071 : 524287);
      if (isSetFilterEx())
        hashCode = hashCode * 8191 + filter_ex.hashCode();

      hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(beg_ms);

      hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(end_ms);

      return hashCode;
    }

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

      int lastComparison = 0;

      lastComparison = java.lang.Boolean.valueOf(isSetMid()).compareTo(other.isSetMid());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetMid()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.mid, other.mid);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = java.lang.Boolean.valueOf(isSetFilterId()).compareTo(other.isSetFilterId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetFilterId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.filter_id, other.filter_id);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = java.lang.Boolean.valueOf(isSetFilterEx()).compareTo(other.isSetFilterEx());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetFilterEx()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.filter_ex, other.filter_ex);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = java.lang.Boolean.valueOf(isSetBegMs()).compareTo(other.isSetBegMs());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetBegMs()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.beg_ms, other.beg_ms);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = java.lang.Boolean.valueOf(isSetEndMs()).compareTo(other.isSetEndMs());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetEndMs()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.end_ms, other.end_ms);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    @org.apache.thrift.annotation.Nullable
    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

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

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

    @Override
    public java.lang.String toString() {
      java.lang.StringBuilder sb = new java.lang.StringBuilder("combined_filter_args(");
      boolean first = true;

      sb.append("mid:");
      sb.append(this.mid);
      first = false;
      if (!first) sb.append(", ");
      sb.append("filter_id:");
      if (this.filter_id == null) {
        sb.append("null");
      } else {
        sb.append(this.filter_id);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("filter_ex:");
      if (this.filter_ex == null) {
        sb.append("null");
      } else {
        sb.append(this.filter_ex);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("beg_ms:");
      sb.append(this.beg_ms);
      first = false;
      if (!first) sb.append(", ");
      sb.append("end_ms:");
      sb.append(this.end_ms);
      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, java.lang.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 combined_filter_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public combined_filter_argsStandardScheme getScheme() {
        return new combined_filter_argsStandardScheme();
      }
    }

    private static class combined_filter_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<combined_filter_args> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, combined_filter_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: // MID
              if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
                struct.mid = iprot.readI64();
                struct.setMidIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // FILTER_ID
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.filter_id = iprot.readString();
                struct.setFilterIdIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 3: // FILTER_EX
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.filter_ex = iprot.readString();
                struct.setFilterExIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 4: // BEG_MS
              if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
                struct.beg_ms = iprot.readI64();
                struct.setBegMsIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 5: // END_MS
              if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
                struct.end_ms = iprot.readI64();
                struct.setEndMsIsSet(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, combined_filter_args struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        oprot.writeFieldBegin(MID_FIELD_DESC);
        oprot.writeI64(struct.mid);
        oprot.writeFieldEnd();
        if (struct.filter_id != null) {
          oprot.writeFieldBegin(FILTER_ID_FIELD_DESC);
          oprot.writeString(struct.filter_id);
          oprot.writeFieldEnd();
        }
        if (struct.filter_ex != null) {
          oprot.writeFieldBegin(FILTER_EX_FIELD_DESC);
          oprot.writeString(struct.filter_ex);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldBegin(BEG_MS_FIELD_DESC);
        oprot.writeI64(struct.beg_ms);
        oprot.writeFieldEnd();
        oprot.writeFieldBegin(END_MS_FIELD_DESC);
        oprot.writeI64(struct.end_ms);
        oprot.writeFieldEnd();
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class combined_filter_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public combined_filter_argsTupleScheme getScheme() {
        return new combined_filter_argsTupleScheme();
      }
    }

    private static class combined_filter_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<combined_filter_args> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, combined_filter_args struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet optionals = new java.util.BitSet();
        if (struct.isSetMid()) {
          optionals.set(0);
        }
        if (struct.isSetFilterId()) {
          optionals.set(1);
        }
        if (struct.isSetFilterEx()) {
          optionals.set(2);
        }
        if (struct.isSetBegMs()) {
          optionals.set(3);
        }
        if (struct.isSetEndMs()) {
          optionals.set(4);
        }
        oprot.writeBitSet(optionals, 5);
        if (struct.isSetMid()) {
          oprot.writeI64(struct.mid);
        }
        if (struct.isSetFilterId()) {
          oprot.writeString(struct.filter_id);
        }
        if (struct.isSetFilterEx()) {
          oprot.writeString(struct.filter_ex);
        }
        if (struct.isSetBegMs()) {
          oprot.writeI64(struct.beg_ms);
        }
        if (struct.isSetEndMs()) {
          oprot.writeI64(struct.end_ms);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, combined_filter_args struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet incoming = iprot.readBitSet(5);
        if (incoming.get(0)) {
          struct.mid = iprot.readI64();
          struct.setMidIsSet(true);
        }
        if (incoming.get(1)) {
          struct.filter_id = iprot.readString();
          struct.setFilterIdIsSet(true);
        }
        if (incoming.get(2)) {
          struct.filter_ex = iprot.readString();
          struct.setFilterExIsSet(true);
        }
        if (incoming.get(3)) {
          struct.beg_ms = iprot.readI64();
          struct.setBegMsIsSet(true);
        }
        if (incoming.get(4)) {
          struct.end_ms = iprot.readI64();
          struct.setEndMsIsSet(true);
        }
      }
    }

    private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
      return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
    }
  }

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

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

    private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new combined_filter_resultStandardSchemeFactory();
    private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new combined_filter_resultTupleSchemeFactory();

    private @org.apache.thrift.annotation.Nullable rpc_iterator_handle success; // required
    private @org.apache.thrift.annotation.Nullable rpc_invalid_operation ex; // 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"),
      EX((short)1, "ex");

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

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

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          case 1: // EX
            return EX;
          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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByName(java.lang.String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final java.lang.String _fieldName;

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

      public short getThriftFieldId() {
        return _thriftId;
      }

      public java.lang.String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.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, rpc_iterator_handle.class)));
      tmpMap.put(_Fields.EX, new org.apache.thrift.meta_data.FieldMetaData("ex", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, rpc_invalid_operation.class)));
      metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(combined_filter_result.class, metaDataMap);
    }

    public combined_filter_result() {
    }

    public combined_filter_result(
      rpc_iterator_handle success,
      rpc_invalid_operation ex)
    {
      this();
      this.success = success;
      this.ex = ex;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public combined_filter_result(combined_filter_result other) {
      if (other.isSetSuccess()) {
        this.success = new rpc_iterator_handle(other.success);
      }
      if (other.isSetEx()) {
        this.ex = new rpc_invalid_operation(other.ex);
      }
    }

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

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

    @org.apache.thrift.annotation.Nullable
    public rpc_iterator_handle getSuccess() {
      return this.success;
    }

    public combined_filter_result setSuccess(@org.apache.thrift.annotation.Nullable rpc_iterator_handle 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;
      }
    }

    @org.apache.thrift.annotation.Nullable
    public rpc_invalid_operation getEx() {
      return this.ex;
    }

    public combined_filter_result setEx(@org.apache.thrift.annotation.Nullable rpc_invalid_operation ex) {
      this.ex = ex;
      return this;
    }

    public void unsetEx() {
      this.ex = null;
    }

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

    public void setExIsSet(boolean value) {
      if (!value) {
        this.ex = null;
      }
    }

    public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((rpc_iterator_handle)value);
        }
        break;

      case EX:
        if (value == null) {
          unsetEx();
        } else {
          setEx((rpc_invalid_operation)value);
        }
        break;

      }
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      case EX:
        return getEx();

      }
      throw new java.lang.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 java.lang.IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      case EX:
        return isSetEx();
      }
      throw new java.lang.IllegalStateException();
    }

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

    public boolean equals(combined_filter_result that) {
      if (that == null)
        return false;
      if (this == that)
        return true;

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

      boolean this_present_ex = true && this.isSetEx();
      boolean that_present_ex = true && that.isSetEx();
      if (this_present_ex || that_present_ex) {
        if (!(this_present_ex && that_present_ex))
          return false;
        if (!this.ex.equals(that.ex))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      int hashCode = 1;

      hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287);
      if (isSetSuccess())
        hashCode = hashCode * 8191 + success.hashCode();

      hashCode = hashCode * 8191 + ((isSetEx()) ? 131071 : 524287);
      if (isSetEx())
        hashCode = hashCode * 8191 + ex.hashCode();

      return hashCode;
    }

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

      int lastComparison = 0;

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

    @org.apache.thrift.annotation.Nullable
    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

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

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

    @Override
    public java.lang.String toString() {
      java.lang.StringBuilder sb = new java.lang.StringBuilder("combined_filter_result(");
      boolean first = true;

      sb.append("success:");
      if (this.success == null) {
        sb.append("null");
      } else {
        sb.append(this.success);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("ex:");
      if (this.ex == null) {
        sb.append("null");
      } else {
        sb.append(this.ex);
      }
      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, java.lang.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 combined_filter_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public combined_filter_resultStandardScheme getScheme() {
        return new combined_filter_resultStandardScheme();
      }
    }

    private static class combined_filter_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<combined_filter_result> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, combined_filter_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) {
                if (struct.success == null) {
                  struct.success = new rpc_iterator_handle();
                }
                struct.success.read(iprot);
                struct.setSuccessIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 1: // EX
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                if (struct.ex == null) {
                  struct.ex = new rpc_invalid_operation();
                }
                struct.ex.read(iprot);
                struct.setExIsSet(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, combined_filter_result struct) throws org.apache.thrift.TException {
        struct.validate();

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

    }

    private static class combined_filter_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public combined_filter_resultTupleScheme getScheme() {
        return new combined_filter_resultTupleScheme();
      }
    }

    private static class combined_filter_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<combined_filter_result> {

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

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, combined_filter_result struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet incoming = iprot.readBitSet(2);
        if (incoming.get(0)) {
          if (struct.success == null) {
            struct.success = new rpc_iterator_handle();
          }
          struct.success.read(iprot);
          struct.setSuccessIsSet(true);
        }
        if (incoming.get(1)) {
          if (struct.ex == null) {
            struct.ex = new rpc_invalid_operation();
          }
          struct.ex.read(iprot);
          struct.setExIsSet(true);
        }
      }
    }

    private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
      return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
    }
  }

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

    private static final org.apache.thrift.protocol.TField MID_FIELD_DESC = new org.apache.thrift.protocol.TField("mid", org.apache.thrift.protocol.TType.I64, (short)1);
    private static final org.apache.thrift.protocol.TField BEG_MS_FIELD_DESC = new org.apache.thrift.protocol.TField("beg_ms", org.apache.thrift.protocol.TType.I64, (short)2);
    private static final org.apache.thrift.protocol.TField END_MS_FIELD_DESC = new org.apache.thrift.protocol.TField("end_ms", org.apache.thrift.protocol.TType.I64, (short)3);

    private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new alerts_by_time_argsStandardSchemeFactory();
    private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new alerts_by_time_argsTupleSchemeFactory();

    private long mid; // required
    private long beg_ms; // required
    private long end_ms; // 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 {
      MID((short)1, "mid"),
      BEG_MS((short)2, "beg_ms"),
      END_MS((short)3, "end_ms");

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

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

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // MID
            return MID;
          case 2: // BEG_MS
            return BEG_MS;
          case 3: // END_MS
            return END_MS;
          default:
            return null;
        }
      }

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

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByName(java.lang.String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final java.lang.String _fieldName;

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

      public short getThriftFieldId() {
        return _thriftId;
      }

      public java.lang.String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    private static final int __MID_ISSET_ID = 0;
    private static final int __BEG_MS_ISSET_ID = 1;
    private static final int __END_MS_ISSET_ID = 2;
    private byte __isset_bitfield = 0;
    public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.MID, new org.apache.thrift.meta_data.FieldMetaData("mid", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      tmpMap.put(_Fields.BEG_MS, new org.apache.thrift.meta_data.FieldMetaData("beg_ms", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      tmpMap.put(_Fields.END_MS, new org.apache.thrift.meta_data.FieldMetaData("end_ms", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(alerts_by_time_args.class, metaDataMap);
    }

    public alerts_by_time_args() {
    }

    public alerts_by_time_args(
      long mid,
      long beg_ms,
      long end_ms)
    {
      this();
      this.mid = mid;
      setMidIsSet(true);
      this.beg_ms = beg_ms;
      setBegMsIsSet(true);
      this.end_ms = end_ms;
      setEndMsIsSet(true);
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public alerts_by_time_args(alerts_by_time_args other) {
      __isset_bitfield = other.__isset_bitfield;
      this.mid = other.mid;
      this.beg_ms = other.beg_ms;
      this.end_ms = other.end_ms;
    }

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

    @Override
    public void clear() {
      setMidIsSet(false);
      this.mid = 0;
      setBegMsIsSet(false);
      this.beg_ms = 0;
      setEndMsIsSet(false);
      this.end_ms = 0;
    }

    public long getMid() {
      return this.mid;
    }

    public alerts_by_time_args setMid(long mid) {
      this.mid = mid;
      setMidIsSet(true);
      return this;
    }

    public void unsetMid() {
      __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __MID_ISSET_ID);
    }

    /** Returns true if field mid is set (has been assigned a value) and false otherwise */
    public boolean isSetMid() {
      return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __MID_ISSET_ID);
    }

    public void setMidIsSet(boolean value) {
      __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __MID_ISSET_ID, value);
    }

    public long getBegMs() {
      return this.beg_ms;
    }

    public alerts_by_time_args setBegMs(long beg_ms) {
      this.beg_ms = beg_ms;
      setBegMsIsSet(true);
      return this;
    }

    public void unsetBegMs() {
      __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __BEG_MS_ISSET_ID);
    }

    /** Returns true if field beg_ms is set (has been assigned a value) and false otherwise */
    public boolean isSetBegMs() {
      return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __BEG_MS_ISSET_ID);
    }

    public void setBegMsIsSet(boolean value) {
      __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __BEG_MS_ISSET_ID, value);
    }

    public long getEndMs() {
      return this.end_ms;
    }

    public alerts_by_time_args setEndMs(long end_ms) {
      this.end_ms = end_ms;
      setEndMsIsSet(true);
      return this;
    }

    public void unsetEndMs() {
      __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __END_MS_ISSET_ID);
    }

    /** Returns true if field end_ms is set (has been assigned a value) and false otherwise */
    public boolean isSetEndMs() {
      return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __END_MS_ISSET_ID);
    }

    public void setEndMsIsSet(boolean value) {
      __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __END_MS_ISSET_ID, value);
    }

    public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
      switch (field) {
      case MID:
        if (value == null) {
          unsetMid();
        } else {
          setMid((java.lang.Long)value);
        }
        break;

      case BEG_MS:
        if (value == null) {
          unsetBegMs();
        } else {
          setBegMs((java.lang.Long)value);
        }
        break;

      case END_MS:
        if (value == null) {
          unsetEndMs();
        } else {
          setEndMs((java.lang.Long)value);
        }
        break;

      }
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.Object getFieldValue(_Fields field) {
      switch (field) {
      case MID:
        return getMid();

      case BEG_MS:
        return getBegMs();

      case END_MS:
        return getEndMs();

      }
      throw new java.lang.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 java.lang.IllegalArgumentException();
      }

      switch (field) {
      case MID:
        return isSetMid();
      case BEG_MS:
        return isSetBegMs();
      case END_MS:
        return isSetEndMs();
      }
      throw new java.lang.IllegalStateException();
    }

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

    public boolean equals(alerts_by_time_args that) {
      if (that == null)
        return false;
      if (this == that)
        return true;

      boolean this_present_mid = true;
      boolean that_present_mid = true;
      if (this_present_mid || that_present_mid) {
        if (!(this_present_mid && that_present_mid))
          return false;
        if (this.mid != that.mid)
          return false;
      }

      boolean this_present_beg_ms = true;
      boolean that_present_beg_ms = true;
      if (this_present_beg_ms || that_present_beg_ms) {
        if (!(this_present_beg_ms && that_present_beg_ms))
          return false;
        if (this.beg_ms != that.beg_ms)
          return false;
      }

      boolean this_present_end_ms = true;
      boolean that_present_end_ms = true;
      if (this_present_end_ms || that_present_end_ms) {
        if (!(this_present_end_ms && that_present_end_ms))
          return false;
        if (this.end_ms != that.end_ms)
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      int hashCode = 1;

      hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(mid);

      hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(beg_ms);

      hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(end_ms);

      return hashCode;
    }

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

      int lastComparison = 0;

      lastComparison = java.lang.Boolean.valueOf(isSetMid()).compareTo(other.isSetMid());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetMid()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.mid, other.mid);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = java.lang.Boolean.valueOf(isSetBegMs()).compareTo(other.isSetBegMs());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetBegMs()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.beg_ms, other.beg_ms);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = java.lang.Boolean.valueOf(isSetEndMs()).compareTo(other.isSetEndMs());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetEndMs()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.end_ms, other.end_ms);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    @org.apache.thrift.annotation.Nullable
    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

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

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

    @Override
    public java.lang.String toString() {
      java.lang.StringBuilder sb = new java.lang.StringBuilder("alerts_by_time_args(");
      boolean first = true;

      sb.append("mid:");
      sb.append(this.mid);
      first = false;
      if (!first) sb.append(", ");
      sb.append("beg_ms:");
      sb.append(this.beg_ms);
      first = false;
      if (!first) sb.append(", ");
      sb.append("end_ms:");
      sb.append(this.end_ms);
      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, java.lang.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 alerts_by_time_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public alerts_by_time_argsStandardScheme getScheme() {
        return new alerts_by_time_argsStandardScheme();
      }
    }

    private static class alerts_by_time_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<alerts_by_time_args> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, alerts_by_time_args struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TField schemeField;
        iprot.readStructBegin();
        while (true)
        {
          schemeField = iprot.readFieldBegin();
          if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { 
            break;
          }
          switch (schemeField.id) {
            case 1: // MID
              if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
                struct.mid = iprot.readI64();
                struct.setMidIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // BEG_MS
              if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
                struct.beg_ms = iprot.readI64();
                struct.setBegMsIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 3: // END_MS
              if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
                struct.end_ms = iprot.readI64();
                struct.setEndMsIsSet(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, alerts_by_time_args struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        oprot.writeFieldBegin(MID_FIELD_DESC);
        oprot.writeI64(struct.mid);
        oprot.writeFieldEnd();
        oprot.writeFieldBegin(BEG_MS_FIELD_DESC);
        oprot.writeI64(struct.beg_ms);
        oprot.writeFieldEnd();
        oprot.writeFieldBegin(END_MS_FIELD_DESC);
        oprot.writeI64(struct.end_ms);
        oprot.writeFieldEnd();
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class alerts_by_time_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public alerts_by_time_argsTupleScheme getScheme() {
        return new alerts_by_time_argsTupleScheme();
      }
    }

    private static class alerts_by_time_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<alerts_by_time_args> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, alerts_by_time_args struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet optionals = new java.util.BitSet();
        if (struct.isSetMid()) {
          optionals.set(0);
        }
        if (struct.isSetBegMs()) {
          optionals.set(1);
        }
        if (struct.isSetEndMs()) {
          optionals.set(2);
        }
        oprot.writeBitSet(optionals, 3);
        if (struct.isSetMid()) {
          oprot.writeI64(struct.mid);
        }
        if (struct.isSetBegMs()) {
          oprot.writeI64(struct.beg_ms);
        }
        if (struct.isSetEndMs()) {
          oprot.writeI64(struct.end_ms);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, alerts_by_time_args struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet incoming = iprot.readBitSet(3);
        if (incoming.get(0)) {
          struct.mid = iprot.readI64();
          struct.setMidIsSet(true);
        }
        if (incoming.get(1)) {
          struct.beg_ms = iprot.readI64();
          struct.setBegMsIsSet(true);
        }
        if (incoming.get(2)) {
          struct.end_ms = iprot.readI64();
          struct.setEndMsIsSet(true);
        }
      }
    }

    private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
      return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
    }
  }

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

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

    private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new alerts_by_time_resultStandardSchemeFactory();
    private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new alerts_by_time_resultTupleSchemeFactory();

    private @org.apache.thrift.annotation.Nullable rpc_iterator_handle success; // required
    private @org.apache.thrift.annotation.Nullable rpc_invalid_operation ex; // 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"),
      EX((short)1, "ex");

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

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

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          case 1: // EX
            return EX;
          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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByName(java.lang.String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final java.lang.String _fieldName;

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

      public short getThriftFieldId() {
        return _thriftId;
      }

      public java.lang.String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.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, rpc_iterator_handle.class)));
      tmpMap.put(_Fields.EX, new org.apache.thrift.meta_data.FieldMetaData("ex", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, rpc_invalid_operation.class)));
      metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(alerts_by_time_result.class, metaDataMap);
    }

    public alerts_by_time_result() {
    }

    public alerts_by_time_result(
      rpc_iterator_handle success,
      rpc_invalid_operation ex)
    {
      this();
      this.success = success;
      this.ex = ex;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public alerts_by_time_result(alerts_by_time_result other) {
      if (other.isSetSuccess()) {
        this.success = new rpc_iterator_handle(other.success);
      }
      if (other.isSetEx()) {
        this.ex = new rpc_invalid_operation(other.ex);
      }
    }

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

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

    @org.apache.thrift.annotation.Nullable
    public rpc_iterator_handle getSuccess() {
      return this.success;
    }

    public alerts_by_time_result setSuccess(@org.apache.thrift.annotation.Nullable rpc_iterator_handle 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;
      }
    }

    @org.apache.thrift.annotation.Nullable
    public rpc_invalid_operation getEx() {
      return this.ex;
    }

    public alerts_by_time_result setEx(@org.apache.thrift.annotation.Nullable rpc_invalid_operation ex) {
      this.ex = ex;
      return this;
    }

    public void unsetEx() {
      this.ex = null;
    }

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

    public void setExIsSet(boolean value) {
      if (!value) {
        this.ex = null;
      }
    }

    public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((rpc_iterator_handle)value);
        }
        break;

      case EX:
        if (value == null) {
          unsetEx();
        } else {
          setEx((rpc_invalid_operation)value);
        }
        break;

      }
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      case EX:
        return getEx();

      }
      throw new java.lang.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 java.lang.IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      case EX:
        return isSetEx();
      }
      throw new java.lang.IllegalStateException();
    }

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

    public boolean equals(alerts_by_time_result that) {
      if (that == null)
        return false;
      if (this == that)
        return true;

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

      boolean this_present_ex = true && this.isSetEx();
      boolean that_present_ex = true && that.isSetEx();
      if (this_present_ex || that_present_ex) {
        if (!(this_present_ex && that_present_ex))
          return false;
        if (!this.ex.equals(that.ex))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      int hashCode = 1;

      hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287);
      if (isSetSuccess())
        hashCode = hashCode * 8191 + success.hashCode();

      hashCode = hashCode * 8191 + ((isSetEx()) ? 131071 : 524287);
      if (isSetEx())
        hashCode = hashCode * 8191 + ex.hashCode();

      return hashCode;
    }

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

      int lastComparison = 0;

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

    @org.apache.thrift.annotation.Nullable
    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

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

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

    @Override
    public java.lang.String toString() {
      java.lang.StringBuilder sb = new java.lang.StringBuilder("alerts_by_time_result(");
      boolean first = true;

      sb.append("success:");
      if (this.success == null) {
        sb.append("null");
      } else {
        sb.append(this.success);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("ex:");
      if (this.ex == null) {
        sb.append("null");
      } else {
        sb.append(this.ex);
      }
      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, java.lang.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 alerts_by_time_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public alerts_by_time_resultStandardScheme getScheme() {
        return new alerts_by_time_resultStandardScheme();
      }
    }

    private static class alerts_by_time_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<alerts_by_time_result> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, alerts_by_time_result struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TField schemeField;
        iprot.readStructBegin();
        while (true)
        {
          schemeField = iprot.readFieldBegin();
          if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { 
            break;
          }
          switch (schemeField.id) {
            case 0: // SUCCESS
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                if (struct.success == null) {
                  struct.success = new rpc_iterator_handle();
                }
                struct.success.read(iprot);
                struct.setSuccessIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 1: // EX
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                if (struct.ex == null) {
                  struct.ex = new rpc_invalid_operation();
                }
                struct.ex.read(iprot);
                struct.setExIsSet(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, alerts_by_time_result struct) throws org.apache.thrift.TException {
        struct.validate();

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

    }

    private static class alerts_by_time_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public alerts_by_time_resultTupleScheme getScheme() {
        return new alerts_by_time_resultTupleScheme();
      }
    }

    private static class alerts_by_time_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<alerts_by_time_result> {

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

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, alerts_by_time_result struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet incoming = iprot.readBitSet(2);
        if (incoming.get(0)) {
          if (struct.success == null) {
            struct.success = new rpc_iterator_handle();
          }
          struct.success.read(iprot);
          struct.setSuccessIsSet(true);
        }
        if (incoming.get(1)) {
          if (struct.ex == null) {
            struct.ex = new rpc_invalid_operation();
          }
          struct.ex.read(iprot);
          struct.setExIsSet(true);
        }
      }
    }

    private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
      return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
    }
  }

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

    private static final org.apache.thrift.protocol.TField MID_FIELD_DESC = new org.apache.thrift.protocol.TField("mid", org.apache.thrift.protocol.TType.I64, (short)1);
    private static final org.apache.thrift.protocol.TField TRIGGER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("trigger_id", org.apache.thrift.protocol.TType.STRING, (short)2);
    private static final org.apache.thrift.protocol.TField BEG_MS_FIELD_DESC = new org.apache.thrift.protocol.TField("beg_ms", org.apache.thrift.protocol.TType.I64, (short)3);
    private static final org.apache.thrift.protocol.TField END_MS_FIELD_DESC = new org.apache.thrift.protocol.TField("end_ms", org.apache.thrift.protocol.TType.I64, (short)4);

    private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new alerts_by_trigger_and_time_argsStandardSchemeFactory();
    private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new alerts_by_trigger_and_time_argsTupleSchemeFactory();

    private long mid; // required
    private @org.apache.thrift.annotation.Nullable java.lang.String trigger_id; // required
    private long beg_ms; // required
    private long end_ms; // 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 {
      MID((short)1, "mid"),
      TRIGGER_ID((short)2, "trigger_id"),
      BEG_MS((short)3, "beg_ms"),
      END_MS((short)4, "end_ms");

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

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

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // MID
            return MID;
          case 2: // TRIGGER_ID
            return TRIGGER_ID;
          case 3: // BEG_MS
            return BEG_MS;
          case 4: // END_MS
            return END_MS;
          default:
            return null;
        }
      }

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

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByName(java.lang.String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final java.lang.String _fieldName;

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

      public short getThriftFieldId() {
        return _thriftId;
      }

      public java.lang.String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    private static final int __MID_ISSET_ID = 0;
    private static final int __BEG_MS_ISSET_ID = 1;
    private static final int __END_MS_ISSET_ID = 2;
    private byte __isset_bitfield = 0;
    public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.MID, new org.apache.thrift.meta_data.FieldMetaData("mid", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      tmpMap.put(_Fields.TRIGGER_ID, new org.apache.thrift.meta_data.FieldMetaData("trigger_id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
      tmpMap.put(_Fields.BEG_MS, new org.apache.thrift.meta_data.FieldMetaData("beg_ms", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      tmpMap.put(_Fields.END_MS, new org.apache.thrift.meta_data.FieldMetaData("end_ms", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(alerts_by_trigger_and_time_args.class, metaDataMap);
    }

    public alerts_by_trigger_and_time_args() {
    }

    public alerts_by_trigger_and_time_args(
      long mid,
      java.lang.String trigger_id,
      long beg_ms,
      long end_ms)
    {
      this();
      this.mid = mid;
      setMidIsSet(true);
      this.trigger_id = trigger_id;
      this.beg_ms = beg_ms;
      setBegMsIsSet(true);
      this.end_ms = end_ms;
      setEndMsIsSet(true);
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public alerts_by_trigger_and_time_args(alerts_by_trigger_and_time_args other) {
      __isset_bitfield = other.__isset_bitfield;
      this.mid = other.mid;
      if (other.isSetTriggerId()) {
        this.trigger_id = other.trigger_id;
      }
      this.beg_ms = other.beg_ms;
      this.end_ms = other.end_ms;
    }

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

    @Override
    public void clear() {
      setMidIsSet(false);
      this.mid = 0;
      this.trigger_id = null;
      setBegMsIsSet(false);
      this.beg_ms = 0;
      setEndMsIsSet(false);
      this.end_ms = 0;
    }

    public long getMid() {
      return this.mid;
    }

    public alerts_by_trigger_and_time_args setMid(long mid) {
      this.mid = mid;
      setMidIsSet(true);
      return this;
    }

    public void unsetMid() {
      __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __MID_ISSET_ID);
    }

    /** Returns true if field mid is set (has been assigned a value) and false otherwise */
    public boolean isSetMid() {
      return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __MID_ISSET_ID);
    }

    public void setMidIsSet(boolean value) {
      __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __MID_ISSET_ID, value);
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.String getTriggerId() {
      return this.trigger_id;
    }

    public alerts_by_trigger_and_time_args setTriggerId(@org.apache.thrift.annotation.Nullable java.lang.String trigger_id) {
      this.trigger_id = trigger_id;
      return this;
    }

    public void unsetTriggerId() {
      this.trigger_id = null;
    }

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

    public void setTriggerIdIsSet(boolean value) {
      if (!value) {
        this.trigger_id = null;
      }
    }

    public long getBegMs() {
      return this.beg_ms;
    }

    public alerts_by_trigger_and_time_args setBegMs(long beg_ms) {
      this.beg_ms = beg_ms;
      setBegMsIsSet(true);
      return this;
    }

    public void unsetBegMs() {
      __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __BEG_MS_ISSET_ID);
    }

    /** Returns true if field beg_ms is set (has been assigned a value) and false otherwise */
    public boolean isSetBegMs() {
      return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __BEG_MS_ISSET_ID);
    }

    public void setBegMsIsSet(boolean value) {
      __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __BEG_MS_ISSET_ID, value);
    }

    public long getEndMs() {
      return this.end_ms;
    }

    public alerts_by_trigger_and_time_args setEndMs(long end_ms) {
      this.end_ms = end_ms;
      setEndMsIsSet(true);
      return this;
    }

    public void unsetEndMs() {
      __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __END_MS_ISSET_ID);
    }

    /** Returns true if field end_ms is set (has been assigned a value) and false otherwise */
    public boolean isSetEndMs() {
      return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __END_MS_ISSET_ID);
    }

    public void setEndMsIsSet(boolean value) {
      __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __END_MS_ISSET_ID, value);
    }

    public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
      switch (field) {
      case MID:
        if (value == null) {
          unsetMid();
        } else {
          setMid((java.lang.Long)value);
        }
        break;

      case TRIGGER_ID:
        if (value == null) {
          unsetTriggerId();
        } else {
          setTriggerId((java.lang.String)value);
        }
        break;

      case BEG_MS:
        if (value == null) {
          unsetBegMs();
        } else {
          setBegMs((java.lang.Long)value);
        }
        break;

      case END_MS:
        if (value == null) {
          unsetEndMs();
        } else {
          setEndMs((java.lang.Long)value);
        }
        break;

      }
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.Object getFieldValue(_Fields field) {
      switch (field) {
      case MID:
        return getMid();

      case TRIGGER_ID:
        return getTriggerId();

      case BEG_MS:
        return getBegMs();

      case END_MS:
        return getEndMs();

      }
      throw new java.lang.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 java.lang.IllegalArgumentException();
      }

      switch (field) {
      case MID:
        return isSetMid();
      case TRIGGER_ID:
        return isSetTriggerId();
      case BEG_MS:
        return isSetBegMs();
      case END_MS:
        return isSetEndMs();
      }
      throw new java.lang.IllegalStateException();
    }

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

    public boolean equals(alerts_by_trigger_and_time_args that) {
      if (that == null)
        return false;
      if (this == that)
        return true;

      boolean this_present_mid = true;
      boolean that_present_mid = true;
      if (this_present_mid || that_present_mid) {
        if (!(this_present_mid && that_present_mid))
          return false;
        if (this.mid != that.mid)
          return false;
      }

      boolean this_present_trigger_id = true && this.isSetTriggerId();
      boolean that_present_trigger_id = true && that.isSetTriggerId();
      if (this_present_trigger_id || that_present_trigger_id) {
        if (!(this_present_trigger_id && that_present_trigger_id))
          return false;
        if (!this.trigger_id.equals(that.trigger_id))
          return false;
      }

      boolean this_present_beg_ms = true;
      boolean that_present_beg_ms = true;
      if (this_present_beg_ms || that_present_beg_ms) {
        if (!(this_present_beg_ms && that_present_beg_ms))
          return false;
        if (this.beg_ms != that.beg_ms)
          return false;
      }

      boolean this_present_end_ms = true;
      boolean that_present_end_ms = true;
      if (this_present_end_ms || that_present_end_ms) {
        if (!(this_present_end_ms && that_present_end_ms))
          return false;
        if (this.end_ms != that.end_ms)
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      int hashCode = 1;

      hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(mid);

      hashCode = hashCode * 8191 + ((isSetTriggerId()) ? 131071 : 524287);
      if (isSetTriggerId())
        hashCode = hashCode * 8191 + trigger_id.hashCode();

      hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(beg_ms);

      hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(end_ms);

      return hashCode;
    }

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

      int lastComparison = 0;

      lastComparison = java.lang.Boolean.valueOf(isSetMid()).compareTo(other.isSetMid());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetMid()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.mid, other.mid);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = java.lang.Boolean.valueOf(isSetTriggerId()).compareTo(other.isSetTriggerId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetTriggerId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.trigger_id, other.trigger_id);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = java.lang.Boolean.valueOf(isSetBegMs()).compareTo(other.isSetBegMs());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetBegMs()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.beg_ms, other.beg_ms);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = java.lang.Boolean.valueOf(isSetEndMs()).compareTo(other.isSetEndMs());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetEndMs()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.end_ms, other.end_ms);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    @org.apache.thrift.annotation.Nullable
    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

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

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

    @Override
    public java.lang.String toString() {
      java.lang.StringBuilder sb = new java.lang.StringBuilder("alerts_by_trigger_and_time_args(");
      boolean first = true;

      sb.append("mid:");
      sb.append(this.mid);
      first = false;
      if (!first) sb.append(", ");
      sb.append("trigger_id:");
      if (this.trigger_id == null) {
        sb.append("null");
      } else {
        sb.append(this.trigger_id);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("beg_ms:");
      sb.append(this.beg_ms);
      first = false;
      if (!first) sb.append(", ");
      sb.append("end_ms:");
      sb.append(this.end_ms);
      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, java.lang.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 alerts_by_trigger_and_time_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public alerts_by_trigger_and_time_argsStandardScheme getScheme() {
        return new alerts_by_trigger_and_time_argsStandardScheme();
      }
    }

    private static class alerts_by_trigger_and_time_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<alerts_by_trigger_and_time_args> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, alerts_by_trigger_and_time_args struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TField schemeField;
        iprot.readStructBegin();
        while (true)
        {
          schemeField = iprot.readFieldBegin();
          if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { 
            break;
          }
          switch (schemeField.id) {
            case 1: // MID
              if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
                struct.mid = iprot.readI64();
                struct.setMidIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // TRIGGER_ID
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.trigger_id = iprot.readString();
                struct.setTriggerIdIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 3: // BEG_MS
              if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
                struct.beg_ms = iprot.readI64();
                struct.setBegMsIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 4: // END_MS
              if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
                struct.end_ms = iprot.readI64();
                struct.setEndMsIsSet(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, alerts_by_trigger_and_time_args struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        oprot.writeFieldBegin(MID_FIELD_DESC);
        oprot.writeI64(struct.mid);
        oprot.writeFieldEnd();
        if (struct.trigger_id != null) {
          oprot.writeFieldBegin(TRIGGER_ID_FIELD_DESC);
          oprot.writeString(struct.trigger_id);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldBegin(BEG_MS_FIELD_DESC);
        oprot.writeI64(struct.beg_ms);
        oprot.writeFieldEnd();
        oprot.writeFieldBegin(END_MS_FIELD_DESC);
        oprot.writeI64(struct.end_ms);
        oprot.writeFieldEnd();
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class alerts_by_trigger_and_time_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public alerts_by_trigger_and_time_argsTupleScheme getScheme() {
        return new alerts_by_trigger_and_time_argsTupleScheme();
      }
    }

    private static class alerts_by_trigger_and_time_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<alerts_by_trigger_and_time_args> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, alerts_by_trigger_and_time_args struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet optionals = new java.util.BitSet();
        if (struct.isSetMid()) {
          optionals.set(0);
        }
        if (struct.isSetTriggerId()) {
          optionals.set(1);
        }
        if (struct.isSetBegMs()) {
          optionals.set(2);
        }
        if (struct.isSetEndMs()) {
          optionals.set(3);
        }
        oprot.writeBitSet(optionals, 4);
        if (struct.isSetMid()) {
          oprot.writeI64(struct.mid);
        }
        if (struct.isSetTriggerId()) {
          oprot.writeString(struct.trigger_id);
        }
        if (struct.isSetBegMs()) {
          oprot.writeI64(struct.beg_ms);
        }
        if (struct.isSetEndMs()) {
          oprot.writeI64(struct.end_ms);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, alerts_by_trigger_and_time_args struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet incoming = iprot.readBitSet(4);
        if (incoming.get(0)) {
          struct.mid = iprot.readI64();
          struct.setMidIsSet(true);
        }
        if (incoming.get(1)) {
          struct.trigger_id = iprot.readString();
          struct.setTriggerIdIsSet(true);
        }
        if (incoming.get(2)) {
          struct.beg_ms = iprot.readI64();
          struct.setBegMsIsSet(true);
        }
        if (incoming.get(3)) {
          struct.end_ms = iprot.readI64();
          struct.setEndMsIsSet(true);
        }
      }
    }

    private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
      return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
    }
  }

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

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

    private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new alerts_by_trigger_and_time_resultStandardSchemeFactory();
    private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new alerts_by_trigger_and_time_resultTupleSchemeFactory();

    private @org.apache.thrift.annotation.Nullable rpc_iterator_handle success; // required
    private @org.apache.thrift.annotation.Nullable rpc_invalid_operation ex; // 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"),
      EX((short)1, "ex");

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

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

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          case 1: // EX
            return EX;
          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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByName(java.lang.String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final java.lang.String _fieldName;

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

      public short getThriftFieldId() {
        return _thriftId;
      }

      public java.lang.String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.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, rpc_iterator_handle.class)));
      tmpMap.put(_Fields.EX, new org.apache.thrift.meta_data.FieldMetaData("ex", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, rpc_invalid_operation.class)));
      metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(alerts_by_trigger_and_time_result.class, metaDataMap);
    }

    public alerts_by_trigger_and_time_result() {
    }

    public alerts_by_trigger_and_time_result(
      rpc_iterator_handle success,
      rpc_invalid_operation ex)
    {
      this();
      this.success = success;
      this.ex = ex;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public alerts_by_trigger_and_time_result(alerts_by_trigger_and_time_result other) {
      if (other.isSetSuccess()) {
        this.success = new rpc_iterator_handle(other.success);
      }
      if (other.isSetEx()) {
        this.ex = new rpc_invalid_operation(other.ex);
      }
    }

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

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

    @org.apache.thrift.annotation.Nullable
    public rpc_iterator_handle getSuccess() {
      return this.success;
    }

    public alerts_by_trigger_and_time_result setSuccess(@org.apache.thrift.annotation.Nullable rpc_iterator_handle 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;
      }
    }

    @org.apache.thrift.annotation.Nullable
    public rpc_invalid_operation getEx() {
      return this.ex;
    }

    public alerts_by_trigger_and_time_result setEx(@org.apache.thrift.annotation.Nullable rpc_invalid_operation ex) {
      this.ex = ex;
      return this;
    }

    public void unsetEx() {
      this.ex = null;
    }

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

    public void setExIsSet(boolean value) {
      if (!value) {
        this.ex = null;
      }
    }

    public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((rpc_iterator_handle)value);
        }
        break;

      case EX:
        if (value == null) {
          unsetEx();
        } else {
          setEx((rpc_invalid_operation)value);
        }
        break;

      }
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      case EX:
        return getEx();

      }
      throw new java.lang.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 java.lang.IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      case EX:
        return isSetEx();
      }
      throw new java.lang.IllegalStateException();
    }

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

    public boolean equals(alerts_by_trigger_and_time_result that) {
      if (that == null)
        return false;
      if (this == that)
        return true;

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

      boolean this_present_ex = true && this.isSetEx();
      boolean that_present_ex = true && that.isSetEx();
      if (this_present_ex || that_present_ex) {
        if (!(this_present_ex && that_present_ex))
          return false;
        if (!this.ex.equals(that.ex))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      int hashCode = 1;

      hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287);
      if (isSetSuccess())
        hashCode = hashCode * 8191 + success.hashCode();

      hashCode = hashCode * 8191 + ((isSetEx()) ? 131071 : 524287);
      if (isSetEx())
        hashCode = hashCode * 8191 + ex.hashCode();

      return hashCode;
    }

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

      int lastComparison = 0;

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

    @org.apache.thrift.annotation.Nullable
    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

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

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

    @Override
    public java.lang.String toString() {
      java.lang.StringBuilder sb = new java.lang.StringBuilder("alerts_by_trigger_and_time_result(");
      boolean first = true;

      sb.append("success:");
      if (this.success == null) {
        sb.append("null");
      } else {
        sb.append(this.success);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("ex:");
      if (this.ex == null) {
        sb.append("null");
      } else {
        sb.append(this.ex);
      }
      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, java.lang.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 alerts_by_trigger_and_time_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public alerts_by_trigger_and_time_resultStandardScheme getScheme() {
        return new alerts_by_trigger_and_time_resultStandardScheme();
      }
    }

    private static class alerts_by_trigger_and_time_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<alerts_by_trigger_and_time_result> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, alerts_by_trigger_and_time_result struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TField schemeField;
        iprot.readStructBegin();
        while (true)
        {
          schemeField = iprot.readFieldBegin();
          if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { 
            break;
          }
          switch (schemeField.id) {
            case 0: // SUCCESS
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                if (struct.success == null) {
                  struct.success = new rpc_iterator_handle();
                }
                struct.success.read(iprot);
                struct.setSuccessIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 1: // EX
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                if (struct.ex == null) {
                  struct.ex = new rpc_invalid_operation();
                }
                struct.ex.read(iprot);
                struct.setExIsSet(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, alerts_by_trigger_and_time_result struct) throws org.apache.thrift.TException {
        struct.validate();

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

    }

    private static class alerts_by_trigger_and_time_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public alerts_by_trigger_and_time_resultTupleScheme getScheme() {
        return new alerts_by_trigger_and_time_resultTupleScheme();
      }
    }

    private static class alerts_by_trigger_and_time_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<alerts_by_trigger_and_time_result> {

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

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, alerts_by_trigger_and_time_result struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet incoming = iprot.readBitSet(2);
        if (incoming.get(0)) {
          if (struct.success == null) {
            struct.success = new rpc_iterator_handle();
          }
          struct.success.read(iprot);
          struct.setSuccessIsSet(true);
        }
        if (incoming.get(1)) {
          if (struct.ex == null) {
            struct.ex = new rpc_invalid_operation();
          }
          struct.ex.read(iprot);
          struct.setExIsSet(true);
        }
      }
    }

    private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
      return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
    }
  }

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

    private static final org.apache.thrift.protocol.TField MID_FIELD_DESC = new org.apache.thrift.protocol.TField("mid", org.apache.thrift.protocol.TType.I64, (short)1);
    private static final org.apache.thrift.protocol.TField DESC_FIELD_DESC = new org.apache.thrift.protocol.TField("desc", org.apache.thrift.protocol.TType.STRUCT, (short)2);

    private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new get_more_argsStandardSchemeFactory();
    private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new get_more_argsTupleSchemeFactory();

    private long mid; // required
    private @org.apache.thrift.annotation.Nullable rpc_iterator_descriptor desc; // 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 {
      MID((short)1, "mid"),
      DESC((short)2, "desc");

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

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

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // MID
            return MID;
          case 2: // DESC
            return DESC;
          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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByName(java.lang.String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final java.lang.String _fieldName;

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

      public short getThriftFieldId() {
        return _thriftId;
      }

      public java.lang.String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    private static final int __MID_ISSET_ID = 0;
    private byte __isset_bitfield = 0;
    public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.MID, new org.apache.thrift.meta_data.FieldMetaData("mid", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      tmpMap.put(_Fields.DESC, new org.apache.thrift.meta_data.FieldMetaData("desc", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, rpc_iterator_descriptor.class)));
      metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_more_args.class, metaDataMap);
    }

    public get_more_args() {
    }

    public get_more_args(
      long mid,
      rpc_iterator_descriptor desc)
    {
      this();
      this.mid = mid;
      setMidIsSet(true);
      this.desc = desc;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public get_more_args(get_more_args other) {
      __isset_bitfield = other.__isset_bitfield;
      this.mid = other.mid;
      if (other.isSetDesc()) {
        this.desc = new rpc_iterator_descriptor(other.desc);
      }
    }

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

    @Override
    public void clear() {
      setMidIsSet(false);
      this.mid = 0;
      if (this.desc != null) {
        this.desc.clear();
      }
    }

    public long getMid() {
      return this.mid;
    }

    public get_more_args setMid(long mid) {
      this.mid = mid;
      setMidIsSet(true);
      return this;
    }

    public void unsetMid() {
      __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __MID_ISSET_ID);
    }

    /** Returns true if field mid is set (has been assigned a value) and false otherwise */
    public boolean isSetMid() {
      return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __MID_ISSET_ID);
    }

    public void setMidIsSet(boolean value) {
      __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __MID_ISSET_ID, value);
    }

    @org.apache.thrift.annotation.Nullable
    public rpc_iterator_descriptor getDesc() {
      return this.desc;
    }

    public get_more_args setDesc(@org.apache.thrift.annotation.Nullable rpc_iterator_descriptor desc) {
      this.desc = desc;
      return this;
    }

    public void unsetDesc() {
      this.desc = null;
    }

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

    public void setDescIsSet(boolean value) {
      if (!value) {
        this.desc = null;
      }
    }

    public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
      switch (field) {
      case MID:
        if (value == null) {
          unsetMid();
        } else {
          setMid((java.lang.Long)value);
        }
        break;

      case DESC:
        if (value == null) {
          unsetDesc();
        } else {
          setDesc((rpc_iterator_descriptor)value);
        }
        break;

      }
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.Object getFieldValue(_Fields field) {
      switch (field) {
      case MID:
        return getMid();

      case DESC:
        return getDesc();

      }
      throw new java.lang.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 java.lang.IllegalArgumentException();
      }

      switch (field) {
      case MID:
        return isSetMid();
      case DESC:
        return isSetDesc();
      }
      throw new java.lang.IllegalStateException();
    }

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

    public boolean equals(get_more_args that) {
      if (that == null)
        return false;
      if (this == that)
        return true;

      boolean this_present_mid = true;
      boolean that_present_mid = true;
      if (this_present_mid || that_present_mid) {
        if (!(this_present_mid && that_present_mid))
          return false;
        if (this.mid != that.mid)
          return false;
      }

      boolean this_present_desc = true && this.isSetDesc();
      boolean that_present_desc = true && that.isSetDesc();
      if (this_present_desc || that_present_desc) {
        if (!(this_present_desc && that_present_desc))
          return false;
        if (!this.desc.equals(that.desc))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      int hashCode = 1;

      hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(mid);

      hashCode = hashCode * 8191 + ((isSetDesc()) ? 131071 : 524287);
      if (isSetDesc())
        hashCode = hashCode * 8191 + desc.hashCode();

      return hashCode;
    }

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

      int lastComparison = 0;

      lastComparison = java.lang.Boolean.valueOf(isSetMid()).compareTo(other.isSetMid());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetMid()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.mid, other.mid);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = java.lang.Boolean.valueOf(isSetDesc()).compareTo(other.isSetDesc());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetDesc()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.desc, other.desc);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    @org.apache.thrift.annotation.Nullable
    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

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

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

    @Override
    public java.lang.String toString() {
      java.lang.StringBuilder sb = new java.lang.StringBuilder("get_more_args(");
      boolean first = true;

      sb.append("mid:");
      sb.append(this.mid);
      first = false;
      if (!first) sb.append(", ");
      sb.append("desc:");
      if (this.desc == null) {
        sb.append("null");
      } else {
        sb.append(this.desc);
      }
      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 (desc != null) {
        desc.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, java.lang.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 get_more_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public get_more_argsStandardScheme getScheme() {
        return new get_more_argsStandardScheme();
      }
    }

    private static class get_more_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<get_more_args> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, get_more_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: // MID
              if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
                struct.mid = iprot.readI64();
                struct.setMidIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // DESC
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                if (struct.desc == null) {
                  struct.desc = new rpc_iterator_descriptor();
                }
                struct.desc.read(iprot);
                struct.setDescIsSet(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, get_more_args struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        oprot.writeFieldBegin(MID_FIELD_DESC);
        oprot.writeI64(struct.mid);
        oprot.writeFieldEnd();
        if (struct.desc != null) {
          oprot.writeFieldBegin(DESC_FIELD_DESC);
          struct.desc.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class get_more_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public get_more_argsTupleScheme getScheme() {
        return new get_more_argsTupleScheme();
      }
    }

    private static class get_more_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<get_more_args> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, get_more_args struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet optionals = new java.util.BitSet();
        if (struct.isSetMid()) {
          optionals.set(0);
        }
        if (struct.isSetDesc()) {
          optionals.set(1);
        }
        oprot.writeBitSet(optionals, 2);
        if (struct.isSetMid()) {
          oprot.writeI64(struct.mid);
        }
        if (struct.isSetDesc()) {
          struct.desc.write(oprot);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, get_more_args struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet incoming = iprot.readBitSet(2);
        if (incoming.get(0)) {
          struct.mid = iprot.readI64();
          struct.setMidIsSet(true);
        }
        if (incoming.get(1)) {
          if (struct.desc == null) {
            struct.desc = new rpc_iterator_descriptor();
          }
          struct.desc.read(iprot);
          struct.setDescIsSet(true);
        }
      }
    }

    private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
      return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
    }
  }

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

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

    private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new get_more_resultStandardSchemeFactory();
    private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new get_more_resultTupleSchemeFactory();

    private @org.apache.thrift.annotation.Nullable rpc_iterator_handle success; // required
    private @org.apache.thrift.annotation.Nullable rpc_invalid_operation ex; // 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"),
      EX((short)1, "ex");

      private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();

      static {
        for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          case 1: // EX
            return EX;
          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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByName(java.lang.String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final java.lang.String _fieldName;

      _Fields(short thriftId, java.lang.String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public java.lang.String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.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, rpc_iterator_handle.class)));
      tmpMap.put(_Fields.EX, new org.apache.thrift.meta_data.FieldMetaData("ex", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, rpc_invalid_operation.class)));
      metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_more_result.class, metaDataMap);
    }

    public get_more_result() {
    }

    public get_more_result(
      rpc_iterator_handle success,
      rpc_invalid_operation ex)
    {
      this();
      this.success = success;
      this.ex = ex;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public get_more_result(get_more_result other) {
      if (other.isSetSuccess()) {
        this.success = new rpc_iterator_handle(other.success);
      }
      if (other.isSetEx()) {
        this.ex = new rpc_invalid_operation(other.ex);
      }
    }

    public get_more_result deepCopy() {
      return new get_more_result(this);
    }

    @Override
    public void clear() {
      if (this.success != null) {
        this.success.clear();
      }
      this.ex = null;
    }

    @org.apache.thrift.annotation.Nullable
    public rpc_iterator_handle getSuccess() {
      return this.success;
    }

    public get_more_result setSuccess(@org.apache.thrift.annotation.Nullable rpc_iterator_handle 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;
      }
    }

    @org.apache.thrift.annotation.Nullable
    public rpc_invalid_operation getEx() {
      return this.ex;
    }

    public get_more_result setEx(@org.apache.thrift.annotation.Nullable rpc_invalid_operation ex) {
      this.ex = ex;
      return this;
    }

    public void unsetEx() {
      this.ex = null;
    }

    /** Returns true if field ex is set (has been assigned a value) and false otherwise */
    public boolean isSetEx() {
      return this.ex != null;
    }

    public void setExIsSet(boolean value) {
      if (!value) {
        this.ex = null;
      }
    }

    public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((rpc_iterator_handle)value);
        }
        break;

      case EX:
        if (value == null) {
          unsetEx();
        } else {
          setEx((rpc_invalid_operation)value);
        }
        break;

      }
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      case EX:
        return getEx();

      }
      throw new java.lang.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 java.lang.IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      case EX:
        return isSetEx();
      }
      throw new java.lang.IllegalStateException();
    }

    @Override
    public boolean equals(java.lang.Object that) {
      if (that == null)
        return false;
      if (that instanceof get_more_result)
        return this.equals((get_more_result)that);
      return false;
    }

    public boolean equals(get_more_result that) {
      if (that == null)
        return false;
      if (this == that)
        return true;

      boolean this_present_success = true && this.isSetSuccess();
      boolean that_present_success = true && that.isSetSuccess();
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (!this.success.equals(that.success))
          return false;
      }

      boolean this_present_ex = true && this.isSetEx();
      boolean that_present_ex = true && that.isSetEx();
      if (this_present_ex || that_present_ex) {
        if (!(this_present_ex && that_present_ex))
          return false;
        if (!this.ex.equals(that.ex))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      int hashCode = 1;

      hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287);
      if (isSetSuccess())
        hashCode = hashCode * 8191 + success.hashCode();

      hashCode = hashCode * 8191 + ((isSetEx()) ? 131071 : 524287);
      if (isSetEx())
        hashCode = hashCode * 8191 + ex.hashCode();

      return hashCode;
    }

    @Override
    public int compareTo(get_more_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;

      lastComparison = java.lang.Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = java.lang.Boolean.valueOf(isSetEx()).compareTo(other.isSetEx());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetEx()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ex, other.ex);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    @org.apache.thrift.annotation.Nullable
    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      scheme(iprot).read(iprot, this);
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      scheme(oprot).write(oprot, this);
      }

    @Override
    public java.lang.String toString() {
      java.lang.StringBuilder sb = new java.lang.StringBuilder("get_more_result(");
      boolean first = true;

      sb.append("success:");
      if (this.success == null) {
        sb.append("null");
      } else {
        sb.append(this.success);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("ex:");
      if (this.ex == null) {
        sb.append("null");
      } else {
        sb.append(this.ex);
      }
      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, java.lang.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 get_more_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public get_more_resultStandardScheme getScheme() {
        return new get_more_resultStandardScheme();
      }
    }

    private static class get_more_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<get_more_result> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, get_more_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) {
                if (struct.success == null) {
                  struct.success = new rpc_iterator_handle();
                }
                struct.success.read(iprot);
                struct.setSuccessIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 1: // EX
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                if (struct.ex == null) {
                  struct.ex = new rpc_invalid_operation();
                }
                struct.ex.read(iprot);
                struct.setExIsSet(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, get_more_result struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.success != null) {
          oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
          struct.success.write(oprot);
          oprot.writeFieldEnd();
        }
        if (struct.ex != null) {
          oprot.writeFieldBegin(EX_FIELD_DESC);
          struct.ex.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class get_more_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public get_more_resultTupleScheme getScheme() {
        return new get_more_resultTupleScheme();
      }
    }

    private static class get_more_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<get_more_result> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, get_more_result struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet optionals = new java.util.BitSet();
        if (struct.isSetSuccess()) {
          optionals.set(0);
        }
        if (struct.isSetEx()) {
          optionals.set(1);
        }
        oprot.writeBitSet(optionals, 2);
        if (struct.isSetSuccess()) {
          struct.success.write(oprot);
        }
        if (struct.isSetEx()) {
          struct.ex.write(oprot);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, get_more_result struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet incoming = iprot.readBitSet(2);
        if (incoming.get(0)) {
          if (struct.success == null) {
            struct.success = new rpc_iterator_handle();
          }
          struct.success.read(iprot);
          struct.setSuccessIsSet(true);
        }
        if (incoming.get(1)) {
          if (struct.ex == null) {
            struct.ex = new rpc_invalid_operation();
          }
          struct.ex.read(iprot);
          struct.setExIsSet(true);
        }
      }
    }

    private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
      return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
    }
  }

  public static class num_records_args implements org.apache.thrift.TBase<num_records_args, num_records_args._Fields>, java.io.Serializable, Cloneable, Comparable<num_records_args>   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("num_records_args");

    private static final org.apache.thrift.protocol.TField MID_FIELD_DESC = new org.apache.thrift.protocol.TField("mid", org.apache.thrift.protocol.TType.I64, (short)1);

    private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new num_records_argsStandardSchemeFactory();
    private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new num_records_argsTupleSchemeFactory();

    private long mid; // 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 {
      MID((short)1, "mid");

      private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();

      static {
        for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // MID
            return MID;
          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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByName(java.lang.String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final java.lang.String _fieldName;

      _Fields(short thriftId, java.lang.String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public java.lang.String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    private static final int __MID_ISSET_ID = 0;
    private byte __isset_bitfield = 0;
    public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.MID, new org.apache.thrift.meta_data.FieldMetaData("mid", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(num_records_args.class, metaDataMap);
    }

    public num_records_args() {
    }

    public num_records_args(
      long mid)
    {
      this();
      this.mid = mid;
      setMidIsSet(true);
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public num_records_args(num_records_args other) {
      __isset_bitfield = other.__isset_bitfield;
      this.mid = other.mid;
    }

    public num_records_args deepCopy() {
      return new num_records_args(this);
    }

    @Override
    public void clear() {
      setMidIsSet(false);
      this.mid = 0;
    }

    public long getMid() {
      return this.mid;
    }

    public num_records_args setMid(long mid) {
      this.mid = mid;
      setMidIsSet(true);
      return this;
    }

    public void unsetMid() {
      __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __MID_ISSET_ID);
    }

    /** Returns true if field mid is set (has been assigned a value) and false otherwise */
    public boolean isSetMid() {
      return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __MID_ISSET_ID);
    }

    public void setMidIsSet(boolean value) {
      __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __MID_ISSET_ID, value);
    }

    public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
      switch (field) {
      case MID:
        if (value == null) {
          unsetMid();
        } else {
          setMid((java.lang.Long)value);
        }
        break;

      }
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.Object getFieldValue(_Fields field) {
      switch (field) {
      case MID:
        return getMid();

      }
      throw new java.lang.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 java.lang.IllegalArgumentException();
      }

      switch (field) {
      case MID:
        return isSetMid();
      }
      throw new java.lang.IllegalStateException();
    }

    @Override
    public boolean equals(java.lang.Object that) {
      if (that == null)
        return false;
      if (that instanceof num_records_args)
        return this.equals((num_records_args)that);
      return false;
    }

    public boolean equals(num_records_args that) {
      if (that == null)
        return false;
      if (this == that)
        return true;

      boolean this_present_mid = true;
      boolean that_present_mid = true;
      if (this_present_mid || that_present_mid) {
        if (!(this_present_mid && that_present_mid))
          return false;
        if (this.mid != that.mid)
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      int hashCode = 1;

      hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(mid);

      return hashCode;
    }

    @Override
    public int compareTo(num_records_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;

      lastComparison = java.lang.Boolean.valueOf(isSetMid()).compareTo(other.isSetMid());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetMid()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.mid, other.mid);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    @org.apache.thrift.annotation.Nullable
    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      scheme(iprot).read(iprot, this);
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      scheme(oprot).write(oprot, this);
    }

    @Override
    public java.lang.String toString() {
      java.lang.StringBuilder sb = new java.lang.StringBuilder("num_records_args(");
      boolean first = true;

      sb.append("mid:");
      sb.append(this.mid);
      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, java.lang.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 num_records_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public num_records_argsStandardScheme getScheme() {
        return new num_records_argsStandardScheme();
      }
    }

    private static class num_records_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<num_records_args> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, num_records_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: // MID
              if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
                struct.mid = iprot.readI64();
                struct.setMidIsSet(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, num_records_args struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        oprot.writeFieldBegin(MID_FIELD_DESC);
        oprot.writeI64(struct.mid);
        oprot.writeFieldEnd();
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class num_records_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public num_records_argsTupleScheme getScheme() {
        return new num_records_argsTupleScheme();
      }
    }

    private static class num_records_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<num_records_args> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, num_records_args struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet optionals = new java.util.BitSet();
        if (struct.isSetMid()) {
          optionals.set(0);
        }
        oprot.writeBitSet(optionals, 1);
        if (struct.isSetMid()) {
          oprot.writeI64(struct.mid);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, num_records_args struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet incoming = iprot.readBitSet(1);
        if (incoming.get(0)) {
          struct.mid = iprot.readI64();
          struct.setMidIsSet(true);
        }
      }
    }

    private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
      return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
    }
  }

  public static class num_records_result implements org.apache.thrift.TBase<num_records_result, num_records_result._Fields>, java.io.Serializable, Cloneable, Comparable<num_records_result>   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("num_records_result");

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.I64, (short)0);

    private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new num_records_resultStandardSchemeFactory();
    private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new num_records_resultTupleSchemeFactory();

    private long 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 java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();

      static {
        for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByName(java.lang.String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final java.lang.String _fieldName;

      _Fields(short thriftId, java.lang.String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public java.lang.String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    private static final int __SUCCESS_ISSET_ID = 0;
    private byte __isset_bitfield = 0;
    public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.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.I64)));
      metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(num_records_result.class, metaDataMap);
    }

    public num_records_result() {
    }

    public num_records_result(
      long success)
    {
      this();
      this.success = success;
      setSuccessIsSet(true);
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public num_records_result(num_records_result other) {
      __isset_bitfield = other.__isset_bitfield;
      this.success = other.success;
    }

    public num_records_result deepCopy() {
      return new num_records_result(this);
    }

    @Override
    public void clear() {
      setSuccessIsSet(false);
      this.success = 0;
    }

    public long getSuccess() {
      return this.success;
    }

    public num_records_result setSuccess(long success) {
      this.success = success;
      setSuccessIsSet(true);
      return this;
    }

    public void unsetSuccess() {
      __isset_bitfield = org.apache.thrift.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 org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID);
    }

    public void setSuccessIsSet(boolean value) {
      __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value);
    }

    public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((java.lang.Long)value);
        }
        break;

      }
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      }
      throw new java.lang.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 java.lang.IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      }
      throw new java.lang.IllegalStateException();
    }

    @Override
    public boolean equals(java.lang.Object that) {
      if (that == null)
        return false;
      if (that instanceof num_records_result)
        return this.equals((num_records_result)that);
      return false;
    }

    public boolean equals(num_records_result that) {
      if (that == null)
        return false;
      if (this == that)
        return true;

      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() {
      int hashCode = 1;

      hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(success);

      return hashCode;
    }

    @Override
    public int compareTo(num_records_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;

      lastComparison = java.lang.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;
    }

    @org.apache.thrift.annotation.Nullable
    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      scheme(iprot).read(iprot, this);
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      scheme(oprot).write(oprot, this);
      }

    @Override
    public java.lang.String toString() {
      java.lang.StringBuilder sb = new java.lang.StringBuilder("num_records_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, java.lang.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 num_records_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public num_records_resultStandardScheme getScheme() {
        return new num_records_resultStandardScheme();
      }
    }

    private static class num_records_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<num_records_result> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, num_records_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.I64) {
                struct.success = iprot.readI64();
                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, num_records_result struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.isSetSuccess()) {
          oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
          oprot.writeI64(struct.success);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class num_records_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public num_records_resultTupleScheme getScheme() {
        return new num_records_resultTupleScheme();
      }
    }

    private static class num_records_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<num_records_result> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, num_records_result struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet optionals = new java.util.BitSet();
        if (struct.isSetSuccess()) {
          optionals.set(0);
        }
        oprot.writeBitSet(optionals, 1);
        if (struct.isSetSuccess()) {
          oprot.writeI64(struct.success);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, num_records_result struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet incoming = iprot.readBitSet(1);
        if (incoming.get(0)) {
          struct.success = iprot.readI64();
          struct.setSuccessIsSet(true);
        }
      }
    }

    private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
      return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
    }
  }

}
