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

com.xiaomi.infra.galaxy.emq.thrift.StatisticsService 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 StatisticsService {

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

    /**
     * Set user quota, must be ADMIN user;
     * 
     * 
     * @param request
     */
    public void setUserQuota(SetUserQuotaRequest request) throws com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException, libthrift091.TException;

    /**
     * Get user quota;
     * 
     * 
     * @param request
     */
    public GetUserQuotaResponse getUserQuota(GetUserQuotaRequest request) throws com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException, libthrift091.TException;

    /**
     * Get user used quota;
     * 
     * 
     * @param request
     */
    public GetUserQuotaResponse getUserUsedQuota(GetUserUsedQuotaRequest request) throws com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException, libthrift091.TException;

    /**
     * Set user info;
     * 
     * 
     * @param request
     */
    public void setUserInfo(SetUserInfoRequest request) throws com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException, libthrift091.TException;

    /**
     * Get user info;
     * 
     * 
     * @param request
     */
    public GetUserInfoResponse getUserInfo(GetUserInfoRequest request) throws com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException, libthrift091.TException;

    /**
     * Add an alert policy for queue;
     * 
     * 
     * @param request
     */
    public void addQueueAlertPolicy(AddQueueAlertPolicyRequest request) throws com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException, libthrift091.TException;

    /**
     * Add an alert policy for tag;
     * 
     * 
     * @param request
     */
    public void addTagAlertPolicy(AddTagAlertPolicyRequest request) throws com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException, libthrift091.TException;

    /**
     * Delete an alert policy for queue;
     * 
     * 
     * @param request
     */
    public void deleteQueueAlertPolicy(DeleteQueueAlertPolicyRequest request) throws com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException, libthrift091.TException;

    /**
     * Delete an alert policy for tag
     * 
     * 
     * @param request
     */
    public void deleteTagAlertPolicy(DeleteTagAlertPolicyRequest request) throws com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException, libthrift091.TException;

    /**
     * Clear alert policies for queue;
     * 
     * 
     * @param request
     */
    public ListQueueAlertPoliciesResponse listQueueAlertPolicies(ListQueueAlertPoliciesRequest request) throws com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException, libthrift091.TException;

    /**
     * Clear alert policies for tag;
     * 
     * 
     * @param request
     */
    public ListTagAlertPoliciesResponse listTagAlertPolicies(ListTagAlertPoliciesRequest request) throws com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException, libthrift091.TException;

    /**
     * Set daily statistics state for queue;
     * 
     * 
     * @param request
     */
    public void setQueueDailyStatisticsState(SetQueueDailyStatisticsStateRequest request) throws com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException, libthrift091.TException;

    /**
     * Get daily statistics state of queue;
     * 
     * 
     * @param request
     */
    public GetQueueDailyStatisticsStateResponse getQueueDailyStatisticsState(GetQueueDailyStatisticsStateRequest request) throws com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException, libthrift091.TException;

  }

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

    public void setUserQuota(SetUserQuotaRequest request, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException;

    public void getUserQuota(GetUserQuotaRequest request, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException;

    public void getUserUsedQuota(GetUserUsedQuotaRequest request, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException;

    public void setUserInfo(SetUserInfoRequest request, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException;

    public void getUserInfo(GetUserInfoRequest request, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException;

    public void addQueueAlertPolicy(AddQueueAlertPolicyRequest request, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException;

    public void addTagAlertPolicy(AddTagAlertPolicyRequest request, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException;

    public void deleteQueueAlertPolicy(DeleteQueueAlertPolicyRequest request, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException;

    public void deleteTagAlertPolicy(DeleteTagAlertPolicyRequest request, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException;

    public void listQueueAlertPolicies(ListQueueAlertPoliciesRequest request, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException;

    public void listTagAlertPolicies(ListTagAlertPoliciesRequest request, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException;

    public void setQueueDailyStatisticsState(SetQueueDailyStatisticsStateRequest request, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException;

    public void getQueueDailyStatisticsState(GetQueueDailyStatisticsStateRequest request, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException;

  }

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

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

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

    public void setUserQuota(SetUserQuotaRequest request) throws com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException, libthrift091.TException
    {
      send_setUserQuota(request);
      recv_setUserQuota();
    }

    public void send_setUserQuota(SetUserQuotaRequest request) throws libthrift091.TException
    {
      setUserQuota_args args = new setUserQuota_args();
      args.setRequest(request);
      sendBase("setUserQuota", args);
    }

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

    public GetUserQuotaResponse getUserQuota(GetUserQuotaRequest request) throws com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException, libthrift091.TException
    {
      send_getUserQuota(request);
      return recv_getUserQuota();
    }

    public void send_getUserQuota(GetUserQuotaRequest request) throws libthrift091.TException
    {
      getUserQuota_args args = new getUserQuota_args();
      args.setRequest(request);
      sendBase("getUserQuota", args);
    }

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

    public GetUserQuotaResponse getUserUsedQuota(GetUserUsedQuotaRequest request) throws com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException, libthrift091.TException
    {
      send_getUserUsedQuota(request);
      return recv_getUserUsedQuota();
    }

    public void send_getUserUsedQuota(GetUserUsedQuotaRequest request) throws libthrift091.TException
    {
      getUserUsedQuota_args args = new getUserUsedQuota_args();
      args.setRequest(request);
      sendBase("getUserUsedQuota", args);
    }

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

    public void setUserInfo(SetUserInfoRequest request) throws com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException, libthrift091.TException
    {
      send_setUserInfo(request);
      recv_setUserInfo();
    }

    public void send_setUserInfo(SetUserInfoRequest request) throws libthrift091.TException
    {
      setUserInfo_args args = new setUserInfo_args();
      args.setRequest(request);
      sendBase("setUserInfo", args);
    }

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

    public GetUserInfoResponse getUserInfo(GetUserInfoRequest request) throws com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException, libthrift091.TException
    {
      send_getUserInfo(request);
      return recv_getUserInfo();
    }

    public void send_getUserInfo(GetUserInfoRequest request) throws libthrift091.TException
    {
      getUserInfo_args args = new getUserInfo_args();
      args.setRequest(request);
      sendBase("getUserInfo", args);
    }

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

    public void addQueueAlertPolicy(AddQueueAlertPolicyRequest request) throws com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException, libthrift091.TException
    {
      send_addQueueAlertPolicy(request);
      recv_addQueueAlertPolicy();
    }

    public void send_addQueueAlertPolicy(AddQueueAlertPolicyRequest request) throws libthrift091.TException
    {
      addQueueAlertPolicy_args args = new addQueueAlertPolicy_args();
      args.setRequest(request);
      sendBase("addQueueAlertPolicy", args);
    }

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

    public void addTagAlertPolicy(AddTagAlertPolicyRequest request) throws com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException, libthrift091.TException
    {
      send_addTagAlertPolicy(request);
      recv_addTagAlertPolicy();
    }

    public void send_addTagAlertPolicy(AddTagAlertPolicyRequest request) throws libthrift091.TException
    {
      addTagAlertPolicy_args args = new addTagAlertPolicy_args();
      args.setRequest(request);
      sendBase("addTagAlertPolicy", args);
    }

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

    public void deleteQueueAlertPolicy(DeleteQueueAlertPolicyRequest request) throws com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException, libthrift091.TException
    {
      send_deleteQueueAlertPolicy(request);
      recv_deleteQueueAlertPolicy();
    }

    public void send_deleteQueueAlertPolicy(DeleteQueueAlertPolicyRequest request) throws libthrift091.TException
    {
      deleteQueueAlertPolicy_args args = new deleteQueueAlertPolicy_args();
      args.setRequest(request);
      sendBase("deleteQueueAlertPolicy", args);
    }

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

    public void deleteTagAlertPolicy(DeleteTagAlertPolicyRequest request) throws com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException, libthrift091.TException
    {
      send_deleteTagAlertPolicy(request);
      recv_deleteTagAlertPolicy();
    }

    public void send_deleteTagAlertPolicy(DeleteTagAlertPolicyRequest request) throws libthrift091.TException
    {
      deleteTagAlertPolicy_args args = new deleteTagAlertPolicy_args();
      args.setRequest(request);
      sendBase("deleteTagAlertPolicy", args);
    }

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

    public ListQueueAlertPoliciesResponse listQueueAlertPolicies(ListQueueAlertPoliciesRequest request) throws com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException, libthrift091.TException
    {
      send_listQueueAlertPolicies(request);
      return recv_listQueueAlertPolicies();
    }

    public void send_listQueueAlertPolicies(ListQueueAlertPoliciesRequest request) throws libthrift091.TException
    {
      listQueueAlertPolicies_args args = new listQueueAlertPolicies_args();
      args.setRequest(request);
      sendBase("listQueueAlertPolicies", args);
    }

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

    public ListTagAlertPoliciesResponse listTagAlertPolicies(ListTagAlertPoliciesRequest request) throws com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException, libthrift091.TException
    {
      send_listTagAlertPolicies(request);
      return recv_listTagAlertPolicies();
    }

    public void send_listTagAlertPolicies(ListTagAlertPoliciesRequest request) throws libthrift091.TException
    {
      listTagAlertPolicies_args args = new listTagAlertPolicies_args();
      args.setRequest(request);
      sendBase("listTagAlertPolicies", args);
    }

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

    public void setQueueDailyStatisticsState(SetQueueDailyStatisticsStateRequest request) throws com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException, libthrift091.TException
    {
      send_setQueueDailyStatisticsState(request);
      recv_setQueueDailyStatisticsState();
    }

    public void send_setQueueDailyStatisticsState(SetQueueDailyStatisticsStateRequest request) throws libthrift091.TException
    {
      setQueueDailyStatisticsState_args args = new setQueueDailyStatisticsState_args();
      args.setRequest(request);
      sendBase("setQueueDailyStatisticsState", args);
    }

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

    public GetQueueDailyStatisticsStateResponse getQueueDailyStatisticsState(GetQueueDailyStatisticsStateRequest request) throws com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException, libthrift091.TException
    {
      send_getQueueDailyStatisticsState(request);
      return recv_getQueueDailyStatisticsState();
    }

    public void send_getQueueDailyStatisticsState(GetQueueDailyStatisticsStateRequest request) throws libthrift091.TException
    {
      getQueueDailyStatisticsState_args args = new getQueueDailyStatisticsState_args();
      args.setRequest(request);
      sendBase("getQueueDailyStatisticsState", args);
    }

    public GetQueueDailyStatisticsStateResponse recv_getQueueDailyStatisticsState() throws com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException, libthrift091.TException
    {
      getQueueDailyStatisticsState_result result = new getQueueDailyStatisticsState_result();
      receiveBase(result, "getQueueDailyStatisticsState");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.e != null) {
        throw result.e;
      }
      throw new libthrift091.TApplicationException(libthrift091.TApplicationException.MISSING_RESULT, "getQueueDailyStatisticsState 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 setUserQuota(SetUserQuotaRequest request, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException {
      checkReady();
      setUserQuota_call method_call = new setUserQuota_call(request, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

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

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

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

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

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

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

      public GetUserQuotaResponse 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_getUserQuota();
      }
    }

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

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

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

      public GetUserQuotaResponse 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_getUserUsedQuota();
      }
    }

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

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

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

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

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

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

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

      public GetUserInfoResponse 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_getUserInfo();
      }
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      public ListQueueAlertPoliciesResponse 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_listQueueAlertPolicies();
      }
    }

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

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

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

      public ListTagAlertPoliciesResponse 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_listTagAlertPolicies();
      }
    }

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

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

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

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

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

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

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

      public GetQueueDailyStatisticsStateResponse 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_getQueueDailyStatisticsState();
      }
    }

  }

  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("setUserQuota", new setUserQuota());
      processMap.put("getUserQuota", new getUserQuota());
      processMap.put("getUserUsedQuota", new getUserUsedQuota());
      processMap.put("setUserInfo", new setUserInfo());
      processMap.put("getUserInfo", new getUserInfo());
      processMap.put("addQueueAlertPolicy", new addQueueAlertPolicy());
      processMap.put("addTagAlertPolicy", new addTagAlertPolicy());
      processMap.put("deleteQueueAlertPolicy", new deleteQueueAlertPolicy());
      processMap.put("deleteTagAlertPolicy", new deleteTagAlertPolicy());
      processMap.put("listQueueAlertPolicies", new listQueueAlertPolicies());
      processMap.put("listTagAlertPolicies", new listTagAlertPolicies());
      processMap.put("setQueueDailyStatisticsState", new setQueueDailyStatisticsState());
      processMap.put("getQueueDailyStatisticsState", new getQueueDailyStatisticsState());
      return processMap;
    }

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

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

      protected boolean isOneway() {
        return false;
      }

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

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

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

      protected boolean isOneway() {
        return false;
      }

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

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

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

      protected boolean isOneway() {
        return false;
      }

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

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

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

      protected boolean isOneway() {
        return false;
      }

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

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

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

      protected boolean isOneway() {
        return false;
      }

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

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

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

      protected boolean isOneway() {
        return false;
      }

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

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

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

      protected boolean isOneway() {
        return false;
      }

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

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

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

      protected boolean isOneway() {
        return false;
      }

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

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

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

      protected boolean isOneway() {
        return false;
      }

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

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

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

      protected boolean isOneway() {
        return false;
      }

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

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

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

      protected boolean isOneway() {
        return false;
      }

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

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

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

      protected boolean isOneway() {
        return false;
      }

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

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

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

      protected boolean isOneway() {
        return false;
      }

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

  }

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

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

    private static  Map> getProcessMap(Map> processMap) {
      processMap.put("setUserQuota", new setUserQuota());
      processMap.put("getUserQuota", new getUserQuota());
      processMap.put("getUserUsedQuota", new getUserUsedQuota());
      processMap.put("setUserInfo", new setUserInfo());
      processMap.put("getUserInfo", new getUserInfo());
      processMap.put("addQueueAlertPolicy", new addQueueAlertPolicy());
      processMap.put("addTagAlertPolicy", new addTagAlertPolicy());
      processMap.put("deleteQueueAlertPolicy", new deleteQueueAlertPolicy());
      processMap.put("deleteTagAlertPolicy", new deleteTagAlertPolicy());
      processMap.put("listQueueAlertPolicies", new listQueueAlertPolicies());
      processMap.put("listTagAlertPolicies", new listTagAlertPolicies());
      processMap.put("setQueueDailyStatisticsState", new setQueueDailyStatisticsState());
      processMap.put("getQueueDailyStatisticsState", new getQueueDailyStatisticsState());
      return processMap;
    }

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

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

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

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

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

      public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
        final libthrift091.AsyncProcessFunction fcall = this;
        return new AsyncMethodCallback() { 
          public void onComplete(GetUserQuotaResponse o) {
            getUserQuota_result result = new getUserQuota_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;
            getUserQuota_result result = new getUserQuota_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, getUserQuota_args args, libthrift091.async.AsyncMethodCallback resultHandler) throws TException {
        iface.getUserQuota(args.request,resultHandler);
      }
    }

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

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

      public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
        final libthrift091.AsyncProcessFunction fcall = this;
        return new AsyncMethodCallback() { 
          public void onComplete(GetUserQuotaResponse o) {
            getUserUsedQuota_result result = new getUserUsedQuota_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;
            getUserUsedQuota_result result = new getUserUsedQuota_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, getUserUsedQuota_args args, libthrift091.async.AsyncMethodCallback resultHandler) throws TException {
        iface.getUserUsedQuota(args.request,resultHandler);
      }
    }

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

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

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

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

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

      public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
        final libthrift091.AsyncProcessFunction fcall = this;
        return new AsyncMethodCallback() { 
          public void onComplete(GetUserInfoResponse o) {
            getUserInfo_result result = new getUserInfo_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;
            getUserInfo_result result = new getUserInfo_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, getUserInfo_args args, libthrift091.async.AsyncMethodCallback resultHandler) throws TException {
        iface.getUserInfo(args.request,resultHandler);
      }
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
        final libthrift091.AsyncProcessFunction fcall = this;
        return new AsyncMethodCallback() { 
          public void onComplete(ListQueueAlertPoliciesResponse o) {
            listQueueAlertPolicies_result result = new listQueueAlertPolicies_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;
            listQueueAlertPolicies_result result = new listQueueAlertPolicies_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, listQueueAlertPolicies_args args, libthrift091.async.AsyncMethodCallback resultHandler) throws TException {
        iface.listQueueAlertPolicies(args.request,resultHandler);
      }
    }

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

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

      public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
        final libthrift091.AsyncProcessFunction fcall = this;
        return new AsyncMethodCallback() { 
          public void onComplete(ListTagAlertPoliciesResponse o) {
            listTagAlertPolicies_result result = new listTagAlertPolicies_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;
            listTagAlertPolicies_result result = new listTagAlertPolicies_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, listTagAlertPolicies_args args, libthrift091.async.AsyncMethodCallback resultHandler) throws TException {
        iface.listTagAlertPolicies(args.request,resultHandler);
      }
    }

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

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

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

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

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

      public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
        final libthrift091.AsyncProcessFunction fcall = this;
        return new AsyncMethodCallback() { 
          public void onComplete(GetQueueDailyStatisticsStateResponse o) {
            getQueueDailyStatisticsState_result result = new getQueueDailyStatisticsState_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;
            getQueueDailyStatisticsState_result result = new getQueueDailyStatisticsState_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, getQueueDailyStatisticsState_args args, libthrift091.async.AsyncMethodCallback resultHandler) throws TException {
        iface.getQueueDailyStatisticsState(args.request,resultHandler);
      }
    }

  }

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

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

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

    public SetUserQuotaRequest request; // required

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

      private static final Map byName = new HashMap();

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

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

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

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

      private final short _thriftId;
      private final String _fieldName;

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

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

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

    public setUserQuota_args() {
    }

    public setUserQuota_args(
      SetUserQuotaRequest request)
    {
      this();
      this.request = request;
    }

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

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

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

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

    public setUserQuota_args setRequest(SetUserQuotaRequest request) {
      this.request = request;
      return this;
    }

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

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

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

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

      }
    }

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

      }
      throw new IllegalStateException();
    }

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

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

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

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

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

      return true;
    }

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

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

      return list.hashCode();
    }

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

      int lastComparison = 0;

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

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

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

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

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

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

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

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

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

    private static class setUserQuota_argsStandardSchemeFactory implements SchemeFactory {
      public setUserQuota_argsStandardScheme getScheme() {
        return new setUserQuota_argsStandardScheme();
      }
    }

    private static class setUserQuota_argsStandardScheme extends StandardScheme {

      public void read(libthrift091.protocol.TProtocol iprot, setUserQuota_args struct) throws libthrift091.TException {
        libthrift091.protocol.TField schemeField;
        iprot.readStructBegin();
        while (true)
        {
          schemeField = iprot.readFieldBegin();
          if (schemeField.type == libthrift091.protocol.TType.STOP) { 
            break;
          }
          switch (schemeField.id) {
            case 1: // REQUEST
              if (schemeField.type == libthrift091.protocol.TType.STRUCT) {
                struct.request = new SetUserQuotaRequest();
                struct.request.read(iprot);
                struct.setRequestIsSet(true);
              } else { 
                libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            default:
              libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
          }
          iprot.readFieldEnd();
        }
        iprot.readStructEnd();

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

      public void write(libthrift091.protocol.TProtocol oprot, setUserQuota_args struct) throws libthrift091.TException {
        struct.validate();

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

    }

    private static class setUserQuota_argsTupleSchemeFactory implements SchemeFactory {
      public setUserQuota_argsTupleScheme getScheme() {
        return new setUserQuota_argsTupleScheme();
      }
    }

    private static class setUserQuota_argsTupleScheme extends TupleScheme {

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

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

  }

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

    public setUserQuota_result() {
    }

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

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

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

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

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

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

    public boolean equals(setUserQuota_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(setUserQuota_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("setUserQuota_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 setUserQuota_resultStandardSchemeFactory implements SchemeFactory {
      public setUserQuota_resultStandardScheme getScheme() {
        return new setUserQuota_resultStandardScheme();
      }
    }

    private static class setUserQuota_resultStandardScheme extends StandardScheme {

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

    private static class setUserQuota_resultTupleScheme extends TupleScheme {

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

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

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

    public GetUserQuotaRequest request; // required

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

      private static final Map byName = new HashMap();

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

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

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

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

      private final short _thriftId;
      private final String _fieldName;

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

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

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

    public getUserQuota_args() {
    }

    public getUserQuota_args(
      GetUserQuotaRequest request)
    {
      this();
      this.request = request;
    }

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

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

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

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

    public getUserQuota_args setRequest(GetUserQuotaRequest request) {
      this.request = request;
      return this;
    }

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

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

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

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

      }
    }

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

      }
      throw new IllegalStateException();
    }

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

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

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

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

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

      return true;
    }

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

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

      return list.hashCode();
    }

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

      int lastComparison = 0;

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

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

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

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

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

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

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

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

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

    private static class getUserQuota_argsStandardSchemeFactory implements SchemeFactory {
      public getUserQuota_argsStandardScheme getScheme() {
        return new getUserQuota_argsStandardScheme();
      }
    }

    private static class getUserQuota_argsStandardScheme extends StandardScheme {

      public void read(libthrift091.protocol.TProtocol iprot, getUserQuota_args struct) throws libthrift091.TException {
        libthrift091.protocol.TField schemeField;
        iprot.readStructBegin();
        while (true)
        {
          schemeField = iprot.readFieldBegin();
          if (schemeField.type == libthrift091.protocol.TType.STOP) { 
            break;
          }
          switch (schemeField.id) {
            case 1: // REQUEST
              if (schemeField.type == libthrift091.protocol.TType.STRUCT) {
                struct.request = new GetUserQuotaRequest();
                struct.request.read(iprot);
                struct.setRequestIsSet(true);
              } else { 
                libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            default:
              libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
          }
          iprot.readFieldEnd();
        }
        iprot.readStructEnd();

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

      public void write(libthrift091.protocol.TProtocol oprot, getUserQuota_args struct) throws libthrift091.TException {
        struct.validate();

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

    }

    private static class getUserQuota_argsTupleSchemeFactory implements SchemeFactory {
      public getUserQuota_argsTupleScheme getScheme() {
        return new getUserQuota_argsTupleScheme();
      }
    }

    private static class getUserQuota_argsTupleScheme extends TupleScheme {

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

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

  }

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

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

    public getUserQuota_result() {
    }

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

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

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

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

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

    public getUserQuota_result setSuccess(GetUserQuotaResponse 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 getUserQuota_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((GetUserQuotaResponse)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 getUserQuota_result)
        return this.equals((getUserQuota_result)that);
      return false;
    }

    public boolean equals(getUserQuota_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(getUserQuota_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("getUserQuota_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 getUserQuota_resultStandardSchemeFactory implements SchemeFactory {
      public getUserQuota_resultStandardScheme getScheme() {
        return new getUserQuota_resultStandardScheme();
      }
    }

    private static class getUserQuota_resultStandardScheme extends StandardScheme {

      public void read(libthrift091.protocol.TProtocol iprot, getUserQuota_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 GetUserQuotaResponse();
                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, getUserQuota_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 getUserQuota_resultTupleSchemeFactory implements SchemeFactory {
      public getUserQuota_resultTupleScheme getScheme() {
        return new getUserQuota_resultTupleScheme();
      }
    }

    private static class getUserQuota_resultTupleScheme extends TupleScheme {

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

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

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

    public GetUserUsedQuotaRequest request; // required

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

      private static final Map byName = new HashMap();

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

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

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

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

      private final short _thriftId;
      private final String _fieldName;

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

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

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

    public getUserUsedQuota_args() {
    }

    public getUserUsedQuota_args(
      GetUserUsedQuotaRequest request)
    {
      this();
      this.request = request;
    }

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

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

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

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

    public getUserUsedQuota_args setRequest(GetUserUsedQuotaRequest request) {
      this.request = request;
      return this;
    }

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

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

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

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

      }
    }

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

      }
      throw new IllegalStateException();
    }

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

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

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

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

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

      return true;
    }

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

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

      return list.hashCode();
    }

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

      int lastComparison = 0;

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

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

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

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

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

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

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

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

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

    private static class getUserUsedQuota_argsStandardSchemeFactory implements SchemeFactory {
      public getUserUsedQuota_argsStandardScheme getScheme() {
        return new getUserUsedQuota_argsStandardScheme();
      }
    }

    private static class getUserUsedQuota_argsStandardScheme extends StandardScheme {

      public void read(libthrift091.protocol.TProtocol iprot, getUserUsedQuota_args struct) throws libthrift091.TException {
        libthrift091.protocol.TField schemeField;
        iprot.readStructBegin();
        while (true)
        {
          schemeField = iprot.readFieldBegin();
          if (schemeField.type == libthrift091.protocol.TType.STOP) { 
            break;
          }
          switch (schemeField.id) {
            case 1: // REQUEST
              if (schemeField.type == libthrift091.protocol.TType.STRUCT) {
                struct.request = new GetUserUsedQuotaRequest();
                struct.request.read(iprot);
                struct.setRequestIsSet(true);
              } else { 
                libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            default:
              libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
          }
          iprot.readFieldEnd();
        }
        iprot.readStructEnd();

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

      public void write(libthrift091.protocol.TProtocol oprot, getUserUsedQuota_args struct) throws libthrift091.TException {
        struct.validate();

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

    }

    private static class getUserUsedQuota_argsTupleSchemeFactory implements SchemeFactory {
      public getUserUsedQuota_argsTupleScheme getScheme() {
        return new getUserUsedQuota_argsTupleScheme();
      }
    }

    private static class getUserUsedQuota_argsTupleScheme extends TupleScheme {

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

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

  }

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

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

    public getUserUsedQuota_result() {
    }

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

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

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

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

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

    public getUserUsedQuota_result setSuccess(GetUserQuotaResponse 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 getUserUsedQuota_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((GetUserQuotaResponse)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 getUserUsedQuota_result)
        return this.equals((getUserUsedQuota_result)that);
      return false;
    }

    public boolean equals(getUserUsedQuota_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(getUserUsedQuota_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("getUserUsedQuota_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 getUserUsedQuota_resultStandardSchemeFactory implements SchemeFactory {
      public getUserUsedQuota_resultStandardScheme getScheme() {
        return new getUserUsedQuota_resultStandardScheme();
      }
    }

    private static class getUserUsedQuota_resultStandardScheme extends StandardScheme {

      public void read(libthrift091.protocol.TProtocol iprot, getUserUsedQuota_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 GetUserQuotaResponse();
                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, getUserUsedQuota_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 getUserUsedQuota_resultTupleSchemeFactory implements SchemeFactory {
      public getUserUsedQuota_resultTupleScheme getScheme() {
        return new getUserUsedQuota_resultTupleScheme();
      }
    }

    private static class getUserUsedQuota_resultTupleScheme extends TupleScheme {

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

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

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

    public SetUserInfoRequest request; // required

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

      private static final Map byName = new HashMap();

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

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

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

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

      private final short _thriftId;
      private final String _fieldName;

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

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

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

    public setUserInfo_args() {
    }

    public setUserInfo_args(
      SetUserInfoRequest request)
    {
      this();
      this.request = request;
    }

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

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

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

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

    public setUserInfo_args setRequest(SetUserInfoRequest request) {
      this.request = request;
      return this;
    }

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

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

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

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

      }
    }

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

      }
      throw new IllegalStateException();
    }

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

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

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

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

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

      return true;
    }

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

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

      return list.hashCode();
    }

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

      int lastComparison = 0;

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

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

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

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

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

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

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

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

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

    private static class setUserInfo_argsStandardSchemeFactory implements SchemeFactory {
      public setUserInfo_argsStandardScheme getScheme() {
        return new setUserInfo_argsStandardScheme();
      }
    }

    private static class setUserInfo_argsStandardScheme extends StandardScheme {

      public void read(libthrift091.protocol.TProtocol iprot, setUserInfo_args struct) throws libthrift091.TException {
        libthrift091.protocol.TField schemeField;
        iprot.readStructBegin();
        while (true)
        {
          schemeField = iprot.readFieldBegin();
          if (schemeField.type == libthrift091.protocol.TType.STOP) { 
            break;
          }
          switch (schemeField.id) {
            case 1: // REQUEST
              if (schemeField.type == libthrift091.protocol.TType.STRUCT) {
                struct.request = new SetUserInfoRequest();
                struct.request.read(iprot);
                struct.setRequestIsSet(true);
              } else { 
                libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            default:
              libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
          }
          iprot.readFieldEnd();
        }
        iprot.readStructEnd();

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

      public void write(libthrift091.protocol.TProtocol oprot, setUserInfo_args struct) throws libthrift091.TException {
        struct.validate();

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

    }

    private static class setUserInfo_argsTupleSchemeFactory implements SchemeFactory {
      public setUserInfo_argsTupleScheme getScheme() {
        return new setUserInfo_argsTupleScheme();
      }
    }

    private static class setUserInfo_argsTupleScheme extends TupleScheme {

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

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

  }

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

    public setUserInfo_result() {
    }

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

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

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

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

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

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

    public boolean equals(setUserInfo_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(setUserInfo_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("setUserInfo_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 setUserInfo_resultStandardSchemeFactory implements SchemeFactory {
      public setUserInfo_resultStandardScheme getScheme() {
        return new setUserInfo_resultStandardScheme();
      }
    }

    private static class setUserInfo_resultStandardScheme extends StandardScheme {

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

    private static class setUserInfo_resultTupleScheme extends TupleScheme {

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

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

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

    public GetUserInfoRequest request; // required

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

      private static final Map byName = new HashMap();

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

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

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

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

      private final short _thriftId;
      private final String _fieldName;

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

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

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

    public getUserInfo_args() {
    }

    public getUserInfo_args(
      GetUserInfoRequest request)
    {
      this();
      this.request = request;
    }

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

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

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

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

    public getUserInfo_args setRequest(GetUserInfoRequest request) {
      this.request = request;
      return this;
    }

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

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

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

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

      }
    }

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

      }
      throw new IllegalStateException();
    }

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

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

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

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

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

      return true;
    }

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

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

      return list.hashCode();
    }

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

      int lastComparison = 0;

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

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

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

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

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

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

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

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

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

    private static class getUserInfo_argsStandardSchemeFactory implements SchemeFactory {
      public getUserInfo_argsStandardScheme getScheme() {
        return new getUserInfo_argsStandardScheme();
      }
    }

    private static class getUserInfo_argsStandardScheme extends StandardScheme {

      public void read(libthrift091.protocol.TProtocol iprot, getUserInfo_args struct) throws libthrift091.TException {
        libthrift091.protocol.TField schemeField;
        iprot.readStructBegin();
        while (true)
        {
          schemeField = iprot.readFieldBegin();
          if (schemeField.type == libthrift091.protocol.TType.STOP) { 
            break;
          }
          switch (schemeField.id) {
            case 1: // REQUEST
              if (schemeField.type == libthrift091.protocol.TType.STRUCT) {
                struct.request = new GetUserInfoRequest();
                struct.request.read(iprot);
                struct.setRequestIsSet(true);
              } else { 
                libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            default:
              libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
          }
          iprot.readFieldEnd();
        }
        iprot.readStructEnd();

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

      public void write(libthrift091.protocol.TProtocol oprot, getUserInfo_args struct) throws libthrift091.TException {
        struct.validate();

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

    }

    private static class getUserInfo_argsTupleSchemeFactory implements SchemeFactory {
      public getUserInfo_argsTupleScheme getScheme() {
        return new getUserInfo_argsTupleScheme();
      }
    }

    private static class getUserInfo_argsTupleScheme extends TupleScheme {

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

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

  }

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

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

    public getUserInfo_result() {
    }

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

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

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

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

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

    public getUserInfo_result setSuccess(GetUserInfoResponse 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 getUserInfo_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((GetUserInfoResponse)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 getUserInfo_result)
        return this.equals((getUserInfo_result)that);
      return false;
    }

    public boolean equals(getUserInfo_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(getUserInfo_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("getUserInfo_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 getUserInfo_resultStandardSchemeFactory implements SchemeFactory {
      public getUserInfo_resultStandardScheme getScheme() {
        return new getUserInfo_resultStandardScheme();
      }
    }

    private static class getUserInfo_resultStandardScheme extends StandardScheme {

      public void read(libthrift091.protocol.TProtocol iprot, getUserInfo_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 GetUserInfoResponse();
                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, getUserInfo_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 getUserInfo_resultTupleSchemeFactory implements SchemeFactory {
      public getUserInfo_resultTupleScheme getScheme() {
        return new getUserInfo_resultTupleScheme();
      }
    }

    private static class getUserInfo_resultTupleScheme extends TupleScheme {

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

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

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

    public AddQueueAlertPolicyRequest request; // required

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

      private static final Map byName = new HashMap();

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

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

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

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

      private final short _thriftId;
      private final String _fieldName;

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

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

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

    public addQueueAlertPolicy_args() {
    }

    public addQueueAlertPolicy_args(
      AddQueueAlertPolicyRequest request)
    {
      this();
      this.request = request;
    }

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

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

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

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

    public addQueueAlertPolicy_args setRequest(AddQueueAlertPolicyRequest request) {
      this.request = request;
      return this;
    }

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

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

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

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

      }
    }

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

      }
      throw new IllegalStateException();
    }

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

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

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

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

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

      return true;
    }

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

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

      return list.hashCode();
    }

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

      int lastComparison = 0;

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

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

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

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

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

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

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

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

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

    private static class addQueueAlertPolicy_argsStandardSchemeFactory implements SchemeFactory {
      public addQueueAlertPolicy_argsStandardScheme getScheme() {
        return new addQueueAlertPolicy_argsStandardScheme();
      }
    }

    private static class addQueueAlertPolicy_argsStandardScheme extends StandardScheme {

      public void read(libthrift091.protocol.TProtocol iprot, addQueueAlertPolicy_args struct) throws libthrift091.TException {
        libthrift091.protocol.TField schemeField;
        iprot.readStructBegin();
        while (true)
        {
          schemeField = iprot.readFieldBegin();
          if (schemeField.type == libthrift091.protocol.TType.STOP) { 
            break;
          }
          switch (schemeField.id) {
            case 1: // REQUEST
              if (schemeField.type == libthrift091.protocol.TType.STRUCT) {
                struct.request = new AddQueueAlertPolicyRequest();
                struct.request.read(iprot);
                struct.setRequestIsSet(true);
              } else { 
                libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            default:
              libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
          }
          iprot.readFieldEnd();
        }
        iprot.readStructEnd();

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

      public void write(libthrift091.protocol.TProtocol oprot, addQueueAlertPolicy_args struct) throws libthrift091.TException {
        struct.validate();

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

    }

    private static class addQueueAlertPolicy_argsTupleSchemeFactory implements SchemeFactory {
      public addQueueAlertPolicy_argsTupleScheme getScheme() {
        return new addQueueAlertPolicy_argsTupleScheme();
      }
    }

    private static class addQueueAlertPolicy_argsTupleScheme extends TupleScheme {

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

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

  }

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

    public addQueueAlertPolicy_result() {
    }

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

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

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

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

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

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

    public boolean equals(addQueueAlertPolicy_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(addQueueAlertPolicy_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("addQueueAlertPolicy_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 addQueueAlertPolicy_resultStandardSchemeFactory implements SchemeFactory {
      public addQueueAlertPolicy_resultStandardScheme getScheme() {
        return new addQueueAlertPolicy_resultStandardScheme();
      }
    }

    private static class addQueueAlertPolicy_resultStandardScheme extends StandardScheme {

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

    private static class addQueueAlertPolicy_resultTupleScheme extends TupleScheme {

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

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

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

    public AddTagAlertPolicyRequest request; // required

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

      private static final Map byName = new HashMap();

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

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

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

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

      private final short _thriftId;
      private final String _fieldName;

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

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

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

    public addTagAlertPolicy_args() {
    }

    public addTagAlertPolicy_args(
      AddTagAlertPolicyRequest request)
    {
      this();
      this.request = request;
    }

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

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

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

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

    public addTagAlertPolicy_args setRequest(AddTagAlertPolicyRequest request) {
      this.request = request;
      return this;
    }

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

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

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

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

      }
    }

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

      }
      throw new IllegalStateException();
    }

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

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

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

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

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

      return true;
    }

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

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

      return list.hashCode();
    }

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

      int lastComparison = 0;

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

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

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

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

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

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

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

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

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

    private static class addTagAlertPolicy_argsStandardSchemeFactory implements SchemeFactory {
      public addTagAlertPolicy_argsStandardScheme getScheme() {
        return new addTagAlertPolicy_argsStandardScheme();
      }
    }

    private static class addTagAlertPolicy_argsStandardScheme extends StandardScheme {

      public void read(libthrift091.protocol.TProtocol iprot, addTagAlertPolicy_args struct) throws libthrift091.TException {
        libthrift091.protocol.TField schemeField;
        iprot.readStructBegin();
        while (true)
        {
          schemeField = iprot.readFieldBegin();
          if (schemeField.type == libthrift091.protocol.TType.STOP) { 
            break;
          }
          switch (schemeField.id) {
            case 1: // REQUEST
              if (schemeField.type == libthrift091.protocol.TType.STRUCT) {
                struct.request = new AddTagAlertPolicyRequest();
                struct.request.read(iprot);
                struct.setRequestIsSet(true);
              } else { 
                libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            default:
              libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
          }
          iprot.readFieldEnd();
        }
        iprot.readStructEnd();

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

      public void write(libthrift091.protocol.TProtocol oprot, addTagAlertPolicy_args struct) throws libthrift091.TException {
        struct.validate();

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

    }

    private static class addTagAlertPolicy_argsTupleSchemeFactory implements SchemeFactory {
      public addTagAlertPolicy_argsTupleScheme getScheme() {
        return new addTagAlertPolicy_argsTupleScheme();
      }
    }

    private static class addTagAlertPolicy_argsTupleScheme extends TupleScheme {

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

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

  }

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

    public addTagAlertPolicy_result() {
    }

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

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

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

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

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

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

    public boolean equals(addTagAlertPolicy_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(addTagAlertPolicy_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("addTagAlertPolicy_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 addTagAlertPolicy_resultStandardSchemeFactory implements SchemeFactory {
      public addTagAlertPolicy_resultStandardScheme getScheme() {
        return new addTagAlertPolicy_resultStandardScheme();
      }
    }

    private static class addTagAlertPolicy_resultStandardScheme extends StandardScheme {

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

    private static class addTagAlertPolicy_resultTupleScheme extends TupleScheme {

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

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

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

    public DeleteQueueAlertPolicyRequest request; // required

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

      private static final Map byName = new HashMap();

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

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

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

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

      private final short _thriftId;
      private final String _fieldName;

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

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

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

    public deleteQueueAlertPolicy_args() {
    }

    public deleteQueueAlertPolicy_args(
      DeleteQueueAlertPolicyRequest request)
    {
      this();
      this.request = request;
    }

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

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

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

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

    public deleteQueueAlertPolicy_args setRequest(DeleteQueueAlertPolicyRequest request) {
      this.request = request;
      return this;
    }

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

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

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

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

      }
    }

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

      }
      throw new IllegalStateException();
    }

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

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

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

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

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

      return true;
    }

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

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

      return list.hashCode();
    }

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

      int lastComparison = 0;

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

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

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

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

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

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

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

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

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

    private static class deleteQueueAlertPolicy_argsStandardSchemeFactory implements SchemeFactory {
      public deleteQueueAlertPolicy_argsStandardScheme getScheme() {
        return new deleteQueueAlertPolicy_argsStandardScheme();
      }
    }

    private static class deleteQueueAlertPolicy_argsStandardScheme extends StandardScheme {

      public void read(libthrift091.protocol.TProtocol iprot, deleteQueueAlertPolicy_args struct) throws libthrift091.TException {
        libthrift091.protocol.TField schemeField;
        iprot.readStructBegin();
        while (true)
        {
          schemeField = iprot.readFieldBegin();
          if (schemeField.type == libthrift091.protocol.TType.STOP) { 
            break;
          }
          switch (schemeField.id) {
            case 1: // REQUEST
              if (schemeField.type == libthrift091.protocol.TType.STRUCT) {
                struct.request = new DeleteQueueAlertPolicyRequest();
                struct.request.read(iprot);
                struct.setRequestIsSet(true);
              } else { 
                libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            default:
              libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
          }
          iprot.readFieldEnd();
        }
        iprot.readStructEnd();

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

      public void write(libthrift091.protocol.TProtocol oprot, deleteQueueAlertPolicy_args struct) throws libthrift091.TException {
        struct.validate();

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

    }

    private static class deleteQueueAlertPolicy_argsTupleSchemeFactory implements SchemeFactory {
      public deleteQueueAlertPolicy_argsTupleScheme getScheme() {
        return new deleteQueueAlertPolicy_argsTupleScheme();
      }
    }

    private static class deleteQueueAlertPolicy_argsTupleScheme extends TupleScheme {

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

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

  }

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

    public deleteQueueAlertPolicy_result() {
    }

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

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

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

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

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

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

    public boolean equals(deleteQueueAlertPolicy_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(deleteQueueAlertPolicy_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("deleteQueueAlertPolicy_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 deleteQueueAlertPolicy_resultStandardSchemeFactory implements SchemeFactory {
      public deleteQueueAlertPolicy_resultStandardScheme getScheme() {
        return new deleteQueueAlertPolicy_resultStandardScheme();
      }
    }

    private static class deleteQueueAlertPolicy_resultStandardScheme extends StandardScheme {

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

    private static class deleteQueueAlertPolicy_resultTupleScheme extends TupleScheme {

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

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

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

    public DeleteTagAlertPolicyRequest request; // required

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

      private static final Map byName = new HashMap();

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

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

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

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

      private final short _thriftId;
      private final String _fieldName;

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

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

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

    public deleteTagAlertPolicy_args() {
    }

    public deleteTagAlertPolicy_args(
      DeleteTagAlertPolicyRequest request)
    {
      this();
      this.request = request;
    }

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

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

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

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

    public deleteTagAlertPolicy_args setRequest(DeleteTagAlertPolicyRequest request) {
      this.request = request;
      return this;
    }

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

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

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

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

      }
    }

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

      }
      throw new IllegalStateException();
    }

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

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

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

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

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

      return true;
    }

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

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

      return list.hashCode();
    }

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

      int lastComparison = 0;

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

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

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

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

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

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

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

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

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

    private static class deleteTagAlertPolicy_argsStandardSchemeFactory implements SchemeFactory {
      public deleteTagAlertPolicy_argsStandardScheme getScheme() {
        return new deleteTagAlertPolicy_argsStandardScheme();
      }
    }

    private static class deleteTagAlertPolicy_argsStandardScheme extends StandardScheme {

      public void read(libthrift091.protocol.TProtocol iprot, deleteTagAlertPolicy_args struct) throws libthrift091.TException {
        libthrift091.protocol.TField schemeField;
        iprot.readStructBegin();
        while (true)
        {
          schemeField = iprot.readFieldBegin();
          if (schemeField.type == libthrift091.protocol.TType.STOP) { 
            break;
          }
          switch (schemeField.id) {
            case 1: // REQUEST
              if (schemeField.type == libthrift091.protocol.TType.STRUCT) {
                struct.request = new DeleteTagAlertPolicyRequest();
                struct.request.read(iprot);
                struct.setRequestIsSet(true);
              } else { 
                libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            default:
              libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
          }
          iprot.readFieldEnd();
        }
        iprot.readStructEnd();

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

      public void write(libthrift091.protocol.TProtocol oprot, deleteTagAlertPolicy_args struct) throws libthrift091.TException {
        struct.validate();

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

    }

    private static class deleteTagAlertPolicy_argsTupleSchemeFactory implements SchemeFactory {
      public deleteTagAlertPolicy_argsTupleScheme getScheme() {
        return new deleteTagAlertPolicy_argsTupleScheme();
      }
    }

    private static class deleteTagAlertPolicy_argsTupleScheme extends TupleScheme {

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

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

  }

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

    public deleteTagAlertPolicy_result() {
    }

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

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

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

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

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

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

    public boolean equals(deleteTagAlertPolicy_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(deleteTagAlertPolicy_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("deleteTagAlertPolicy_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 deleteTagAlertPolicy_resultStandardSchemeFactory implements SchemeFactory {
      public deleteTagAlertPolicy_resultStandardScheme getScheme() {
        return new deleteTagAlertPolicy_resultStandardScheme();
      }
    }

    private static class deleteTagAlertPolicy_resultStandardScheme extends StandardScheme {

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

    private static class deleteTagAlertPolicy_resultTupleScheme extends TupleScheme {

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

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

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

    public ListQueueAlertPoliciesRequest request; // required

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

      private static final Map byName = new HashMap();

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

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

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

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

      private final short _thriftId;
      private final String _fieldName;

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

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

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

    public listQueueAlertPolicies_args() {
    }

    public listQueueAlertPolicies_args(
      ListQueueAlertPoliciesRequest request)
    {
      this();
      this.request = request;
    }

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

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

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

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

    public listQueueAlertPolicies_args setRequest(ListQueueAlertPoliciesRequest request) {
      this.request = request;
      return this;
    }

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

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

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

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

      }
    }

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

      }
      throw new IllegalStateException();
    }

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

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

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

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

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

      return true;
    }

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

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

      return list.hashCode();
    }

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

      int lastComparison = 0;

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

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

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

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

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

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

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

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

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

    private static class listQueueAlertPolicies_argsStandardSchemeFactory implements SchemeFactory {
      public listQueueAlertPolicies_argsStandardScheme getScheme() {
        return new listQueueAlertPolicies_argsStandardScheme();
      }
    }

    private static class listQueueAlertPolicies_argsStandardScheme extends StandardScheme {

      public void read(libthrift091.protocol.TProtocol iprot, listQueueAlertPolicies_args struct) throws libthrift091.TException {
        libthrift091.protocol.TField schemeField;
        iprot.readStructBegin();
        while (true)
        {
          schemeField = iprot.readFieldBegin();
          if (schemeField.type == libthrift091.protocol.TType.STOP) { 
            break;
          }
          switch (schemeField.id) {
            case 1: // REQUEST
              if (schemeField.type == libthrift091.protocol.TType.STRUCT) {
                struct.request = new ListQueueAlertPoliciesRequest();
                struct.request.read(iprot);
                struct.setRequestIsSet(true);
              } else { 
                libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            default:
              libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
          }
          iprot.readFieldEnd();
        }
        iprot.readStructEnd();

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

      public void write(libthrift091.protocol.TProtocol oprot, listQueueAlertPolicies_args struct) throws libthrift091.TException {
        struct.validate();

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

    }

    private static class listQueueAlertPolicies_argsTupleSchemeFactory implements SchemeFactory {
      public listQueueAlertPolicies_argsTupleScheme getScheme() {
        return new listQueueAlertPolicies_argsTupleScheme();
      }
    }

    private static class listQueueAlertPolicies_argsTupleScheme extends TupleScheme {

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

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

  }

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

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

    public listQueueAlertPolicies_result() {
    }

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

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

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

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

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

    public listQueueAlertPolicies_result setSuccess(ListQueueAlertPoliciesResponse 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 listQueueAlertPolicies_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((ListQueueAlertPoliciesResponse)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 listQueueAlertPolicies_result)
        return this.equals((listQueueAlertPolicies_result)that);
      return false;
    }

    public boolean equals(listQueueAlertPolicies_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(listQueueAlertPolicies_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("listQueueAlertPolicies_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 listQueueAlertPolicies_resultStandardSchemeFactory implements SchemeFactory {
      public listQueueAlertPolicies_resultStandardScheme getScheme() {
        return new listQueueAlertPolicies_resultStandardScheme();
      }
    }

    private static class listQueueAlertPolicies_resultStandardScheme extends StandardScheme {

      public void read(libthrift091.protocol.TProtocol iprot, listQueueAlertPolicies_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 ListQueueAlertPoliciesResponse();
                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, listQueueAlertPolicies_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 listQueueAlertPolicies_resultTupleSchemeFactory implements SchemeFactory {
      public listQueueAlertPolicies_resultTupleScheme getScheme() {
        return new listQueueAlertPolicies_resultTupleScheme();
      }
    }

    private static class listQueueAlertPolicies_resultTupleScheme extends TupleScheme {

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

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

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

    public ListTagAlertPoliciesRequest request; // required

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

      private static final Map byName = new HashMap();

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

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

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

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

      private final short _thriftId;
      private final String _fieldName;

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

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

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

    public listTagAlertPolicies_args() {
    }

    public listTagAlertPolicies_args(
      ListTagAlertPoliciesRequest request)
    {
      this();
      this.request = request;
    }

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

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

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

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

    public listTagAlertPolicies_args setRequest(ListTagAlertPoliciesRequest request) {
      this.request = request;
      return this;
    }

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

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

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

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

      }
    }

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

      }
      throw new IllegalStateException();
    }

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

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

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

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

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

      return true;
    }

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

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

      return list.hashCode();
    }

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

      int lastComparison = 0;

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

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

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

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

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

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

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

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

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

    private static class listTagAlertPolicies_argsStandardSchemeFactory implements SchemeFactory {
      public listTagAlertPolicies_argsStandardScheme getScheme() {
        return new listTagAlertPolicies_argsStandardScheme();
      }
    }

    private static class listTagAlertPolicies_argsStandardScheme extends StandardScheme {

      public void read(libthrift091.protocol.TProtocol iprot, listTagAlertPolicies_args struct) throws libthrift091.TException {
        libthrift091.protocol.TField schemeField;
        iprot.readStructBegin();
        while (true)
        {
          schemeField = iprot.readFieldBegin();
          if (schemeField.type == libthrift091.protocol.TType.STOP) { 
            break;
          }
          switch (schemeField.id) {
            case 1: // REQUEST
              if (schemeField.type == libthrift091.protocol.TType.STRUCT) {
                struct.request = new ListTagAlertPoliciesRequest();
                struct.request.read(iprot);
                struct.setRequestIsSet(true);
              } else { 
                libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            default:
              libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
          }
          iprot.readFieldEnd();
        }
        iprot.readStructEnd();

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

      public void write(libthrift091.protocol.TProtocol oprot, listTagAlertPolicies_args struct) throws libthrift091.TException {
        struct.validate();

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

    }

    private static class listTagAlertPolicies_argsTupleSchemeFactory implements SchemeFactory {
      public listTagAlertPolicies_argsTupleScheme getScheme() {
        return new listTagAlertPolicies_argsTupleScheme();
      }
    }

    private static class listTagAlertPolicies_argsTupleScheme extends TupleScheme {

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

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

  }

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

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

    public listTagAlertPolicies_result() {
    }

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

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

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

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

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

    public listTagAlertPolicies_result setSuccess(ListTagAlertPoliciesResponse 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 listTagAlertPolicies_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((ListTagAlertPoliciesResponse)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 listTagAlertPolicies_result)
        return this.equals((listTagAlertPolicies_result)that);
      return false;
    }

    public boolean equals(listTagAlertPolicies_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(listTagAlertPolicies_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("listTagAlertPolicies_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 listTagAlertPolicies_resultStandardSchemeFactory implements SchemeFactory {
      public listTagAlertPolicies_resultStandardScheme getScheme() {
        return new listTagAlertPolicies_resultStandardScheme();
      }
    }

    private static class listTagAlertPolicies_resultStandardScheme extends StandardScheme {

      public void read(libthrift091.protocol.TProtocol iprot, listTagAlertPolicies_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 ListTagAlertPoliciesResponse();
                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, listTagAlertPolicies_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 listTagAlertPolicies_resultTupleSchemeFactory implements SchemeFactory {
      public listTagAlertPolicies_resultTupleScheme getScheme() {
        return new listTagAlertPolicies_resultTupleScheme();
      }
    }

    private static class listTagAlertPolicies_resultTupleScheme extends TupleScheme {

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

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

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

    public SetQueueDailyStatisticsStateRequest request; // required

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

      private static final Map byName = new HashMap();

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

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

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

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

      private final short _thriftId;
      private final String _fieldName;

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

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

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

    public setQueueDailyStatisticsState_args() {
    }

    public setQueueDailyStatisticsState_args(
      SetQueueDailyStatisticsStateRequest request)
    {
      this();
      this.request = request;
    }

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

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

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

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

    public setQueueDailyStatisticsState_args setRequest(SetQueueDailyStatisticsStateRequest request) {
      this.request = request;
      return this;
    }

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

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

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

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

      }
    }

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

      }
      throw new IllegalStateException();
    }

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

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

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

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

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

      return true;
    }

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

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

      return list.hashCode();
    }

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

      int lastComparison = 0;

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

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

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

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

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

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

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

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

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

    private static class setQueueDailyStatisticsState_argsStandardSchemeFactory implements SchemeFactory {
      public setQueueDailyStatisticsState_argsStandardScheme getScheme() {
        return new setQueueDailyStatisticsState_argsStandardScheme();
      }
    }

    private static class setQueueDailyStatisticsState_argsStandardScheme extends StandardScheme {

      public void read(libthrift091.protocol.TProtocol iprot, setQueueDailyStatisticsState_args struct) throws libthrift091.TException {
        libthrift091.protocol.TField schemeField;
        iprot.readStructBegin();
        while (true)
        {
          schemeField = iprot.readFieldBegin();
          if (schemeField.type == libthrift091.protocol.TType.STOP) { 
            break;
          }
          switch (schemeField.id) {
            case 1: // REQUEST
              if (schemeField.type == libthrift091.protocol.TType.STRUCT) {
                struct.request = new SetQueueDailyStatisticsStateRequest();
                struct.request.read(iprot);
                struct.setRequestIsSet(true);
              } else { 
                libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            default:
              libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
          }
          iprot.readFieldEnd();
        }
        iprot.readStructEnd();

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

      public void write(libthrift091.protocol.TProtocol oprot, setQueueDailyStatisticsState_args struct) throws libthrift091.TException {
        struct.validate();

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

    }

    private static class setQueueDailyStatisticsState_argsTupleSchemeFactory implements SchemeFactory {
      public setQueueDailyStatisticsState_argsTupleScheme getScheme() {
        return new setQueueDailyStatisticsState_argsTupleScheme();
      }
    }

    private static class setQueueDailyStatisticsState_argsTupleScheme extends TupleScheme {

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

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

  }

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

    public setQueueDailyStatisticsState_result() {
    }

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

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

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

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

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

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

    public boolean equals(setQueueDailyStatisticsState_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(setQueueDailyStatisticsState_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("setQueueDailyStatisticsState_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 setQueueDailyStatisticsState_resultStandardSchemeFactory implements SchemeFactory {
      public setQueueDailyStatisticsState_resultStandardScheme getScheme() {
        return new setQueueDailyStatisticsState_resultStandardScheme();
      }
    }

    private static class setQueueDailyStatisticsState_resultStandardScheme extends StandardScheme {

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

    private static class setQueueDailyStatisticsState_resultTupleScheme extends TupleScheme {

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

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

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

    public GetQueueDailyStatisticsStateRequest request; // required

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

      private static final Map byName = new HashMap();

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

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

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

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

      private final short _thriftId;
      private final String _fieldName;

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

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

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

    public getQueueDailyStatisticsState_args() {
    }

    public getQueueDailyStatisticsState_args(
      GetQueueDailyStatisticsStateRequest request)
    {
      this();
      this.request = request;
    }

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

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

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

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

    public getQueueDailyStatisticsState_args setRequest(GetQueueDailyStatisticsStateRequest request) {
      this.request = request;
      return this;
    }

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

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

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

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

      }
    }

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

      }
      throw new IllegalStateException();
    }

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

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

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

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

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

      return true;
    }

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

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

      return list.hashCode();
    }

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

      int lastComparison = 0;

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

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

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

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

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

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

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

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

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

    private static class getQueueDailyStatisticsState_argsStandardSchemeFactory implements SchemeFactory {
      public getQueueDailyStatisticsState_argsStandardScheme getScheme() {
        return new getQueueDailyStatisticsState_argsStandardScheme();
      }
    }

    private static class getQueueDailyStatisticsState_argsStandardScheme extends StandardScheme {

      public void read(libthrift091.protocol.TProtocol iprot, getQueueDailyStatisticsState_args struct) throws libthrift091.TException {
        libthrift091.protocol.TField schemeField;
        iprot.readStructBegin();
        while (true)
        {
          schemeField = iprot.readFieldBegin();
          if (schemeField.type == libthrift091.protocol.TType.STOP) { 
            break;
          }
          switch (schemeField.id) {
            case 1: // REQUEST
              if (schemeField.type == libthrift091.protocol.TType.STRUCT) {
                struct.request = new GetQueueDailyStatisticsStateRequest();
                struct.request.read(iprot);
                struct.setRequestIsSet(true);
              } else { 
                libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            default:
              libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
          }
          iprot.readFieldEnd();
        }
        iprot.readStructEnd();

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

      public void write(libthrift091.protocol.TProtocol oprot, getQueueDailyStatisticsState_args struct) throws libthrift091.TException {
        struct.validate();

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

    }

    private static class getQueueDailyStatisticsState_argsTupleSchemeFactory implements SchemeFactory {
      public getQueueDailyStatisticsState_argsTupleScheme getScheme() {
        return new getQueueDailyStatisticsState_argsTupleScheme();
      }
    }

    private static class getQueueDailyStatisticsState_argsTupleScheme extends TupleScheme {

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

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

  }

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

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

    public getQueueDailyStatisticsState_result() {
    }

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

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

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

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

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

    public getQueueDailyStatisticsState_result setSuccess(GetQueueDailyStatisticsStateResponse 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 getQueueDailyStatisticsState_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((GetQueueDailyStatisticsStateResponse)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 getQueueDailyStatisticsState_result)
        return this.equals((getQueueDailyStatisticsState_result)that);
      return false;
    }

    public boolean equals(getQueueDailyStatisticsState_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(getQueueDailyStatisticsState_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("getQueueDailyStatisticsState_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 getQueueDailyStatisticsState_resultStandardSchemeFactory implements SchemeFactory {
      public getQueueDailyStatisticsState_resultStandardScheme getScheme() {
        return new getQueueDailyStatisticsState_resultStandardScheme();
      }
    }

    private static class getQueueDailyStatisticsState_resultStandardScheme extends StandardScheme {

      public void read(libthrift091.protocol.TProtocol iprot, getQueueDailyStatisticsState_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 GetQueueDailyStatisticsStateResponse();
                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, getQueueDailyStatisticsState_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 getQueueDailyStatisticsState_resultTupleSchemeFactory implements SchemeFactory {
      public getQueueDailyStatisticsState_resultTupleScheme getScheme() {
        return new getQueueDailyStatisticsState_resultTupleScheme();
      }
    }

    private static class getQueueDailyStatisticsState_resultTupleScheme extends TupleScheme {

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

  }

}