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

com.xiaomi.infra.galaxy.emq.thrift.MessageService 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-2-27")
public class MessageService {

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

    /**
     * Send message;
     * 
     * 
     * @param queueName
     * @param request
     */
    public SendMessageResponse sendMessage(String queueName, SendMessageRequest request) throws com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException, libthrift091.TException;

    /**
     * Send message batch;
     * 
     * 
     * @param queueName
     * @param requests
     */
    public List sendMessageBatch(String queueName, List requests) throws com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException, libthrift091.TException;

    /**
     * Receive message;
     * 
     * 
     * @param queueName
     * @param request
     */
    public List receiveMessage(String queueName, ReceiveMessageRequest request) throws com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException, libthrift091.TException;

    /**
     * Change message invisibility seconds;
     * 
     * 
     * @param queueName
     * @param request
     */
    public void changeMessageVisibilitySeconds(String queueName, ChangeMessageVisibilityRequest request) throws com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException, libthrift091.TException;

    /**
     * Change message invisibility seconds batch;
     * 
     * 
     * @param queueName
     * @param requests
     */
    public void changeMessageVisibilitySecondsBatch(String queueName, List requests) throws com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException, libthrift091.TException;

    /**
     * Delete message;
     * 
     * 
     * @param queueName
     * @param request
     */
    public void deleteMessage(String queueName, DeleteMessageRequest request) throws com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException, libthrift091.TException;

    /**
     * Delete message batch;
     * 
     * 
     * @param queueName
     * @param requests
     */
    public void deleteMessageBatch(String queueName, List requests) throws com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException, libthrift091.TException;

  }

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

    public void sendMessage(String queueName, SendMessageRequest request, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException;

    public void sendMessageBatch(String queueName, List requests, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException;

    public void receiveMessage(String queueName, ReceiveMessageRequest request, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException;

    public void changeMessageVisibilitySeconds(String queueName, ChangeMessageVisibilityRequest request, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException;

    public void changeMessageVisibilitySecondsBatch(String queueName, List requests, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException;

    public void deleteMessage(String queueName, DeleteMessageRequest request, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException;

    public void deleteMessageBatch(String queueName, List requests, 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 SendMessageResponse sendMessage(String queueName, SendMessageRequest request) throws com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException, libthrift091.TException
    {
      send_sendMessage(queueName, request);
      return recv_sendMessage();
    }

    public void send_sendMessage(String queueName, SendMessageRequest request) throws libthrift091.TException
    {
      sendMessage_args args = new sendMessage_args();
      args.setQueueName(queueName);
      args.setRequest(request);
      sendBase("sendMessage", args);
    }

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

    public List sendMessageBatch(String queueName, List requests) throws com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException, libthrift091.TException
    {
      send_sendMessageBatch(queueName, requests);
      return recv_sendMessageBatch();
    }

    public void send_sendMessageBatch(String queueName, List requests) throws libthrift091.TException
    {
      sendMessageBatch_args args = new sendMessageBatch_args();
      args.setQueueName(queueName);
      args.setRequests(requests);
      sendBase("sendMessageBatch", args);
    }

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

    public List receiveMessage(String queueName, ReceiveMessageRequest request) throws com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException, libthrift091.TException
    {
      send_receiveMessage(queueName, request);
      return recv_receiveMessage();
    }

    public void send_receiveMessage(String queueName, ReceiveMessageRequest request) throws libthrift091.TException
    {
      receiveMessage_args args = new receiveMessage_args();
      args.setQueueName(queueName);
      args.setRequest(request);
      sendBase("receiveMessage", args);
    }

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

    public void changeMessageVisibilitySeconds(String queueName, ChangeMessageVisibilityRequest request) throws com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException, libthrift091.TException
    {
      send_changeMessageVisibilitySeconds(queueName, request);
      recv_changeMessageVisibilitySeconds();
    }

    public void send_changeMessageVisibilitySeconds(String queueName, ChangeMessageVisibilityRequest request) throws libthrift091.TException
    {
      changeMessageVisibilitySeconds_args args = new changeMessageVisibilitySeconds_args();
      args.setQueueName(queueName);
      args.setRequest(request);
      sendBase("changeMessageVisibilitySeconds", args);
    }

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

    public void changeMessageVisibilitySecondsBatch(String queueName, List requests) throws com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException, libthrift091.TException
    {
      send_changeMessageVisibilitySecondsBatch(queueName, requests);
      recv_changeMessageVisibilitySecondsBatch();
    }

    public void send_changeMessageVisibilitySecondsBatch(String queueName, List requests) throws libthrift091.TException
    {
      changeMessageVisibilitySecondsBatch_args args = new changeMessageVisibilitySecondsBatch_args();
      args.setQueueName(queueName);
      args.setRequests(requests);
      sendBase("changeMessageVisibilitySecondsBatch", args);
    }

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

    public void deleteMessage(String queueName, DeleteMessageRequest request) throws com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException, libthrift091.TException
    {
      send_deleteMessage(queueName, request);
      recv_deleteMessage();
    }

    public void send_deleteMessage(String queueName, DeleteMessageRequest request) throws libthrift091.TException
    {
      deleteMessage_args args = new deleteMessage_args();
      args.setQueueName(queueName);
      args.setRequest(request);
      sendBase("deleteMessage", args);
    }

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

    public void deleteMessageBatch(String queueName, List requests) throws com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException, libthrift091.TException
    {
      send_deleteMessageBatch(queueName, requests);
      recv_deleteMessageBatch();
    }

    public void send_deleteMessageBatch(String queueName, List requests) throws libthrift091.TException
    {
      deleteMessageBatch_args args = new deleteMessageBatch_args();
      args.setQueueName(queueName);
      args.setRequests(requests);
      sendBase("deleteMessageBatch", args);
    }

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

  }
  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 sendMessage(String queueName, SendMessageRequest request, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException {
      checkReady();
      sendMessage_call method_call = new sendMessage_call(queueName, request, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class sendMessage_call extends libthrift091.async.TAsyncMethodCall {
      private String queueName;
      private SendMessageRequest request;
      public sendMessage_call(String queueName, SendMessageRequest 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.queueName = queueName;
        this.request = request;
      }

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

      public SendMessageResponse 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_sendMessage();
      }
    }

    public void sendMessageBatch(String queueName, List requests, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException {
      checkReady();
      sendMessageBatch_call method_call = new sendMessageBatch_call(queueName, requests, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class sendMessageBatch_call extends libthrift091.async.TAsyncMethodCall {
      private String queueName;
      private List requests;
      public sendMessageBatch_call(String queueName, List requests, 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.queueName = queueName;
        this.requests = requests;
      }

      public void write_args(libthrift091.protocol.TProtocol prot) throws libthrift091.TException {
        prot.writeMessageBegin(new libthrift091.protocol.TMessage("sendMessageBatch", libthrift091.protocol.TMessageType.CALL, 0));
        sendMessageBatch_args args = new sendMessageBatch_args();
        args.setQueueName(queueName);
        args.setRequests(requests);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public List 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_sendMessageBatch();
      }
    }

    public void receiveMessage(String queueName, ReceiveMessageRequest request, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException {
      checkReady();
      receiveMessage_call method_call = new receiveMessage_call(queueName, request, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class receiveMessage_call extends libthrift091.async.TAsyncMethodCall {
      private String queueName;
      private ReceiveMessageRequest request;
      public receiveMessage_call(String queueName, ReceiveMessageRequest 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.queueName = queueName;
        this.request = request;
      }

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

      public List 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_receiveMessage();
      }
    }

    public void changeMessageVisibilitySeconds(String queueName, ChangeMessageVisibilityRequest request, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException {
      checkReady();
      changeMessageVisibilitySeconds_call method_call = new changeMessageVisibilitySeconds_call(queueName, request, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class changeMessageVisibilitySeconds_call extends libthrift091.async.TAsyncMethodCall {
      private String queueName;
      private ChangeMessageVisibilityRequest request;
      public changeMessageVisibilitySeconds_call(String queueName, ChangeMessageVisibilityRequest 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.queueName = queueName;
        this.request = request;
      }

      public void write_args(libthrift091.protocol.TProtocol prot) throws libthrift091.TException {
        prot.writeMessageBegin(new libthrift091.protocol.TMessage("changeMessageVisibilitySeconds", libthrift091.protocol.TMessageType.CALL, 0));
        changeMessageVisibilitySeconds_args args = new changeMessageVisibilitySeconds_args();
        args.setQueueName(queueName);
        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_changeMessageVisibilitySeconds();
      }
    }

    public void changeMessageVisibilitySecondsBatch(String queueName, List requests, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException {
      checkReady();
      changeMessageVisibilitySecondsBatch_call method_call = new changeMessageVisibilitySecondsBatch_call(queueName, requests, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class changeMessageVisibilitySecondsBatch_call extends libthrift091.async.TAsyncMethodCall {
      private String queueName;
      private List requests;
      public changeMessageVisibilitySecondsBatch_call(String queueName, List requests, 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.queueName = queueName;
        this.requests = requests;
      }

      public void write_args(libthrift091.protocol.TProtocol prot) throws libthrift091.TException {
        prot.writeMessageBegin(new libthrift091.protocol.TMessage("changeMessageVisibilitySecondsBatch", libthrift091.protocol.TMessageType.CALL, 0));
        changeMessageVisibilitySecondsBatch_args args = new changeMessageVisibilitySecondsBatch_args();
        args.setQueueName(queueName);
        args.setRequests(requests);
        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_changeMessageVisibilitySecondsBatch();
      }
    }

    public void deleteMessage(String queueName, DeleteMessageRequest request, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException {
      checkReady();
      deleteMessage_call method_call = new deleteMessage_call(queueName, request, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class deleteMessage_call extends libthrift091.async.TAsyncMethodCall {
      private String queueName;
      private DeleteMessageRequest request;
      public deleteMessage_call(String queueName, DeleteMessageRequest 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.queueName = queueName;
        this.request = request;
      }

      public void write_args(libthrift091.protocol.TProtocol prot) throws libthrift091.TException {
        prot.writeMessageBegin(new libthrift091.protocol.TMessage("deleteMessage", libthrift091.protocol.TMessageType.CALL, 0));
        deleteMessage_args args = new deleteMessage_args();
        args.setQueueName(queueName);
        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_deleteMessage();
      }
    }

    public void deleteMessageBatch(String queueName, List requests, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException {
      checkReady();
      deleteMessageBatch_call method_call = new deleteMessageBatch_call(queueName, requests, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class deleteMessageBatch_call extends libthrift091.async.TAsyncMethodCall {
      private String queueName;
      private List requests;
      public deleteMessageBatch_call(String queueName, List requests, 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.queueName = queueName;
        this.requests = requests;
      }

      public void write_args(libthrift091.protocol.TProtocol prot) throws libthrift091.TException {
        prot.writeMessageBegin(new libthrift091.protocol.TMessage("deleteMessageBatch", libthrift091.protocol.TMessageType.CALL, 0));
        deleteMessageBatch_args args = new deleteMessageBatch_args();
        args.setQueueName(queueName);
        args.setRequests(requests);
        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_deleteMessageBatch();
      }
    }

  }

  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("sendMessage", new sendMessage());
      processMap.put("sendMessageBatch", new sendMessageBatch());
      processMap.put("receiveMessage", new receiveMessage());
      processMap.put("changeMessageVisibilitySeconds", new changeMessageVisibilitySeconds());
      processMap.put("changeMessageVisibilitySecondsBatch", new changeMessageVisibilitySecondsBatch());
      processMap.put("deleteMessage", new deleteMessage());
      processMap.put("deleteMessageBatch", new deleteMessageBatch());
      return processMap;
    }

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

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

      protected boolean isOneway() {
        return false;
      }

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

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

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

      protected boolean isOneway() {
        return false;
      }

      public sendMessageBatch_result getResult(I iface, sendMessageBatch_args args) throws libthrift091.TException {
        sendMessageBatch_result result = new sendMessageBatch_result();
        try {
          result.success = iface.sendMessageBatch(args.queueName, args.requests);
        } catch (com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException e) {
          result.e = e;
        }
        return result;
      }
    }

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

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

      protected boolean isOneway() {
        return false;
      }

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

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

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

      protected boolean isOneway() {
        return false;
      }

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

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

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

      protected boolean isOneway() {
        return false;
      }

      public changeMessageVisibilitySecondsBatch_result getResult(I iface, changeMessageVisibilitySecondsBatch_args args) throws libthrift091.TException {
        changeMessageVisibilitySecondsBatch_result result = new changeMessageVisibilitySecondsBatch_result();
        try {
          iface.changeMessageVisibilitySecondsBatch(args.queueName, args.requests);
        } catch (com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException e) {
          result.e = e;
        }
        return result;
      }
    }

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

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

      protected boolean isOneway() {
        return false;
      }

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

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

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

      protected boolean isOneway() {
        return false;
      }

      public deleteMessageBatch_result getResult(I iface, deleteMessageBatch_args args) throws libthrift091.TException {
        deleteMessageBatch_result result = new deleteMessageBatch_result();
        try {
          iface.deleteMessageBatch(args.queueName, args.requests);
        } 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("sendMessage", new sendMessage());
      processMap.put("sendMessageBatch", new sendMessageBatch());
      processMap.put("receiveMessage", new receiveMessage());
      processMap.put("changeMessageVisibilitySeconds", new changeMessageVisibilitySeconds());
      processMap.put("changeMessageVisibilitySecondsBatch", new changeMessageVisibilitySecondsBatch());
      processMap.put("deleteMessage", new deleteMessage());
      processMap.put("deleteMessageBatch", new deleteMessageBatch());
      return processMap;
    }

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

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

      public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
        final libthrift091.AsyncProcessFunction fcall = this;
        return new AsyncMethodCallback() { 
          public void onComplete(SendMessageResponse o) {
            sendMessage_result result = new sendMessage_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;
            sendMessage_result result = new sendMessage_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, sendMessage_args args, libthrift091.async.AsyncMethodCallback resultHandler) throws TException {
        iface.sendMessage(args.queueName, args.request,resultHandler);
      }
    }

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

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

      public AsyncMethodCallback> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
        final libthrift091.AsyncProcessFunction fcall = this;
        return new AsyncMethodCallback>() { 
          public void onComplete(List o) {
            sendMessageBatch_result result = new sendMessageBatch_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;
            sendMessageBatch_result result = new sendMessageBatch_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, sendMessageBatch_args args, libthrift091.async.AsyncMethodCallback> resultHandler) throws TException {
        iface.sendMessageBatch(args.queueName, args.requests,resultHandler);
      }
    }

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

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

      public AsyncMethodCallback> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
        final libthrift091.AsyncProcessFunction fcall = this;
        return new AsyncMethodCallback>() { 
          public void onComplete(List o) {
            receiveMessage_result result = new receiveMessage_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;
            receiveMessage_result result = new receiveMessage_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, receiveMessage_args args, libthrift091.async.AsyncMethodCallback> resultHandler) throws TException {
        iface.receiveMessage(args.queueName, args.request,resultHandler);
      }
    }

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

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

      public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
        final libthrift091.AsyncProcessFunction fcall = this;
        return new AsyncMethodCallback() { 
          public void onComplete(Void o) {
            changeMessageVisibilitySeconds_result result = new changeMessageVisibilitySeconds_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;
            changeMessageVisibilitySeconds_result result = new changeMessageVisibilitySeconds_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, changeMessageVisibilitySeconds_args args, libthrift091.async.AsyncMethodCallback resultHandler) throws TException {
        iface.changeMessageVisibilitySeconds(args.queueName, args.request,resultHandler);
      }
    }

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

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

      public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
        final libthrift091.AsyncProcessFunction fcall = this;
        return new AsyncMethodCallback() { 
          public void onComplete(Void o) {
            changeMessageVisibilitySecondsBatch_result result = new changeMessageVisibilitySecondsBatch_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;
            changeMessageVisibilitySecondsBatch_result result = new changeMessageVisibilitySecondsBatch_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, changeMessageVisibilitySecondsBatch_args args, libthrift091.async.AsyncMethodCallback resultHandler) throws TException {
        iface.changeMessageVisibilitySecondsBatch(args.queueName, args.requests,resultHandler);
      }
    }

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

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

      public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
        final libthrift091.AsyncProcessFunction fcall = this;
        return new AsyncMethodCallback() { 
          public void onComplete(Void o) {
            deleteMessage_result result = new deleteMessage_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;
            deleteMessage_result result = new deleteMessage_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, deleteMessage_args args, libthrift091.async.AsyncMethodCallback resultHandler) throws TException {
        iface.deleteMessage(args.queueName, args.request,resultHandler);
      }
    }

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

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

      public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
        final libthrift091.AsyncProcessFunction fcall = this;
        return new AsyncMethodCallback() { 
          public void onComplete(Void o) {
            deleteMessageBatch_result result = new deleteMessageBatch_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;
            deleteMessageBatch_result result = new deleteMessageBatch_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, deleteMessageBatch_args args, libthrift091.async.AsyncMethodCallback resultHandler) throws TException {
        iface.deleteMessageBatch(args.queueName, args.requests,resultHandler);
      }
    }

  }

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

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

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

    public String queueName; // required
    public SendMessageRequest request; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements libthrift091.TFieldIdEnum {
      QUEUE_NAME((short)1, "queueName"),
      REQUEST((short)2, "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: // QUEUE_NAME
            return QUEUE_NAME;
          case 2: // 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.QUEUE_NAME, new libthrift091.meta_data.FieldMetaData("queueName", libthrift091.TFieldRequirementType.DEFAULT, 
          new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.STRING)));
      tmpMap.put(_Fields.REQUEST, new libthrift091.meta_data.FieldMetaData("request", libthrift091.TFieldRequirementType.DEFAULT, 
          new libthrift091.meta_data.StructMetaData(libthrift091.protocol.TType.STRUCT, SendMessageRequest.class)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(sendMessage_args.class, metaDataMap);
    }

    public sendMessage_args() {
    }

    public sendMessage_args(
      String queueName,
      SendMessageRequest request)
    {
      this();
      this.queueName = queueName;
      this.request = request;
    }

    /**
     * Performs a deep copy on other.
     */
    public sendMessage_args(sendMessage_args other) {
      if (other.isSetQueueName()) {
        this.queueName = other.queueName;
      }
      if (other.isSetRequest()) {
        this.request = new SendMessageRequest(other.request);
      }
    }

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

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

    public String getQueueName() {
      return this.queueName;
    }

    public sendMessage_args setQueueName(String queueName) {
      this.queueName = queueName;
      return this;
    }

    public void unsetQueueName() {
      this.queueName = null;
    }

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

    public void setQueueNameIsSet(boolean value) {
      if (!value) {
        this.queueName = null;
      }
    }

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

    public sendMessage_args setRequest(SendMessageRequest 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 QUEUE_NAME:
        if (value == null) {
          unsetQueueName();
        } else {
          setQueueName((String)value);
        }
        break;

      case REQUEST:
        if (value == null) {
          unsetRequest();
        } else {
          setRequest((SendMessageRequest)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case QUEUE_NAME:
        return getQueueName();

      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 QUEUE_NAME:
        return isSetQueueName();
      case REQUEST:
        return isSetRequest();
      }
      throw new IllegalStateException();
    }

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

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

      boolean this_present_queueName = true && this.isSetQueueName();
      boolean that_present_queueName = true && that.isSetQueueName();
      if (this_present_queueName || that_present_queueName) {
        if (!(this_present_queueName && that_present_queueName))
          return false;
        if (!this.queueName.equals(that.queueName))
          return false;
      }

      boolean this_present_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_queueName = true && (isSetQueueName());
      list.add(present_queueName);
      if (present_queueName)
        list.add(queueName);

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

      return list.hashCode();
    }

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

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetQueueName()).compareTo(other.isSetQueueName());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetQueueName()) {
        lastComparison = libthrift091.TBaseHelper.compareTo(this.queueName, other.queueName);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      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("sendMessage_args(");
      boolean first = true;

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

    private static class sendMessage_argsStandardScheme extends StandardScheme {

      public void read(libthrift091.protocol.TProtocol iprot, sendMessage_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: // QUEUE_NAME
              if (schemeField.type == libthrift091.protocol.TType.STRING) {
                struct.queueName = iprot.readString();
                struct.setQueueNameIsSet(true);
              } else { 
                libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // REQUEST
              if (schemeField.type == libthrift091.protocol.TType.STRUCT) {
                struct.request = new SendMessageRequest();
                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, sendMessage_args struct) throws libthrift091.TException {
        struct.validate();

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

    }

    private static class sendMessage_argsTupleSchemeFactory implements SchemeFactory {
      public sendMessage_argsTupleScheme getScheme() {
        return new sendMessage_argsTupleScheme();
      }
    }

    private static class sendMessage_argsTupleScheme extends TupleScheme {

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

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

  }

  public static class sendMessage_result implements libthrift091.TBase, java.io.Serializable, Cloneable, Comparable   {
    private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("sendMessage_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 sendMessage_resultStandardSchemeFactory());
      schemes.put(TupleScheme.class, new sendMessage_resultTupleSchemeFactory());
    }

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

    public sendMessage_result() {
    }

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

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

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

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

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

    public sendMessage_result setSuccess(SendMessageResponse 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 sendMessage_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((SendMessageResponse)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 sendMessage_result)
        return this.equals((sendMessage_result)that);
      return false;
    }

    public boolean equals(sendMessage_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(sendMessage_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("sendMessage_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 sendMessage_resultStandardSchemeFactory implements SchemeFactory {
      public sendMessage_resultStandardScheme getScheme() {
        return new sendMessage_resultStandardScheme();
      }
    }

    private static class sendMessage_resultStandardScheme extends StandardScheme {

      public void read(libthrift091.protocol.TProtocol iprot, sendMessage_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 SendMessageResponse();
                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, sendMessage_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 sendMessage_resultTupleSchemeFactory implements SchemeFactory {
      public sendMessage_resultTupleScheme getScheme() {
        return new sendMessage_resultTupleScheme();
      }
    }

    private static class sendMessage_resultTupleScheme extends TupleScheme {

      @Override
      public void write(libthrift091.protocol.TProtocol prot, sendMessage_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, sendMessage_result struct) throws libthrift091.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(2);
        if (incoming.get(0)) {
          struct.success = new SendMessageResponse();
          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 sendMessageBatch_args implements libthrift091.TBase, java.io.Serializable, Cloneable, Comparable   {
    private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("sendMessageBatch_args");

    private static final libthrift091.protocol.TField QUEUE_NAME_FIELD_DESC = new libthrift091.protocol.TField("queueName", libthrift091.protocol.TType.STRING, (short)1);
    private static final libthrift091.protocol.TField REQUESTS_FIELD_DESC = new libthrift091.protocol.TField("requests", libthrift091.protocol.TType.LIST, (short)2);

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

    public String queueName; // required
    public List requests; // required

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

      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: // QUEUE_NAME
            return QUEUE_NAME;
          case 2: // REQUESTS
            return REQUESTS;
          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.QUEUE_NAME, new libthrift091.meta_data.FieldMetaData("queueName", libthrift091.TFieldRequirementType.DEFAULT, 
          new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.STRING)));
      tmpMap.put(_Fields.REQUESTS, new libthrift091.meta_data.FieldMetaData("requests", libthrift091.TFieldRequirementType.DEFAULT, 
          new libthrift091.meta_data.ListMetaData(libthrift091.protocol.TType.LIST, 
              new libthrift091.meta_data.StructMetaData(libthrift091.protocol.TType.STRUCT, SendMessageRequest.class))));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(sendMessageBatch_args.class, metaDataMap);
    }

    public sendMessageBatch_args() {
    }

    public sendMessageBatch_args(
      String queueName,
      List requests)
    {
      this();
      this.queueName = queueName;
      this.requests = requests;
    }

    /**
     * Performs a deep copy on other.
     */
    public sendMessageBatch_args(sendMessageBatch_args other) {
      if (other.isSetQueueName()) {
        this.queueName = other.queueName;
      }
      if (other.isSetRequests()) {
        List __this__requests = new ArrayList(other.requests.size());
        for (SendMessageRequest other_element : other.requests) {
          __this__requests.add(new SendMessageRequest(other_element));
        }
        this.requests = __this__requests;
      }
    }

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

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

    public String getQueueName() {
      return this.queueName;
    }

    public sendMessageBatch_args setQueueName(String queueName) {
      this.queueName = queueName;
      return this;
    }

    public void unsetQueueName() {
      this.queueName = null;
    }

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

    public void setQueueNameIsSet(boolean value) {
      if (!value) {
        this.queueName = null;
      }
    }

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

    public java.util.Iterator getRequestsIterator() {
      return (this.requests == null) ? null : this.requests.iterator();
    }

    public void addToRequests(SendMessageRequest elem) {
      if (this.requests == null) {
        this.requests = new ArrayList();
      }
      this.requests.add(elem);
    }

    public List getRequests() {
      return this.requests;
    }

    public sendMessageBatch_args setRequests(List requests) {
      this.requests = requests;
      return this;
    }

    public void unsetRequests() {
      this.requests = null;
    }

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

    public void setRequestsIsSet(boolean value) {
      if (!value) {
        this.requests = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case QUEUE_NAME:
        if (value == null) {
          unsetQueueName();
        } else {
          setQueueName((String)value);
        }
        break;

      case REQUESTS:
        if (value == null) {
          unsetRequests();
        } else {
          setRequests((List)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case QUEUE_NAME:
        return getQueueName();

      case REQUESTS:
        return getRequests();

      }
      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 QUEUE_NAME:
        return isSetQueueName();
      case REQUESTS:
        return isSetRequests();
      }
      throw new IllegalStateException();
    }

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

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

      boolean this_present_queueName = true && this.isSetQueueName();
      boolean that_present_queueName = true && that.isSetQueueName();
      if (this_present_queueName || that_present_queueName) {
        if (!(this_present_queueName && that_present_queueName))
          return false;
        if (!this.queueName.equals(that.queueName))
          return false;
      }

      boolean this_present_requests = true && this.isSetRequests();
      boolean that_present_requests = true && that.isSetRequests();
      if (this_present_requests || that_present_requests) {
        if (!(this_present_requests && that_present_requests))
          return false;
        if (!this.requests.equals(that.requests))
          return false;
      }

      return true;
    }

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

      boolean present_queueName = true && (isSetQueueName());
      list.add(present_queueName);
      if (present_queueName)
        list.add(queueName);

      boolean present_requests = true && (isSetRequests());
      list.add(present_requests);
      if (present_requests)
        list.add(requests);

      return list.hashCode();
    }

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

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetQueueName()).compareTo(other.isSetQueueName());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetQueueName()) {
        lastComparison = libthrift091.TBaseHelper.compareTo(this.queueName, other.queueName);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetRequests()).compareTo(other.isSetRequests());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetRequests()) {
        lastComparison = libthrift091.TBaseHelper.compareTo(this.requests, other.requests);
        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("sendMessageBatch_args(");
      boolean first = true;

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

    private static class sendMessageBatch_argsStandardScheme extends StandardScheme {

      public void read(libthrift091.protocol.TProtocol iprot, sendMessageBatch_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: // QUEUE_NAME
              if (schemeField.type == libthrift091.protocol.TType.STRING) {
                struct.queueName = iprot.readString();
                struct.setQueueNameIsSet(true);
              } else { 
                libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // REQUESTS
              if (schemeField.type == libthrift091.protocol.TType.LIST) {
                {
                  libthrift091.protocol.TList _list0 = iprot.readListBegin();
                  struct.requests = new ArrayList(_list0.size);
                  SendMessageRequest _elem1;
                  for (int _i2 = 0; _i2 < _list0.size; ++_i2)
                  {
                    _elem1 = new SendMessageRequest();
                    _elem1.read(iprot);
                    struct.requests.add(_elem1);
                  }
                  iprot.readListEnd();
                }
                struct.setRequestsIsSet(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, sendMessageBatch_args struct) throws libthrift091.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.queueName != null) {
          oprot.writeFieldBegin(QUEUE_NAME_FIELD_DESC);
          oprot.writeString(struct.queueName);
          oprot.writeFieldEnd();
        }
        if (struct.requests != null) {
          oprot.writeFieldBegin(REQUESTS_FIELD_DESC);
          {
            oprot.writeListBegin(new libthrift091.protocol.TList(libthrift091.protocol.TType.STRUCT, struct.requests.size()));
            for (SendMessageRequest _iter3 : struct.requests)
            {
              _iter3.write(oprot);
            }
            oprot.writeListEnd();
          }
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class sendMessageBatch_argsTupleSchemeFactory implements SchemeFactory {
      public sendMessageBatch_argsTupleScheme getScheme() {
        return new sendMessageBatch_argsTupleScheme();
      }
    }

    private static class sendMessageBatch_argsTupleScheme extends TupleScheme {

      @Override
      public void write(libthrift091.protocol.TProtocol prot, sendMessageBatch_args struct) throws libthrift091.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetQueueName()) {
          optionals.set(0);
        }
        if (struct.isSetRequests()) {
          optionals.set(1);
        }
        oprot.writeBitSet(optionals, 2);
        if (struct.isSetQueueName()) {
          oprot.writeString(struct.queueName);
        }
        if (struct.isSetRequests()) {
          {
            oprot.writeI32(struct.requests.size());
            for (SendMessageRequest _iter4 : struct.requests)
            {
              _iter4.write(oprot);
            }
          }
        }
      }

      @Override
      public void read(libthrift091.protocol.TProtocol prot, sendMessageBatch_args struct) throws libthrift091.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(2);
        if (incoming.get(0)) {
          struct.queueName = iprot.readString();
          struct.setQueueNameIsSet(true);
        }
        if (incoming.get(1)) {
          {
            libthrift091.protocol.TList _list5 = new libthrift091.protocol.TList(libthrift091.protocol.TType.STRUCT, iprot.readI32());
            struct.requests = new ArrayList(_list5.size);
            SendMessageRequest _elem6;
            for (int _i7 = 0; _i7 < _list5.size; ++_i7)
            {
              _elem6 = new SendMessageRequest();
              _elem6.read(iprot);
              struct.requests.add(_elem6);
            }
          }
          struct.setRequestsIsSet(true);
        }
      }
    }

  }

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

    private static final libthrift091.protocol.TField SUCCESS_FIELD_DESC = new libthrift091.protocol.TField("success", libthrift091.protocol.TType.LIST, (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 sendMessageBatch_resultStandardSchemeFactory());
      schemes.put(TupleScheme.class, new sendMessageBatch_resultTupleSchemeFactory());
    }

    public List 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.ListMetaData(libthrift091.protocol.TType.LIST, 
              new libthrift091.meta_data.StructMetaData(libthrift091.protocol.TType.STRUCT, SendMessageResponse.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(sendMessageBatch_result.class, metaDataMap);
    }

    public sendMessageBatch_result() {
    }

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

    /**
     * Performs a deep copy on other.
     */
    public sendMessageBatch_result(sendMessageBatch_result other) {
      if (other.isSetSuccess()) {
        List __this__success = new ArrayList(other.success.size());
        for (SendMessageResponse other_element : other.success) {
          __this__success.add(new SendMessageResponse(other_element));
        }
        this.success = __this__success;
      }
      if (other.isSetE()) {
        this.e = new com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException(other.e);
      }
    }

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

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

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

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

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

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

    public sendMessageBatch_result setSuccess(List 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 sendMessageBatch_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((List)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 sendMessageBatch_result)
        return this.equals((sendMessageBatch_result)that);
      return false;
    }

    public boolean equals(sendMessageBatch_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(sendMessageBatch_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("sendMessageBatch_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
    }

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

    private static class sendMessageBatch_resultStandardScheme extends StandardScheme {

      public void read(libthrift091.protocol.TProtocol iprot, sendMessageBatch_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.LIST) {
                {
                  libthrift091.protocol.TList _list8 = iprot.readListBegin();
                  struct.success = new ArrayList(_list8.size);
                  SendMessageResponse _elem9;
                  for (int _i10 = 0; _i10 < _list8.size; ++_i10)
                  {
                    _elem9 = new SendMessageResponse();
                    _elem9.read(iprot);
                    struct.success.add(_elem9);
                  }
                  iprot.readListEnd();
                }
                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, sendMessageBatch_result struct) throws libthrift091.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.success != null) {
          oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
          {
            oprot.writeListBegin(new libthrift091.protocol.TList(libthrift091.protocol.TType.STRUCT, struct.success.size()));
            for (SendMessageResponse _iter11 : struct.success)
            {
              _iter11.write(oprot);
            }
            oprot.writeListEnd();
          }
          oprot.writeFieldEnd();
        }
        if (struct.e != null) {
          oprot.writeFieldBegin(E_FIELD_DESC);
          struct.e.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class sendMessageBatch_resultTupleSchemeFactory implements SchemeFactory {
      public sendMessageBatch_resultTupleScheme getScheme() {
        return new sendMessageBatch_resultTupleScheme();
      }
    }

    private static class sendMessageBatch_resultTupleScheme extends TupleScheme {

      @Override
      public void write(libthrift091.protocol.TProtocol prot, sendMessageBatch_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()) {
          {
            oprot.writeI32(struct.success.size());
            for (SendMessageResponse _iter12 : struct.success)
            {
              _iter12.write(oprot);
            }
          }
        }
        if (struct.isSetE()) {
          struct.e.write(oprot);
        }
      }

      @Override
      public void read(libthrift091.protocol.TProtocol prot, sendMessageBatch_result struct) throws libthrift091.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(2);
        if (incoming.get(0)) {
          {
            libthrift091.protocol.TList _list13 = new libthrift091.protocol.TList(libthrift091.protocol.TType.STRUCT, iprot.readI32());
            struct.success = new ArrayList(_list13.size);
            SendMessageResponse _elem14;
            for (int _i15 = 0; _i15 < _list13.size; ++_i15)
            {
              _elem14 = new SendMessageResponse();
              _elem14.read(iprot);
              struct.success.add(_elem14);
            }
          }
          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 receiveMessage_args implements libthrift091.TBase, java.io.Serializable, Cloneable, Comparable   {
    private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("receiveMessage_args");

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

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

    public String queueName; // required
    public ReceiveMessageRequest request; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements libthrift091.TFieldIdEnum {
      QUEUE_NAME((short)1, "queueName"),
      REQUEST((short)2, "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: // QUEUE_NAME
            return QUEUE_NAME;
          case 2: // 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.QUEUE_NAME, new libthrift091.meta_data.FieldMetaData("queueName", libthrift091.TFieldRequirementType.DEFAULT, 
          new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.STRING)));
      tmpMap.put(_Fields.REQUEST, new libthrift091.meta_data.FieldMetaData("request", libthrift091.TFieldRequirementType.DEFAULT, 
          new libthrift091.meta_data.StructMetaData(libthrift091.protocol.TType.STRUCT, ReceiveMessageRequest.class)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(receiveMessage_args.class, metaDataMap);
    }

    public receiveMessage_args() {
    }

    public receiveMessage_args(
      String queueName,
      ReceiveMessageRequest request)
    {
      this();
      this.queueName = queueName;
      this.request = request;
    }

    /**
     * Performs a deep copy on other.
     */
    public receiveMessage_args(receiveMessage_args other) {
      if (other.isSetQueueName()) {
        this.queueName = other.queueName;
      }
      if (other.isSetRequest()) {
        this.request = new ReceiveMessageRequest(other.request);
      }
    }

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

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

    public String getQueueName() {
      return this.queueName;
    }

    public receiveMessage_args setQueueName(String queueName) {
      this.queueName = queueName;
      return this;
    }

    public void unsetQueueName() {
      this.queueName = null;
    }

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

    public void setQueueNameIsSet(boolean value) {
      if (!value) {
        this.queueName = null;
      }
    }

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

    public receiveMessage_args setRequest(ReceiveMessageRequest 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 QUEUE_NAME:
        if (value == null) {
          unsetQueueName();
        } else {
          setQueueName((String)value);
        }
        break;

      case REQUEST:
        if (value == null) {
          unsetRequest();
        } else {
          setRequest((ReceiveMessageRequest)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case QUEUE_NAME:
        return getQueueName();

      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 QUEUE_NAME:
        return isSetQueueName();
      case REQUEST:
        return isSetRequest();
      }
      throw new IllegalStateException();
    }

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

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

      boolean this_present_queueName = true && this.isSetQueueName();
      boolean that_present_queueName = true && that.isSetQueueName();
      if (this_present_queueName || that_present_queueName) {
        if (!(this_present_queueName && that_present_queueName))
          return false;
        if (!this.queueName.equals(that.queueName))
          return false;
      }

      boolean this_present_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_queueName = true && (isSetQueueName());
      list.add(present_queueName);
      if (present_queueName)
        list.add(queueName);

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

      return list.hashCode();
    }

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

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetQueueName()).compareTo(other.isSetQueueName());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetQueueName()) {
        lastComparison = libthrift091.TBaseHelper.compareTo(this.queueName, other.queueName);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      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("receiveMessage_args(");
      boolean first = true;

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

    private static class receiveMessage_argsStandardScheme extends StandardScheme {

      public void read(libthrift091.protocol.TProtocol iprot, receiveMessage_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: // QUEUE_NAME
              if (schemeField.type == libthrift091.protocol.TType.STRING) {
                struct.queueName = iprot.readString();
                struct.setQueueNameIsSet(true);
              } else { 
                libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // REQUEST
              if (schemeField.type == libthrift091.protocol.TType.STRUCT) {
                struct.request = new ReceiveMessageRequest();
                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, receiveMessage_args struct) throws libthrift091.TException {
        struct.validate();

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

    }

    private static class receiveMessage_argsTupleSchemeFactory implements SchemeFactory {
      public receiveMessage_argsTupleScheme getScheme() {
        return new receiveMessage_argsTupleScheme();
      }
    }

    private static class receiveMessage_argsTupleScheme extends TupleScheme {

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

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

  }

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

    private static final libthrift091.protocol.TField SUCCESS_FIELD_DESC = new libthrift091.protocol.TField("success", libthrift091.protocol.TType.LIST, (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 receiveMessage_resultStandardSchemeFactory());
      schemes.put(TupleScheme.class, new receiveMessage_resultTupleSchemeFactory());
    }

    public List 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.ListMetaData(libthrift091.protocol.TType.LIST, 
              new libthrift091.meta_data.StructMetaData(libthrift091.protocol.TType.STRUCT, ReceiveMessageResponse.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(receiveMessage_result.class, metaDataMap);
    }

    public receiveMessage_result() {
    }

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

    /**
     * Performs a deep copy on other.
     */
    public receiveMessage_result(receiveMessage_result other) {
      if (other.isSetSuccess()) {
        List __this__success = new ArrayList(other.success.size());
        for (ReceiveMessageResponse other_element : other.success) {
          __this__success.add(new ReceiveMessageResponse(other_element));
        }
        this.success = __this__success;
      }
      if (other.isSetE()) {
        this.e = new com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException(other.e);
      }
    }

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

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

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

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

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

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

    public receiveMessage_result setSuccess(List 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 receiveMessage_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((List)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 receiveMessage_result)
        return this.equals((receiveMessage_result)that);
      return false;
    }

    public boolean equals(receiveMessage_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(receiveMessage_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("receiveMessage_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
    }

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

    private static class receiveMessage_resultStandardScheme extends StandardScheme {

      public void read(libthrift091.protocol.TProtocol iprot, receiveMessage_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.LIST) {
                {
                  libthrift091.protocol.TList _list16 = iprot.readListBegin();
                  struct.success = new ArrayList(_list16.size);
                  ReceiveMessageResponse _elem17;
                  for (int _i18 = 0; _i18 < _list16.size; ++_i18)
                  {
                    _elem17 = new ReceiveMessageResponse();
                    _elem17.read(iprot);
                    struct.success.add(_elem17);
                  }
                  iprot.readListEnd();
                }
                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, receiveMessage_result struct) throws libthrift091.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.success != null) {
          oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
          {
            oprot.writeListBegin(new libthrift091.protocol.TList(libthrift091.protocol.TType.STRUCT, struct.success.size()));
            for (ReceiveMessageResponse _iter19 : struct.success)
            {
              _iter19.write(oprot);
            }
            oprot.writeListEnd();
          }
          oprot.writeFieldEnd();
        }
        if (struct.e != null) {
          oprot.writeFieldBegin(E_FIELD_DESC);
          struct.e.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class receiveMessage_resultTupleSchemeFactory implements SchemeFactory {
      public receiveMessage_resultTupleScheme getScheme() {
        return new receiveMessage_resultTupleScheme();
      }
    }

    private static class receiveMessage_resultTupleScheme extends TupleScheme {

      @Override
      public void write(libthrift091.protocol.TProtocol prot, receiveMessage_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()) {
          {
            oprot.writeI32(struct.success.size());
            for (ReceiveMessageResponse _iter20 : struct.success)
            {
              _iter20.write(oprot);
            }
          }
        }
        if (struct.isSetE()) {
          struct.e.write(oprot);
        }
      }

      @Override
      public void read(libthrift091.protocol.TProtocol prot, receiveMessage_result struct) throws libthrift091.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(2);
        if (incoming.get(0)) {
          {
            libthrift091.protocol.TList _list21 = new libthrift091.protocol.TList(libthrift091.protocol.TType.STRUCT, iprot.readI32());
            struct.success = new ArrayList(_list21.size);
            ReceiveMessageResponse _elem22;
            for (int _i23 = 0; _i23 < _list21.size; ++_i23)
            {
              _elem22 = new ReceiveMessageResponse();
              _elem22.read(iprot);
              struct.success.add(_elem22);
            }
          }
          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 changeMessageVisibilitySeconds_args implements libthrift091.TBase, java.io.Serializable, Cloneable, Comparable   {
    private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("changeMessageVisibilitySeconds_args");

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

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

    public String queueName; // required
    public ChangeMessageVisibilityRequest request; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements libthrift091.TFieldIdEnum {
      QUEUE_NAME((short)1, "queueName"),
      REQUEST((short)2, "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: // QUEUE_NAME
            return QUEUE_NAME;
          case 2: // 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.QUEUE_NAME, new libthrift091.meta_data.FieldMetaData("queueName", libthrift091.TFieldRequirementType.DEFAULT, 
          new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.STRING)));
      tmpMap.put(_Fields.REQUEST, new libthrift091.meta_data.FieldMetaData("request", libthrift091.TFieldRequirementType.DEFAULT, 
          new libthrift091.meta_data.StructMetaData(libthrift091.protocol.TType.STRUCT, ChangeMessageVisibilityRequest.class)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(changeMessageVisibilitySeconds_args.class, metaDataMap);
    }

    public changeMessageVisibilitySeconds_args() {
    }

    public changeMessageVisibilitySeconds_args(
      String queueName,
      ChangeMessageVisibilityRequest request)
    {
      this();
      this.queueName = queueName;
      this.request = request;
    }

    /**
     * Performs a deep copy on other.
     */
    public changeMessageVisibilitySeconds_args(changeMessageVisibilitySeconds_args other) {
      if (other.isSetQueueName()) {
        this.queueName = other.queueName;
      }
      if (other.isSetRequest()) {
        this.request = new ChangeMessageVisibilityRequest(other.request);
      }
    }

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

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

    public String getQueueName() {
      return this.queueName;
    }

    public changeMessageVisibilitySeconds_args setQueueName(String queueName) {
      this.queueName = queueName;
      return this;
    }

    public void unsetQueueName() {
      this.queueName = null;
    }

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

    public void setQueueNameIsSet(boolean value) {
      if (!value) {
        this.queueName = null;
      }
    }

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

    public changeMessageVisibilitySeconds_args setRequest(ChangeMessageVisibilityRequest 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 QUEUE_NAME:
        if (value == null) {
          unsetQueueName();
        } else {
          setQueueName((String)value);
        }
        break;

      case REQUEST:
        if (value == null) {
          unsetRequest();
        } else {
          setRequest((ChangeMessageVisibilityRequest)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case QUEUE_NAME:
        return getQueueName();

      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 QUEUE_NAME:
        return isSetQueueName();
      case REQUEST:
        return isSetRequest();
      }
      throw new IllegalStateException();
    }

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

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

      boolean this_present_queueName = true && this.isSetQueueName();
      boolean that_present_queueName = true && that.isSetQueueName();
      if (this_present_queueName || that_present_queueName) {
        if (!(this_present_queueName && that_present_queueName))
          return false;
        if (!this.queueName.equals(that.queueName))
          return false;
      }

      boolean this_present_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_queueName = true && (isSetQueueName());
      list.add(present_queueName);
      if (present_queueName)
        list.add(queueName);

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

      return list.hashCode();
    }

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

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetQueueName()).compareTo(other.isSetQueueName());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetQueueName()) {
        lastComparison = libthrift091.TBaseHelper.compareTo(this.queueName, other.queueName);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      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("changeMessageVisibilitySeconds_args(");
      boolean first = true;

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

    private static class changeMessageVisibilitySeconds_argsStandardScheme extends StandardScheme {

      public void read(libthrift091.protocol.TProtocol iprot, changeMessageVisibilitySeconds_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: // QUEUE_NAME
              if (schemeField.type == libthrift091.protocol.TType.STRING) {
                struct.queueName = iprot.readString();
                struct.setQueueNameIsSet(true);
              } else { 
                libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // REQUEST
              if (schemeField.type == libthrift091.protocol.TType.STRUCT) {
                struct.request = new ChangeMessageVisibilityRequest();
                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, changeMessageVisibilitySeconds_args struct) throws libthrift091.TException {
        struct.validate();

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

    }

    private static class changeMessageVisibilitySeconds_argsTupleSchemeFactory implements SchemeFactory {
      public changeMessageVisibilitySeconds_argsTupleScheme getScheme() {
        return new changeMessageVisibilitySeconds_argsTupleScheme();
      }
    }

    private static class changeMessageVisibilitySeconds_argsTupleScheme extends TupleScheme {

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

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

  }

  public static class changeMessageVisibilitySeconds_result implements libthrift091.TBase, java.io.Serializable, Cloneable, Comparable   {
    private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("changeMessageVisibilitySeconds_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 changeMessageVisibilitySeconds_resultStandardSchemeFactory());
      schemes.put(TupleScheme.class, new changeMessageVisibilitySeconds_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(changeMessageVisibilitySeconds_result.class, metaDataMap);
    }

    public changeMessageVisibilitySeconds_result() {
    }

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

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

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

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

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

    public changeMessageVisibilitySeconds_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 changeMessageVisibilitySeconds_result)
        return this.equals((changeMessageVisibilitySeconds_result)that);
      return false;
    }

    public boolean equals(changeMessageVisibilitySeconds_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(changeMessageVisibilitySeconds_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("changeMessageVisibilitySeconds_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 changeMessageVisibilitySeconds_resultStandardSchemeFactory implements SchemeFactory {
      public changeMessageVisibilitySeconds_resultStandardScheme getScheme() {
        return new changeMessageVisibilitySeconds_resultStandardScheme();
      }
    }

    private static class changeMessageVisibilitySeconds_resultStandardScheme extends StandardScheme {

      public void read(libthrift091.protocol.TProtocol iprot, changeMessageVisibilitySeconds_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, changeMessageVisibilitySeconds_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 changeMessageVisibilitySeconds_resultTupleSchemeFactory implements SchemeFactory {
      public changeMessageVisibilitySeconds_resultTupleScheme getScheme() {
        return new changeMessageVisibilitySeconds_resultTupleScheme();
      }
    }

    private static class changeMessageVisibilitySeconds_resultTupleScheme extends TupleScheme {

      @Override
      public void write(libthrift091.protocol.TProtocol prot, changeMessageVisibilitySeconds_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, changeMessageVisibilitySeconds_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 changeMessageVisibilitySecondsBatch_args implements libthrift091.TBase, java.io.Serializable, Cloneable, Comparable   {
    private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("changeMessageVisibilitySecondsBatch_args");

    private static final libthrift091.protocol.TField QUEUE_NAME_FIELD_DESC = new libthrift091.protocol.TField("queueName", libthrift091.protocol.TType.STRING, (short)1);
    private static final libthrift091.protocol.TField REQUESTS_FIELD_DESC = new libthrift091.protocol.TField("requests", libthrift091.protocol.TType.LIST, (short)2);

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

    public String queueName; // required
    public List requests; // required

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

      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: // QUEUE_NAME
            return QUEUE_NAME;
          case 2: // REQUESTS
            return REQUESTS;
          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.QUEUE_NAME, new libthrift091.meta_data.FieldMetaData("queueName", libthrift091.TFieldRequirementType.DEFAULT, 
          new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.STRING)));
      tmpMap.put(_Fields.REQUESTS, new libthrift091.meta_data.FieldMetaData("requests", libthrift091.TFieldRequirementType.DEFAULT, 
          new libthrift091.meta_data.ListMetaData(libthrift091.protocol.TType.LIST, 
              new libthrift091.meta_data.StructMetaData(libthrift091.protocol.TType.STRUCT, ChangeMessageVisibilityRequest.class))));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(changeMessageVisibilitySecondsBatch_args.class, metaDataMap);
    }

    public changeMessageVisibilitySecondsBatch_args() {
    }

    public changeMessageVisibilitySecondsBatch_args(
      String queueName,
      List requests)
    {
      this();
      this.queueName = queueName;
      this.requests = requests;
    }

    /**
     * Performs a deep copy on other.
     */
    public changeMessageVisibilitySecondsBatch_args(changeMessageVisibilitySecondsBatch_args other) {
      if (other.isSetQueueName()) {
        this.queueName = other.queueName;
      }
      if (other.isSetRequests()) {
        List __this__requests = new ArrayList(other.requests.size());
        for (ChangeMessageVisibilityRequest other_element : other.requests) {
          __this__requests.add(new ChangeMessageVisibilityRequest(other_element));
        }
        this.requests = __this__requests;
      }
    }

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

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

    public String getQueueName() {
      return this.queueName;
    }

    public changeMessageVisibilitySecondsBatch_args setQueueName(String queueName) {
      this.queueName = queueName;
      return this;
    }

    public void unsetQueueName() {
      this.queueName = null;
    }

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

    public void setQueueNameIsSet(boolean value) {
      if (!value) {
        this.queueName = null;
      }
    }

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

    public java.util.Iterator getRequestsIterator() {
      return (this.requests == null) ? null : this.requests.iterator();
    }

    public void addToRequests(ChangeMessageVisibilityRequest elem) {
      if (this.requests == null) {
        this.requests = new ArrayList();
      }
      this.requests.add(elem);
    }

    public List getRequests() {
      return this.requests;
    }

    public changeMessageVisibilitySecondsBatch_args setRequests(List requests) {
      this.requests = requests;
      return this;
    }

    public void unsetRequests() {
      this.requests = null;
    }

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

    public void setRequestsIsSet(boolean value) {
      if (!value) {
        this.requests = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case QUEUE_NAME:
        if (value == null) {
          unsetQueueName();
        } else {
          setQueueName((String)value);
        }
        break;

      case REQUESTS:
        if (value == null) {
          unsetRequests();
        } else {
          setRequests((List)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case QUEUE_NAME:
        return getQueueName();

      case REQUESTS:
        return getRequests();

      }
      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 QUEUE_NAME:
        return isSetQueueName();
      case REQUESTS:
        return isSetRequests();
      }
      throw new IllegalStateException();
    }

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

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

      boolean this_present_queueName = true && this.isSetQueueName();
      boolean that_present_queueName = true && that.isSetQueueName();
      if (this_present_queueName || that_present_queueName) {
        if (!(this_present_queueName && that_present_queueName))
          return false;
        if (!this.queueName.equals(that.queueName))
          return false;
      }

      boolean this_present_requests = true && this.isSetRequests();
      boolean that_present_requests = true && that.isSetRequests();
      if (this_present_requests || that_present_requests) {
        if (!(this_present_requests && that_present_requests))
          return false;
        if (!this.requests.equals(that.requests))
          return false;
      }

      return true;
    }

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

      boolean present_queueName = true && (isSetQueueName());
      list.add(present_queueName);
      if (present_queueName)
        list.add(queueName);

      boolean present_requests = true && (isSetRequests());
      list.add(present_requests);
      if (present_requests)
        list.add(requests);

      return list.hashCode();
    }

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

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetQueueName()).compareTo(other.isSetQueueName());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetQueueName()) {
        lastComparison = libthrift091.TBaseHelper.compareTo(this.queueName, other.queueName);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetRequests()).compareTo(other.isSetRequests());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetRequests()) {
        lastComparison = libthrift091.TBaseHelper.compareTo(this.requests, other.requests);
        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("changeMessageVisibilitySecondsBatch_args(");
      boolean first = true;

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

    private static class changeMessageVisibilitySecondsBatch_argsStandardScheme extends StandardScheme {

      public void read(libthrift091.protocol.TProtocol iprot, changeMessageVisibilitySecondsBatch_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: // QUEUE_NAME
              if (schemeField.type == libthrift091.protocol.TType.STRING) {
                struct.queueName = iprot.readString();
                struct.setQueueNameIsSet(true);
              } else { 
                libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // REQUESTS
              if (schemeField.type == libthrift091.protocol.TType.LIST) {
                {
                  libthrift091.protocol.TList _list24 = iprot.readListBegin();
                  struct.requests = new ArrayList(_list24.size);
                  ChangeMessageVisibilityRequest _elem25;
                  for (int _i26 = 0; _i26 < _list24.size; ++_i26)
                  {
                    _elem25 = new ChangeMessageVisibilityRequest();
                    _elem25.read(iprot);
                    struct.requests.add(_elem25);
                  }
                  iprot.readListEnd();
                }
                struct.setRequestsIsSet(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, changeMessageVisibilitySecondsBatch_args struct) throws libthrift091.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.queueName != null) {
          oprot.writeFieldBegin(QUEUE_NAME_FIELD_DESC);
          oprot.writeString(struct.queueName);
          oprot.writeFieldEnd();
        }
        if (struct.requests != null) {
          oprot.writeFieldBegin(REQUESTS_FIELD_DESC);
          {
            oprot.writeListBegin(new libthrift091.protocol.TList(libthrift091.protocol.TType.STRUCT, struct.requests.size()));
            for (ChangeMessageVisibilityRequest _iter27 : struct.requests)
            {
              _iter27.write(oprot);
            }
            oprot.writeListEnd();
          }
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class changeMessageVisibilitySecondsBatch_argsTupleSchemeFactory implements SchemeFactory {
      public changeMessageVisibilitySecondsBatch_argsTupleScheme getScheme() {
        return new changeMessageVisibilitySecondsBatch_argsTupleScheme();
      }
    }

    private static class changeMessageVisibilitySecondsBatch_argsTupleScheme extends TupleScheme {

      @Override
      public void write(libthrift091.protocol.TProtocol prot, changeMessageVisibilitySecondsBatch_args struct) throws libthrift091.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetQueueName()) {
          optionals.set(0);
        }
        if (struct.isSetRequests()) {
          optionals.set(1);
        }
        oprot.writeBitSet(optionals, 2);
        if (struct.isSetQueueName()) {
          oprot.writeString(struct.queueName);
        }
        if (struct.isSetRequests()) {
          {
            oprot.writeI32(struct.requests.size());
            for (ChangeMessageVisibilityRequest _iter28 : struct.requests)
            {
              _iter28.write(oprot);
            }
          }
        }
      }

      @Override
      public void read(libthrift091.protocol.TProtocol prot, changeMessageVisibilitySecondsBatch_args struct) throws libthrift091.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(2);
        if (incoming.get(0)) {
          struct.queueName = iprot.readString();
          struct.setQueueNameIsSet(true);
        }
        if (incoming.get(1)) {
          {
            libthrift091.protocol.TList _list29 = new libthrift091.protocol.TList(libthrift091.protocol.TType.STRUCT, iprot.readI32());
            struct.requests = new ArrayList(_list29.size);
            ChangeMessageVisibilityRequest _elem30;
            for (int _i31 = 0; _i31 < _list29.size; ++_i31)
            {
              _elem30 = new ChangeMessageVisibilityRequest();
              _elem30.read(iprot);
              struct.requests.add(_elem30);
            }
          }
          struct.setRequestsIsSet(true);
        }
      }
    }

  }

  public static class changeMessageVisibilitySecondsBatch_result implements libthrift091.TBase, java.io.Serializable, Cloneable, Comparable   {
    private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("changeMessageVisibilitySecondsBatch_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 changeMessageVisibilitySecondsBatch_resultStandardSchemeFactory());
      schemes.put(TupleScheme.class, new changeMessageVisibilitySecondsBatch_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(changeMessageVisibilitySecondsBatch_result.class, metaDataMap);
    }

    public changeMessageVisibilitySecondsBatch_result() {
    }

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

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

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

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

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

    public changeMessageVisibilitySecondsBatch_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 changeMessageVisibilitySecondsBatch_result)
        return this.equals((changeMessageVisibilitySecondsBatch_result)that);
      return false;
    }

    public boolean equals(changeMessageVisibilitySecondsBatch_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(changeMessageVisibilitySecondsBatch_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("changeMessageVisibilitySecondsBatch_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 changeMessageVisibilitySecondsBatch_resultStandardSchemeFactory implements SchemeFactory {
      public changeMessageVisibilitySecondsBatch_resultStandardScheme getScheme() {
        return new changeMessageVisibilitySecondsBatch_resultStandardScheme();
      }
    }

    private static class changeMessageVisibilitySecondsBatch_resultStandardScheme extends StandardScheme {

      public void read(libthrift091.protocol.TProtocol iprot, changeMessageVisibilitySecondsBatch_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, changeMessageVisibilitySecondsBatch_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 changeMessageVisibilitySecondsBatch_resultTupleSchemeFactory implements SchemeFactory {
      public changeMessageVisibilitySecondsBatch_resultTupleScheme getScheme() {
        return new changeMessageVisibilitySecondsBatch_resultTupleScheme();
      }
    }

    private static class changeMessageVisibilitySecondsBatch_resultTupleScheme extends TupleScheme {

      @Override
      public void write(libthrift091.protocol.TProtocol prot, changeMessageVisibilitySecondsBatch_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, changeMessageVisibilitySecondsBatch_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 deleteMessage_args implements libthrift091.TBase, java.io.Serializable, Cloneable, Comparable   {
    private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("deleteMessage_args");

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

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

    public String queueName; // required
    public DeleteMessageRequest request; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements libthrift091.TFieldIdEnum {
      QUEUE_NAME((short)1, "queueName"),
      REQUEST((short)2, "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: // QUEUE_NAME
            return QUEUE_NAME;
          case 2: // 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.QUEUE_NAME, new libthrift091.meta_data.FieldMetaData("queueName", libthrift091.TFieldRequirementType.DEFAULT, 
          new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.STRING)));
      tmpMap.put(_Fields.REQUEST, new libthrift091.meta_data.FieldMetaData("request", libthrift091.TFieldRequirementType.DEFAULT, 
          new libthrift091.meta_data.StructMetaData(libthrift091.protocol.TType.STRUCT, DeleteMessageRequest.class)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(deleteMessage_args.class, metaDataMap);
    }

    public deleteMessage_args() {
    }

    public deleteMessage_args(
      String queueName,
      DeleteMessageRequest request)
    {
      this();
      this.queueName = queueName;
      this.request = request;
    }

    /**
     * Performs a deep copy on other.
     */
    public deleteMessage_args(deleteMessage_args other) {
      if (other.isSetQueueName()) {
        this.queueName = other.queueName;
      }
      if (other.isSetRequest()) {
        this.request = new DeleteMessageRequest(other.request);
      }
    }

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

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

    public String getQueueName() {
      return this.queueName;
    }

    public deleteMessage_args setQueueName(String queueName) {
      this.queueName = queueName;
      return this;
    }

    public void unsetQueueName() {
      this.queueName = null;
    }

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

    public void setQueueNameIsSet(boolean value) {
      if (!value) {
        this.queueName = null;
      }
    }

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

    public deleteMessage_args setRequest(DeleteMessageRequest 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 QUEUE_NAME:
        if (value == null) {
          unsetQueueName();
        } else {
          setQueueName((String)value);
        }
        break;

      case REQUEST:
        if (value == null) {
          unsetRequest();
        } else {
          setRequest((DeleteMessageRequest)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case QUEUE_NAME:
        return getQueueName();

      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 QUEUE_NAME:
        return isSetQueueName();
      case REQUEST:
        return isSetRequest();
      }
      throw new IllegalStateException();
    }

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

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

      boolean this_present_queueName = true && this.isSetQueueName();
      boolean that_present_queueName = true && that.isSetQueueName();
      if (this_present_queueName || that_present_queueName) {
        if (!(this_present_queueName && that_present_queueName))
          return false;
        if (!this.queueName.equals(that.queueName))
          return false;
      }

      boolean this_present_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_queueName = true && (isSetQueueName());
      list.add(present_queueName);
      if (present_queueName)
        list.add(queueName);

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

      return list.hashCode();
    }

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

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetQueueName()).compareTo(other.isSetQueueName());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetQueueName()) {
        lastComparison = libthrift091.TBaseHelper.compareTo(this.queueName, other.queueName);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      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("deleteMessage_args(");
      boolean first = true;

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

    private static class deleteMessage_argsStandardScheme extends StandardScheme {

      public void read(libthrift091.protocol.TProtocol iprot, deleteMessage_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: // QUEUE_NAME
              if (schemeField.type == libthrift091.protocol.TType.STRING) {
                struct.queueName = iprot.readString();
                struct.setQueueNameIsSet(true);
              } else { 
                libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // REQUEST
              if (schemeField.type == libthrift091.protocol.TType.STRUCT) {
                struct.request = new DeleteMessageRequest();
                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, deleteMessage_args struct) throws libthrift091.TException {
        struct.validate();

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

    }

    private static class deleteMessage_argsTupleSchemeFactory implements SchemeFactory {
      public deleteMessage_argsTupleScheme getScheme() {
        return new deleteMessage_argsTupleScheme();
      }
    }

    private static class deleteMessage_argsTupleScheme extends TupleScheme {

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

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

  }

  public static class deleteMessage_result implements libthrift091.TBase, java.io.Serializable, Cloneable, Comparable   {
    private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("deleteMessage_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 deleteMessage_resultStandardSchemeFactory());
      schemes.put(TupleScheme.class, new deleteMessage_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(deleteMessage_result.class, metaDataMap);
    }

    public deleteMessage_result() {
    }

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

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

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

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

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

    public deleteMessage_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 deleteMessage_result)
        return this.equals((deleteMessage_result)that);
      return false;
    }

    public boolean equals(deleteMessage_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(deleteMessage_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("deleteMessage_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 deleteMessage_resultStandardSchemeFactory implements SchemeFactory {
      public deleteMessage_resultStandardScheme getScheme() {
        return new deleteMessage_resultStandardScheme();
      }
    }

    private static class deleteMessage_resultStandardScheme extends StandardScheme {

      public void read(libthrift091.protocol.TProtocol iprot, deleteMessage_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, deleteMessage_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 deleteMessage_resultTupleSchemeFactory implements SchemeFactory {
      public deleteMessage_resultTupleScheme getScheme() {
        return new deleteMessage_resultTupleScheme();
      }
    }

    private static class deleteMessage_resultTupleScheme extends TupleScheme {

      @Override
      public void write(libthrift091.protocol.TProtocol prot, deleteMessage_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, deleteMessage_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 deleteMessageBatch_args implements libthrift091.TBase, java.io.Serializable, Cloneable, Comparable   {
    private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("deleteMessageBatch_args");

    private static final libthrift091.protocol.TField QUEUE_NAME_FIELD_DESC = new libthrift091.protocol.TField("queueName", libthrift091.protocol.TType.STRING, (short)1);
    private static final libthrift091.protocol.TField REQUESTS_FIELD_DESC = new libthrift091.protocol.TField("requests", libthrift091.protocol.TType.LIST, (short)2);

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

    public String queueName; // required
    public List requests; // required

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

      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: // QUEUE_NAME
            return QUEUE_NAME;
          case 2: // REQUESTS
            return REQUESTS;
          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.QUEUE_NAME, new libthrift091.meta_data.FieldMetaData("queueName", libthrift091.TFieldRequirementType.DEFAULT, 
          new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.STRING)));
      tmpMap.put(_Fields.REQUESTS, new libthrift091.meta_data.FieldMetaData("requests", libthrift091.TFieldRequirementType.DEFAULT, 
          new libthrift091.meta_data.ListMetaData(libthrift091.protocol.TType.LIST, 
              new libthrift091.meta_data.StructMetaData(libthrift091.protocol.TType.STRUCT, DeleteMessageRequest.class))));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(deleteMessageBatch_args.class, metaDataMap);
    }

    public deleteMessageBatch_args() {
    }

    public deleteMessageBatch_args(
      String queueName,
      List requests)
    {
      this();
      this.queueName = queueName;
      this.requests = requests;
    }

    /**
     * Performs a deep copy on other.
     */
    public deleteMessageBatch_args(deleteMessageBatch_args other) {
      if (other.isSetQueueName()) {
        this.queueName = other.queueName;
      }
      if (other.isSetRequests()) {
        List __this__requests = new ArrayList(other.requests.size());
        for (DeleteMessageRequest other_element : other.requests) {
          __this__requests.add(new DeleteMessageRequest(other_element));
        }
        this.requests = __this__requests;
      }
    }

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

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

    public String getQueueName() {
      return this.queueName;
    }

    public deleteMessageBatch_args setQueueName(String queueName) {
      this.queueName = queueName;
      return this;
    }

    public void unsetQueueName() {
      this.queueName = null;
    }

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

    public void setQueueNameIsSet(boolean value) {
      if (!value) {
        this.queueName = null;
      }
    }

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

    public java.util.Iterator getRequestsIterator() {
      return (this.requests == null) ? null : this.requests.iterator();
    }

    public void addToRequests(DeleteMessageRequest elem) {
      if (this.requests == null) {
        this.requests = new ArrayList();
      }
      this.requests.add(elem);
    }

    public List getRequests() {
      return this.requests;
    }

    public deleteMessageBatch_args setRequests(List requests) {
      this.requests = requests;
      return this;
    }

    public void unsetRequests() {
      this.requests = null;
    }

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

    public void setRequestsIsSet(boolean value) {
      if (!value) {
        this.requests = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case QUEUE_NAME:
        if (value == null) {
          unsetQueueName();
        } else {
          setQueueName((String)value);
        }
        break;

      case REQUESTS:
        if (value == null) {
          unsetRequests();
        } else {
          setRequests((List)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case QUEUE_NAME:
        return getQueueName();

      case REQUESTS:
        return getRequests();

      }
      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 QUEUE_NAME:
        return isSetQueueName();
      case REQUESTS:
        return isSetRequests();
      }
      throw new IllegalStateException();
    }

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

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

      boolean this_present_queueName = true && this.isSetQueueName();
      boolean that_present_queueName = true && that.isSetQueueName();
      if (this_present_queueName || that_present_queueName) {
        if (!(this_present_queueName && that_present_queueName))
          return false;
        if (!this.queueName.equals(that.queueName))
          return false;
      }

      boolean this_present_requests = true && this.isSetRequests();
      boolean that_present_requests = true && that.isSetRequests();
      if (this_present_requests || that_present_requests) {
        if (!(this_present_requests && that_present_requests))
          return false;
        if (!this.requests.equals(that.requests))
          return false;
      }

      return true;
    }

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

      boolean present_queueName = true && (isSetQueueName());
      list.add(present_queueName);
      if (present_queueName)
        list.add(queueName);

      boolean present_requests = true && (isSetRequests());
      list.add(present_requests);
      if (present_requests)
        list.add(requests);

      return list.hashCode();
    }

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

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetQueueName()).compareTo(other.isSetQueueName());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetQueueName()) {
        lastComparison = libthrift091.TBaseHelper.compareTo(this.queueName, other.queueName);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetRequests()).compareTo(other.isSetRequests());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetRequests()) {
        lastComparison = libthrift091.TBaseHelper.compareTo(this.requests, other.requests);
        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("deleteMessageBatch_args(");
      boolean first = true;

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

    private static class deleteMessageBatch_argsStandardScheme extends StandardScheme {

      public void read(libthrift091.protocol.TProtocol iprot, deleteMessageBatch_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: // QUEUE_NAME
              if (schemeField.type == libthrift091.protocol.TType.STRING) {
                struct.queueName = iprot.readString();
                struct.setQueueNameIsSet(true);
              } else { 
                libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // REQUESTS
              if (schemeField.type == libthrift091.protocol.TType.LIST) {
                {
                  libthrift091.protocol.TList _list32 = iprot.readListBegin();
                  struct.requests = new ArrayList(_list32.size);
                  DeleteMessageRequest _elem33;
                  for (int _i34 = 0; _i34 < _list32.size; ++_i34)
                  {
                    _elem33 = new DeleteMessageRequest();
                    _elem33.read(iprot);
                    struct.requests.add(_elem33);
                  }
                  iprot.readListEnd();
                }
                struct.setRequestsIsSet(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, deleteMessageBatch_args struct) throws libthrift091.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.queueName != null) {
          oprot.writeFieldBegin(QUEUE_NAME_FIELD_DESC);
          oprot.writeString(struct.queueName);
          oprot.writeFieldEnd();
        }
        if (struct.requests != null) {
          oprot.writeFieldBegin(REQUESTS_FIELD_DESC);
          {
            oprot.writeListBegin(new libthrift091.protocol.TList(libthrift091.protocol.TType.STRUCT, struct.requests.size()));
            for (DeleteMessageRequest _iter35 : struct.requests)
            {
              _iter35.write(oprot);
            }
            oprot.writeListEnd();
          }
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class deleteMessageBatch_argsTupleSchemeFactory implements SchemeFactory {
      public deleteMessageBatch_argsTupleScheme getScheme() {
        return new deleteMessageBatch_argsTupleScheme();
      }
    }

    private static class deleteMessageBatch_argsTupleScheme extends TupleScheme {

      @Override
      public void write(libthrift091.protocol.TProtocol prot, deleteMessageBatch_args struct) throws libthrift091.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetQueueName()) {
          optionals.set(0);
        }
        if (struct.isSetRequests()) {
          optionals.set(1);
        }
        oprot.writeBitSet(optionals, 2);
        if (struct.isSetQueueName()) {
          oprot.writeString(struct.queueName);
        }
        if (struct.isSetRequests()) {
          {
            oprot.writeI32(struct.requests.size());
            for (DeleteMessageRequest _iter36 : struct.requests)
            {
              _iter36.write(oprot);
            }
          }
        }
      }

      @Override
      public void read(libthrift091.protocol.TProtocol prot, deleteMessageBatch_args struct) throws libthrift091.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(2);
        if (incoming.get(0)) {
          struct.queueName = iprot.readString();
          struct.setQueueNameIsSet(true);
        }
        if (incoming.get(1)) {
          {
            libthrift091.protocol.TList _list37 = new libthrift091.protocol.TList(libthrift091.protocol.TType.STRUCT, iprot.readI32());
            struct.requests = new ArrayList(_list37.size);
            DeleteMessageRequest _elem38;
            for (int _i39 = 0; _i39 < _list37.size; ++_i39)
            {
              _elem38 = new DeleteMessageRequest();
              _elem38.read(iprot);
              struct.requests.add(_elem38);
            }
          }
          struct.setRequestsIsSet(true);
        }
      }
    }

  }

  public static class deleteMessageBatch_result implements libthrift091.TBase, java.io.Serializable, Cloneable, Comparable   {
    private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("deleteMessageBatch_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 deleteMessageBatch_resultStandardSchemeFactory());
      schemes.put(TupleScheme.class, new deleteMessageBatch_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(deleteMessageBatch_result.class, metaDataMap);
    }

    public deleteMessageBatch_result() {
    }

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

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

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

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

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

    public deleteMessageBatch_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 deleteMessageBatch_result)
        return this.equals((deleteMessageBatch_result)that);
      return false;
    }

    public boolean equals(deleteMessageBatch_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(deleteMessageBatch_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("deleteMessageBatch_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 deleteMessageBatch_resultStandardSchemeFactory implements SchemeFactory {
      public deleteMessageBatch_resultStandardScheme getScheme() {
        return new deleteMessageBatch_resultStandardScheme();
      }
    }

    private static class deleteMessageBatch_resultStandardScheme extends StandardScheme {

      public void read(libthrift091.protocol.TProtocol iprot, deleteMessageBatch_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, deleteMessageBatch_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 deleteMessageBatch_resultTupleSchemeFactory implements SchemeFactory {
      public deleteMessageBatch_resultTupleScheme getScheme() {
        return new deleteMessageBatch_resultTupleScheme();
      }
    }

    private static class deleteMessageBatch_resultTupleScheme extends TupleScheme {

      @Override
      public void write(libthrift091.protocol.TProtocol prot, deleteMessageBatch_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, deleteMessageBatch_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);
        }
      }
    }

  }

}