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

com.xiaomi.infra.galaxy.emq.thrift.QueueService Maven / Gradle / Ivy

There is a newer version: 1.3.2
Show newest version
/**
 * Autogenerated by Thrift Compiler (0.9.2)
 *
 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
 *  @generated
 */
package com.xiaomi.infra.galaxy.emq.thrift;

import libthrift091.scheme.IScheme;
import libthrift091.scheme.SchemeFactory;
import libthrift091.scheme.StandardScheme;

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

@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-3-3")
public class QueueService {

  public interface Iface extends com.xiaomi.infra.galaxy.emq.thrift.EMQBaseService.Iface {

    /**
     * Create queue;
     * 
     * 
     * @param request
     */
    public void createQueue(CreateQueueRequest request) throws com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException, libthrift091.TException;

    /**
     * Delete queue;
     * 
     * 
     * @param request
     */
    public void deleteQueue(DeleteQueueRequest request) throws com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException, libthrift091.TException;

    /**
     * Set queue attribute;
     * 
     * 
     * @param request
     */
    public void setQueueAttribute(SetQueueAttributesRequest request) throws com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException, libthrift091.TException;

    /**
     * Get queue info, incloud QueueAttribute and QueueState;
     * 
     * 
     * @param request
     */
    public GetQueueInfoResponse getQueueInfo(GetQueueInfoRequest request) throws com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException, libthrift091.TException;

    /**
     * List queue with queueNamePrefix;
     * 
     * 
     * @param request
     */
    public ListQueueResponse listQueue(ListQueueRequest request) throws com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException, libthrift091.TException;

  }

  public interface AsyncIface extends com.xiaomi.infra.galaxy.emq.thrift.EMQBaseService .AsyncIface {

    public void createQueue(CreateQueueRequest request, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException;

    public void deleteQueue(DeleteQueueRequest request, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException;

    public void setQueueAttribute(SetQueueAttributesRequest request, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException;

    public void getQueueInfo(GetQueueInfoRequest request, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException;

    public void listQueue(ListQueueRequest request, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException;

  }

  public static class Client extends com.xiaomi.infra.galaxy.emq.thrift.EMQBaseService.Client implements Iface {
    public static class Factory implements libthrift091.TServiceClientFactory {
      public Factory() {}
      public Client getClient(libthrift091.protocol.TProtocol prot) {
        return new Client(prot);
      }
      public Client getClient(libthrift091.protocol.TProtocol iprot, libthrift091.protocol.TProtocol oprot) {
        return new Client(iprot, oprot);
      }
    }

    public Client(libthrift091.protocol.TProtocol prot)
    {
      super(prot, prot);
    }

    public Client(libthrift091.protocol.TProtocol iprot, libthrift091.protocol.TProtocol oprot) {
      super(iprot, oprot);
    }

    public void createQueue(CreateQueueRequest request) throws com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException, libthrift091.TException
    {
      send_createQueue(request);
      recv_createQueue();
    }

    public void send_createQueue(CreateQueueRequest request) throws libthrift091.TException
    {
      createQueue_args args = new createQueue_args();
      args.setRequest(request);
      sendBase("createQueue", args);
    }

    public void recv_createQueue() throws com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException, libthrift091.TException
    {
      createQueue_result result = new createQueue_result();
      receiveBase(result, "createQueue");
      if (result.e != null) {
        throw result.e;
      }
      return;
    }

    public void deleteQueue(DeleteQueueRequest request) throws com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException, libthrift091.TException
    {
      send_deleteQueue(request);
      recv_deleteQueue();
    }

    public void send_deleteQueue(DeleteQueueRequest request) throws libthrift091.TException
    {
      deleteQueue_args args = new deleteQueue_args();
      args.setRequest(request);
      sendBase("deleteQueue", args);
    }

    public void recv_deleteQueue() throws com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException, libthrift091.TException
    {
      deleteQueue_result result = new deleteQueue_result();
      receiveBase(result, "deleteQueue");
      if (result.e != null) {
        throw result.e;
      }
      return;
    }

    public void setQueueAttribute(SetQueueAttributesRequest request) throws com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException, libthrift091.TException
    {
      send_setQueueAttribute(request);
      recv_setQueueAttribute();
    }

    public void send_setQueueAttribute(SetQueueAttributesRequest request) throws libthrift091.TException
    {
      setQueueAttribute_args args = new setQueueAttribute_args();
      args.setRequest(request);
      sendBase("setQueueAttribute", args);
    }

    public void recv_setQueueAttribute() throws com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException, libthrift091.TException
    {
      setQueueAttribute_result result = new setQueueAttribute_result();
      receiveBase(result, "setQueueAttribute");
      if (result.e != null) {
        throw result.e;
      }
      return;
    }

    public GetQueueInfoResponse getQueueInfo(GetQueueInfoRequest request) throws com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException, libthrift091.TException
    {
      send_getQueueInfo(request);
      return recv_getQueueInfo();
    }

    public void send_getQueueInfo(GetQueueInfoRequest request) throws libthrift091.TException
    {
      getQueueInfo_args args = new getQueueInfo_args();
      args.setRequest(request);
      sendBase("getQueueInfo", args);
    }

    public GetQueueInfoResponse recv_getQueueInfo() throws com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException, libthrift091.TException
    {
      getQueueInfo_result result = new getQueueInfo_result();
      receiveBase(result, "getQueueInfo");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.e != null) {
        throw result.e;
      }
      throw new libthrift091.TApplicationException(libthrift091.TApplicationException.MISSING_RESULT, "getQueueInfo failed: unknown result");
    }

    public ListQueueResponse listQueue(ListQueueRequest request) throws com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException, libthrift091.TException
    {
      send_listQueue(request);
      return recv_listQueue();
    }

    public void send_listQueue(ListQueueRequest request) throws libthrift091.TException
    {
      listQueue_args args = new listQueue_args();
      args.setRequest(request);
      sendBase("listQueue", args);
    }

    public ListQueueResponse recv_listQueue() throws com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException, libthrift091.TException
    {
      listQueue_result result = new listQueue_result();
      receiveBase(result, "listQueue");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.e != null) {
        throw result.e;
      }
      throw new libthrift091.TApplicationException(libthrift091.TApplicationException.MISSING_RESULT, "listQueue failed: unknown result");
    }

  }
  public static class AsyncClient extends com.xiaomi.infra.galaxy.emq.thrift.EMQBaseService.AsyncClient implements AsyncIface {
    public static class Factory implements libthrift091.async.TAsyncClientFactory {
      private libthrift091.async.TAsyncClientManager clientManager;
      private libthrift091.protocol.TProtocolFactory protocolFactory;
      public Factory(libthrift091.async.TAsyncClientManager clientManager, libthrift091.protocol.TProtocolFactory protocolFactory) {
        this.clientManager = clientManager;
        this.protocolFactory = protocolFactory;
      }
      public AsyncClient getAsyncClient(libthrift091.transport.TNonblockingTransport transport) {
        return new AsyncClient(protocolFactory, clientManager, transport);
      }
    }

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

    public void createQueue(CreateQueueRequest request, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException {
      checkReady();
      createQueue_call method_call = new createQueue_call(request, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class createQueue_call extends libthrift091.async.TAsyncMethodCall {
      private CreateQueueRequest request;
      public createQueue_call(CreateQueueRequest request, libthrift091.async.AsyncMethodCallback resultHandler, libthrift091.async.TAsyncClient client, libthrift091.protocol.TProtocolFactory protocolFactory, libthrift091.transport.TNonblockingTransport transport) throws libthrift091.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.request = request;
      }

      public void write_args(libthrift091.protocol.TProtocol prot) throws libthrift091.TException {
        prot.writeMessageBegin(new libthrift091.protocol.TMessage("createQueue", libthrift091.protocol.TMessageType.CALL, 0));
        createQueue_args args = new createQueue_args();
        args.setRequest(request);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public void getResult() throws com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException, libthrift091.TException {
        if (getState() != libthrift091.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        libthrift091.transport.TMemoryInputTransport memoryTransport = new libthrift091.transport.TMemoryInputTransport(getFrameBuffer().array());
        libthrift091.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        (new Client(prot)).recv_createQueue();
      }
    }

    public void deleteQueue(DeleteQueueRequest request, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException {
      checkReady();
      deleteQueue_call method_call = new deleteQueue_call(request, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class deleteQueue_call extends libthrift091.async.TAsyncMethodCall {
      private DeleteQueueRequest request;
      public deleteQueue_call(DeleteQueueRequest request, libthrift091.async.AsyncMethodCallback resultHandler, libthrift091.async.TAsyncClient client, libthrift091.protocol.TProtocolFactory protocolFactory, libthrift091.transport.TNonblockingTransport transport) throws libthrift091.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.request = request;
      }

      public void write_args(libthrift091.protocol.TProtocol prot) throws libthrift091.TException {
        prot.writeMessageBegin(new libthrift091.protocol.TMessage("deleteQueue", libthrift091.protocol.TMessageType.CALL, 0));
        deleteQueue_args args = new deleteQueue_args();
        args.setRequest(request);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public void getResult() throws com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException, libthrift091.TException {
        if (getState() != libthrift091.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        libthrift091.transport.TMemoryInputTransport memoryTransport = new libthrift091.transport.TMemoryInputTransport(getFrameBuffer().array());
        libthrift091.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        (new Client(prot)).recv_deleteQueue();
      }
    }

    public void setQueueAttribute(SetQueueAttributesRequest request, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException {
      checkReady();
      setQueueAttribute_call method_call = new setQueueAttribute_call(request, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class setQueueAttribute_call extends libthrift091.async.TAsyncMethodCall {
      private SetQueueAttributesRequest request;
      public setQueueAttribute_call(SetQueueAttributesRequest request, libthrift091.async.AsyncMethodCallback resultHandler, libthrift091.async.TAsyncClient client, libthrift091.protocol.TProtocolFactory protocolFactory, libthrift091.transport.TNonblockingTransport transport) throws libthrift091.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.request = request;
      }

      public void write_args(libthrift091.protocol.TProtocol prot) throws libthrift091.TException {
        prot.writeMessageBegin(new libthrift091.protocol.TMessage("setQueueAttribute", libthrift091.protocol.TMessageType.CALL, 0));
        setQueueAttribute_args args = new setQueueAttribute_args();
        args.setRequest(request);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public void getResult() throws com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException, libthrift091.TException {
        if (getState() != libthrift091.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        libthrift091.transport.TMemoryInputTransport memoryTransport = new libthrift091.transport.TMemoryInputTransport(getFrameBuffer().array());
        libthrift091.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        (new Client(prot)).recv_setQueueAttribute();
      }
    }

    public void getQueueInfo(GetQueueInfoRequest request, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException {
      checkReady();
      getQueueInfo_call method_call = new getQueueInfo_call(request, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class getQueueInfo_call extends libthrift091.async.TAsyncMethodCall {
      private GetQueueInfoRequest request;
      public getQueueInfo_call(GetQueueInfoRequest request, libthrift091.async.AsyncMethodCallback resultHandler, libthrift091.async.TAsyncClient client, libthrift091.protocol.TProtocolFactory protocolFactory, libthrift091.transport.TNonblockingTransport transport) throws libthrift091.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.request = request;
      }

      public void write_args(libthrift091.protocol.TProtocol prot) throws libthrift091.TException {
        prot.writeMessageBegin(new libthrift091.protocol.TMessage("getQueueInfo", libthrift091.protocol.TMessageType.CALL, 0));
        getQueueInfo_args args = new getQueueInfo_args();
        args.setRequest(request);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public GetQueueInfoResponse getResult() throws com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException, libthrift091.TException {
        if (getState() != libthrift091.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        libthrift091.transport.TMemoryInputTransport memoryTransport = new libthrift091.transport.TMemoryInputTransport(getFrameBuffer().array());
        libthrift091.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        return (new Client(prot)).recv_getQueueInfo();
      }
    }

    public void listQueue(ListQueueRequest request, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException {
      checkReady();
      listQueue_call method_call = new listQueue_call(request, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class listQueue_call extends libthrift091.async.TAsyncMethodCall {
      private ListQueueRequest request;
      public listQueue_call(ListQueueRequest request, libthrift091.async.AsyncMethodCallback resultHandler, libthrift091.async.TAsyncClient client, libthrift091.protocol.TProtocolFactory protocolFactory, libthrift091.transport.TNonblockingTransport transport) throws libthrift091.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.request = request;
      }

      public void write_args(libthrift091.protocol.TProtocol prot) throws libthrift091.TException {
        prot.writeMessageBegin(new libthrift091.protocol.TMessage("listQueue", libthrift091.protocol.TMessageType.CALL, 0));
        listQueue_args args = new listQueue_args();
        args.setRequest(request);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public ListQueueResponse getResult() throws com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException, libthrift091.TException {
        if (getState() != libthrift091.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        libthrift091.transport.TMemoryInputTransport memoryTransport = new libthrift091.transport.TMemoryInputTransport(getFrameBuffer().array());
        libthrift091.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        return (new Client(prot)).recv_listQueue();
      }
    }

  }

  public static class Processor extends com.xiaomi.infra.galaxy.emq.thrift.EMQBaseService.Processor implements libthrift091.TProcessor {
    private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
    public Processor(I iface) {
      super(iface, getProcessMap(new HashMap>()));
    }

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

    private static  Map> getProcessMap(Map> processMap) {
      processMap.put("createQueue", new createQueue());
      processMap.put("deleteQueue", new deleteQueue());
      processMap.put("setQueueAttribute", new setQueueAttribute());
      processMap.put("getQueueInfo", new getQueueInfo());
      processMap.put("listQueue", new listQueue());
      return processMap;
    }

    public static class createQueue extends libthrift091.ProcessFunction {
      public createQueue() {
        super("createQueue");
      }

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

      protected boolean isOneway() {
        return false;
      }

      public createQueue_result getResult(I iface, createQueue_args args) throws libthrift091.TException {
        createQueue_result result = new createQueue_result();
        try {
          iface.createQueue(args.request);
        } catch (com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException e) {
          result.e = e;
        }
        return result;
      }
    }

    public static class deleteQueue extends libthrift091.ProcessFunction {
      public deleteQueue() {
        super("deleteQueue");
      }

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

      protected boolean isOneway() {
        return false;
      }

      public deleteQueue_result getResult(I iface, deleteQueue_args args) throws libthrift091.TException {
        deleteQueue_result result = new deleteQueue_result();
        try {
          iface.deleteQueue(args.request);
        } catch (com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException e) {
          result.e = e;
        }
        return result;
      }
    }

    public static class setQueueAttribute extends libthrift091.ProcessFunction {
      public setQueueAttribute() {
        super("setQueueAttribute");
      }

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

      protected boolean isOneway() {
        return false;
      }

      public setQueueAttribute_result getResult(I iface, setQueueAttribute_args args) throws libthrift091.TException {
        setQueueAttribute_result result = new setQueueAttribute_result();
        try {
          iface.setQueueAttribute(args.request);
        } catch (com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException e) {
          result.e = e;
        }
        return result;
      }
    }

    public static class getQueueInfo extends libthrift091.ProcessFunction {
      public getQueueInfo() {
        super("getQueueInfo");
      }

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

      protected boolean isOneway() {
        return false;
      }

      public getQueueInfo_result getResult(I iface, getQueueInfo_args args) throws libthrift091.TException {
        getQueueInfo_result result = new getQueueInfo_result();
        try {
          result.success = iface.getQueueInfo(args.request);
        } catch (com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException e) {
          result.e = e;
        }
        return result;
      }
    }

    public static class listQueue extends libthrift091.ProcessFunction {
      public listQueue() {
        super("listQueue");
      }

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

      protected boolean isOneway() {
        return false;
      }

      public listQueue_result getResult(I iface, listQueue_args args) throws libthrift091.TException {
        listQueue_result result = new listQueue_result();
        try {
          result.success = iface.listQueue(args.request);
        } catch (com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException e) {
          result.e = e;
        }
        return result;
      }
    }

  }

  public static class AsyncProcessor extends com.xiaomi.infra.galaxy.emq.thrift.EMQBaseService.AsyncProcessor {
    private static final Logger LOGGER = LoggerFactory.getLogger(AsyncProcessor.class.getName());
    public AsyncProcessor(I iface) {
      super(iface, getProcessMap(new HashMap>()));
    }

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

    private static  Map> getProcessMap(Map> processMap) {
      processMap.put("createQueue", new createQueue());
      processMap.put("deleteQueue", new deleteQueue());
      processMap.put("setQueueAttribute", new setQueueAttribute());
      processMap.put("getQueueInfo", new getQueueInfo());
      processMap.put("listQueue", new listQueue());
      return processMap;
    }

    public static class createQueue extends libthrift091.AsyncProcessFunction {
      public createQueue() {
        super("createQueue");
      }

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

      public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
        final libthrift091.AsyncProcessFunction fcall = this;
        return new AsyncMethodCallback() { 
          public void onComplete(Void o) {
            createQueue_result result = new createQueue_result();
            try {
              fcall.sendResponse(fb,result, libthrift091.protocol.TMessageType.REPLY,seqid);
              return;
            } catch (Exception e) {
              LOGGER.error("Exception writing to internal frame buffer", e);
            }
            fb.close();
          }
          public void onError(Exception e) {
            byte msgType = libthrift091.protocol.TMessageType.REPLY;
            libthrift091.TBase msg;
            createQueue_result result = new createQueue_result();
            if (e instanceof com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException) {
                        result.e = (com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException) e;
                        result.setEIsSet(true);
                        msg = result;
            }
             else 
            {
              msgType = libthrift091.protocol.TMessageType.EXCEPTION;
              msg = (libthrift091.TBase)new libthrift091.TApplicationException(libthrift091.TApplicationException.INTERNAL_ERROR, e.getMessage());
            }
            try {
              fcall.sendResponse(fb,msg,msgType,seqid);
              return;
            } catch (Exception ex) {
              LOGGER.error("Exception writing to internal frame buffer", ex);
            }
            fb.close();
          }
        };
      }

      protected boolean isOneway() {
        return false;
      }

      public void start(I iface, createQueue_args args, libthrift091.async.AsyncMethodCallback resultHandler) throws TException {
        iface.createQueue(args.request,resultHandler);
      }
    }

    public static class deleteQueue extends libthrift091.AsyncProcessFunction {
      public deleteQueue() {
        super("deleteQueue");
      }

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

      public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
        final libthrift091.AsyncProcessFunction fcall = this;
        return new AsyncMethodCallback() { 
          public void onComplete(Void o) {
            deleteQueue_result result = new deleteQueue_result();
            try {
              fcall.sendResponse(fb,result, libthrift091.protocol.TMessageType.REPLY,seqid);
              return;
            } catch (Exception e) {
              LOGGER.error("Exception writing to internal frame buffer", e);
            }
            fb.close();
          }
          public void onError(Exception e) {
            byte msgType = libthrift091.protocol.TMessageType.REPLY;
            libthrift091.TBase msg;
            deleteQueue_result result = new deleteQueue_result();
            if (e instanceof com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException) {
                        result.e = (com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException) e;
                        result.setEIsSet(true);
                        msg = result;
            }
             else 
            {
              msgType = libthrift091.protocol.TMessageType.EXCEPTION;
              msg = (libthrift091.TBase)new libthrift091.TApplicationException(libthrift091.TApplicationException.INTERNAL_ERROR, e.getMessage());
            }
            try {
              fcall.sendResponse(fb,msg,msgType,seqid);
              return;
            } catch (Exception ex) {
              LOGGER.error("Exception writing to internal frame buffer", ex);
            }
            fb.close();
          }
        };
      }

      protected boolean isOneway() {
        return false;
      }

      public void start(I iface, deleteQueue_args args, libthrift091.async.AsyncMethodCallback resultHandler) throws TException {
        iface.deleteQueue(args.request,resultHandler);
      }
    }

    public static class setQueueAttribute extends libthrift091.AsyncProcessFunction {
      public setQueueAttribute() {
        super("setQueueAttribute");
      }

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

      public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
        final libthrift091.AsyncProcessFunction fcall = this;
        return new AsyncMethodCallback() { 
          public void onComplete(Void o) {
            setQueueAttribute_result result = new setQueueAttribute_result();
            try {
              fcall.sendResponse(fb,result, libthrift091.protocol.TMessageType.REPLY,seqid);
              return;
            } catch (Exception e) {
              LOGGER.error("Exception writing to internal frame buffer", e);
            }
            fb.close();
          }
          public void onError(Exception e) {
            byte msgType = libthrift091.protocol.TMessageType.REPLY;
            libthrift091.TBase msg;
            setQueueAttribute_result result = new setQueueAttribute_result();
            if (e instanceof com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException) {
                        result.e = (com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException) e;
                        result.setEIsSet(true);
                        msg = result;
            }
             else 
            {
              msgType = libthrift091.protocol.TMessageType.EXCEPTION;
              msg = (libthrift091.TBase)new libthrift091.TApplicationException(libthrift091.TApplicationException.INTERNAL_ERROR, e.getMessage());
            }
            try {
              fcall.sendResponse(fb,msg,msgType,seqid);
              return;
            } catch (Exception ex) {
              LOGGER.error("Exception writing to internal frame buffer", ex);
            }
            fb.close();
          }
        };
      }

      protected boolean isOneway() {
        return false;
      }

      public void start(I iface, setQueueAttribute_args args, libthrift091.async.AsyncMethodCallback resultHandler) throws TException {
        iface.setQueueAttribute(args.request,resultHandler);
      }
    }

    public static class getQueueInfo extends libthrift091.AsyncProcessFunction {
      public getQueueInfo() {
        super("getQueueInfo");
      }

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

      public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
        final libthrift091.AsyncProcessFunction fcall = this;
        return new AsyncMethodCallback() { 
          public void onComplete(GetQueueInfoResponse o) {
            getQueueInfo_result result = new getQueueInfo_result();
            result.success = o;
            try {
              fcall.sendResponse(fb,result, libthrift091.protocol.TMessageType.REPLY,seqid);
              return;
            } catch (Exception e) {
              LOGGER.error("Exception writing to internal frame buffer", e);
            }
            fb.close();
          }
          public void onError(Exception e) {
            byte msgType = libthrift091.protocol.TMessageType.REPLY;
            libthrift091.TBase msg;
            getQueueInfo_result result = new getQueueInfo_result();
            if (e instanceof com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException) {
                        result.e = (com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException) e;
                        result.setEIsSet(true);
                        msg = result;
            }
             else 
            {
              msgType = libthrift091.protocol.TMessageType.EXCEPTION;
              msg = (libthrift091.TBase)new libthrift091.TApplicationException(libthrift091.TApplicationException.INTERNAL_ERROR, e.getMessage());
            }
            try {
              fcall.sendResponse(fb,msg,msgType,seqid);
              return;
            } catch (Exception ex) {
              LOGGER.error("Exception writing to internal frame buffer", ex);
            }
            fb.close();
          }
        };
      }

      protected boolean isOneway() {
        return false;
      }

      public void start(I iface, getQueueInfo_args args, libthrift091.async.AsyncMethodCallback resultHandler) throws TException {
        iface.getQueueInfo(args.request,resultHandler);
      }
    }

    public static class listQueue extends libthrift091.AsyncProcessFunction {
      public listQueue() {
        super("listQueue");
      }

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

      public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
        final libthrift091.AsyncProcessFunction fcall = this;
        return new AsyncMethodCallback() { 
          public void onComplete(ListQueueResponse o) {
            listQueue_result result = new listQueue_result();
            result.success = o;
            try {
              fcall.sendResponse(fb,result, libthrift091.protocol.TMessageType.REPLY,seqid);
              return;
            } catch (Exception e) {
              LOGGER.error("Exception writing to internal frame buffer", e);
            }
            fb.close();
          }
          public void onError(Exception e) {
            byte msgType = libthrift091.protocol.TMessageType.REPLY;
            libthrift091.TBase msg;
            listQueue_result result = new listQueue_result();
            if (e instanceof com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException) {
                        result.e = (com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException) e;
                        result.setEIsSet(true);
                        msg = result;
            }
             else 
            {
              msgType = libthrift091.protocol.TMessageType.EXCEPTION;
              msg = (libthrift091.TBase)new libthrift091.TApplicationException(libthrift091.TApplicationException.INTERNAL_ERROR, e.getMessage());
            }
            try {
              fcall.sendResponse(fb,msg,msgType,seqid);
              return;
            } catch (Exception ex) {
              LOGGER.error("Exception writing to internal frame buffer", ex);
            }
            fb.close();
          }
        };
      }

      protected boolean isOneway() {
        return false;
      }

      public void start(I iface, listQueue_args args, libthrift091.async.AsyncMethodCallback resultHandler) throws TException {
        iface.listQueue(args.request,resultHandler);
      }
    }

  }

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

    private static final libthrift091.protocol.TField REQUEST_FIELD_DESC = new libthrift091.protocol.TField("request", libthrift091.protocol.TType.STRUCT, (short)1);

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

    public CreateQueueRequest request; // required

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

      private static final Map byName = new HashMap();

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

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

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

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

      private final short _thriftId;
      private final String _fieldName;

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

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final Map<_Fields, libthrift091.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, libthrift091.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, libthrift091.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.REQUEST, new libthrift091.meta_data.FieldMetaData("request", libthrift091.TFieldRequirementType.DEFAULT, 
          new libthrift091.meta_data.StructMetaData(libthrift091.protocol.TType.STRUCT, CreateQueueRequest.class)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(createQueue_args.class, metaDataMap);
    }

    public createQueue_args() {
    }

    public createQueue_args(
      CreateQueueRequest request)
    {
      this();
      this.request = request;
    }

    /**
     * Performs a deep copy on other.
     */
    public createQueue_args(createQueue_args other) {
      if (other.isSetRequest()) {
        this.request = new CreateQueueRequest(other.request);
      }
    }

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

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

    public CreateQueueRequest getRequest() {
      return this.request;
    }

    public createQueue_args setRequest(CreateQueueRequest request) {
      this.request = request;
      return this;
    }

    public void unsetRequest() {
      this.request = null;
    }

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

    public void setRequestIsSet(boolean value) {
      if (!value) {
        this.request = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case REQUEST:
        if (value == null) {
          unsetRequest();
        } else {
          setRequest((CreateQueueRequest)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case REQUEST:
        return getRequest();

      }
      throw new IllegalStateException();
    }

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

      switch (field) {
      case REQUEST:
        return isSetRequest();
      }
      throw new IllegalStateException();
    }

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

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

      boolean this_present_request = true && this.isSetRequest();
      boolean that_present_request = true && that.isSetRequest();
      if (this_present_request || that_present_request) {
        if (!(this_present_request && that_present_request))
          return false;
        if (!this.request.equals(that.request))
          return false;
      }

      return true;
    }

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

      boolean present_request = true && (isSetRequest());
      list.add(present_request);
      if (present_request)
        list.add(request);

      return list.hashCode();
    }

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

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetRequest()).compareTo(other.isSetRequest());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetRequest()) {
        lastComparison = libthrift091.TBaseHelper.compareTo(this.request, other.request);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

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

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

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

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

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

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

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

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

    private static class createQueue_argsStandardSchemeFactory implements SchemeFactory {
      public createQueue_argsStandardScheme getScheme() {
        return new createQueue_argsStandardScheme();
      }
    }

    private static class createQueue_argsStandardScheme extends StandardScheme {

      public void read(libthrift091.protocol.TProtocol iprot, createQueue_args struct) throws libthrift091.TException {
        libthrift091.protocol.TField schemeField;
        iprot.readStructBegin();
        while (true)
        {
          schemeField = iprot.readFieldBegin();
          if (schemeField.type == libthrift091.protocol.TType.STOP) { 
            break;
          }
          switch (schemeField.id) {
            case 1: // REQUEST
              if (schemeField.type == libthrift091.protocol.TType.STRUCT) {
                struct.request = new CreateQueueRequest();
                struct.request.read(iprot);
                struct.setRequestIsSet(true);
              } else { 
                libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            default:
              libthrift091.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(libthrift091.protocol.TProtocol oprot, createQueue_args struct) throws libthrift091.TException {
        struct.validate();

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

    }

    private static class createQueue_argsTupleSchemeFactory implements SchemeFactory {
      public createQueue_argsTupleScheme getScheme() {
        return new createQueue_argsTupleScheme();
      }
    }

    private static class createQueue_argsTupleScheme extends TupleScheme {

      @Override
      public void write(libthrift091.protocol.TProtocol prot, createQueue_args struct) throws libthrift091.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetRequest()) {
          optionals.set(0);
        }
        oprot.writeBitSet(optionals, 1);
        if (struct.isSetRequest()) {
          struct.request.write(oprot);
        }
      }

      @Override
      public void read(libthrift091.protocol.TProtocol prot, createQueue_args struct) throws libthrift091.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(1);
        if (incoming.get(0)) {
          struct.request = new CreateQueueRequest();
          struct.request.read(iprot);
          struct.setRequestIsSet(true);
        }
      }
    }

  }

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

    private static final libthrift091.protocol.TField E_FIELD_DESC = new libthrift091.protocol.TField("e", libthrift091.protocol.TType.STRUCT, (short)1);

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

    public com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException e; // required

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

      private static final Map byName = new HashMap();

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

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

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

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

      private final short _thriftId;
      private final String _fieldName;

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

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final Map<_Fields, libthrift091.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, libthrift091.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, libthrift091.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.E, new libthrift091.meta_data.FieldMetaData("e", libthrift091.TFieldRequirementType.DEFAULT, 
          new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.STRUCT)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(createQueue_result.class, metaDataMap);
    }

    public createQueue_result() {
    }

    public createQueue_result(
      com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException e)
    {
      this();
      this.e = e;
    }

    /**
     * Performs a deep copy on other.
     */
    public createQueue_result(createQueue_result other) {
      if (other.isSetE()) {
        this.e = new com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException(other.e);
      }
    }

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

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

    public com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException getE() {
      return this.e;
    }

    public createQueue_result setE(com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException e) {
      this.e = e;
      return this;
    }

    public void unsetE() {
      this.e = null;
    }

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

    public void setEIsSet(boolean value) {
      if (!value) {
        this.e = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case E:
        if (value == null) {
          unsetE();
        } else {
          setE((com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case E:
        return getE();

      }
      throw new IllegalStateException();
    }

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

      switch (field) {
      case E:
        return isSetE();
      }
      throw new IllegalStateException();
    }

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

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

      boolean this_present_e = true && this.isSetE();
      boolean that_present_e = true && that.isSetE();
      if (this_present_e || that_present_e) {
        if (!(this_present_e && that_present_e))
          return false;
        if (!this.e.equals(that.e))
          return false;
      }

      return true;
    }

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

      boolean present_e = true && (isSetE());
      list.add(present_e);
      if (present_e)
        list.add(e);

      return list.hashCode();
    }

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

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetE()).compareTo(other.isSetE());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetE()) {
        lastComparison = libthrift091.TBaseHelper.compareTo(this.e, other.e);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

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

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

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

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

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

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

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

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

    private static class createQueue_resultStandardSchemeFactory implements SchemeFactory {
      public createQueue_resultStandardScheme getScheme() {
        return new createQueue_resultStandardScheme();
      }
    }

    private static class createQueue_resultStandardScheme extends StandardScheme {

      public void read(libthrift091.protocol.TProtocol iprot, createQueue_result struct) throws libthrift091.TException {
        libthrift091.protocol.TField schemeField;
        iprot.readStructBegin();
        while (true)
        {
          schemeField = iprot.readFieldBegin();
          if (schemeField.type == libthrift091.protocol.TType.STOP) { 
            break;
          }
          switch (schemeField.id) {
            case 1: // E
              if (schemeField.type == libthrift091.protocol.TType.STRUCT) {
                struct.e = new com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException();
                struct.e.read(iprot);
                struct.setEIsSet(true);
              } else { 
                libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            default:
              libthrift091.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(libthrift091.protocol.TProtocol oprot, createQueue_result struct) throws libthrift091.TException {
        struct.validate();

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

    }

    private static class createQueue_resultTupleSchemeFactory implements SchemeFactory {
      public createQueue_resultTupleScheme getScheme() {
        return new createQueue_resultTupleScheme();
      }
    }

    private static class createQueue_resultTupleScheme extends TupleScheme {

      @Override
      public void write(libthrift091.protocol.TProtocol prot, createQueue_result struct) throws libthrift091.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetE()) {
          optionals.set(0);
        }
        oprot.writeBitSet(optionals, 1);
        if (struct.isSetE()) {
          struct.e.write(oprot);
        }
      }

      @Override
      public void read(libthrift091.protocol.TProtocol prot, createQueue_result struct) throws libthrift091.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(1);
        if (incoming.get(0)) {
          struct.e = new com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException();
          struct.e.read(iprot);
          struct.setEIsSet(true);
        }
      }
    }

  }

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

    private static final libthrift091.protocol.TField REQUEST_FIELD_DESC = new libthrift091.protocol.TField("request", libthrift091.protocol.TType.STRUCT, (short)1);

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

    public DeleteQueueRequest request; // required

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

      private static final Map byName = new HashMap();

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

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

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

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

      private final short _thriftId;
      private final String _fieldName;

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

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final Map<_Fields, libthrift091.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, libthrift091.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, libthrift091.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.REQUEST, new libthrift091.meta_data.FieldMetaData("request", libthrift091.TFieldRequirementType.DEFAULT, 
          new libthrift091.meta_data.StructMetaData(libthrift091.protocol.TType.STRUCT, DeleteQueueRequest.class)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(deleteQueue_args.class, metaDataMap);
    }

    public deleteQueue_args() {
    }

    public deleteQueue_args(
      DeleteQueueRequest request)
    {
      this();
      this.request = request;
    }

    /**
     * Performs a deep copy on other.
     */
    public deleteQueue_args(deleteQueue_args other) {
      if (other.isSetRequest()) {
        this.request = new DeleteQueueRequest(other.request);
      }
    }

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

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

    public DeleteQueueRequest getRequest() {
      return this.request;
    }

    public deleteQueue_args setRequest(DeleteQueueRequest request) {
      this.request = request;
      return this;
    }

    public void unsetRequest() {
      this.request = null;
    }

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

    public void setRequestIsSet(boolean value) {
      if (!value) {
        this.request = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case REQUEST:
        if (value == null) {
          unsetRequest();
        } else {
          setRequest((DeleteQueueRequest)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case REQUEST:
        return getRequest();

      }
      throw new IllegalStateException();
    }

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

      switch (field) {
      case REQUEST:
        return isSetRequest();
      }
      throw new IllegalStateException();
    }

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

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

      boolean this_present_request = true && this.isSetRequest();
      boolean that_present_request = true && that.isSetRequest();
      if (this_present_request || that_present_request) {
        if (!(this_present_request && that_present_request))
          return false;
        if (!this.request.equals(that.request))
          return false;
      }

      return true;
    }

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

      boolean present_request = true && (isSetRequest());
      list.add(present_request);
      if (present_request)
        list.add(request);

      return list.hashCode();
    }

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

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetRequest()).compareTo(other.isSetRequest());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetRequest()) {
        lastComparison = libthrift091.TBaseHelper.compareTo(this.request, other.request);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

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

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

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

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

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

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

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

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

    private static class deleteQueue_argsStandardSchemeFactory implements SchemeFactory {
      public deleteQueue_argsStandardScheme getScheme() {
        return new deleteQueue_argsStandardScheme();
      }
    }

    private static class deleteQueue_argsStandardScheme extends StandardScheme {

      public void read(libthrift091.protocol.TProtocol iprot, deleteQueue_args struct) throws libthrift091.TException {
        libthrift091.protocol.TField schemeField;
        iprot.readStructBegin();
        while (true)
        {
          schemeField = iprot.readFieldBegin();
          if (schemeField.type == libthrift091.protocol.TType.STOP) { 
            break;
          }
          switch (schemeField.id) {
            case 1: // REQUEST
              if (schemeField.type == libthrift091.protocol.TType.STRUCT) {
                struct.request = new DeleteQueueRequest();
                struct.request.read(iprot);
                struct.setRequestIsSet(true);
              } else { 
                libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            default:
              libthrift091.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(libthrift091.protocol.TProtocol oprot, deleteQueue_args struct) throws libthrift091.TException {
        struct.validate();

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

    }

    private static class deleteQueue_argsTupleSchemeFactory implements SchemeFactory {
      public deleteQueue_argsTupleScheme getScheme() {
        return new deleteQueue_argsTupleScheme();
      }
    }

    private static class deleteQueue_argsTupleScheme extends TupleScheme {

      @Override
      public void write(libthrift091.protocol.TProtocol prot, deleteQueue_args struct) throws libthrift091.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetRequest()) {
          optionals.set(0);
        }
        oprot.writeBitSet(optionals, 1);
        if (struct.isSetRequest()) {
          struct.request.write(oprot);
        }
      }

      @Override
      public void read(libthrift091.protocol.TProtocol prot, deleteQueue_args struct) throws libthrift091.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(1);
        if (incoming.get(0)) {
          struct.request = new DeleteQueueRequest();
          struct.request.read(iprot);
          struct.setRequestIsSet(true);
        }
      }
    }

  }

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

    private static final libthrift091.protocol.TField E_FIELD_DESC = new libthrift091.protocol.TField("e", libthrift091.protocol.TType.STRUCT, (short)1);

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

    public com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException e; // required

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

      private static final Map byName = new HashMap();

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

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

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

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

      private final short _thriftId;
      private final String _fieldName;

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

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final Map<_Fields, libthrift091.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, libthrift091.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, libthrift091.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.E, new libthrift091.meta_data.FieldMetaData("e", libthrift091.TFieldRequirementType.DEFAULT, 
          new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.STRUCT)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(deleteQueue_result.class, metaDataMap);
    }

    public deleteQueue_result() {
    }

    public deleteQueue_result(
      com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException e)
    {
      this();
      this.e = e;
    }

    /**
     * Performs a deep copy on other.
     */
    public deleteQueue_result(deleteQueue_result other) {
      if (other.isSetE()) {
        this.e = new com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException(other.e);
      }
    }

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

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

    public com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException getE() {
      return this.e;
    }

    public deleteQueue_result setE(com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException e) {
      this.e = e;
      return this;
    }

    public void unsetE() {
      this.e = null;
    }

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

    public void setEIsSet(boolean value) {
      if (!value) {
        this.e = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case E:
        if (value == null) {
          unsetE();
        } else {
          setE((com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case E:
        return getE();

      }
      throw new IllegalStateException();
    }

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

      switch (field) {
      case E:
        return isSetE();
      }
      throw new IllegalStateException();
    }

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

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

      boolean this_present_e = true && this.isSetE();
      boolean that_present_e = true && that.isSetE();
      if (this_present_e || that_present_e) {
        if (!(this_present_e && that_present_e))
          return false;
        if (!this.e.equals(that.e))
          return false;
      }

      return true;
    }

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

      boolean present_e = true && (isSetE());
      list.add(present_e);
      if (present_e)
        list.add(e);

      return list.hashCode();
    }

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

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetE()).compareTo(other.isSetE());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetE()) {
        lastComparison = libthrift091.TBaseHelper.compareTo(this.e, other.e);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

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

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

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

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

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

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

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

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

    private static class deleteQueue_resultStandardSchemeFactory implements SchemeFactory {
      public deleteQueue_resultStandardScheme getScheme() {
        return new deleteQueue_resultStandardScheme();
      }
    }

    private static class deleteQueue_resultStandardScheme extends StandardScheme {

      public void read(libthrift091.protocol.TProtocol iprot, deleteQueue_result struct) throws libthrift091.TException {
        libthrift091.protocol.TField schemeField;
        iprot.readStructBegin();
        while (true)
        {
          schemeField = iprot.readFieldBegin();
          if (schemeField.type == libthrift091.protocol.TType.STOP) { 
            break;
          }
          switch (schemeField.id) {
            case 1: // E
              if (schemeField.type == libthrift091.protocol.TType.STRUCT) {
                struct.e = new com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException();
                struct.e.read(iprot);
                struct.setEIsSet(true);
              } else { 
                libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            default:
              libthrift091.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(libthrift091.protocol.TProtocol oprot, deleteQueue_result struct) throws libthrift091.TException {
        struct.validate();

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

    }

    private static class deleteQueue_resultTupleSchemeFactory implements SchemeFactory {
      public deleteQueue_resultTupleScheme getScheme() {
        return new deleteQueue_resultTupleScheme();
      }
    }

    private static class deleteQueue_resultTupleScheme extends TupleScheme {

      @Override
      public void write(libthrift091.protocol.TProtocol prot, deleteQueue_result struct) throws libthrift091.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetE()) {
          optionals.set(0);
        }
        oprot.writeBitSet(optionals, 1);
        if (struct.isSetE()) {
          struct.e.write(oprot);
        }
      }

      @Override
      public void read(libthrift091.protocol.TProtocol prot, deleteQueue_result struct) throws libthrift091.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(1);
        if (incoming.get(0)) {
          struct.e = new com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException();
          struct.e.read(iprot);
          struct.setEIsSet(true);
        }
      }
    }

  }

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

    private static final libthrift091.protocol.TField REQUEST_FIELD_DESC = new libthrift091.protocol.TField("request", libthrift091.protocol.TType.STRUCT, (short)1);

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

    public SetQueueAttributesRequest request; // required

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

      private static final Map byName = new HashMap();

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

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

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

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

      private final short _thriftId;
      private final String _fieldName;

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

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final Map<_Fields, libthrift091.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, libthrift091.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, libthrift091.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.REQUEST, new libthrift091.meta_data.FieldMetaData("request", libthrift091.TFieldRequirementType.DEFAULT, 
          new libthrift091.meta_data.StructMetaData(libthrift091.protocol.TType.STRUCT, SetQueueAttributesRequest.class)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(setQueueAttribute_args.class, metaDataMap);
    }

    public setQueueAttribute_args() {
    }

    public setQueueAttribute_args(
      SetQueueAttributesRequest request)
    {
      this();
      this.request = request;
    }

    /**
     * Performs a deep copy on other.
     */
    public setQueueAttribute_args(setQueueAttribute_args other) {
      if (other.isSetRequest()) {
        this.request = new SetQueueAttributesRequest(other.request);
      }
    }

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

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

    public SetQueueAttributesRequest getRequest() {
      return this.request;
    }

    public setQueueAttribute_args setRequest(SetQueueAttributesRequest request) {
      this.request = request;
      return this;
    }

    public void unsetRequest() {
      this.request = null;
    }

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

    public void setRequestIsSet(boolean value) {
      if (!value) {
        this.request = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case REQUEST:
        if (value == null) {
          unsetRequest();
        } else {
          setRequest((SetQueueAttributesRequest)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case REQUEST:
        return getRequest();

      }
      throw new IllegalStateException();
    }

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

      switch (field) {
      case REQUEST:
        return isSetRequest();
      }
      throw new IllegalStateException();
    }

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

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

      boolean this_present_request = true && this.isSetRequest();
      boolean that_present_request = true && that.isSetRequest();
      if (this_present_request || that_present_request) {
        if (!(this_present_request && that_present_request))
          return false;
        if (!this.request.equals(that.request))
          return false;
      }

      return true;
    }

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

      boolean present_request = true && (isSetRequest());
      list.add(present_request);
      if (present_request)
        list.add(request);

      return list.hashCode();
    }

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

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetRequest()).compareTo(other.isSetRequest());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetRequest()) {
        lastComparison = libthrift091.TBaseHelper.compareTo(this.request, other.request);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

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

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

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

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

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

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

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

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

    private static class setQueueAttribute_argsStandardSchemeFactory implements SchemeFactory {
      public setQueueAttribute_argsStandardScheme getScheme() {
        return new setQueueAttribute_argsStandardScheme();
      }
    }

    private static class setQueueAttribute_argsStandardScheme extends StandardScheme {

      public void read(libthrift091.protocol.TProtocol iprot, setQueueAttribute_args struct) throws libthrift091.TException {
        libthrift091.protocol.TField schemeField;
        iprot.readStructBegin();
        while (true)
        {
          schemeField = iprot.readFieldBegin();
          if (schemeField.type == libthrift091.protocol.TType.STOP) { 
            break;
          }
          switch (schemeField.id) {
            case 1: // REQUEST
              if (schemeField.type == libthrift091.protocol.TType.STRUCT) {
                struct.request = new SetQueueAttributesRequest();
                struct.request.read(iprot);
                struct.setRequestIsSet(true);
              } else { 
                libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            default:
              libthrift091.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(libthrift091.protocol.TProtocol oprot, setQueueAttribute_args struct) throws libthrift091.TException {
        struct.validate();

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

    }

    private static class setQueueAttribute_argsTupleSchemeFactory implements SchemeFactory {
      public setQueueAttribute_argsTupleScheme getScheme() {
        return new setQueueAttribute_argsTupleScheme();
      }
    }

    private static class setQueueAttribute_argsTupleScheme extends TupleScheme {

      @Override
      public void write(libthrift091.protocol.TProtocol prot, setQueueAttribute_args struct) throws libthrift091.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetRequest()) {
          optionals.set(0);
        }
        oprot.writeBitSet(optionals, 1);
        if (struct.isSetRequest()) {
          struct.request.write(oprot);
        }
      }

      @Override
      public void read(libthrift091.protocol.TProtocol prot, setQueueAttribute_args struct) throws libthrift091.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(1);
        if (incoming.get(0)) {
          struct.request = new SetQueueAttributesRequest();
          struct.request.read(iprot);
          struct.setRequestIsSet(true);
        }
      }
    }

  }

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

    private static final libthrift091.protocol.TField E_FIELD_DESC = new libthrift091.protocol.TField("e", libthrift091.protocol.TType.STRUCT, (short)1);

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

    public com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException e; // required

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

      private static final Map byName = new HashMap();

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

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

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

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

      private final short _thriftId;
      private final String _fieldName;

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

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final Map<_Fields, libthrift091.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, libthrift091.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, libthrift091.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.E, new libthrift091.meta_data.FieldMetaData("e", libthrift091.TFieldRequirementType.DEFAULT, 
          new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.STRUCT)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(setQueueAttribute_result.class, metaDataMap);
    }

    public setQueueAttribute_result() {
    }

    public setQueueAttribute_result(
      com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException e)
    {
      this();
      this.e = e;
    }

    /**
     * Performs a deep copy on other.
     */
    public setQueueAttribute_result(setQueueAttribute_result other) {
      if (other.isSetE()) {
        this.e = new com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException(other.e);
      }
    }

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

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

    public com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException getE() {
      return this.e;
    }

    public setQueueAttribute_result setE(com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException e) {
      this.e = e;
      return this;
    }

    public void unsetE() {
      this.e = null;
    }

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

    public void setEIsSet(boolean value) {
      if (!value) {
        this.e = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case E:
        if (value == null) {
          unsetE();
        } else {
          setE((com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case E:
        return getE();

      }
      throw new IllegalStateException();
    }

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

      switch (field) {
      case E:
        return isSetE();
      }
      throw new IllegalStateException();
    }

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

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

      boolean this_present_e = true && this.isSetE();
      boolean that_present_e = true && that.isSetE();
      if (this_present_e || that_present_e) {
        if (!(this_present_e && that_present_e))
          return false;
        if (!this.e.equals(that.e))
          return false;
      }

      return true;
    }

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

      boolean present_e = true && (isSetE());
      list.add(present_e);
      if (present_e)
        list.add(e);

      return list.hashCode();
    }

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

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetE()).compareTo(other.isSetE());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetE()) {
        lastComparison = libthrift091.TBaseHelper.compareTo(this.e, other.e);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

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

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

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

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

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

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

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

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

    private static class setQueueAttribute_resultStandardSchemeFactory implements SchemeFactory {
      public setQueueAttribute_resultStandardScheme getScheme() {
        return new setQueueAttribute_resultStandardScheme();
      }
    }

    private static class setQueueAttribute_resultStandardScheme extends StandardScheme {

      public void read(libthrift091.protocol.TProtocol iprot, setQueueAttribute_result struct) throws libthrift091.TException {
        libthrift091.protocol.TField schemeField;
        iprot.readStructBegin();
        while (true)
        {
          schemeField = iprot.readFieldBegin();
          if (schemeField.type == libthrift091.protocol.TType.STOP) { 
            break;
          }
          switch (schemeField.id) {
            case 1: // E
              if (schemeField.type == libthrift091.protocol.TType.STRUCT) {
                struct.e = new com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException();
                struct.e.read(iprot);
                struct.setEIsSet(true);
              } else { 
                libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            default:
              libthrift091.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(libthrift091.protocol.TProtocol oprot, setQueueAttribute_result struct) throws libthrift091.TException {
        struct.validate();

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

    }

    private static class setQueueAttribute_resultTupleSchemeFactory implements SchemeFactory {
      public setQueueAttribute_resultTupleScheme getScheme() {
        return new setQueueAttribute_resultTupleScheme();
      }
    }

    private static class setQueueAttribute_resultTupleScheme extends TupleScheme {

      @Override
      public void write(libthrift091.protocol.TProtocol prot, setQueueAttribute_result struct) throws libthrift091.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetE()) {
          optionals.set(0);
        }
        oprot.writeBitSet(optionals, 1);
        if (struct.isSetE()) {
          struct.e.write(oprot);
        }
      }

      @Override
      public void read(libthrift091.protocol.TProtocol prot, setQueueAttribute_result struct) throws libthrift091.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(1);
        if (incoming.get(0)) {
          struct.e = new com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException();
          struct.e.read(iprot);
          struct.setEIsSet(true);
        }
      }
    }

  }

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

    private static final libthrift091.protocol.TField REQUEST_FIELD_DESC = new libthrift091.protocol.TField("request", libthrift091.protocol.TType.STRUCT, (short)1);

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

    public GetQueueInfoRequest request; // required

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

      private static final Map byName = new HashMap();

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

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

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

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

      private final short _thriftId;
      private final String _fieldName;

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

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final Map<_Fields, libthrift091.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, libthrift091.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, libthrift091.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.REQUEST, new libthrift091.meta_data.FieldMetaData("request", libthrift091.TFieldRequirementType.DEFAULT, 
          new libthrift091.meta_data.StructMetaData(libthrift091.protocol.TType.STRUCT, GetQueueInfoRequest.class)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(getQueueInfo_args.class, metaDataMap);
    }

    public getQueueInfo_args() {
    }

    public getQueueInfo_args(
      GetQueueInfoRequest request)
    {
      this();
      this.request = request;
    }

    /**
     * Performs a deep copy on other.
     */
    public getQueueInfo_args(getQueueInfo_args other) {
      if (other.isSetRequest()) {
        this.request = new GetQueueInfoRequest(other.request);
      }
    }

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

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

    public GetQueueInfoRequest getRequest() {
      return this.request;
    }

    public getQueueInfo_args setRequest(GetQueueInfoRequest request) {
      this.request = request;
      return this;
    }

    public void unsetRequest() {
      this.request = null;
    }

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

    public void setRequestIsSet(boolean value) {
      if (!value) {
        this.request = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case REQUEST:
        if (value == null) {
          unsetRequest();
        } else {
          setRequest((GetQueueInfoRequest)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case REQUEST:
        return getRequest();

      }
      throw new IllegalStateException();
    }

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

      switch (field) {
      case REQUEST:
        return isSetRequest();
      }
      throw new IllegalStateException();
    }

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

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

      boolean this_present_request = true && this.isSetRequest();
      boolean that_present_request = true && that.isSetRequest();
      if (this_present_request || that_present_request) {
        if (!(this_present_request && that_present_request))
          return false;
        if (!this.request.equals(that.request))
          return false;
      }

      return true;
    }

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

      boolean present_request = true && (isSetRequest());
      list.add(present_request);
      if (present_request)
        list.add(request);

      return list.hashCode();
    }

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

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetRequest()).compareTo(other.isSetRequest());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetRequest()) {
        lastComparison = libthrift091.TBaseHelper.compareTo(this.request, other.request);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

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

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

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

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

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

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

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

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

    private static class getQueueInfo_argsStandardSchemeFactory implements SchemeFactory {
      public getQueueInfo_argsStandardScheme getScheme() {
        return new getQueueInfo_argsStandardScheme();
      }
    }

    private static class getQueueInfo_argsStandardScheme extends StandardScheme {

      public void read(libthrift091.protocol.TProtocol iprot, getQueueInfo_args struct) throws libthrift091.TException {
        libthrift091.protocol.TField schemeField;
        iprot.readStructBegin();
        while (true)
        {
          schemeField = iprot.readFieldBegin();
          if (schemeField.type == libthrift091.protocol.TType.STOP) { 
            break;
          }
          switch (schemeField.id) {
            case 1: // REQUEST
              if (schemeField.type == libthrift091.protocol.TType.STRUCT) {
                struct.request = new GetQueueInfoRequest();
                struct.request.read(iprot);
                struct.setRequestIsSet(true);
              } else { 
                libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            default:
              libthrift091.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(libthrift091.protocol.TProtocol oprot, getQueueInfo_args struct) throws libthrift091.TException {
        struct.validate();

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

    }

    private static class getQueueInfo_argsTupleSchemeFactory implements SchemeFactory {
      public getQueueInfo_argsTupleScheme getScheme() {
        return new getQueueInfo_argsTupleScheme();
      }
    }

    private static class getQueueInfo_argsTupleScheme extends TupleScheme {

      @Override
      public void write(libthrift091.protocol.TProtocol prot, getQueueInfo_args struct) throws libthrift091.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetRequest()) {
          optionals.set(0);
        }
        oprot.writeBitSet(optionals, 1);
        if (struct.isSetRequest()) {
          struct.request.write(oprot);
        }
      }

      @Override
      public void read(libthrift091.protocol.TProtocol prot, getQueueInfo_args struct) throws libthrift091.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(1);
        if (incoming.get(0)) {
          struct.request = new GetQueueInfoRequest();
          struct.request.read(iprot);
          struct.setRequestIsSet(true);
        }
      }
    }

  }

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

    private static final libthrift091.protocol.TField SUCCESS_FIELD_DESC = new libthrift091.protocol.TField("success", libthrift091.protocol.TType.STRUCT, (short)0);
    private static final libthrift091.protocol.TField E_FIELD_DESC = new libthrift091.protocol.TField("e", libthrift091.protocol.TType.STRUCT, (short)1);

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

    public GetQueueInfoResponse success; // required
    public com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException e; // required

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

      private static final Map byName = new HashMap();

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

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

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

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

      private final short _thriftId;
      private final String _fieldName;

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

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final Map<_Fields, libthrift091.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, libthrift091.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, libthrift091.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SUCCESS, new libthrift091.meta_data.FieldMetaData("success", libthrift091.TFieldRequirementType.DEFAULT, 
          new libthrift091.meta_data.StructMetaData(libthrift091.protocol.TType.STRUCT, GetQueueInfoResponse.class)));
      tmpMap.put(_Fields.E, new libthrift091.meta_data.FieldMetaData("e", libthrift091.TFieldRequirementType.DEFAULT, 
          new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.STRUCT)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(getQueueInfo_result.class, metaDataMap);
    }

    public getQueueInfo_result() {
    }

    public getQueueInfo_result(
      GetQueueInfoResponse success,
      com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException e)
    {
      this();
      this.success = success;
      this.e = e;
    }

    /**
     * Performs a deep copy on other.
     */
    public getQueueInfo_result(getQueueInfo_result other) {
      if (other.isSetSuccess()) {
        this.success = new GetQueueInfoResponse(other.success);
      }
      if (other.isSetE()) {
        this.e = new com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException(other.e);
      }
    }

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

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

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

    public getQueueInfo_result setSuccess(GetQueueInfoResponse success) {
      this.success = success;
      return this;
    }

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

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

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

    public com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException getE() {
      return this.e;
    }

    public getQueueInfo_result setE(com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException e) {
      this.e = e;
      return this;
    }

    public void unsetE() {
      this.e = null;
    }

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

    public void setEIsSet(boolean value) {
      if (!value) {
        this.e = null;
      }
    }

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

      case E:
        if (value == null) {
          unsetE();
        } else {
          setE((com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException)value);
        }
        break;

      }
    }

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

      case E:
        return getE();

      }
      throw new IllegalStateException();
    }

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

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      case E:
        return isSetE();
      }
      throw new IllegalStateException();
    }

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

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

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

      boolean this_present_e = true && this.isSetE();
      boolean that_present_e = true && that.isSetE();
      if (this_present_e || that_present_e) {
        if (!(this_present_e && that_present_e))
          return false;
        if (!this.e.equals(that.e))
          return false;
      }

      return true;
    }

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

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

      boolean present_e = true && (isSetE());
      list.add(present_e);
      if (present_e)
        list.add(e);

      return list.hashCode();
    }

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

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = libthrift091.TBaseHelper.compareTo(this.success, other.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetE()).compareTo(other.isSetE());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetE()) {
        lastComparison = libthrift091.TBaseHelper.compareTo(this.e, other.e);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

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

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

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

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getQueueInfo_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("e:");
      if (this.e == null) {
        sb.append("null");
      } else {
        sb.append(this.e);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws libthrift091.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 libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(out)));
      } catch (libthrift091.TException te) {
        throw new java.io.IOException(te);
      }
    }

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

    private static class getQueueInfo_resultStandardSchemeFactory implements SchemeFactory {
      public getQueueInfo_resultStandardScheme getScheme() {
        return new getQueueInfo_resultStandardScheme();
      }
    }

    private static class getQueueInfo_resultStandardScheme extends StandardScheme {

      public void read(libthrift091.protocol.TProtocol iprot, getQueueInfo_result struct) throws libthrift091.TException {
        libthrift091.protocol.TField schemeField;
        iprot.readStructBegin();
        while (true)
        {
          schemeField = iprot.readFieldBegin();
          if (schemeField.type == libthrift091.protocol.TType.STOP) { 
            break;
          }
          switch (schemeField.id) {
            case 0: // SUCCESS
              if (schemeField.type == libthrift091.protocol.TType.STRUCT) {
                struct.success = new GetQueueInfoResponse();
                struct.success.read(iprot);
                struct.setSuccessIsSet(true);
              } else { 
                libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 1: // E
              if (schemeField.type == libthrift091.protocol.TType.STRUCT) {
                struct.e = new com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException();
                struct.e.read(iprot);
                struct.setEIsSet(true);
              } else { 
                libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            default:
              libthrift091.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(libthrift091.protocol.TProtocol oprot, getQueueInfo_result struct) throws libthrift091.TException {
        struct.validate();

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

    }

    private static class getQueueInfo_resultTupleSchemeFactory implements SchemeFactory {
      public getQueueInfo_resultTupleScheme getScheme() {
        return new getQueueInfo_resultTupleScheme();
      }
    }

    private static class getQueueInfo_resultTupleScheme extends TupleScheme {

      @Override
      public void write(libthrift091.protocol.TProtocol prot, getQueueInfo_result struct) throws libthrift091.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetSuccess()) {
          optionals.set(0);
        }
        if (struct.isSetE()) {
          optionals.set(1);
        }
        oprot.writeBitSet(optionals, 2);
        if (struct.isSetSuccess()) {
          struct.success.write(oprot);
        }
        if (struct.isSetE()) {
          struct.e.write(oprot);
        }
      }

      @Override
      public void read(libthrift091.protocol.TProtocol prot, getQueueInfo_result struct) throws libthrift091.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(2);
        if (incoming.get(0)) {
          struct.success = new GetQueueInfoResponse();
          struct.success.read(iprot);
          struct.setSuccessIsSet(true);
        }
        if (incoming.get(1)) {
          struct.e = new com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException();
          struct.e.read(iprot);
          struct.setEIsSet(true);
        }
      }
    }

  }

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

    private static final libthrift091.protocol.TField REQUEST_FIELD_DESC = new libthrift091.protocol.TField("request", libthrift091.protocol.TType.STRUCT, (short)1);

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

    public ListQueueRequest request; // required

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

      private static final Map byName = new HashMap();

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

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

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

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

      private final short _thriftId;
      private final String _fieldName;

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

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final Map<_Fields, libthrift091.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, libthrift091.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, libthrift091.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.REQUEST, new libthrift091.meta_data.FieldMetaData("request", libthrift091.TFieldRequirementType.DEFAULT, 
          new libthrift091.meta_data.StructMetaData(libthrift091.protocol.TType.STRUCT, ListQueueRequest.class)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(listQueue_args.class, metaDataMap);
    }

    public listQueue_args() {
    }

    public listQueue_args(
      ListQueueRequest request)
    {
      this();
      this.request = request;
    }

    /**
     * Performs a deep copy on other.
     */
    public listQueue_args(listQueue_args other) {
      if (other.isSetRequest()) {
        this.request = new ListQueueRequest(other.request);
      }
    }

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

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

    public ListQueueRequest getRequest() {
      return this.request;
    }

    public listQueue_args setRequest(ListQueueRequest request) {
      this.request = request;
      return this;
    }

    public void unsetRequest() {
      this.request = null;
    }

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

    public void setRequestIsSet(boolean value) {
      if (!value) {
        this.request = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case REQUEST:
        if (value == null) {
          unsetRequest();
        } else {
          setRequest((ListQueueRequest)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case REQUEST:
        return getRequest();

      }
      throw new IllegalStateException();
    }

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

      switch (field) {
      case REQUEST:
        return isSetRequest();
      }
      throw new IllegalStateException();
    }

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

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

      boolean this_present_request = true && this.isSetRequest();
      boolean that_present_request = true && that.isSetRequest();
      if (this_present_request || that_present_request) {
        if (!(this_present_request && that_present_request))
          return false;
        if (!this.request.equals(that.request))
          return false;
      }

      return true;
    }

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

      boolean present_request = true && (isSetRequest());
      list.add(present_request);
      if (present_request)
        list.add(request);

      return list.hashCode();
    }

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

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetRequest()).compareTo(other.isSetRequest());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetRequest()) {
        lastComparison = libthrift091.TBaseHelper.compareTo(this.request, other.request);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

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

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

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

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

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

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

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

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

    private static class listQueue_argsStandardSchemeFactory implements SchemeFactory {
      public listQueue_argsStandardScheme getScheme() {
        return new listQueue_argsStandardScheme();
      }
    }

    private static class listQueue_argsStandardScheme extends StandardScheme {

      public void read(libthrift091.protocol.TProtocol iprot, listQueue_args struct) throws libthrift091.TException {
        libthrift091.protocol.TField schemeField;
        iprot.readStructBegin();
        while (true)
        {
          schemeField = iprot.readFieldBegin();
          if (schemeField.type == libthrift091.protocol.TType.STOP) { 
            break;
          }
          switch (schemeField.id) {
            case 1: // REQUEST
              if (schemeField.type == libthrift091.protocol.TType.STRUCT) {
                struct.request = new ListQueueRequest();
                struct.request.read(iprot);
                struct.setRequestIsSet(true);
              } else { 
                libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            default:
              libthrift091.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(libthrift091.protocol.TProtocol oprot, listQueue_args struct) throws libthrift091.TException {
        struct.validate();

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

    }

    private static class listQueue_argsTupleSchemeFactory implements SchemeFactory {
      public listQueue_argsTupleScheme getScheme() {
        return new listQueue_argsTupleScheme();
      }
    }

    private static class listQueue_argsTupleScheme extends TupleScheme {

      @Override
      public void write(libthrift091.protocol.TProtocol prot, listQueue_args struct) throws libthrift091.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetRequest()) {
          optionals.set(0);
        }
        oprot.writeBitSet(optionals, 1);
        if (struct.isSetRequest()) {
          struct.request.write(oprot);
        }
      }

      @Override
      public void read(libthrift091.protocol.TProtocol prot, listQueue_args struct) throws libthrift091.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(1);
        if (incoming.get(0)) {
          struct.request = new ListQueueRequest();
          struct.request.read(iprot);
          struct.setRequestIsSet(true);
        }
      }
    }

  }

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

    private static final libthrift091.protocol.TField SUCCESS_FIELD_DESC = new libthrift091.protocol.TField("success", libthrift091.protocol.TType.STRUCT, (short)0);
    private static final libthrift091.protocol.TField E_FIELD_DESC = new libthrift091.protocol.TField("e", libthrift091.protocol.TType.STRUCT, (short)1);

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

    public ListQueueResponse success; // required
    public com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException e; // required

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

      private static final Map byName = new HashMap();

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

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

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

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

      private final short _thriftId;
      private final String _fieldName;

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

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final Map<_Fields, libthrift091.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, libthrift091.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, libthrift091.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SUCCESS, new libthrift091.meta_data.FieldMetaData("success", libthrift091.TFieldRequirementType.DEFAULT, 
          new libthrift091.meta_data.StructMetaData(libthrift091.protocol.TType.STRUCT, ListQueueResponse.class)));
      tmpMap.put(_Fields.E, new libthrift091.meta_data.FieldMetaData("e", libthrift091.TFieldRequirementType.DEFAULT, 
          new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.STRUCT)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(listQueue_result.class, metaDataMap);
    }

    public listQueue_result() {
    }

    public listQueue_result(
      ListQueueResponse success,
      com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException e)
    {
      this();
      this.success = success;
      this.e = e;
    }

    /**
     * Performs a deep copy on other.
     */
    public listQueue_result(listQueue_result other) {
      if (other.isSetSuccess()) {
        this.success = new ListQueueResponse(other.success);
      }
      if (other.isSetE()) {
        this.e = new com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException(other.e);
      }
    }

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

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

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

    public listQueue_result setSuccess(ListQueueResponse success) {
      this.success = success;
      return this;
    }

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

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

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

    public com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException getE() {
      return this.e;
    }

    public listQueue_result setE(com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException e) {
      this.e = e;
      return this;
    }

    public void unsetE() {
      this.e = null;
    }

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

    public void setEIsSet(boolean value) {
      if (!value) {
        this.e = null;
      }
    }

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

      case E:
        if (value == null) {
          unsetE();
        } else {
          setE((com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException)value);
        }
        break;

      }
    }

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

      case E:
        return getE();

      }
      throw new IllegalStateException();
    }

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

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      case E:
        return isSetE();
      }
      throw new IllegalStateException();
    }

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

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

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

      boolean this_present_e = true && this.isSetE();
      boolean that_present_e = true && that.isSetE();
      if (this_present_e || that_present_e) {
        if (!(this_present_e && that_present_e))
          return false;
        if (!this.e.equals(that.e))
          return false;
      }

      return true;
    }

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

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

      boolean present_e = true && (isSetE());
      list.add(present_e);
      if (present_e)
        list.add(e);

      return list.hashCode();
    }

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

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = libthrift091.TBaseHelper.compareTo(this.success, other.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetE()).compareTo(other.isSetE());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetE()) {
        lastComparison = libthrift091.TBaseHelper.compareTo(this.e, other.e);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

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

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

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

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("listQueue_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("e:");
      if (this.e == null) {
        sb.append("null");
      } else {
        sb.append(this.e);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws libthrift091.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 libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(out)));
      } catch (libthrift091.TException te) {
        throw new java.io.IOException(te);
      }
    }

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

    private static class listQueue_resultStandardSchemeFactory implements SchemeFactory {
      public listQueue_resultStandardScheme getScheme() {
        return new listQueue_resultStandardScheme();
      }
    }

    private static class listQueue_resultStandardScheme extends StandardScheme {

      public void read(libthrift091.protocol.TProtocol iprot, listQueue_result struct) throws libthrift091.TException {
        libthrift091.protocol.TField schemeField;
        iprot.readStructBegin();
        while (true)
        {
          schemeField = iprot.readFieldBegin();
          if (schemeField.type == libthrift091.protocol.TType.STOP) { 
            break;
          }
          switch (schemeField.id) {
            case 0: // SUCCESS
              if (schemeField.type == libthrift091.protocol.TType.STRUCT) {
                struct.success = new ListQueueResponse();
                struct.success.read(iprot);
                struct.setSuccessIsSet(true);
              } else { 
                libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 1: // E
              if (schemeField.type == libthrift091.protocol.TType.STRUCT) {
                struct.e = new com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException();
                struct.e.read(iprot);
                struct.setEIsSet(true);
              } else { 
                libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            default:
              libthrift091.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(libthrift091.protocol.TProtocol oprot, listQueue_result struct) throws libthrift091.TException {
        struct.validate();

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

    }

    private static class listQueue_resultTupleSchemeFactory implements SchemeFactory {
      public listQueue_resultTupleScheme getScheme() {
        return new listQueue_resultTupleScheme();
      }
    }

    private static class listQueue_resultTupleScheme extends TupleScheme {

      @Override
      public void write(libthrift091.protocol.TProtocol prot, listQueue_result struct) throws libthrift091.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetSuccess()) {
          optionals.set(0);
        }
        if (struct.isSetE()) {
          optionals.set(1);
        }
        oprot.writeBitSet(optionals, 2);
        if (struct.isSetSuccess()) {
          struct.success.write(oprot);
        }
        if (struct.isSetE()) {
          struct.e.write(oprot);
        }
      }

      @Override
      public void read(libthrift091.protocol.TProtocol prot, listQueue_result struct) throws libthrift091.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(2);
        if (incoming.get(0)) {
          struct.success = new ListQueueResponse();
          struct.success.read(iprot);
          struct.setSuccessIsSet(true);
        }
        if (incoming.get(1)) {
          struct.e = new com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException();
          struct.e.read(iprot);
          struct.setEIsSet(true);
        }
      }
    }

  }

}