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

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

The 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 = "2017-9-13")
public class MessageService {

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

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

    /**
     * Send message batch;
     * 
     * 
     * @param sendMessageBatchRequest
     */
    public SendMessageBatchResponse sendMessageBatch(SendMessageBatchRequest sendMessageBatchRequest) throws com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException, libthrift091.TException;

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

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

    /**
     * Change message invisibility seconds batch;
     * 
     * 
     * @param changeMessageVisibilityBatchRequest
     */
    public ChangeMessageVisibilityBatchResponse changeMessageVisibilitySecondsBatch(ChangeMessageVisibilityBatchRequest changeMessageVisibilityBatchRequest) throws com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException, libthrift091.TException;

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

    /**
     * Delete message batch;
     * 
     * 
     * @param deleteMessageBatchRequest
     */
    public DeleteMessageBatchResponse deleteMessageBatch(DeleteMessageBatchRequest deleteMessageBatchRequest) throws com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException, libthrift091.TException;

    /**
     * Dead message;
     * 
     * 
     * @param deadMessageRequest
     */
    public void deadMessage(DeadMessageRequest deadMessageRequest) throws com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException, libthrift091.TException;

    /**
     * Dead message batch;
     * 
     * 
     * @param deadMessageBatchRequest
     */
    public DeadMessageBatchResponse deadMessageBatch(DeadMessageBatchRequest deadMessageBatchRequest) throws com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException, libthrift091.TException;

    /**
     * Peek message;
     * 
     * 
     * @param peekMessageRequest
     */
    public List peekMessage(PeekMessageRequest peekMessageRequest) throws com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException, libthrift091.TException;

    /**
     * Delete peek message;
     * 
     * 
     * @param deletePeekMessageRequest
     */
    public void deletePeekMessage(DeletePeekMessageRequest deletePeekMessageRequest) throws com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException, libthrift091.TException;

    /**
     * Delete peek message batch;
     * 
     * 
     * @param deletePeekMessageBatchRequest
     */
    public DeletePeekMessageBatchResponse deletePeekMessageBatch(DeletePeekMessageBatchRequest deletePeekMessageBatchRequest) 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(SendMessageRequest sendMessageRequest, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException;

    public void sendMessageBatch(SendMessageBatchRequest sendMessageBatchRequest, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException;

    public void receiveMessage(ReceiveMessageRequest receiveMessageRequest, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException;

    public void changeMessageVisibilitySeconds(ChangeMessageVisibilityRequest changeMessageVisibilityRequest, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException;

    public void changeMessageVisibilitySecondsBatch(ChangeMessageVisibilityBatchRequest changeMessageVisibilityBatchRequest, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException;

    public void deleteMessage(DeleteMessageRequest deleteMessageRequest, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException;

    public void deleteMessageBatch(DeleteMessageBatchRequest deleteMessageBatchRequest, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException;

    public void deadMessage(DeadMessageRequest deadMessageRequest, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException;

    public void deadMessageBatch(DeadMessageBatchRequest deadMessageBatchRequest, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException;

    public void peekMessage(PeekMessageRequest peekMessageRequest, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException;

    public void deletePeekMessage(DeletePeekMessageRequest deletePeekMessageRequest, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException;

    public void deletePeekMessageBatch(DeletePeekMessageBatchRequest deletePeekMessageBatchRequest, 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(SendMessageRequest sendMessageRequest) throws com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException, libthrift091.TException
    {
      send_sendMessage(sendMessageRequest);
      return recv_sendMessage();
    }

    public void send_sendMessage(SendMessageRequest sendMessageRequest) throws libthrift091.TException
    {
      sendMessage_args args = new sendMessage_args();
      args.setSendMessageRequest(sendMessageRequest);
      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 SendMessageBatchResponse sendMessageBatch(SendMessageBatchRequest sendMessageBatchRequest) throws com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException, libthrift091.TException
    {
      send_sendMessageBatch(sendMessageBatchRequest);
      return recv_sendMessageBatch();
    }

    public void send_sendMessageBatch(SendMessageBatchRequest sendMessageBatchRequest) throws libthrift091.TException
    {
      sendMessageBatch_args args = new sendMessageBatch_args();
      args.setSendMessageBatchRequest(sendMessageBatchRequest);
      sendBase("sendMessageBatch", args);
    }

    public SendMessageBatchResponse 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(ReceiveMessageRequest receiveMessageRequest) throws com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException, libthrift091.TException
    {
      send_receiveMessage(receiveMessageRequest);
      return recv_receiveMessage();
    }

    public void send_receiveMessage(ReceiveMessageRequest receiveMessageRequest) throws libthrift091.TException
    {
      receiveMessage_args args = new receiveMessage_args();
      args.setReceiveMessageRequest(receiveMessageRequest);
      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(ChangeMessageVisibilityRequest changeMessageVisibilityRequest) throws com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException, libthrift091.TException
    {
      send_changeMessageVisibilitySeconds(changeMessageVisibilityRequest);
      recv_changeMessageVisibilitySeconds();
    }

    public void send_changeMessageVisibilitySeconds(ChangeMessageVisibilityRequest changeMessageVisibilityRequest) throws libthrift091.TException
    {
      changeMessageVisibilitySeconds_args args = new changeMessageVisibilitySeconds_args();
      args.setChangeMessageVisibilityRequest(changeMessageVisibilityRequest);
      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 ChangeMessageVisibilityBatchResponse changeMessageVisibilitySecondsBatch(ChangeMessageVisibilityBatchRequest changeMessageVisibilityBatchRequest) throws com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException, libthrift091.TException
    {
      send_changeMessageVisibilitySecondsBatch(changeMessageVisibilityBatchRequest);
      return recv_changeMessageVisibilitySecondsBatch();
    }

    public void send_changeMessageVisibilitySecondsBatch(ChangeMessageVisibilityBatchRequest changeMessageVisibilityBatchRequest) throws libthrift091.TException
    {
      changeMessageVisibilitySecondsBatch_args args = new changeMessageVisibilitySecondsBatch_args();
      args.setChangeMessageVisibilityBatchRequest(changeMessageVisibilityBatchRequest);
      sendBase("changeMessageVisibilitySecondsBatch", args);
    }

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

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

    public void send_deleteMessage(DeleteMessageRequest deleteMessageRequest) throws libthrift091.TException
    {
      deleteMessage_args args = new deleteMessage_args();
      args.setDeleteMessageRequest(deleteMessageRequest);
      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 DeleteMessageBatchResponse deleteMessageBatch(DeleteMessageBatchRequest deleteMessageBatchRequest) throws com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException, libthrift091.TException
    {
      send_deleteMessageBatch(deleteMessageBatchRequest);
      return recv_deleteMessageBatch();
    }

    public void send_deleteMessageBatch(DeleteMessageBatchRequest deleteMessageBatchRequest) throws libthrift091.TException
    {
      deleteMessageBatch_args args = new deleteMessageBatch_args();
      args.setDeleteMessageBatchRequest(deleteMessageBatchRequest);
      sendBase("deleteMessageBatch", args);
    }

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

    public void deadMessage(DeadMessageRequest deadMessageRequest) throws com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException, libthrift091.TException
    {
      send_deadMessage(deadMessageRequest);
      recv_deadMessage();
    }

    public void send_deadMessage(DeadMessageRequest deadMessageRequest) throws libthrift091.TException
    {
      deadMessage_args args = new deadMessage_args();
      args.setDeadMessageRequest(deadMessageRequest);
      sendBase("deadMessage", args);
    }

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

    public DeadMessageBatchResponse deadMessageBatch(DeadMessageBatchRequest deadMessageBatchRequest) throws com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException, libthrift091.TException
    {
      send_deadMessageBatch(deadMessageBatchRequest);
      return recv_deadMessageBatch();
    }

    public void send_deadMessageBatch(DeadMessageBatchRequest deadMessageBatchRequest) throws libthrift091.TException
    {
      deadMessageBatch_args args = new deadMessageBatch_args();
      args.setDeadMessageBatchRequest(deadMessageBatchRequest);
      sendBase("deadMessageBatch", args);
    }

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

    public List peekMessage(PeekMessageRequest peekMessageRequest) throws com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException, libthrift091.TException
    {
      send_peekMessage(peekMessageRequest);
      return recv_peekMessage();
    }

    public void send_peekMessage(PeekMessageRequest peekMessageRequest) throws libthrift091.TException
    {
      peekMessage_args args = new peekMessage_args();
      args.setPeekMessageRequest(peekMessageRequest);
      sendBase("peekMessage", args);
    }

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

    public void deletePeekMessage(DeletePeekMessageRequest deletePeekMessageRequest) throws com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException, libthrift091.TException
    {
      send_deletePeekMessage(deletePeekMessageRequest);
      recv_deletePeekMessage();
    }

    public void send_deletePeekMessage(DeletePeekMessageRequest deletePeekMessageRequest) throws libthrift091.TException
    {
      deletePeekMessage_args args = new deletePeekMessage_args();
      args.setDeletePeekMessageRequest(deletePeekMessageRequest);
      sendBase("deletePeekMessage", args);
    }

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

    public DeletePeekMessageBatchResponse deletePeekMessageBatch(DeletePeekMessageBatchRequest deletePeekMessageBatchRequest) throws com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException, libthrift091.TException
    {
      send_deletePeekMessageBatch(deletePeekMessageBatchRequest);
      return recv_deletePeekMessageBatch();
    }

    public void send_deletePeekMessageBatch(DeletePeekMessageBatchRequest deletePeekMessageBatchRequest) throws libthrift091.TException
    {
      deletePeekMessageBatch_args args = new deletePeekMessageBatch_args();
      args.setDeletePeekMessageBatchRequest(deletePeekMessageBatchRequest);
      sendBase("deletePeekMessageBatch", args);
    }

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

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

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

    public void sendMessage(SendMessageRequest sendMessageRequest, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException {
      checkReady();
      sendMessage_call method_call = new sendMessage_call(sendMessageRequest, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

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

      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.setSendMessageRequest(sendMessageRequest);
        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(SendMessageBatchRequest sendMessageBatchRequest, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException {
      checkReady();
      sendMessageBatch_call method_call = new sendMessageBatch_call(sendMessageBatchRequest, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class sendMessageBatch_call extends libthrift091.async.TAsyncMethodCall {
      private SendMessageBatchRequest sendMessageBatchRequest;
      public sendMessageBatch_call(SendMessageBatchRequest sendMessageBatchRequest, 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.sendMessageBatchRequest = sendMessageBatchRequest;
      }

      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.setSendMessageBatchRequest(sendMessageBatchRequest);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public SendMessageBatchResponse 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(ReceiveMessageRequest receiveMessageRequest, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException {
      checkReady();
      receiveMessage_call method_call = new receiveMessage_call(receiveMessageRequest, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

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

      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.setReceiveMessageRequest(receiveMessageRequest);
        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(ChangeMessageVisibilityRequest changeMessageVisibilityRequest, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException {
      checkReady();
      changeMessageVisibilitySeconds_call method_call = new changeMessageVisibilitySeconds_call(changeMessageVisibilityRequest, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

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

      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.setChangeMessageVisibilityRequest(changeMessageVisibilityRequest);
        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(ChangeMessageVisibilityBatchRequest changeMessageVisibilityBatchRequest, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException {
      checkReady();
      changeMessageVisibilitySecondsBatch_call method_call = new changeMessageVisibilitySecondsBatch_call(changeMessageVisibilityBatchRequest, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class changeMessageVisibilitySecondsBatch_call extends libthrift091.async.TAsyncMethodCall {
      private ChangeMessageVisibilityBatchRequest changeMessageVisibilityBatchRequest;
      public changeMessageVisibilitySecondsBatch_call(ChangeMessageVisibilityBatchRequest changeMessageVisibilityBatchRequest, 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.changeMessageVisibilityBatchRequest = changeMessageVisibilityBatchRequest;
      }

      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.setChangeMessageVisibilityBatchRequest(changeMessageVisibilityBatchRequest);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public ChangeMessageVisibilityBatchResponse 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_changeMessageVisibilitySecondsBatch();
      }
    }

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

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

      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.setDeleteMessageRequest(deleteMessageRequest);
        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(DeleteMessageBatchRequest deleteMessageBatchRequest, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException {
      checkReady();
      deleteMessageBatch_call method_call = new deleteMessageBatch_call(deleteMessageBatchRequest, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class deleteMessageBatch_call extends libthrift091.async.TAsyncMethodCall {
      private DeleteMessageBatchRequest deleteMessageBatchRequest;
      public deleteMessageBatch_call(DeleteMessageBatchRequest deleteMessageBatchRequest, 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.deleteMessageBatchRequest = deleteMessageBatchRequest;
      }

      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.setDeleteMessageBatchRequest(deleteMessageBatchRequest);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public DeleteMessageBatchResponse 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_deleteMessageBatch();
      }
    }

    public void deadMessage(DeadMessageRequest deadMessageRequest, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException {
      checkReady();
      deadMessage_call method_call = new deadMessage_call(deadMessageRequest, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class deadMessage_call extends libthrift091.async.TAsyncMethodCall {
      private DeadMessageRequest deadMessageRequest;
      public deadMessage_call(DeadMessageRequest deadMessageRequest, 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.deadMessageRequest = deadMessageRequest;
      }

      public void write_args(libthrift091.protocol.TProtocol prot) throws libthrift091.TException {
        prot.writeMessageBegin(new libthrift091.protocol.TMessage("deadMessage", libthrift091.protocol.TMessageType.CALL, 0));
        deadMessage_args args = new deadMessage_args();
        args.setDeadMessageRequest(deadMessageRequest);
        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_deadMessage();
      }
    }

    public void deadMessageBatch(DeadMessageBatchRequest deadMessageBatchRequest, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException {
      checkReady();
      deadMessageBatch_call method_call = new deadMessageBatch_call(deadMessageBatchRequest, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class deadMessageBatch_call extends libthrift091.async.TAsyncMethodCall {
      private DeadMessageBatchRequest deadMessageBatchRequest;
      public deadMessageBatch_call(DeadMessageBatchRequest deadMessageBatchRequest, 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.deadMessageBatchRequest = deadMessageBatchRequest;
      }

      public void write_args(libthrift091.protocol.TProtocol prot) throws libthrift091.TException {
        prot.writeMessageBegin(new libthrift091.protocol.TMessage("deadMessageBatch", libthrift091.protocol.TMessageType.CALL, 0));
        deadMessageBatch_args args = new deadMessageBatch_args();
        args.setDeadMessageBatchRequest(deadMessageBatchRequest);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public DeadMessageBatchResponse 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_deadMessageBatch();
      }
    }

    public void peekMessage(PeekMessageRequest peekMessageRequest, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException {
      checkReady();
      peekMessage_call method_call = new peekMessage_call(peekMessageRequest, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class peekMessage_call extends libthrift091.async.TAsyncMethodCall {
      private PeekMessageRequest peekMessageRequest;
      public peekMessage_call(PeekMessageRequest peekMessageRequest, 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.peekMessageRequest = peekMessageRequest;
      }

      public void write_args(libthrift091.protocol.TProtocol prot) throws libthrift091.TException {
        prot.writeMessageBegin(new libthrift091.protocol.TMessage("peekMessage", libthrift091.protocol.TMessageType.CALL, 0));
        peekMessage_args args = new peekMessage_args();
        args.setPeekMessageRequest(peekMessageRequest);
        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_peekMessage();
      }
    }

    public void deletePeekMessage(DeletePeekMessageRequest deletePeekMessageRequest, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException {
      checkReady();
      deletePeekMessage_call method_call = new deletePeekMessage_call(deletePeekMessageRequest, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class deletePeekMessage_call extends libthrift091.async.TAsyncMethodCall {
      private DeletePeekMessageRequest deletePeekMessageRequest;
      public deletePeekMessage_call(DeletePeekMessageRequest deletePeekMessageRequest, 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.deletePeekMessageRequest = deletePeekMessageRequest;
      }

      public void write_args(libthrift091.protocol.TProtocol prot) throws libthrift091.TException {
        prot.writeMessageBegin(new libthrift091.protocol.TMessage("deletePeekMessage", libthrift091.protocol.TMessageType.CALL, 0));
        deletePeekMessage_args args = new deletePeekMessage_args();
        args.setDeletePeekMessageRequest(deletePeekMessageRequest);
        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_deletePeekMessage();
      }
    }

    public void deletePeekMessageBatch(DeletePeekMessageBatchRequest deletePeekMessageBatchRequest, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException {
      checkReady();
      deletePeekMessageBatch_call method_call = new deletePeekMessageBatch_call(deletePeekMessageBatchRequest, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class deletePeekMessageBatch_call extends libthrift091.async.TAsyncMethodCall {
      private DeletePeekMessageBatchRequest deletePeekMessageBatchRequest;
      public deletePeekMessageBatch_call(DeletePeekMessageBatchRequest deletePeekMessageBatchRequest, 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.deletePeekMessageBatchRequest = deletePeekMessageBatchRequest;
      }

      public void write_args(libthrift091.protocol.TProtocol prot) throws libthrift091.TException {
        prot.writeMessageBegin(new libthrift091.protocol.TMessage("deletePeekMessageBatch", libthrift091.protocol.TMessageType.CALL, 0));
        deletePeekMessageBatch_args args = new deletePeekMessageBatch_args();
        args.setDeletePeekMessageBatchRequest(deletePeekMessageBatchRequest);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public DeletePeekMessageBatchResponse 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_deletePeekMessageBatch();
      }
    }

  }

  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());
      processMap.put("deadMessage", new deadMessage());
      processMap.put("deadMessageBatch", new deadMessageBatch());
      processMap.put("peekMessage", new peekMessage());
      processMap.put("deletePeekMessage", new deletePeekMessage());
      processMap.put("deletePeekMessageBatch", new deletePeekMessageBatch());
      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.sendMessageRequest);
        } 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.sendMessageBatchRequest);
        } 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.receiveMessageRequest);
        } 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.changeMessageVisibilityRequest);
        } 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 {
          result.success = iface.changeMessageVisibilitySecondsBatch(args.changeMessageVisibilityBatchRequest);
        } 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.deleteMessageRequest);
        } 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 {
          result.success = iface.deleteMessageBatch(args.deleteMessageBatchRequest);
        } catch (com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException e) {
          result.e = e;
        }
        return result;
      }
    }

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

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

      protected boolean isOneway() {
        return false;
      }

      public deadMessage_result getResult(I iface, deadMessage_args args) throws libthrift091.TException {
        deadMessage_result result = new deadMessage_result();
        try {
          iface.deadMessage(args.deadMessageRequest);
        } catch (com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException e) {
          result.e = e;
        }
        return result;
      }
    }

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

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

      protected boolean isOneway() {
        return false;
      }

      public deadMessageBatch_result getResult(I iface, deadMessageBatch_args args) throws libthrift091.TException {
        deadMessageBatch_result result = new deadMessageBatch_result();
        try {
          result.success = iface.deadMessageBatch(args.deadMessageBatchRequest);
        } catch (com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException e) {
          result.e = e;
        }
        return result;
      }
    }

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

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

      protected boolean isOneway() {
        return false;
      }

      public peekMessage_result getResult(I iface, peekMessage_args args) throws libthrift091.TException {
        peekMessage_result result = new peekMessage_result();
        try {
          result.success = iface.peekMessage(args.peekMessageRequest);
        } catch (com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException e) {
          result.e = e;
        }
        return result;
      }
    }

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

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

      protected boolean isOneway() {
        return false;
      }

      public deletePeekMessage_result getResult(I iface, deletePeekMessage_args args) throws libthrift091.TException {
        deletePeekMessage_result result = new deletePeekMessage_result();
        try {
          iface.deletePeekMessage(args.deletePeekMessageRequest);
        } catch (com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException e) {
          result.e = e;
        }
        return result;
      }
    }

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

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

      protected boolean isOneway() {
        return false;
      }

      public deletePeekMessageBatch_result getResult(I iface, deletePeekMessageBatch_args args) throws libthrift091.TException {
        deletePeekMessageBatch_result result = new deletePeekMessageBatch_result();
        try {
          result.success = iface.deletePeekMessageBatch(args.deletePeekMessageBatchRequest);
        } 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());
      processMap.put("deadMessage", new deadMessage());
      processMap.put("deadMessageBatch", new deadMessageBatch());
      processMap.put("peekMessage", new peekMessage());
      processMap.put("deletePeekMessage", new deletePeekMessage());
      processMap.put("deletePeekMessageBatch", new deletePeekMessageBatch());
      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.sendMessageRequest,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(SendMessageBatchResponse 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.sendMessageBatchRequest,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.receiveMessageRequest,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.changeMessageVisibilityRequest,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(ChangeMessageVisibilityBatchResponse o) {
            changeMessageVisibilitySecondsBatch_result result = new changeMessageVisibilitySecondsBatch_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;
            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.changeMessageVisibilityBatchRequest,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.deleteMessageRequest,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(DeleteMessageBatchResponse o) {
            deleteMessageBatch_result result = new deleteMessageBatch_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;
            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.deleteMessageBatchRequest,resultHandler);
      }
    }

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

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

      public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
        final libthrift091.AsyncProcessFunction fcall = this;
        return new AsyncMethodCallback() { 
          public void onComplete(Void o) {
            deadMessage_result result = new deadMessage_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;
            deadMessage_result result = new deadMessage_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, deadMessage_args args, libthrift091.async.AsyncMethodCallback resultHandler) throws TException {
        iface.deadMessage(args.deadMessageRequest,resultHandler);
      }
    }

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

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

      public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
        final libthrift091.AsyncProcessFunction fcall = this;
        return new AsyncMethodCallback() { 
          public void onComplete(DeadMessageBatchResponse o) {
            deadMessageBatch_result result = new deadMessageBatch_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;
            deadMessageBatch_result result = new deadMessageBatch_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, deadMessageBatch_args args, libthrift091.async.AsyncMethodCallback resultHandler) throws TException {
        iface.deadMessageBatch(args.deadMessageBatchRequest,resultHandler);
      }
    }

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

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

      public AsyncMethodCallback> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
        final libthrift091.AsyncProcessFunction fcall = this;
        return new AsyncMethodCallback>() { 
          public void onComplete(List o) {
            peekMessage_result result = new peekMessage_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;
            peekMessage_result result = new peekMessage_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, peekMessage_args args, libthrift091.async.AsyncMethodCallback> resultHandler) throws TException {
        iface.peekMessage(args.peekMessageRequest,resultHandler);
      }
    }

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

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

      public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
        final libthrift091.AsyncProcessFunction fcall = this;
        return new AsyncMethodCallback() { 
          public void onComplete(Void o) {
            deletePeekMessage_result result = new deletePeekMessage_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;
            deletePeekMessage_result result = new deletePeekMessage_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, deletePeekMessage_args args, libthrift091.async.AsyncMethodCallback resultHandler) throws TException {
        iface.deletePeekMessage(args.deletePeekMessageRequest,resultHandler);
      }
    }

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

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

      public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
        final libthrift091.AsyncProcessFunction fcall = this;
        return new AsyncMethodCallback() { 
          public void onComplete(DeletePeekMessageBatchResponse o) {
            deletePeekMessageBatch_result result = new deletePeekMessageBatch_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;
            deletePeekMessageBatch_result result = new deletePeekMessageBatch_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, deletePeekMessageBatch_args args, libthrift091.async.AsyncMethodCallback resultHandler) throws TException {
        iface.deletePeekMessageBatch(args.deletePeekMessageBatchRequest,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 SEND_MESSAGE_REQUEST_FIELD_DESC = new libthrift091.protocol.TField("sendMessageRequest", libthrift091.protocol.TType.STRUCT, (short)1);

    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 SendMessageRequest sendMessageRequest; // required

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

      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: // SEND_MESSAGE_REQUEST
            return SEND_MESSAGE_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.SEND_MESSAGE_REQUEST, new libthrift091.meta_data.FieldMetaData("sendMessageRequest", 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(
      SendMessageRequest sendMessageRequest)
    {
      this();
      this.sendMessageRequest = sendMessageRequest;
    }

    /**
     * Performs a deep copy on other.
     */
    public sendMessage_args(sendMessage_args other) {
      if (other.isSetSendMessageRequest()) {
        this.sendMessageRequest = new SendMessageRequest(other.sendMessageRequest);
      }
    }

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

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

    public SendMessageRequest getSendMessageRequest() {
      return this.sendMessageRequest;
    }

    public sendMessage_args setSendMessageRequest(SendMessageRequest sendMessageRequest) {
      this.sendMessageRequest = sendMessageRequest;
      return this;
    }

    public void unsetSendMessageRequest() {
      this.sendMessageRequest = null;
    }

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

    public void setSendMessageRequestIsSet(boolean value) {
      if (!value) {
        this.sendMessageRequest = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SEND_MESSAGE_REQUEST:
        if (value == null) {
          unsetSendMessageRequest();
        } else {
          setSendMessageRequest((SendMessageRequest)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SEND_MESSAGE_REQUEST:
        return getSendMessageRequest();

      }
      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 SEND_MESSAGE_REQUEST:
        return isSetSendMessageRequest();
      }
      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_sendMessageRequest = true && this.isSetSendMessageRequest();
      boolean that_present_sendMessageRequest = true && that.isSetSendMessageRequest();
      if (this_present_sendMessageRequest || that_present_sendMessageRequest) {
        if (!(this_present_sendMessageRequest && that_present_sendMessageRequest))
          return false;
        if (!this.sendMessageRequest.equals(that.sendMessageRequest))
          return false;
      }

      return true;
    }

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

      boolean present_sendMessageRequest = true && (isSetSendMessageRequest());
      list.add(present_sendMessageRequest);
      if (present_sendMessageRequest)
        list.add(sendMessageRequest);

      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(isSetSendMessageRequest()).compareTo(other.isSetSendMessageRequest());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSendMessageRequest()) {
        lastComparison = libthrift091.TBaseHelper.compareTo(this.sendMessageRequest, other.sendMessageRequest);
        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("sendMessageRequest:");
      if (this.sendMessageRequest == null) {
        sb.append("null");
      } else {
        sb.append(this.sendMessageRequest);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws libthrift091.TException {
      // check for required fields
      // check for sub-struct validity
      if (sendMessageRequest != null) {
        sendMessageRequest.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: // SEND_MESSAGE_REQUEST
              if (schemeField.type == libthrift091.protocol.TType.STRUCT) {
                struct.sendMessageRequest = new SendMessageRequest();
                struct.sendMessageRequest.read(iprot);
                struct.setSendMessageRequestIsSet(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.sendMessageRequest != null) {
          oprot.writeFieldBegin(SEND_MESSAGE_REQUEST_FIELD_DESC);
          struct.sendMessageRequest.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.isSetSendMessageRequest()) {
          optionals.set(0);
        }
        oprot.writeBitSet(optionals, 1);
        if (struct.isSetSendMessageRequest()) {
          struct.sendMessageRequest.write(oprot);
        }
      }

      @Override
      public void read(libthrift091.protocol.TProtocol prot, sendMessage_args struct) throws libthrift091.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(1);
        if (incoming.get(0)) {
          struct.sendMessageRequest = new SendMessageRequest();
          struct.sendMessageRequest.read(iprot);
          struct.setSendMessageRequestIsSet(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 SEND_MESSAGE_BATCH_REQUEST_FIELD_DESC = new libthrift091.protocol.TField("sendMessageBatchRequest", libthrift091.protocol.TType.STRUCT, (short)1);

    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 SendMessageBatchRequest sendMessageBatchRequest; // required

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

      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: // SEND_MESSAGE_BATCH_REQUEST
            return SEND_MESSAGE_BATCH_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.SEND_MESSAGE_BATCH_REQUEST, new libthrift091.meta_data.FieldMetaData("sendMessageBatchRequest", libthrift091.TFieldRequirementType.DEFAULT, 
          new libthrift091.meta_data.StructMetaData(libthrift091.protocol.TType.STRUCT, SendMessageBatchRequest.class)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(sendMessageBatch_args.class, metaDataMap);
    }

    public sendMessageBatch_args() {
    }

    public sendMessageBatch_args(
      SendMessageBatchRequest sendMessageBatchRequest)
    {
      this();
      this.sendMessageBatchRequest = sendMessageBatchRequest;
    }

    /**
     * Performs a deep copy on other.
     */
    public sendMessageBatch_args(sendMessageBatch_args other) {
      if (other.isSetSendMessageBatchRequest()) {
        this.sendMessageBatchRequest = new SendMessageBatchRequest(other.sendMessageBatchRequest);
      }
    }

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

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

    public SendMessageBatchRequest getSendMessageBatchRequest() {
      return this.sendMessageBatchRequest;
    }

    public sendMessageBatch_args setSendMessageBatchRequest(SendMessageBatchRequest sendMessageBatchRequest) {
      this.sendMessageBatchRequest = sendMessageBatchRequest;
      return this;
    }

    public void unsetSendMessageBatchRequest() {
      this.sendMessageBatchRequest = null;
    }

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

    public void setSendMessageBatchRequestIsSet(boolean value) {
      if (!value) {
        this.sendMessageBatchRequest = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SEND_MESSAGE_BATCH_REQUEST:
        if (value == null) {
          unsetSendMessageBatchRequest();
        } else {
          setSendMessageBatchRequest((SendMessageBatchRequest)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SEND_MESSAGE_BATCH_REQUEST:
        return getSendMessageBatchRequest();

      }
      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 SEND_MESSAGE_BATCH_REQUEST:
        return isSetSendMessageBatchRequest();
      }
      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_sendMessageBatchRequest = true && this.isSetSendMessageBatchRequest();
      boolean that_present_sendMessageBatchRequest = true && that.isSetSendMessageBatchRequest();
      if (this_present_sendMessageBatchRequest || that_present_sendMessageBatchRequest) {
        if (!(this_present_sendMessageBatchRequest && that_present_sendMessageBatchRequest))
          return false;
        if (!this.sendMessageBatchRequest.equals(that.sendMessageBatchRequest))
          return false;
      }

      return true;
    }

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

      boolean present_sendMessageBatchRequest = true && (isSetSendMessageBatchRequest());
      list.add(present_sendMessageBatchRequest);
      if (present_sendMessageBatchRequest)
        list.add(sendMessageBatchRequest);

      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(isSetSendMessageBatchRequest()).compareTo(other.isSetSendMessageBatchRequest());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSendMessageBatchRequest()) {
        lastComparison = libthrift091.TBaseHelper.compareTo(this.sendMessageBatchRequest, other.sendMessageBatchRequest);
        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("sendMessageBatchRequest:");
      if (this.sendMessageBatchRequest == null) {
        sb.append("null");
      } else {
        sb.append(this.sendMessageBatchRequest);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws libthrift091.TException {
      // check for required fields
      // check for sub-struct validity
      if (sendMessageBatchRequest != null) {
        sendMessageBatchRequest.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 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: // SEND_MESSAGE_BATCH_REQUEST
              if (schemeField.type == libthrift091.protocol.TType.STRUCT) {
                struct.sendMessageBatchRequest = new SendMessageBatchRequest();
                struct.sendMessageBatchRequest.read(iprot);
                struct.setSendMessageBatchRequestIsSet(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.sendMessageBatchRequest != null) {
          oprot.writeFieldBegin(SEND_MESSAGE_BATCH_REQUEST_FIELD_DESC);
          struct.sendMessageBatchRequest.write(oprot);
          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.isSetSendMessageBatchRequest()) {
          optionals.set(0);
        }
        oprot.writeBitSet(optionals, 1);
        if (struct.isSetSendMessageBatchRequest()) {
          struct.sendMessageBatchRequest.write(oprot);
        }
      }

      @Override
      public void read(libthrift091.protocol.TProtocol prot, sendMessageBatch_args struct) throws libthrift091.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(1);
        if (incoming.get(0)) {
          struct.sendMessageBatchRequest = new SendMessageBatchRequest();
          struct.sendMessageBatchRequest.read(iprot);
          struct.setSendMessageBatchRequestIsSet(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.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 sendMessageBatch_resultStandardSchemeFactory());
      schemes.put(TupleScheme.class, new sendMessageBatch_resultTupleSchemeFactory());
    }

    public SendMessageBatchResponse 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, SendMessageBatchResponse.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(
      SendMessageBatchResponse 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()) {
        this.success = new SendMessageBatchResponse(other.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 SendMessageBatchResponse getSuccess() {
      return this.success;
    }

    public sendMessageBatch_result setSuccess(SendMessageBatchResponse 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((SendMessageBatchResponse)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
      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 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.STRUCT) {
                struct.success = new SendMessageBatchResponse();
                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, sendMessageBatch_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 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()) {
          struct.success.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)) {
          struct.success = new SendMessageBatchResponse();
          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 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 RECEIVE_MESSAGE_REQUEST_FIELD_DESC = new libthrift091.protocol.TField("receiveMessageRequest", libthrift091.protocol.TType.STRUCT, (short)1);

    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 ReceiveMessageRequest receiveMessageRequest; // required

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

      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: // RECEIVE_MESSAGE_REQUEST
            return RECEIVE_MESSAGE_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.RECEIVE_MESSAGE_REQUEST, new libthrift091.meta_data.FieldMetaData("receiveMessageRequest", 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(
      ReceiveMessageRequest receiveMessageRequest)
    {
      this();
      this.receiveMessageRequest = receiveMessageRequest;
    }

    /**
     * Performs a deep copy on other.
     */
    public receiveMessage_args(receiveMessage_args other) {
      if (other.isSetReceiveMessageRequest()) {
        this.receiveMessageRequest = new ReceiveMessageRequest(other.receiveMessageRequest);
      }
    }

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

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

    public ReceiveMessageRequest getReceiveMessageRequest() {
      return this.receiveMessageRequest;
    }

    public receiveMessage_args setReceiveMessageRequest(ReceiveMessageRequest receiveMessageRequest) {
      this.receiveMessageRequest = receiveMessageRequest;
      return this;
    }

    public void unsetReceiveMessageRequest() {
      this.receiveMessageRequest = null;
    }

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

    public void setReceiveMessageRequestIsSet(boolean value) {
      if (!value) {
        this.receiveMessageRequest = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case RECEIVE_MESSAGE_REQUEST:
        if (value == null) {
          unsetReceiveMessageRequest();
        } else {
          setReceiveMessageRequest((ReceiveMessageRequest)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case RECEIVE_MESSAGE_REQUEST:
        return getReceiveMessageRequest();

      }
      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 RECEIVE_MESSAGE_REQUEST:
        return isSetReceiveMessageRequest();
      }
      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_receiveMessageRequest = true && this.isSetReceiveMessageRequest();
      boolean that_present_receiveMessageRequest = true && that.isSetReceiveMessageRequest();
      if (this_present_receiveMessageRequest || that_present_receiveMessageRequest) {
        if (!(this_present_receiveMessageRequest && that_present_receiveMessageRequest))
          return false;
        if (!this.receiveMessageRequest.equals(that.receiveMessageRequest))
          return false;
      }

      return true;
    }

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

      boolean present_receiveMessageRequest = true && (isSetReceiveMessageRequest());
      list.add(present_receiveMessageRequest);
      if (present_receiveMessageRequest)
        list.add(receiveMessageRequest);

      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(isSetReceiveMessageRequest()).compareTo(other.isSetReceiveMessageRequest());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetReceiveMessageRequest()) {
        lastComparison = libthrift091.TBaseHelper.compareTo(this.receiveMessageRequest, other.receiveMessageRequest);
        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("receiveMessageRequest:");
      if (this.receiveMessageRequest == null) {
        sb.append("null");
      } else {
        sb.append(this.receiveMessageRequest);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws libthrift091.TException {
      // check for required fields
      // check for sub-struct validity
      if (receiveMessageRequest != null) {
        receiveMessageRequest.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: // RECEIVE_MESSAGE_REQUEST
              if (schemeField.type == libthrift091.protocol.TType.STRUCT) {
                struct.receiveMessageRequest = new ReceiveMessageRequest();
                struct.receiveMessageRequest.read(iprot);
                struct.setReceiveMessageRequestIsSet(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.receiveMessageRequest != null) {
          oprot.writeFieldBegin(RECEIVE_MESSAGE_REQUEST_FIELD_DESC);
          struct.receiveMessageRequest.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.isSetReceiveMessageRequest()) {
          optionals.set(0);
        }
        oprot.writeBitSet(optionals, 1);
        if (struct.isSetReceiveMessageRequest()) {
          struct.receiveMessageRequest.write(oprot);
        }
      }

      @Override
      public void read(libthrift091.protocol.TProtocol prot, receiveMessage_args struct) throws libthrift091.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(1);
        if (incoming.get(0)) {
          struct.receiveMessageRequest = new ReceiveMessageRequest();
          struct.receiveMessageRequest.read(iprot);
          struct.setReceiveMessageRequestIsSet(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 _list188 = iprot.readListBegin();
                  struct.success = new ArrayList(_list188.size);
                  ReceiveMessageResponse _elem189;
                  for (int _i190 = 0; _i190 < _list188.size; ++_i190)
                  {
                    _elem189 = new ReceiveMessageResponse();
                    _elem189.read(iprot);
                    struct.success.add(_elem189);
                  }
                  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 _iter191 : struct.success)
            {
              _iter191.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 _iter192 : struct.success)
            {
              _iter192.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 _list193 = new libthrift091.protocol.TList(libthrift091.protocol.TType.STRUCT, iprot.readI32());
            struct.success = new ArrayList(_list193.size);
            ReceiveMessageResponse _elem194;
            for (int _i195 = 0; _i195 < _list193.size; ++_i195)
            {
              _elem194 = new ReceiveMessageResponse();
              _elem194.read(iprot);
              struct.success.add(_elem194);
            }
          }
          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 CHANGE_MESSAGE_VISIBILITY_REQUEST_FIELD_DESC = new libthrift091.protocol.TField("changeMessageVisibilityRequest", libthrift091.protocol.TType.STRUCT, (short)1);

    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 ChangeMessageVisibilityRequest changeMessageVisibilityRequest; // required

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

      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: // CHANGE_MESSAGE_VISIBILITY_REQUEST
            return CHANGE_MESSAGE_VISIBILITY_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.CHANGE_MESSAGE_VISIBILITY_REQUEST, new libthrift091.meta_data.FieldMetaData("changeMessageVisibilityRequest", 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(
      ChangeMessageVisibilityRequest changeMessageVisibilityRequest)
    {
      this();
      this.changeMessageVisibilityRequest = changeMessageVisibilityRequest;
    }

    /**
     * Performs a deep copy on other.
     */
    public changeMessageVisibilitySeconds_args(changeMessageVisibilitySeconds_args other) {
      if (other.isSetChangeMessageVisibilityRequest()) {
        this.changeMessageVisibilityRequest = new ChangeMessageVisibilityRequest(other.changeMessageVisibilityRequest);
      }
    }

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

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

    public ChangeMessageVisibilityRequest getChangeMessageVisibilityRequest() {
      return this.changeMessageVisibilityRequest;
    }

    public changeMessageVisibilitySeconds_args setChangeMessageVisibilityRequest(ChangeMessageVisibilityRequest changeMessageVisibilityRequest) {
      this.changeMessageVisibilityRequest = changeMessageVisibilityRequest;
      return this;
    }

    public void unsetChangeMessageVisibilityRequest() {
      this.changeMessageVisibilityRequest = null;
    }

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

    public void setChangeMessageVisibilityRequestIsSet(boolean value) {
      if (!value) {
        this.changeMessageVisibilityRequest = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case CHANGE_MESSAGE_VISIBILITY_REQUEST:
        if (value == null) {
          unsetChangeMessageVisibilityRequest();
        } else {
          setChangeMessageVisibilityRequest((ChangeMessageVisibilityRequest)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case CHANGE_MESSAGE_VISIBILITY_REQUEST:
        return getChangeMessageVisibilityRequest();

      }
      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 CHANGE_MESSAGE_VISIBILITY_REQUEST:
        return isSetChangeMessageVisibilityRequest();
      }
      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_changeMessageVisibilityRequest = true && this.isSetChangeMessageVisibilityRequest();
      boolean that_present_changeMessageVisibilityRequest = true && that.isSetChangeMessageVisibilityRequest();
      if (this_present_changeMessageVisibilityRequest || that_present_changeMessageVisibilityRequest) {
        if (!(this_present_changeMessageVisibilityRequest && that_present_changeMessageVisibilityRequest))
          return false;
        if (!this.changeMessageVisibilityRequest.equals(that.changeMessageVisibilityRequest))
          return false;
      }

      return true;
    }

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

      boolean present_changeMessageVisibilityRequest = true && (isSetChangeMessageVisibilityRequest());
      list.add(present_changeMessageVisibilityRequest);
      if (present_changeMessageVisibilityRequest)
        list.add(changeMessageVisibilityRequest);

      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(isSetChangeMessageVisibilityRequest()).compareTo(other.isSetChangeMessageVisibilityRequest());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetChangeMessageVisibilityRequest()) {
        lastComparison = libthrift091.TBaseHelper.compareTo(this.changeMessageVisibilityRequest, other.changeMessageVisibilityRequest);
        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("changeMessageVisibilityRequest:");
      if (this.changeMessageVisibilityRequest == null) {
        sb.append("null");
      } else {
        sb.append(this.changeMessageVisibilityRequest);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws libthrift091.TException {
      // check for required fields
      // check for sub-struct validity
      if (changeMessageVisibilityRequest != null) {
        changeMessageVisibilityRequest.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: // CHANGE_MESSAGE_VISIBILITY_REQUEST
              if (schemeField.type == libthrift091.protocol.TType.STRUCT) {
                struct.changeMessageVisibilityRequest = new ChangeMessageVisibilityRequest();
                struct.changeMessageVisibilityRequest.read(iprot);
                struct.setChangeMessageVisibilityRequestIsSet(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.changeMessageVisibilityRequest != null) {
          oprot.writeFieldBegin(CHANGE_MESSAGE_VISIBILITY_REQUEST_FIELD_DESC);
          struct.changeMessageVisibilityRequest.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.isSetChangeMessageVisibilityRequest()) {
          optionals.set(0);
        }
        oprot.writeBitSet(optionals, 1);
        if (struct.isSetChangeMessageVisibilityRequest()) {
          struct.changeMessageVisibilityRequest.write(oprot);
        }
      }

      @Override
      public void read(libthrift091.protocol.TProtocol prot, changeMessageVisibilitySeconds_args struct) throws libthrift091.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(1);
        if (incoming.get(0)) {
          struct.changeMessageVisibilityRequest = new ChangeMessageVisibilityRequest();
          struct.changeMessageVisibilityRequest.read(iprot);
          struct.setChangeMessageVisibilityRequestIsSet(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 CHANGE_MESSAGE_VISIBILITY_BATCH_REQUEST_FIELD_DESC = new libthrift091.protocol.TField("changeMessageVisibilityBatchRequest", libthrift091.protocol.TType.STRUCT, (short)1);

    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 ChangeMessageVisibilityBatchRequest changeMessageVisibilityBatchRequest; // required

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

      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: // CHANGE_MESSAGE_VISIBILITY_BATCH_REQUEST
            return CHANGE_MESSAGE_VISIBILITY_BATCH_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.CHANGE_MESSAGE_VISIBILITY_BATCH_REQUEST, new libthrift091.meta_data.FieldMetaData("changeMessageVisibilityBatchRequest", libthrift091.TFieldRequirementType.DEFAULT, 
          new libthrift091.meta_data.StructMetaData(libthrift091.protocol.TType.STRUCT, ChangeMessageVisibilityBatchRequest.class)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(changeMessageVisibilitySecondsBatch_args.class, metaDataMap);
    }

    public changeMessageVisibilitySecondsBatch_args() {
    }

    public changeMessageVisibilitySecondsBatch_args(
      ChangeMessageVisibilityBatchRequest changeMessageVisibilityBatchRequest)
    {
      this();
      this.changeMessageVisibilityBatchRequest = changeMessageVisibilityBatchRequest;
    }

    /**
     * Performs a deep copy on other.
     */
    public changeMessageVisibilitySecondsBatch_args(changeMessageVisibilitySecondsBatch_args other) {
      if (other.isSetChangeMessageVisibilityBatchRequest()) {
        this.changeMessageVisibilityBatchRequest = new ChangeMessageVisibilityBatchRequest(other.changeMessageVisibilityBatchRequest);
      }
    }

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

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

    public ChangeMessageVisibilityBatchRequest getChangeMessageVisibilityBatchRequest() {
      return this.changeMessageVisibilityBatchRequest;
    }

    public changeMessageVisibilitySecondsBatch_args setChangeMessageVisibilityBatchRequest(ChangeMessageVisibilityBatchRequest changeMessageVisibilityBatchRequest) {
      this.changeMessageVisibilityBatchRequest = changeMessageVisibilityBatchRequest;
      return this;
    }

    public void unsetChangeMessageVisibilityBatchRequest() {
      this.changeMessageVisibilityBatchRequest = null;
    }

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

    public void setChangeMessageVisibilityBatchRequestIsSet(boolean value) {
      if (!value) {
        this.changeMessageVisibilityBatchRequest = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case CHANGE_MESSAGE_VISIBILITY_BATCH_REQUEST:
        if (value == null) {
          unsetChangeMessageVisibilityBatchRequest();
        } else {
          setChangeMessageVisibilityBatchRequest((ChangeMessageVisibilityBatchRequest)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case CHANGE_MESSAGE_VISIBILITY_BATCH_REQUEST:
        return getChangeMessageVisibilityBatchRequest();

      }
      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 CHANGE_MESSAGE_VISIBILITY_BATCH_REQUEST:
        return isSetChangeMessageVisibilityBatchRequest();
      }
      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_changeMessageVisibilityBatchRequest = true && this.isSetChangeMessageVisibilityBatchRequest();
      boolean that_present_changeMessageVisibilityBatchRequest = true && that.isSetChangeMessageVisibilityBatchRequest();
      if (this_present_changeMessageVisibilityBatchRequest || that_present_changeMessageVisibilityBatchRequest) {
        if (!(this_present_changeMessageVisibilityBatchRequest && that_present_changeMessageVisibilityBatchRequest))
          return false;
        if (!this.changeMessageVisibilityBatchRequest.equals(that.changeMessageVisibilityBatchRequest))
          return false;
      }

      return true;
    }

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

      boolean present_changeMessageVisibilityBatchRequest = true && (isSetChangeMessageVisibilityBatchRequest());
      list.add(present_changeMessageVisibilityBatchRequest);
      if (present_changeMessageVisibilityBatchRequest)
        list.add(changeMessageVisibilityBatchRequest);

      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(isSetChangeMessageVisibilityBatchRequest()).compareTo(other.isSetChangeMessageVisibilityBatchRequest());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetChangeMessageVisibilityBatchRequest()) {
        lastComparison = libthrift091.TBaseHelper.compareTo(this.changeMessageVisibilityBatchRequest, other.changeMessageVisibilityBatchRequest);
        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("changeMessageVisibilityBatchRequest:");
      if (this.changeMessageVisibilityBatchRequest == null) {
        sb.append("null");
      } else {
        sb.append(this.changeMessageVisibilityBatchRequest);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws libthrift091.TException {
      // check for required fields
      // check for sub-struct validity
      if (changeMessageVisibilityBatchRequest != null) {
        changeMessageVisibilityBatchRequest.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 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: // CHANGE_MESSAGE_VISIBILITY_BATCH_REQUEST
              if (schemeField.type == libthrift091.protocol.TType.STRUCT) {
                struct.changeMessageVisibilityBatchRequest = new ChangeMessageVisibilityBatchRequest();
                struct.changeMessageVisibilityBatchRequest.read(iprot);
                struct.setChangeMessageVisibilityBatchRequestIsSet(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.changeMessageVisibilityBatchRequest != null) {
          oprot.writeFieldBegin(CHANGE_MESSAGE_VISIBILITY_BATCH_REQUEST_FIELD_DESC);
          struct.changeMessageVisibilityBatchRequest.write(oprot);
          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.isSetChangeMessageVisibilityBatchRequest()) {
          optionals.set(0);
        }
        oprot.writeBitSet(optionals, 1);
        if (struct.isSetChangeMessageVisibilityBatchRequest()) {
          struct.changeMessageVisibilityBatchRequest.write(oprot);
        }
      }

      @Override
      public void read(libthrift091.protocol.TProtocol prot, changeMessageVisibilitySecondsBatch_args struct) throws libthrift091.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(1);
        if (incoming.get(0)) {
          struct.changeMessageVisibilityBatchRequest = new ChangeMessageVisibilityBatchRequest();
          struct.changeMessageVisibilityBatchRequest.read(iprot);
          struct.setChangeMessageVisibilityBatchRequestIsSet(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 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 changeMessageVisibilitySecondsBatch_resultStandardSchemeFactory());
      schemes.put(TupleScheme.class, new changeMessageVisibilitySecondsBatch_resultTupleSchemeFactory());
    }

    public ChangeMessageVisibilityBatchResponse 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, ChangeMessageVisibilityBatchResponse.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(
      ChangeMessageVisibilityBatchResponse success,
      com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException e)
    {
      this();
      this.success = success;
      this.e = e;
    }

    /**
     * Performs a deep copy on other.
     */
    public changeMessageVisibilitySecondsBatch_result(changeMessageVisibilitySecondsBatch_result other) {
      if (other.isSetSuccess()) {
        this.success = new ChangeMessageVisibilityBatchResponse(other.success);
      }
      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.success = null;
      this.e = null;
    }

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

    public changeMessageVisibilitySecondsBatch_result setSuccess(ChangeMessageVisibilityBatchResponse 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 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 SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((ChangeMessageVisibilityBatchResponse)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 changeMessageVisibilitySecondsBatch_result)
        return this.equals((changeMessageVisibilitySecondsBatch_result)that);
      return false;
    }

    public boolean equals(changeMessageVisibilitySecondsBatch_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(changeMessageVisibilitySecondsBatch_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("changeMessageVisibilitySecondsBatch_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 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 0: // SUCCESS
              if (schemeField.type == libthrift091.protocol.TType.STRUCT) {
                struct.success = new ChangeMessageVisibilityBatchResponse();
                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, changeMessageVisibilitySecondsBatch_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 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.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, changeMessageVisibilitySecondsBatch_result struct) throws libthrift091.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(2);
        if (incoming.get(0)) {
          struct.success = new ChangeMessageVisibilityBatchResponse();
          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 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 DELETE_MESSAGE_REQUEST_FIELD_DESC = new libthrift091.protocol.TField("deleteMessageRequest", libthrift091.protocol.TType.STRUCT, (short)1);

    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 DeleteMessageRequest deleteMessageRequest; // required

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

      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: // DELETE_MESSAGE_REQUEST
            return DELETE_MESSAGE_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.DELETE_MESSAGE_REQUEST, new libthrift091.meta_data.FieldMetaData("deleteMessageRequest", 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(
      DeleteMessageRequest deleteMessageRequest)
    {
      this();
      this.deleteMessageRequest = deleteMessageRequest;
    }

    /**
     * Performs a deep copy on other.
     */
    public deleteMessage_args(deleteMessage_args other) {
      if (other.isSetDeleteMessageRequest()) {
        this.deleteMessageRequest = new DeleteMessageRequest(other.deleteMessageRequest);
      }
    }

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

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

    public DeleteMessageRequest getDeleteMessageRequest() {
      return this.deleteMessageRequest;
    }

    public deleteMessage_args setDeleteMessageRequest(DeleteMessageRequest deleteMessageRequest) {
      this.deleteMessageRequest = deleteMessageRequest;
      return this;
    }

    public void unsetDeleteMessageRequest() {
      this.deleteMessageRequest = null;
    }

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

    public void setDeleteMessageRequestIsSet(boolean value) {
      if (!value) {
        this.deleteMessageRequest = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case DELETE_MESSAGE_REQUEST:
        if (value == null) {
          unsetDeleteMessageRequest();
        } else {
          setDeleteMessageRequest((DeleteMessageRequest)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case DELETE_MESSAGE_REQUEST:
        return getDeleteMessageRequest();

      }
      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 DELETE_MESSAGE_REQUEST:
        return isSetDeleteMessageRequest();
      }
      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_deleteMessageRequest = true && this.isSetDeleteMessageRequest();
      boolean that_present_deleteMessageRequest = true && that.isSetDeleteMessageRequest();
      if (this_present_deleteMessageRequest || that_present_deleteMessageRequest) {
        if (!(this_present_deleteMessageRequest && that_present_deleteMessageRequest))
          return false;
        if (!this.deleteMessageRequest.equals(that.deleteMessageRequest))
          return false;
      }

      return true;
    }

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

      boolean present_deleteMessageRequest = true && (isSetDeleteMessageRequest());
      list.add(present_deleteMessageRequest);
      if (present_deleteMessageRequest)
        list.add(deleteMessageRequest);

      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(isSetDeleteMessageRequest()).compareTo(other.isSetDeleteMessageRequest());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetDeleteMessageRequest()) {
        lastComparison = libthrift091.TBaseHelper.compareTo(this.deleteMessageRequest, other.deleteMessageRequest);
        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("deleteMessageRequest:");
      if (this.deleteMessageRequest == null) {
        sb.append("null");
      } else {
        sb.append(this.deleteMessageRequest);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws libthrift091.TException {
      // check for required fields
      // check for sub-struct validity
      if (deleteMessageRequest != null) {
        deleteMessageRequest.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: // DELETE_MESSAGE_REQUEST
              if (schemeField.type == libthrift091.protocol.TType.STRUCT) {
                struct.deleteMessageRequest = new DeleteMessageRequest();
                struct.deleteMessageRequest.read(iprot);
                struct.setDeleteMessageRequestIsSet(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.deleteMessageRequest != null) {
          oprot.writeFieldBegin(DELETE_MESSAGE_REQUEST_FIELD_DESC);
          struct.deleteMessageRequest.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.isSetDeleteMessageRequest()) {
          optionals.set(0);
        }
        oprot.writeBitSet(optionals, 1);
        if (struct.isSetDeleteMessageRequest()) {
          struct.deleteMessageRequest.write(oprot);
        }
      }

      @Override
      public void read(libthrift091.protocol.TProtocol prot, deleteMessage_args struct) throws libthrift091.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(1);
        if (incoming.get(0)) {
          struct.deleteMessageRequest = new DeleteMessageRequest();
          struct.deleteMessageRequest.read(iprot);
          struct.setDeleteMessageRequestIsSet(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 DELETE_MESSAGE_BATCH_REQUEST_FIELD_DESC = new libthrift091.protocol.TField("deleteMessageBatchRequest", libthrift091.protocol.TType.STRUCT, (short)1);

    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 DeleteMessageBatchRequest deleteMessageBatchRequest; // required

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

      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: // DELETE_MESSAGE_BATCH_REQUEST
            return DELETE_MESSAGE_BATCH_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.DELETE_MESSAGE_BATCH_REQUEST, new libthrift091.meta_data.FieldMetaData("deleteMessageBatchRequest", libthrift091.TFieldRequirementType.DEFAULT, 
          new libthrift091.meta_data.StructMetaData(libthrift091.protocol.TType.STRUCT, DeleteMessageBatchRequest.class)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(deleteMessageBatch_args.class, metaDataMap);
    }

    public deleteMessageBatch_args() {
    }

    public deleteMessageBatch_args(
      DeleteMessageBatchRequest deleteMessageBatchRequest)
    {
      this();
      this.deleteMessageBatchRequest = deleteMessageBatchRequest;
    }

    /**
     * Performs a deep copy on other.
     */
    public deleteMessageBatch_args(deleteMessageBatch_args other) {
      if (other.isSetDeleteMessageBatchRequest()) {
        this.deleteMessageBatchRequest = new DeleteMessageBatchRequest(other.deleteMessageBatchRequest);
      }
    }

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

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

    public DeleteMessageBatchRequest getDeleteMessageBatchRequest() {
      return this.deleteMessageBatchRequest;
    }

    public deleteMessageBatch_args setDeleteMessageBatchRequest(DeleteMessageBatchRequest deleteMessageBatchRequest) {
      this.deleteMessageBatchRequest = deleteMessageBatchRequest;
      return this;
    }

    public void unsetDeleteMessageBatchRequest() {
      this.deleteMessageBatchRequest = null;
    }

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

    public void setDeleteMessageBatchRequestIsSet(boolean value) {
      if (!value) {
        this.deleteMessageBatchRequest = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case DELETE_MESSAGE_BATCH_REQUEST:
        if (value == null) {
          unsetDeleteMessageBatchRequest();
        } else {
          setDeleteMessageBatchRequest((DeleteMessageBatchRequest)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case DELETE_MESSAGE_BATCH_REQUEST:
        return getDeleteMessageBatchRequest();

      }
      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 DELETE_MESSAGE_BATCH_REQUEST:
        return isSetDeleteMessageBatchRequest();
      }
      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_deleteMessageBatchRequest = true && this.isSetDeleteMessageBatchRequest();
      boolean that_present_deleteMessageBatchRequest = true && that.isSetDeleteMessageBatchRequest();
      if (this_present_deleteMessageBatchRequest || that_present_deleteMessageBatchRequest) {
        if (!(this_present_deleteMessageBatchRequest && that_present_deleteMessageBatchRequest))
          return false;
        if (!this.deleteMessageBatchRequest.equals(that.deleteMessageBatchRequest))
          return false;
      }

      return true;
    }

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

      boolean present_deleteMessageBatchRequest = true && (isSetDeleteMessageBatchRequest());
      list.add(present_deleteMessageBatchRequest);
      if (present_deleteMessageBatchRequest)
        list.add(deleteMessageBatchRequest);

      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(isSetDeleteMessageBatchRequest()).compareTo(other.isSetDeleteMessageBatchRequest());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetDeleteMessageBatchRequest()) {
        lastComparison = libthrift091.TBaseHelper.compareTo(this.deleteMessageBatchRequest, other.deleteMessageBatchRequest);
        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("deleteMessageBatchRequest:");
      if (this.deleteMessageBatchRequest == null) {
        sb.append("null");
      } else {
        sb.append(this.deleteMessageBatchRequest);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws libthrift091.TException {
      // check for required fields
      // check for sub-struct validity
      if (deleteMessageBatchRequest != null) {
        deleteMessageBatchRequest.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 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: // DELETE_MESSAGE_BATCH_REQUEST
              if (schemeField.type == libthrift091.protocol.TType.STRUCT) {
                struct.deleteMessageBatchRequest = new DeleteMessageBatchRequest();
                struct.deleteMessageBatchRequest.read(iprot);
                struct.setDeleteMessageBatchRequestIsSet(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.deleteMessageBatchRequest != null) {
          oprot.writeFieldBegin(DELETE_MESSAGE_BATCH_REQUEST_FIELD_DESC);
          struct.deleteMessageBatchRequest.write(oprot);
          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.isSetDeleteMessageBatchRequest()) {
          optionals.set(0);
        }
        oprot.writeBitSet(optionals, 1);
        if (struct.isSetDeleteMessageBatchRequest()) {
          struct.deleteMessageBatchRequest.write(oprot);
        }
      }

      @Override
      public void read(libthrift091.protocol.TProtocol prot, deleteMessageBatch_args struct) throws libthrift091.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(1);
        if (incoming.get(0)) {
          struct.deleteMessageBatchRequest = new DeleteMessageBatchRequest();
          struct.deleteMessageBatchRequest.read(iprot);
          struct.setDeleteMessageBatchRequestIsSet(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 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 deleteMessageBatch_resultStandardSchemeFactory());
      schemes.put(TupleScheme.class, new deleteMessageBatch_resultTupleSchemeFactory());
    }

    public DeleteMessageBatchResponse 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, DeleteMessageBatchResponse.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(
      DeleteMessageBatchResponse success,
      com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException e)
    {
      this();
      this.success = success;
      this.e = e;
    }

    /**
     * Performs a deep copy on other.
     */
    public deleteMessageBatch_result(deleteMessageBatch_result other) {
      if (other.isSetSuccess()) {
        this.success = new DeleteMessageBatchResponse(other.success);
      }
      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.success = null;
      this.e = null;
    }

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

    public deleteMessageBatch_result setSuccess(DeleteMessageBatchResponse 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 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 SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((DeleteMessageBatchResponse)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 deleteMessageBatch_result)
        return this.equals((deleteMessageBatch_result)that);
      return false;
    }

    public boolean equals(deleteMessageBatch_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(deleteMessageBatch_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("deleteMessageBatch_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 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 0: // SUCCESS
              if (schemeField.type == libthrift091.protocol.TType.STRUCT) {
                struct.success = new DeleteMessageBatchResponse();
                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, deleteMessageBatch_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 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.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, deleteMessageBatch_result struct) throws libthrift091.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(2);
        if (incoming.get(0)) {
          struct.success = new DeleteMessageBatchResponse();
          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 deadMessage_args implements libthrift091.TBase, java.io.Serializable, Cloneable, Comparable   {
    private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("deadMessage_args");

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

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

    public DeadMessageRequest deadMessageRequest; // required

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

      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: // DEAD_MESSAGE_REQUEST
            return DEAD_MESSAGE_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.DEAD_MESSAGE_REQUEST, new libthrift091.meta_data.FieldMetaData("deadMessageRequest", libthrift091.TFieldRequirementType.DEFAULT, 
          new libthrift091.meta_data.StructMetaData(libthrift091.protocol.TType.STRUCT, DeadMessageRequest.class)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(deadMessage_args.class, metaDataMap);
    }

    public deadMessage_args() {
    }

    public deadMessage_args(
      DeadMessageRequest deadMessageRequest)
    {
      this();
      this.deadMessageRequest = deadMessageRequest;
    }

    /**
     * Performs a deep copy on other.
     */
    public deadMessage_args(deadMessage_args other) {
      if (other.isSetDeadMessageRequest()) {
        this.deadMessageRequest = new DeadMessageRequest(other.deadMessageRequest);
      }
    }

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

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

    public DeadMessageRequest getDeadMessageRequest() {
      return this.deadMessageRequest;
    }

    public deadMessage_args setDeadMessageRequest(DeadMessageRequest deadMessageRequest) {
      this.deadMessageRequest = deadMessageRequest;
      return this;
    }

    public void unsetDeadMessageRequest() {
      this.deadMessageRequest = null;
    }

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

    public void setDeadMessageRequestIsSet(boolean value) {
      if (!value) {
        this.deadMessageRequest = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case DEAD_MESSAGE_REQUEST:
        if (value == null) {
          unsetDeadMessageRequest();
        } else {
          setDeadMessageRequest((DeadMessageRequest)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case DEAD_MESSAGE_REQUEST:
        return getDeadMessageRequest();

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

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

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

      boolean this_present_deadMessageRequest = true && this.isSetDeadMessageRequest();
      boolean that_present_deadMessageRequest = true && that.isSetDeadMessageRequest();
      if (this_present_deadMessageRequest || that_present_deadMessageRequest) {
        if (!(this_present_deadMessageRequest && that_present_deadMessageRequest))
          return false;
        if (!this.deadMessageRequest.equals(that.deadMessageRequest))
          return false;
      }

      return true;
    }

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

      boolean present_deadMessageRequest = true && (isSetDeadMessageRequest());
      list.add(present_deadMessageRequest);
      if (present_deadMessageRequest)
        list.add(deadMessageRequest);

      return list.hashCode();
    }

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

      int lastComparison = 0;

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

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

    public void validate() throws libthrift091.TException {
      // check for required fields
      // check for sub-struct validity
      if (deadMessageRequest != null) {
        deadMessageRequest.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 deadMessage_argsStandardSchemeFactory implements SchemeFactory {
      public deadMessage_argsStandardScheme getScheme() {
        return new deadMessage_argsStandardScheme();
      }
    }

    private static class deadMessage_argsStandardScheme extends StandardScheme {

      public void read(libthrift091.protocol.TProtocol iprot, deadMessage_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: // DEAD_MESSAGE_REQUEST
              if (schemeField.type == libthrift091.protocol.TType.STRUCT) {
                struct.deadMessageRequest = new DeadMessageRequest();
                struct.deadMessageRequest.read(iprot);
                struct.setDeadMessageRequestIsSet(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, deadMessage_args struct) throws libthrift091.TException {
        struct.validate();

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

    }

    private static class deadMessage_argsTupleSchemeFactory implements SchemeFactory {
      public deadMessage_argsTupleScheme getScheme() {
        return new deadMessage_argsTupleScheme();
      }
    }

    private static class deadMessage_argsTupleScheme extends TupleScheme {

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

      @Override
      public void read(libthrift091.protocol.TProtocol prot, deadMessage_args struct) throws libthrift091.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(1);
        if (incoming.get(0)) {
          struct.deadMessageRequest = new DeadMessageRequest();
          struct.deadMessageRequest.read(iprot);
          struct.setDeadMessageRequestIsSet(true);
        }
      }
    }

  }

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

    public deadMessage_result() {
    }

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

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

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

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

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

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

    public boolean equals(deadMessage_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(deadMessage_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("deadMessage_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 deadMessage_resultStandardSchemeFactory implements SchemeFactory {
      public deadMessage_resultStandardScheme getScheme() {
        return new deadMessage_resultStandardScheme();
      }
    }

    private static class deadMessage_resultStandardScheme extends StandardScheme {

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

    private static class deadMessage_resultTupleScheme extends TupleScheme {

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

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

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

    public DeadMessageBatchRequest deadMessageBatchRequest; // required

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

      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: // DEAD_MESSAGE_BATCH_REQUEST
            return DEAD_MESSAGE_BATCH_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.DEAD_MESSAGE_BATCH_REQUEST, new libthrift091.meta_data.FieldMetaData("deadMessageBatchRequest", libthrift091.TFieldRequirementType.DEFAULT, 
          new libthrift091.meta_data.StructMetaData(libthrift091.protocol.TType.STRUCT, DeadMessageBatchRequest.class)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(deadMessageBatch_args.class, metaDataMap);
    }

    public deadMessageBatch_args() {
    }

    public deadMessageBatch_args(
      DeadMessageBatchRequest deadMessageBatchRequest)
    {
      this();
      this.deadMessageBatchRequest = deadMessageBatchRequest;
    }

    /**
     * Performs a deep copy on other.
     */
    public deadMessageBatch_args(deadMessageBatch_args other) {
      if (other.isSetDeadMessageBatchRequest()) {
        this.deadMessageBatchRequest = new DeadMessageBatchRequest(other.deadMessageBatchRequest);
      }
    }

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

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

    public DeadMessageBatchRequest getDeadMessageBatchRequest() {
      return this.deadMessageBatchRequest;
    }

    public deadMessageBatch_args setDeadMessageBatchRequest(DeadMessageBatchRequest deadMessageBatchRequest) {
      this.deadMessageBatchRequest = deadMessageBatchRequest;
      return this;
    }

    public void unsetDeadMessageBatchRequest() {
      this.deadMessageBatchRequest = null;
    }

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

    public void setDeadMessageBatchRequestIsSet(boolean value) {
      if (!value) {
        this.deadMessageBatchRequest = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case DEAD_MESSAGE_BATCH_REQUEST:
        if (value == null) {
          unsetDeadMessageBatchRequest();
        } else {
          setDeadMessageBatchRequest((DeadMessageBatchRequest)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case DEAD_MESSAGE_BATCH_REQUEST:
        return getDeadMessageBatchRequest();

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

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

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

      boolean this_present_deadMessageBatchRequest = true && this.isSetDeadMessageBatchRequest();
      boolean that_present_deadMessageBatchRequest = true && that.isSetDeadMessageBatchRequest();
      if (this_present_deadMessageBatchRequest || that_present_deadMessageBatchRequest) {
        if (!(this_present_deadMessageBatchRequest && that_present_deadMessageBatchRequest))
          return false;
        if (!this.deadMessageBatchRequest.equals(that.deadMessageBatchRequest))
          return false;
      }

      return true;
    }

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

      boolean present_deadMessageBatchRequest = true && (isSetDeadMessageBatchRequest());
      list.add(present_deadMessageBatchRequest);
      if (present_deadMessageBatchRequest)
        list.add(deadMessageBatchRequest);

      return list.hashCode();
    }

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

      int lastComparison = 0;

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

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

    public void validate() throws libthrift091.TException {
      // check for required fields
      // check for sub-struct validity
      if (deadMessageBatchRequest != null) {
        deadMessageBatchRequest.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 deadMessageBatch_argsStandardSchemeFactory implements SchemeFactory {
      public deadMessageBatch_argsStandardScheme getScheme() {
        return new deadMessageBatch_argsStandardScheme();
      }
    }

    private static class deadMessageBatch_argsStandardScheme extends StandardScheme {

      public void read(libthrift091.protocol.TProtocol iprot, deadMessageBatch_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: // DEAD_MESSAGE_BATCH_REQUEST
              if (schemeField.type == libthrift091.protocol.TType.STRUCT) {
                struct.deadMessageBatchRequest = new DeadMessageBatchRequest();
                struct.deadMessageBatchRequest.read(iprot);
                struct.setDeadMessageBatchRequestIsSet(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, deadMessageBatch_args struct) throws libthrift091.TException {
        struct.validate();

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

    }

    private static class deadMessageBatch_argsTupleSchemeFactory implements SchemeFactory {
      public deadMessageBatch_argsTupleScheme getScheme() {
        return new deadMessageBatch_argsTupleScheme();
      }
    }

    private static class deadMessageBatch_argsTupleScheme extends TupleScheme {

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

      @Override
      public void read(libthrift091.protocol.TProtocol prot, deadMessageBatch_args struct) throws libthrift091.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(1);
        if (incoming.get(0)) {
          struct.deadMessageBatchRequest = new DeadMessageBatchRequest();
          struct.deadMessageBatchRequest.read(iprot);
          struct.setDeadMessageBatchRequestIsSet(true);
        }
      }
    }

  }

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

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

    public deadMessageBatch_result() {
    }

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

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

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

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

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

    public deadMessageBatch_result setSuccess(DeadMessageBatchResponse 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 deadMessageBatch_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((DeadMessageBatchResponse)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 deadMessageBatch_result)
        return this.equals((deadMessageBatch_result)that);
      return false;
    }

    public boolean equals(deadMessageBatch_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(deadMessageBatch_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("deadMessageBatch_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 deadMessageBatch_resultStandardSchemeFactory implements SchemeFactory {
      public deadMessageBatch_resultStandardScheme getScheme() {
        return new deadMessageBatch_resultStandardScheme();
      }
    }

    private static class deadMessageBatch_resultStandardScheme extends StandardScheme {

      public void read(libthrift091.protocol.TProtocol iprot, deadMessageBatch_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 DeadMessageBatchResponse();
                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, deadMessageBatch_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 deadMessageBatch_resultTupleSchemeFactory implements SchemeFactory {
      public deadMessageBatch_resultTupleScheme getScheme() {
        return new deadMessageBatch_resultTupleScheme();
      }
    }

    private static class deadMessageBatch_resultTupleScheme extends TupleScheme {

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

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

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

    public PeekMessageRequest peekMessageRequest; // required

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

      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: // PEEK_MESSAGE_REQUEST
            return PEEK_MESSAGE_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.PEEK_MESSAGE_REQUEST, new libthrift091.meta_data.FieldMetaData("peekMessageRequest", libthrift091.TFieldRequirementType.DEFAULT, 
          new libthrift091.meta_data.StructMetaData(libthrift091.protocol.TType.STRUCT, PeekMessageRequest.class)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(peekMessage_args.class, metaDataMap);
    }

    public peekMessage_args() {
    }

    public peekMessage_args(
      PeekMessageRequest peekMessageRequest)
    {
      this();
      this.peekMessageRequest = peekMessageRequest;
    }

    /**
     * Performs a deep copy on other.
     */
    public peekMessage_args(peekMessage_args other) {
      if (other.isSetPeekMessageRequest()) {
        this.peekMessageRequest = new PeekMessageRequest(other.peekMessageRequest);
      }
    }

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

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

    public PeekMessageRequest getPeekMessageRequest() {
      return this.peekMessageRequest;
    }

    public peekMessage_args setPeekMessageRequest(PeekMessageRequest peekMessageRequest) {
      this.peekMessageRequest = peekMessageRequest;
      return this;
    }

    public void unsetPeekMessageRequest() {
      this.peekMessageRequest = null;
    }

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

    public void setPeekMessageRequestIsSet(boolean value) {
      if (!value) {
        this.peekMessageRequest = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case PEEK_MESSAGE_REQUEST:
        if (value == null) {
          unsetPeekMessageRequest();
        } else {
          setPeekMessageRequest((PeekMessageRequest)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case PEEK_MESSAGE_REQUEST:
        return getPeekMessageRequest();

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

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

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

      boolean this_present_peekMessageRequest = true && this.isSetPeekMessageRequest();
      boolean that_present_peekMessageRequest = true && that.isSetPeekMessageRequest();
      if (this_present_peekMessageRequest || that_present_peekMessageRequest) {
        if (!(this_present_peekMessageRequest && that_present_peekMessageRequest))
          return false;
        if (!this.peekMessageRequest.equals(that.peekMessageRequest))
          return false;
      }

      return true;
    }

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

      boolean present_peekMessageRequest = true && (isSetPeekMessageRequest());
      list.add(present_peekMessageRequest);
      if (present_peekMessageRequest)
        list.add(peekMessageRequest);

      return list.hashCode();
    }

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

      int lastComparison = 0;

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

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

    public void validate() throws libthrift091.TException {
      // check for required fields
      // check for sub-struct validity
      if (peekMessageRequest != null) {
        peekMessageRequest.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 peekMessage_argsStandardSchemeFactory implements SchemeFactory {
      public peekMessage_argsStandardScheme getScheme() {
        return new peekMessage_argsStandardScheme();
      }
    }

    private static class peekMessage_argsStandardScheme extends StandardScheme {

      public void read(libthrift091.protocol.TProtocol iprot, peekMessage_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: // PEEK_MESSAGE_REQUEST
              if (schemeField.type == libthrift091.protocol.TType.STRUCT) {
                struct.peekMessageRequest = new PeekMessageRequest();
                struct.peekMessageRequest.read(iprot);
                struct.setPeekMessageRequestIsSet(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, peekMessage_args struct) throws libthrift091.TException {
        struct.validate();

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

    }

    private static class peekMessage_argsTupleSchemeFactory implements SchemeFactory {
      public peekMessage_argsTupleScheme getScheme() {
        return new peekMessage_argsTupleScheme();
      }
    }

    private static class peekMessage_argsTupleScheme extends TupleScheme {

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

      @Override
      public void read(libthrift091.protocol.TProtocol prot, peekMessage_args struct) throws libthrift091.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(1);
        if (incoming.get(0)) {
          struct.peekMessageRequest = new PeekMessageRequest();
          struct.peekMessageRequest.read(iprot);
          struct.setPeekMessageRequestIsSet(true);
        }
      }
    }

  }

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

    public peekMessage_result() {
    }

    public peekMessage_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 peekMessage_result(peekMessage_result other) {
      if (other.isSetSuccess()) {
        List __this__success = new ArrayList(other.success.size());
        for (PeekMessageResponse other_element : other.success) {
          __this__success.add(new PeekMessageResponse(other_element));
        }
        this.success = __this__success;
      }
      if (other.isSetE()) {
        this.e = new com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException(other.e);
      }
    }

    public peekMessage_result deepCopy() {
      return new peekMessage_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(PeekMessageResponse elem) {
      if (this.success == null) {
        this.success = new ArrayList();
      }
      this.success.add(elem);
    }

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

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

    public boolean equals(peekMessage_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(peekMessage_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("peekMessage_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 peekMessage_resultStandardSchemeFactory implements SchemeFactory {
      public peekMessage_resultStandardScheme getScheme() {
        return new peekMessage_resultStandardScheme();
      }
    }

    private static class peekMessage_resultStandardScheme extends StandardScheme {

      public void read(libthrift091.protocol.TProtocol iprot, peekMessage_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 _list196 = iprot.readListBegin();
                  struct.success = new ArrayList(_list196.size);
                  PeekMessageResponse _elem197;
                  for (int _i198 = 0; _i198 < _list196.size; ++_i198)
                  {
                    _elem197 = new PeekMessageResponse();
                    _elem197.read(iprot);
                    struct.success.add(_elem197);
                  }
                  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, peekMessage_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 (PeekMessageResponse _iter199 : struct.success)
            {
              _iter199.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 peekMessage_resultTupleSchemeFactory implements SchemeFactory {
      public peekMessage_resultTupleScheme getScheme() {
        return new peekMessage_resultTupleScheme();
      }
    }

    private static class peekMessage_resultTupleScheme extends TupleScheme {

      @Override
      public void write(libthrift091.protocol.TProtocol prot, peekMessage_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 (PeekMessageResponse _iter200 : struct.success)
            {
              _iter200.write(oprot);
            }
          }
        }
        if (struct.isSetE()) {
          struct.e.write(oprot);
        }
      }

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

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

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

    public DeletePeekMessageRequest deletePeekMessageRequest; // required

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

      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: // DELETE_PEEK_MESSAGE_REQUEST
            return DELETE_PEEK_MESSAGE_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.DELETE_PEEK_MESSAGE_REQUEST, new libthrift091.meta_data.FieldMetaData("deletePeekMessageRequest", libthrift091.TFieldRequirementType.DEFAULT, 
          new libthrift091.meta_data.StructMetaData(libthrift091.protocol.TType.STRUCT, DeletePeekMessageRequest.class)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(deletePeekMessage_args.class, metaDataMap);
    }

    public deletePeekMessage_args() {
    }

    public deletePeekMessage_args(
      DeletePeekMessageRequest deletePeekMessageRequest)
    {
      this();
      this.deletePeekMessageRequest = deletePeekMessageRequest;
    }

    /**
     * Performs a deep copy on other.
     */
    public deletePeekMessage_args(deletePeekMessage_args other) {
      if (other.isSetDeletePeekMessageRequest()) {
        this.deletePeekMessageRequest = new DeletePeekMessageRequest(other.deletePeekMessageRequest);
      }
    }

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

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

    public DeletePeekMessageRequest getDeletePeekMessageRequest() {
      return this.deletePeekMessageRequest;
    }

    public deletePeekMessage_args setDeletePeekMessageRequest(DeletePeekMessageRequest deletePeekMessageRequest) {
      this.deletePeekMessageRequest = deletePeekMessageRequest;
      return this;
    }

    public void unsetDeletePeekMessageRequest() {
      this.deletePeekMessageRequest = null;
    }

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

    public void setDeletePeekMessageRequestIsSet(boolean value) {
      if (!value) {
        this.deletePeekMessageRequest = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case DELETE_PEEK_MESSAGE_REQUEST:
        if (value == null) {
          unsetDeletePeekMessageRequest();
        } else {
          setDeletePeekMessageRequest((DeletePeekMessageRequest)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case DELETE_PEEK_MESSAGE_REQUEST:
        return getDeletePeekMessageRequest();

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

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

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

      boolean this_present_deletePeekMessageRequest = true && this.isSetDeletePeekMessageRequest();
      boolean that_present_deletePeekMessageRequest = true && that.isSetDeletePeekMessageRequest();
      if (this_present_deletePeekMessageRequest || that_present_deletePeekMessageRequest) {
        if (!(this_present_deletePeekMessageRequest && that_present_deletePeekMessageRequest))
          return false;
        if (!this.deletePeekMessageRequest.equals(that.deletePeekMessageRequest))
          return false;
      }

      return true;
    }

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

      boolean present_deletePeekMessageRequest = true && (isSetDeletePeekMessageRequest());
      list.add(present_deletePeekMessageRequest);
      if (present_deletePeekMessageRequest)
        list.add(deletePeekMessageRequest);

      return list.hashCode();
    }

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

      int lastComparison = 0;

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

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

    public void validate() throws libthrift091.TException {
      // check for required fields
      // check for sub-struct validity
      if (deletePeekMessageRequest != null) {
        deletePeekMessageRequest.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 deletePeekMessage_argsStandardSchemeFactory implements SchemeFactory {
      public deletePeekMessage_argsStandardScheme getScheme() {
        return new deletePeekMessage_argsStandardScheme();
      }
    }

    private static class deletePeekMessage_argsStandardScheme extends StandardScheme {

      public void read(libthrift091.protocol.TProtocol iprot, deletePeekMessage_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: // DELETE_PEEK_MESSAGE_REQUEST
              if (schemeField.type == libthrift091.protocol.TType.STRUCT) {
                struct.deletePeekMessageRequest = new DeletePeekMessageRequest();
                struct.deletePeekMessageRequest.read(iprot);
                struct.setDeletePeekMessageRequestIsSet(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, deletePeekMessage_args struct) throws libthrift091.TException {
        struct.validate();

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

    }

    private static class deletePeekMessage_argsTupleSchemeFactory implements SchemeFactory {
      public deletePeekMessage_argsTupleScheme getScheme() {
        return new deletePeekMessage_argsTupleScheme();
      }
    }

    private static class deletePeekMessage_argsTupleScheme extends TupleScheme {

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

      @Override
      public void read(libthrift091.protocol.TProtocol prot, deletePeekMessage_args struct) throws libthrift091.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(1);
        if (incoming.get(0)) {
          struct.deletePeekMessageRequest = new DeletePeekMessageRequest();
          struct.deletePeekMessageRequest.read(iprot);
          struct.setDeletePeekMessageRequestIsSet(true);
        }
      }
    }

  }

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

    public deletePeekMessage_result() {
    }

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

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

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

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

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

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

    public boolean equals(deletePeekMessage_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(deletePeekMessage_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("deletePeekMessage_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 deletePeekMessage_resultStandardSchemeFactory implements SchemeFactory {
      public deletePeekMessage_resultStandardScheme getScheme() {
        return new deletePeekMessage_resultStandardScheme();
      }
    }

    private static class deletePeekMessage_resultStandardScheme extends StandardScheme {

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

    private static class deletePeekMessage_resultTupleScheme extends TupleScheme {

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

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

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

    public DeletePeekMessageBatchRequest deletePeekMessageBatchRequest; // required

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

      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: // DELETE_PEEK_MESSAGE_BATCH_REQUEST
            return DELETE_PEEK_MESSAGE_BATCH_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.DELETE_PEEK_MESSAGE_BATCH_REQUEST, new libthrift091.meta_data.FieldMetaData("deletePeekMessageBatchRequest", libthrift091.TFieldRequirementType.DEFAULT, 
          new libthrift091.meta_data.StructMetaData(libthrift091.protocol.TType.STRUCT, DeletePeekMessageBatchRequest.class)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(deletePeekMessageBatch_args.class, metaDataMap);
    }

    public deletePeekMessageBatch_args() {
    }

    public deletePeekMessageBatch_args(
      DeletePeekMessageBatchRequest deletePeekMessageBatchRequest)
    {
      this();
      this.deletePeekMessageBatchRequest = deletePeekMessageBatchRequest;
    }

    /**
     * Performs a deep copy on other.
     */
    public deletePeekMessageBatch_args(deletePeekMessageBatch_args other) {
      if (other.isSetDeletePeekMessageBatchRequest()) {
        this.deletePeekMessageBatchRequest = new DeletePeekMessageBatchRequest(other.deletePeekMessageBatchRequest);
      }
    }

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

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

    public DeletePeekMessageBatchRequest getDeletePeekMessageBatchRequest() {
      return this.deletePeekMessageBatchRequest;
    }

    public deletePeekMessageBatch_args setDeletePeekMessageBatchRequest(DeletePeekMessageBatchRequest deletePeekMessageBatchRequest) {
      this.deletePeekMessageBatchRequest = deletePeekMessageBatchRequest;
      return this;
    }

    public void unsetDeletePeekMessageBatchRequest() {
      this.deletePeekMessageBatchRequest = null;
    }

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

    public void setDeletePeekMessageBatchRequestIsSet(boolean value) {
      if (!value) {
        this.deletePeekMessageBatchRequest = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case DELETE_PEEK_MESSAGE_BATCH_REQUEST:
        if (value == null) {
          unsetDeletePeekMessageBatchRequest();
        } else {
          setDeletePeekMessageBatchRequest((DeletePeekMessageBatchRequest)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case DELETE_PEEK_MESSAGE_BATCH_REQUEST:
        return getDeletePeekMessageBatchRequest();

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

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

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

      boolean this_present_deletePeekMessageBatchRequest = true && this.isSetDeletePeekMessageBatchRequest();
      boolean that_present_deletePeekMessageBatchRequest = true && that.isSetDeletePeekMessageBatchRequest();
      if (this_present_deletePeekMessageBatchRequest || that_present_deletePeekMessageBatchRequest) {
        if (!(this_present_deletePeekMessageBatchRequest && that_present_deletePeekMessageBatchRequest))
          return false;
        if (!this.deletePeekMessageBatchRequest.equals(that.deletePeekMessageBatchRequest))
          return false;
      }

      return true;
    }

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

      boolean present_deletePeekMessageBatchRequest = true && (isSetDeletePeekMessageBatchRequest());
      list.add(present_deletePeekMessageBatchRequest);
      if (present_deletePeekMessageBatchRequest)
        list.add(deletePeekMessageBatchRequest);

      return list.hashCode();
    }

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

      int lastComparison = 0;

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

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

    public void validate() throws libthrift091.TException {
      // check for required fields
      // check for sub-struct validity
      if (deletePeekMessageBatchRequest != null) {
        deletePeekMessageBatchRequest.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 deletePeekMessageBatch_argsStandardSchemeFactory implements SchemeFactory {
      public deletePeekMessageBatch_argsStandardScheme getScheme() {
        return new deletePeekMessageBatch_argsStandardScheme();
      }
    }

    private static class deletePeekMessageBatch_argsStandardScheme extends StandardScheme {

      public void read(libthrift091.protocol.TProtocol iprot, deletePeekMessageBatch_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: // DELETE_PEEK_MESSAGE_BATCH_REQUEST
              if (schemeField.type == libthrift091.protocol.TType.STRUCT) {
                struct.deletePeekMessageBatchRequest = new DeletePeekMessageBatchRequest();
                struct.deletePeekMessageBatchRequest.read(iprot);
                struct.setDeletePeekMessageBatchRequestIsSet(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, deletePeekMessageBatch_args struct) throws libthrift091.TException {
        struct.validate();

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

    }

    private static class deletePeekMessageBatch_argsTupleSchemeFactory implements SchemeFactory {
      public deletePeekMessageBatch_argsTupleScheme getScheme() {
        return new deletePeekMessageBatch_argsTupleScheme();
      }
    }

    private static class deletePeekMessageBatch_argsTupleScheme extends TupleScheme {

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

      @Override
      public void read(libthrift091.protocol.TProtocol prot, deletePeekMessageBatch_args struct) throws libthrift091.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(1);
        if (incoming.get(0)) {
          struct.deletePeekMessageBatchRequest = new DeletePeekMessageBatchRequest();
          struct.deletePeekMessageBatchRequest.read(iprot);
          struct.setDeletePeekMessageBatchRequestIsSet(true);
        }
      }
    }

  }

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

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

    public deletePeekMessageBatch_result() {
    }

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

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

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

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

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

    public deletePeekMessageBatch_result setSuccess(DeletePeekMessageBatchResponse 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 deletePeekMessageBatch_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((DeletePeekMessageBatchResponse)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 deletePeekMessageBatch_result)
        return this.equals((deletePeekMessageBatch_result)that);
      return false;
    }

    public boolean equals(deletePeekMessageBatch_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(deletePeekMessageBatch_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("deletePeekMessageBatch_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 deletePeekMessageBatch_resultStandardSchemeFactory implements SchemeFactory {
      public deletePeekMessageBatch_resultStandardScheme getScheme() {
        return new deletePeekMessageBatch_resultStandardScheme();
      }
    }

    private static class deletePeekMessageBatch_resultStandardScheme extends StandardScheme {

      public void read(libthrift091.protocol.TProtocol iprot, deletePeekMessageBatch_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 DeletePeekMessageBatchResponse();
                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, deletePeekMessageBatch_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 deletePeekMessageBatch_resultTupleSchemeFactory implements SchemeFactory {
      public deletePeekMessageBatch_resultTupleScheme getScheme() {
        return new deletePeekMessageBatch_resultTupleScheme();
      }
    }

    private static class deletePeekMessageBatch_resultTupleScheme extends TupleScheme {

      @Override
      public void write(libthrift091.protocol.TProtocol prot, deletePeekMessageBatch_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, deletePeekMessageBatch_result struct) throws libthrift091.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(2);
        if (incoming.get(0)) {
          struct.success = new DeletePeekMessageBatchResponse();
          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);
        }
      }
    }

  }

}