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

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

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

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

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

    /**
     * Purge queue;
     * 
     * 
     * @param request
     */
    public void purgeQueue(PurgeQueueRequest request) throws com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException, libthrift091.TException;

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

    /**
     * Set queue quota;
     * 
     * 
     * @param request
     */
    public SetQueueQuotaResponse setQueueQuota(SetQueueQuotaRequest request) throws com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException, libthrift091.TException;

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

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

    /**
     * Remove queue redrive policy;
     * 
     * 
     * @param request
     */
    public SetQueueRedrivePolicyResponse setQueueRedrivePolicy(SetQueueRedrivePolicyRequest request) throws com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException, libthrift091.TException;

    /**
     * Remove queue redrive policy;
     * 
     * 
     * @param request
     */
    public void removeQueueRedrivePolicy(RemoveQueueRedrivePolicyRequest request) throws com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException, libthrift091.TException;

    /**
     * Set permission for developer
     * FULL_CONTROL required to use this method
     * 
     * 
     * @param request
     */
    public void setPermission(SetPermissionRequest request) throws com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException, libthrift091.TException;

    /**
     * Revoke permission for developer
     * FULL_CONTROL required to use this method
     * 
     * @param request
     */
    public void revokePermission(RevokePermissionRequest request) throws com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException, libthrift091.TException;

    /**
     * query permission for developer using this method
     * no permission required to use this method
     * 
     * @param request
     */
    public QueryPermissionResponse queryPermission(QueryPermissionRequest request) throws com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException, libthrift091.TException;

    /**
     * List permission for developer
     * ADMIN_QUEUE required to use this method
     * 
     * @param request
     */
    public QueryPermissionForIdResponse queryPermissionForId(QueryPermissionForIdRequest request) throws com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException, libthrift091.TException;

    /**
     * list permissions for all users of the queue
     * ADMIN_QUEUE required to use this method
     * 
     * 
     * @param request
     */
    public ListPermissionsResponse listPermissions(ListPermissionsRequest request) throws com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException, libthrift091.TException;

    /**
     * create tag for queue
     * ADMIN_QUEUE required to use this method
     * 
     * 
     * @param request
     */
    public CreateTagResponse createTag(CreateTagRequest request) throws com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException, libthrift091.TException;

    /**
     * delete tag for queue
     * ADMIN_QUEUE required to use this method
     * 
     * 
     * @param request
     */
    public void deleteTag(DeleteTagRequest request) throws com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException, libthrift091.TException;

    /**
     * get info of tag
     * ADMIN_QUEUE required to use this method
     * 
     * 
     * @param request
     */
    public GetTagInfoResponse getTagInfo(GetTagInfoRequest request) throws com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException, libthrift091.TException;

    /**
     * list names of all tag of queue
     * ADMIN_QUEUE required to use this method
     * 
     * 
     * @param request
     */
    public ListTagResponse listTag(ListTagRequest request) throws com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException, libthrift091.TException;

    /**
     * query metrics
     * FULL_CONTROL required to use this method
     * 
     * 
     * @param request
     */
    public TimeSeriesData queryMetric(QueryMetricRequest request) throws com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException, libthrift091.TException;

    /**
     * query privileged queues
     * No permission required
     * 
     * 
     * @param request
     */
    public QueryPrivilegedQueueResponse queryPrivilegedQueue(QueryPrivilegedQueueRequest request) throws com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException, libthrift091.TException;

    public VerifyEMQAdminResponse verifyEMQAdmin() throws com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException, libthrift091.TException;

    public VerifyEMQAdminRoleResponse verifyEMQAdminRole(VerifyEMQAdminRoleRequest request) throws com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException, libthrift091.TException;

    /**
     * copy queues using queues meta
     * 
     * 
     * @param request
     */
    public void copyQueue(CopyQueueRequest request) throws com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException, libthrift091.TException;

    public GetQueueMetaResponse getQueueMeta(String queueName) throws com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException, libthrift091.TException;

  }

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

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

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

    public void purgeQueue(PurgeQueueRequest request, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException;

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

    public void setQueueQuota(SetQueueQuotaRequest request, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException;

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

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

    public void setQueueRedrivePolicy(SetQueueRedrivePolicyRequest request, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException;

    public void removeQueueRedrivePolicy(RemoveQueueRedrivePolicyRequest request, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException;

    public void setPermission(SetPermissionRequest request, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException;

    public void revokePermission(RevokePermissionRequest request, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException;

    public void queryPermission(QueryPermissionRequest request, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException;

    public void queryPermissionForId(QueryPermissionForIdRequest request, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException;

    public void listPermissions(ListPermissionsRequest request, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException;

    public void createTag(CreateTagRequest request, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException;

    public void deleteTag(DeleteTagRequest request, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException;

    public void getTagInfo(GetTagInfoRequest request, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException;

    public void listTag(ListTagRequest request, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException;

    public void queryMetric(QueryMetricRequest request, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException;

    public void queryPrivilegedQueue(QueryPrivilegedQueueRequest request, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException;

    public void verifyEMQAdmin(libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException;

    public void verifyEMQAdminRole(VerifyEMQAdminRoleRequest request, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException;

    public void copyQueue(CopyQueueRequest request, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException;

    public void getQueueMeta(String queueName, 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 CreateQueueResponse createQueue(CreateQueueRequest request) throws com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException, libthrift091.TException
    {
      send_createQueue(request);
      return recv_createQueue();
    }

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

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

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

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

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

    public void purgeQueue(PurgeQueueRequest request) throws com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException, libthrift091.TException
    {
      send_purgeQueue(request);
      recv_purgeQueue();
    }

    public void send_purgeQueue(PurgeQueueRequest request) throws libthrift091.TException
    {
      purgeQueue_args args = new purgeQueue_args();
      args.setRequest(request);
      sendBase("purgeQueue", args);
    }

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

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

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

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

    public SetQueueQuotaResponse setQueueQuota(SetQueueQuotaRequest request) throws com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException, libthrift091.TException
    {
      send_setQueueQuota(request);
      return recv_setQueueQuota();
    }

    public void send_setQueueQuota(SetQueueQuotaRequest request) throws libthrift091.TException
    {
      setQueueQuota_args args = new setQueueQuota_args();
      args.setRequest(request);
      sendBase("setQueueQuota", args);
    }

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

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

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

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

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

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

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

    public SetQueueRedrivePolicyResponse setQueueRedrivePolicy(SetQueueRedrivePolicyRequest request) throws com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException, libthrift091.TException
    {
      send_setQueueRedrivePolicy(request);
      return recv_setQueueRedrivePolicy();
    }

    public void send_setQueueRedrivePolicy(SetQueueRedrivePolicyRequest request) throws libthrift091.TException
    {
      setQueueRedrivePolicy_args args = new setQueueRedrivePolicy_args();
      args.setRequest(request);
      sendBase("setQueueRedrivePolicy", args);
    }

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

    public void removeQueueRedrivePolicy(RemoveQueueRedrivePolicyRequest request) throws com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException, libthrift091.TException
    {
      send_removeQueueRedrivePolicy(request);
      recv_removeQueueRedrivePolicy();
    }

    public void send_removeQueueRedrivePolicy(RemoveQueueRedrivePolicyRequest request) throws libthrift091.TException
    {
      removeQueueRedrivePolicy_args args = new removeQueueRedrivePolicy_args();
      args.setRequest(request);
      sendBase("removeQueueRedrivePolicy", args);
    }

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

    public void setPermission(SetPermissionRequest request) throws com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException, libthrift091.TException
    {
      send_setPermission(request);
      recv_setPermission();
    }

    public void send_setPermission(SetPermissionRequest request) throws libthrift091.TException
    {
      setPermission_args args = new setPermission_args();
      args.setRequest(request);
      sendBase("setPermission", args);
    }

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

    public void revokePermission(RevokePermissionRequest request) throws com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException, libthrift091.TException
    {
      send_revokePermission(request);
      recv_revokePermission();
    }

    public void send_revokePermission(RevokePermissionRequest request) throws libthrift091.TException
    {
      revokePermission_args args = new revokePermission_args();
      args.setRequest(request);
      sendBase("revokePermission", args);
    }

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

    public QueryPermissionResponse queryPermission(QueryPermissionRequest request) throws com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException, libthrift091.TException
    {
      send_queryPermission(request);
      return recv_queryPermission();
    }

    public void send_queryPermission(QueryPermissionRequest request) throws libthrift091.TException
    {
      queryPermission_args args = new queryPermission_args();
      args.setRequest(request);
      sendBase("queryPermission", args);
    }

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

    public QueryPermissionForIdResponse queryPermissionForId(QueryPermissionForIdRequest request) throws com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException, libthrift091.TException
    {
      send_queryPermissionForId(request);
      return recv_queryPermissionForId();
    }

    public void send_queryPermissionForId(QueryPermissionForIdRequest request) throws libthrift091.TException
    {
      queryPermissionForId_args args = new queryPermissionForId_args();
      args.setRequest(request);
      sendBase("queryPermissionForId", args);
    }

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

    public ListPermissionsResponse listPermissions(ListPermissionsRequest request) throws com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException, libthrift091.TException
    {
      send_listPermissions(request);
      return recv_listPermissions();
    }

    public void send_listPermissions(ListPermissionsRequest request) throws libthrift091.TException
    {
      listPermissions_args args = new listPermissions_args();
      args.setRequest(request);
      sendBase("listPermissions", args);
    }

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

    public CreateTagResponse createTag(CreateTagRequest request) throws com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException, libthrift091.TException
    {
      send_createTag(request);
      return recv_createTag();
    }

    public void send_createTag(CreateTagRequest request) throws libthrift091.TException
    {
      createTag_args args = new createTag_args();
      args.setRequest(request);
      sendBase("createTag", args);
    }

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

    public void deleteTag(DeleteTagRequest request) throws com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException, libthrift091.TException
    {
      send_deleteTag(request);
      recv_deleteTag();
    }

    public void send_deleteTag(DeleteTagRequest request) throws libthrift091.TException
    {
      deleteTag_args args = new deleteTag_args();
      args.setRequest(request);
      sendBase("deleteTag", args);
    }

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

    public GetTagInfoResponse getTagInfo(GetTagInfoRequest request) throws com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException, libthrift091.TException
    {
      send_getTagInfo(request);
      return recv_getTagInfo();
    }

    public void send_getTagInfo(GetTagInfoRequest request) throws libthrift091.TException
    {
      getTagInfo_args args = new getTagInfo_args();
      args.setRequest(request);
      sendBase("getTagInfo", args);
    }

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

    public ListTagResponse listTag(ListTagRequest request) throws com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException, libthrift091.TException
    {
      send_listTag(request);
      return recv_listTag();
    }

    public void send_listTag(ListTagRequest request) throws libthrift091.TException
    {
      listTag_args args = new listTag_args();
      args.setRequest(request);
      sendBase("listTag", args);
    }

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

    public TimeSeriesData queryMetric(QueryMetricRequest request) throws com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException, libthrift091.TException
    {
      send_queryMetric(request);
      return recv_queryMetric();
    }

    public void send_queryMetric(QueryMetricRequest request) throws libthrift091.TException
    {
      queryMetric_args args = new queryMetric_args();
      args.setRequest(request);
      sendBase("queryMetric", args);
    }

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

    public QueryPrivilegedQueueResponse queryPrivilegedQueue(QueryPrivilegedQueueRequest request) throws com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException, libthrift091.TException
    {
      send_queryPrivilegedQueue(request);
      return recv_queryPrivilegedQueue();
    }

    public void send_queryPrivilegedQueue(QueryPrivilegedQueueRequest request) throws libthrift091.TException
    {
      queryPrivilegedQueue_args args = new queryPrivilegedQueue_args();
      args.setRequest(request);
      sendBase("queryPrivilegedQueue", args);
    }

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

    public VerifyEMQAdminResponse verifyEMQAdmin() throws com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException, libthrift091.TException
    {
      send_verifyEMQAdmin();
      return recv_verifyEMQAdmin();
    }

    public void send_verifyEMQAdmin() throws libthrift091.TException
    {
      verifyEMQAdmin_args args = new verifyEMQAdmin_args();
      sendBase("verifyEMQAdmin", args);
    }

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

    public VerifyEMQAdminRoleResponse verifyEMQAdminRole(VerifyEMQAdminRoleRequest request) throws com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException, libthrift091.TException
    {
      send_verifyEMQAdminRole(request);
      return recv_verifyEMQAdminRole();
    }

    public void send_verifyEMQAdminRole(VerifyEMQAdminRoleRequest request) throws libthrift091.TException
    {
      verifyEMQAdminRole_args args = new verifyEMQAdminRole_args();
      args.setRequest(request);
      sendBase("verifyEMQAdminRole", args);
    }

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

    public void copyQueue(CopyQueueRequest request) throws com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException, libthrift091.TException
    {
      send_copyQueue(request);
      recv_copyQueue();
    }

    public void send_copyQueue(CopyQueueRequest request) throws libthrift091.TException
    {
      copyQueue_args args = new copyQueue_args();
      args.setRequest(request);
      sendBase("copyQueue", args);
    }

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

    public GetQueueMetaResponse getQueueMeta(String queueName) throws com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException, libthrift091.TException
    {
      send_getQueueMeta(queueName);
      return recv_getQueueMeta();
    }

    public void send_getQueueMeta(String queueName) throws libthrift091.TException
    {
      getQueueMeta_args args = new getQueueMeta_args();
      args.setQueueName(queueName);
      sendBase("getQueueMeta", args);
    }

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

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

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

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

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

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

      public CreateQueueResponse 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_createQueue();
      }
    }

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

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

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

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

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

    public static class purgeQueue_call extends libthrift091.async.TAsyncMethodCall {
      private PurgeQueueRequest request;
      public purgeQueue_call(PurgeQueueRequest 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("purgeQueue", libthrift091.protocol.TMessageType.CALL, 0));
        purgeQueue_args args = new purgeQueue_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_purgeQueue();
      }
    }

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

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

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

      public SetQueueAttributesResponse 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_setQueueAttribute();
      }
    }

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

    public static class setQueueQuota_call extends libthrift091.async.TAsyncMethodCall {
      private SetQueueQuotaRequest request;
      public setQueueQuota_call(SetQueueQuotaRequest 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("setQueueQuota", libthrift091.protocol.TMessageType.CALL, 0));
        setQueueQuota_args args = new setQueueQuota_args();
        args.setRequest(request);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public SetQueueQuotaResponse 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_setQueueQuota();
      }
    }

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

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

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

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

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

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

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

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

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

    public static class setQueueRedrivePolicy_call extends libthrift091.async.TAsyncMethodCall {
      private SetQueueRedrivePolicyRequest request;
      public setQueueRedrivePolicy_call(SetQueueRedrivePolicyRequest 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("setQueueRedrivePolicy", libthrift091.protocol.TMessageType.CALL, 0));
        setQueueRedrivePolicy_args args = new setQueueRedrivePolicy_args();
        args.setRequest(request);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public SetQueueRedrivePolicyResponse 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_setQueueRedrivePolicy();
      }
    }

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

    public static class removeQueueRedrivePolicy_call extends libthrift091.async.TAsyncMethodCall {
      private RemoveQueueRedrivePolicyRequest request;
      public removeQueueRedrivePolicy_call(RemoveQueueRedrivePolicyRequest 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("removeQueueRedrivePolicy", libthrift091.protocol.TMessageType.CALL, 0));
        removeQueueRedrivePolicy_args args = new removeQueueRedrivePolicy_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_removeQueueRedrivePolicy();
      }
    }

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

    public static class setPermission_call extends libthrift091.async.TAsyncMethodCall {
      private SetPermissionRequest request;
      public setPermission_call(SetPermissionRequest 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("setPermission", libthrift091.protocol.TMessageType.CALL, 0));
        setPermission_args args = new setPermission_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_setPermission();
      }
    }

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

    public static class revokePermission_call extends libthrift091.async.TAsyncMethodCall {
      private RevokePermissionRequest request;
      public revokePermission_call(RevokePermissionRequest 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("revokePermission", libthrift091.protocol.TMessageType.CALL, 0));
        revokePermission_args args = new revokePermission_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_revokePermission();
      }
    }

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

    public static class queryPermission_call extends libthrift091.async.TAsyncMethodCall {
      private QueryPermissionRequest request;
      public queryPermission_call(QueryPermissionRequest 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("queryPermission", libthrift091.protocol.TMessageType.CALL, 0));
        queryPermission_args args = new queryPermission_args();
        args.setRequest(request);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public QueryPermissionResponse 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_queryPermission();
      }
    }

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

    public static class queryPermissionForId_call extends libthrift091.async.TAsyncMethodCall {
      private QueryPermissionForIdRequest request;
      public queryPermissionForId_call(QueryPermissionForIdRequest 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("queryPermissionForId", libthrift091.protocol.TMessageType.CALL, 0));
        queryPermissionForId_args args = new queryPermissionForId_args();
        args.setRequest(request);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public QueryPermissionForIdResponse 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_queryPermissionForId();
      }
    }

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

    public static class listPermissions_call extends libthrift091.async.TAsyncMethodCall {
      private ListPermissionsRequest request;
      public listPermissions_call(ListPermissionsRequest 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("listPermissions", libthrift091.protocol.TMessageType.CALL, 0));
        listPermissions_args args = new listPermissions_args();
        args.setRequest(request);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public ListPermissionsResponse 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_listPermissions();
      }
    }

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

    public static class createTag_call extends libthrift091.async.TAsyncMethodCall {
      private CreateTagRequest request;
      public createTag_call(CreateTagRequest 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("createTag", libthrift091.protocol.TMessageType.CALL, 0));
        createTag_args args = new createTag_args();
        args.setRequest(request);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public CreateTagResponse 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_createTag();
      }
    }

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

    public static class deleteTag_call extends libthrift091.async.TAsyncMethodCall {
      private DeleteTagRequest request;
      public deleteTag_call(DeleteTagRequest 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("deleteTag", libthrift091.protocol.TMessageType.CALL, 0));
        deleteTag_args args = new deleteTag_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_deleteTag();
      }
    }

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

    public static class getTagInfo_call extends libthrift091.async.TAsyncMethodCall {
      private GetTagInfoRequest request;
      public getTagInfo_call(GetTagInfoRequest 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("getTagInfo", libthrift091.protocol.TMessageType.CALL, 0));
        getTagInfo_args args = new getTagInfo_args();
        args.setRequest(request);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public GetTagInfoResponse 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_getTagInfo();
      }
    }

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

    public static class listTag_call extends libthrift091.async.TAsyncMethodCall {
      private ListTagRequest request;
      public listTag_call(ListTagRequest 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("listTag", libthrift091.protocol.TMessageType.CALL, 0));
        listTag_args args = new listTag_args();
        args.setRequest(request);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public ListTagResponse 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_listTag();
      }
    }

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

    public static class queryMetric_call extends libthrift091.async.TAsyncMethodCall {
      private QueryMetricRequest request;
      public queryMetric_call(QueryMetricRequest 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("queryMetric", libthrift091.protocol.TMessageType.CALL, 0));
        queryMetric_args args = new queryMetric_args();
        args.setRequest(request);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public TimeSeriesData 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_queryMetric();
      }
    }

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

    public static class queryPrivilegedQueue_call extends libthrift091.async.TAsyncMethodCall {
      private QueryPrivilegedQueueRequest request;
      public queryPrivilegedQueue_call(QueryPrivilegedQueueRequest 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("queryPrivilegedQueue", libthrift091.protocol.TMessageType.CALL, 0));
        queryPrivilegedQueue_args args = new queryPrivilegedQueue_args();
        args.setRequest(request);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public QueryPrivilegedQueueResponse 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_queryPrivilegedQueue();
      }
    }

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

    public static class verifyEMQAdmin_call extends libthrift091.async.TAsyncMethodCall {
      public verifyEMQAdmin_call(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);
      }

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

      public VerifyEMQAdminResponse 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_verifyEMQAdmin();
      }
    }

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

    public static class verifyEMQAdminRole_call extends libthrift091.async.TAsyncMethodCall {
      private VerifyEMQAdminRoleRequest request;
      public verifyEMQAdminRole_call(VerifyEMQAdminRoleRequest 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("verifyEMQAdminRole", libthrift091.protocol.TMessageType.CALL, 0));
        verifyEMQAdminRole_args args = new verifyEMQAdminRole_args();
        args.setRequest(request);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public VerifyEMQAdminRoleResponse 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_verifyEMQAdminRole();
      }
    }

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

    public static class copyQueue_call extends libthrift091.async.TAsyncMethodCall {
      private CopyQueueRequest request;
      public copyQueue_call(CopyQueueRequest 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("copyQueue", libthrift091.protocol.TMessageType.CALL, 0));
        copyQueue_args args = new copyQueue_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_copyQueue();
      }
    }

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

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

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

      public GetQueueMetaResponse 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_getQueueMeta();
      }
    }

  }

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

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

    private static  Map> getProcessMap(Map> processMap) {
      processMap.put("createQueue", new createQueue());
      processMap.put("deleteQueue", new deleteQueue());
      processMap.put("purgeQueue", new purgeQueue());
      processMap.put("setQueueAttribute", new setQueueAttribute());
      processMap.put("setQueueQuota", new setQueueQuota());
      processMap.put("getQueueInfo", new getQueueInfo());
      processMap.put("listQueue", new listQueue());
      processMap.put("setQueueRedrivePolicy", new setQueueRedrivePolicy());
      processMap.put("removeQueueRedrivePolicy", new removeQueueRedrivePolicy());
      processMap.put("setPermission", new setPermission());
      processMap.put("revokePermission", new revokePermission());
      processMap.put("queryPermission", new queryPermission());
      processMap.put("queryPermissionForId", new queryPermissionForId());
      processMap.put("listPermissions", new listPermissions());
      processMap.put("createTag", new createTag());
      processMap.put("deleteTag", new deleteTag());
      processMap.put("getTagInfo", new getTagInfo());
      processMap.put("listTag", new listTag());
      processMap.put("queryMetric", new queryMetric());
      processMap.put("queryPrivilegedQueue", new queryPrivilegedQueue());
      processMap.put("verifyEMQAdmin", new verifyEMQAdmin());
      processMap.put("verifyEMQAdminRole", new verifyEMQAdminRole());
      processMap.put("copyQueue", new copyQueue());
      processMap.put("getQueueMeta", new getQueueMeta());
      return processMap;
    }

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

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

      protected boolean isOneway() {
        return false;
      }

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

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

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

      protected boolean isOneway() {
        return false;
      }

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

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

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

      protected boolean isOneway() {
        return false;
      }

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

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

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

      protected boolean isOneway() {
        return false;
      }

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

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

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

      protected boolean isOneway() {
        return false;
      }

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

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

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

      protected boolean isOneway() {
        return false;
      }

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

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

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

      protected boolean isOneway() {
        return false;
      }

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

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

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

      protected boolean isOneway() {
        return false;
      }

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

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

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

      protected boolean isOneway() {
        return false;
      }

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

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

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

      protected boolean isOneway() {
        return false;
      }

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

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

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

      protected boolean isOneway() {
        return false;
      }

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

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

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

      protected boolean isOneway() {
        return false;
      }

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

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

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

      protected boolean isOneway() {
        return false;
      }

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

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

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

      protected boolean isOneway() {
        return false;
      }

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

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

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

      protected boolean isOneway() {
        return false;
      }

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

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

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

      protected boolean isOneway() {
        return false;
      }

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

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

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

      protected boolean isOneway() {
        return false;
      }

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

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

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

      protected boolean isOneway() {
        return false;
      }

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

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

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

      protected boolean isOneway() {
        return false;
      }

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

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

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

      protected boolean isOneway() {
        return false;
      }

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

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

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

      protected boolean isOneway() {
        return false;
      }

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

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

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

      protected boolean isOneway() {
        return false;
      }

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

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

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

      protected boolean isOneway() {
        return false;
      }

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

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

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

      protected boolean isOneway() {
        return false;
      }

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

  }

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

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

    private static  Map> getProcessMap(Map> processMap) {
      processMap.put("createQueue", new createQueue());
      processMap.put("deleteQueue", new deleteQueue());
      processMap.put("purgeQueue", new purgeQueue());
      processMap.put("setQueueAttribute", new setQueueAttribute());
      processMap.put("setQueueQuota", new setQueueQuota());
      processMap.put("getQueueInfo", new getQueueInfo());
      processMap.put("listQueue", new listQueue());
      processMap.put("setQueueRedrivePolicy", new setQueueRedrivePolicy());
      processMap.put("removeQueueRedrivePolicy", new removeQueueRedrivePolicy());
      processMap.put("setPermission", new setPermission());
      processMap.put("revokePermission", new revokePermission());
      processMap.put("queryPermission", new queryPermission());
      processMap.put("queryPermissionForId", new queryPermissionForId());
      processMap.put("listPermissions", new listPermissions());
      processMap.put("createTag", new createTag());
      processMap.put("deleteTag", new deleteTag());
      processMap.put("getTagInfo", new getTagInfo());
      processMap.put("listTag", new listTag());
      processMap.put("queryMetric", new queryMetric());
      processMap.put("queryPrivilegedQueue", new queryPrivilegedQueue());
      processMap.put("verifyEMQAdmin", new verifyEMQAdmin());
      processMap.put("verifyEMQAdminRole", new verifyEMQAdminRole());
      processMap.put("copyQueue", new copyQueue());
      processMap.put("getQueueMeta", new getQueueMeta());
      return processMap;
    }

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

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

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

      protected boolean isOneway() {
        return false;
      }

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

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

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

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

      protected boolean isOneway() {
        return false;
      }

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

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

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

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

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

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

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

      protected boolean isOneway() {
        return false;
      }

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

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

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

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

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

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

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

      protected boolean isOneway() {
        return false;
      }

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

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

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

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

      protected boolean isOneway() {
        return false;
      }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
        final libthrift091.AsyncProcessFunction fcall = this;
        return new AsyncMethodCallback() { 
          public void onComplete(VerifyEMQAdminResponse o) {
            verifyEMQAdmin_result result = new verifyEMQAdmin_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;
            verifyEMQAdmin_result result = new verifyEMQAdmin_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, verifyEMQAdmin_args args, libthrift091.async.AsyncMethodCallback resultHandler) throws TException {
        iface.verifyEMQAdmin(resultHandler);
      }
    }

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

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

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

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

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

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

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

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

      public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
        final libthrift091.AsyncProcessFunction fcall = this;
        return new AsyncMethodCallback() { 
          public void onComplete(GetQueueMetaResponse o) {
            getQueueMeta_result result = new getQueueMeta_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;
            getQueueMeta_result result = new getQueueMeta_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, getQueueMeta_args args, libthrift091.async.AsyncMethodCallback resultHandler) throws TException {
        iface.getQueueMeta(args.queueName,resultHandler);
      }
    }

  }

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

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

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

    public CreateQueueRequest request; // required

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

      private static final Map byName = new HashMap();

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

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

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

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

      private final short _thriftId;
      private final String _fieldName;

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

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

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

    public createQueue_args() {
    }

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

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

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

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

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

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

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

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

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

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

      }
    }

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

      }
      throw new IllegalStateException();
    }

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

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

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

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

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

      return true;
    }

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

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

      return list.hashCode();
    }

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

      int lastComparison = 0;

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

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

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

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

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

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

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

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

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

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

    private static class createQueue_argsStandardScheme extends StandardScheme {

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

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

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

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

    }

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

    private static class createQueue_argsTupleScheme extends TupleScheme {

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

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

  }

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

    private static final libthrift091.protocol.TField 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 createQueue_resultStandardSchemeFactory());
      schemes.put(TupleScheme.class, new createQueue_resultTupleSchemeFactory());
    }

    public CreateQueueResponse 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, CreateQueueResponse.class)));
      tmpMap.put(_Fields.E, new libthrift091.meta_data.FieldMetaData("e", libthrift091.TFieldRequirementType.DEFAULT, 
          new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.STRUCT)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(createQueue_result.class, metaDataMap);
    }

    public createQueue_result() {
    }

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

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

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

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

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

    public createQueue_result setSuccess(CreateQueueResponse 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 createQueue_result setE(com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException e) {
      this.e = e;
      return this;
    }

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

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

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

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((CreateQueueResponse)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 createQueue_result)
        return this.equals((createQueue_result)that);
      return false;
    }

    public boolean equals(createQueue_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(createQueue_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("createQueue_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 createQueue_resultStandardSchemeFactory implements SchemeFactory {
      public createQueue_resultStandardScheme getScheme() {
        return new createQueue_resultStandardScheme();
      }
    }

    private static class createQueue_resultStandardScheme extends StandardScheme {

      public void read(libthrift091.protocol.TProtocol iprot, createQueue_result struct) throws libthrift091.TException {
        libthrift091.protocol.TField schemeField;
        iprot.readStructBegin();
        while (true)
        {
          schemeField = iprot.readFieldBegin();
          if (schemeField.type == libthrift091.protocol.TType.STOP) { 
            break;
          }
          switch (schemeField.id) {
            case 0: // SUCCESS
              if (schemeField.type == libthrift091.protocol.TType.STRUCT) {
                struct.success = new CreateQueueResponse();
                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, createQueue_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 createQueue_resultTupleSchemeFactory implements SchemeFactory {
      public createQueue_resultTupleScheme getScheme() {
        return new createQueue_resultTupleScheme();
      }
    }

    private static class createQueue_resultTupleScheme extends TupleScheme {

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

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

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

    public DeleteQueueRequest request; // required

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

      private static final Map byName = new HashMap();

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

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

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

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

      private final short _thriftId;
      private final String _fieldName;

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

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

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

    public deleteQueue_args() {
    }

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

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

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

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

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

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

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

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

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

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

      }
    }

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

      }
      throw new IllegalStateException();
    }

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

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

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

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

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

      return true;
    }

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

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

      return list.hashCode();
    }

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

      int lastComparison = 0;

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

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

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

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

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

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

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

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

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

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

    private static class deleteQueue_argsStandardScheme extends StandardScheme {

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

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

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

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

    }

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

    private static class deleteQueue_argsTupleScheme extends TupleScheme {

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

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

  }

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

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

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

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

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

      private static final Map byName = new HashMap();

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

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

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

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

      private final short _thriftId;
      private final String _fieldName;

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

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

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

    public deleteQueue_result() {
    }

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

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

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

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

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

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

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

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

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

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

      }
    }

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

      }
      throw new IllegalStateException();
    }

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

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

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

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

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

      return true;
    }

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

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

      return list.hashCode();
    }

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

      int lastComparison = 0;

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

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

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

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

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

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

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

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

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

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

    private static class deleteQueue_resultStandardScheme extends StandardScheme {

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

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

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

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

    }

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

    private static class deleteQueue_resultTupleScheme extends TupleScheme {

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

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

  }

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

    public PurgeQueueRequest 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, PurgeQueueRequest.class)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(purgeQueue_args.class, metaDataMap);
    }

    public purgeQueue_args() {
    }

    public purgeQueue_args(
      PurgeQueueRequest request)
    {
      this();
      this.request = request;
    }

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

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

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

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

    public purgeQueue_args setRequest(PurgeQueueRequest 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((PurgeQueueRequest)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 purgeQueue_args)
        return this.equals((purgeQueue_args)that);
      return false;
    }

    public boolean equals(purgeQueue_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(purgeQueue_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("purgeQueue_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 purgeQueue_argsStandardSchemeFactory implements SchemeFactory {
      public purgeQueue_argsStandardScheme getScheme() {
        return new purgeQueue_argsStandardScheme();
      }
    }

    private static class purgeQueue_argsStandardScheme extends StandardScheme {

      public void read(libthrift091.protocol.TProtocol iprot, purgeQueue_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 PurgeQueueRequest();
                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, purgeQueue_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 purgeQueue_argsTupleSchemeFactory implements SchemeFactory {
      public purgeQueue_argsTupleScheme getScheme() {
        return new purgeQueue_argsTupleScheme();
      }
    }

    private static class purgeQueue_argsTupleScheme extends TupleScheme {

      @Override
      public void write(libthrift091.protocol.TProtocol prot, purgeQueue_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, purgeQueue_args struct) throws libthrift091.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(1);
        if (incoming.get(0)) {
          struct.request = new PurgeQueueRequest();
          struct.request.read(iprot);
          struct.setRequestIsSet(true);
        }
      }
    }

  }

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

    public purgeQueue_result() {
    }

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

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

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

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

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

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

    public boolean equals(purgeQueue_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(purgeQueue_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("purgeQueue_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 purgeQueue_resultStandardSchemeFactory implements SchemeFactory {
      public purgeQueue_resultStandardScheme getScheme() {
        return new purgeQueue_resultStandardScheme();
      }
    }

    private static class purgeQueue_resultStandardScheme extends StandardScheme {

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

    private static class purgeQueue_resultTupleScheme extends TupleScheme {

      @Override
      public void write(libthrift091.protocol.TProtocol prot, purgeQueue_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, purgeQueue_result struct) throws libthrift091.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(1);
        if (incoming.get(0)) {
          struct.e = new com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException();
          struct.e.read(iprot);
          struct.setEIsSet(true);
        }
      }
    }

  }

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

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

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

    public SetQueueAttributesRequest request; // required

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

      private static final Map byName = new HashMap();

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

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

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

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

      private final short _thriftId;
      private final String _fieldName;

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

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

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

    public setQueueAttribute_args() {
    }

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

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

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

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

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

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

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

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

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

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

      }
    }

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

      }
      throw new IllegalStateException();
    }

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

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

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

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

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

      return true;
    }

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

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

      return list.hashCode();
    }

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

      int lastComparison = 0;

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

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

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

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

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

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

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

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

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

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

    private static class setQueueAttribute_argsStandardScheme extends StandardScheme {

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

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

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

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

    }

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

    private static class setQueueAttribute_argsTupleScheme extends TupleScheme {

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

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

  }

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

    private static final libthrift091.protocol.TField 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 setQueueAttribute_resultStandardSchemeFactory());
      schemes.put(TupleScheme.class, new setQueueAttribute_resultTupleSchemeFactory());
    }

    public SetQueueAttributesResponse 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, SetQueueAttributesResponse.class)));
      tmpMap.put(_Fields.E, new libthrift091.meta_data.FieldMetaData("e", libthrift091.TFieldRequirementType.DEFAULT, 
          new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.STRUCT)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(setQueueAttribute_result.class, metaDataMap);
    }

    public setQueueAttribute_result() {
    }

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

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

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

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

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

    public setQueueAttribute_result setSuccess(SetQueueAttributesResponse 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 setQueueAttribute_result setE(com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException e) {
      this.e = e;
      return this;
    }

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

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

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

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((SetQueueAttributesResponse)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 setQueueAttribute_result)
        return this.equals((setQueueAttribute_result)that);
      return false;
    }

    public boolean equals(setQueueAttribute_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(setQueueAttribute_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("setQueueAttribute_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 setQueueAttribute_resultStandardSchemeFactory implements SchemeFactory {
      public setQueueAttribute_resultStandardScheme getScheme() {
        return new setQueueAttribute_resultStandardScheme();
      }
    }

    private static class setQueueAttribute_resultStandardScheme extends StandardScheme {

      public void read(libthrift091.protocol.TProtocol iprot, setQueueAttribute_result struct) throws libthrift091.TException {
        libthrift091.protocol.TField schemeField;
        iprot.readStructBegin();
        while (true)
        {
          schemeField = iprot.readFieldBegin();
          if (schemeField.type == libthrift091.protocol.TType.STOP) { 
            break;
          }
          switch (schemeField.id) {
            case 0: // SUCCESS
              if (schemeField.type == libthrift091.protocol.TType.STRUCT) {
                struct.success = new SetQueueAttributesResponse();
                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, setQueueAttribute_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 setQueueAttribute_resultTupleSchemeFactory implements SchemeFactory {
      public setQueueAttribute_resultTupleScheme getScheme() {
        return new setQueueAttribute_resultTupleScheme();
      }
    }

    private static class setQueueAttribute_resultTupleScheme extends TupleScheme {

      @Override
      public void write(libthrift091.protocol.TProtocol prot, setQueueAttribute_result struct) throws libthrift091.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.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, setQueueAttribute_result struct) throws libthrift091.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(2);
        if (incoming.get(0)) {
          struct.success = new SetQueueAttributesResponse();
          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 setQueueQuota_args implements libthrift091.TBase, java.io.Serializable, Cloneable, Comparable   {
    private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("setQueueQuota_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 setQueueQuota_argsStandardSchemeFactory());
      schemes.put(TupleScheme.class, new setQueueQuota_argsTupleSchemeFactory());
    }

    public SetQueueQuotaRequest 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, SetQueueQuotaRequest.class)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(setQueueQuota_args.class, metaDataMap);
    }

    public setQueueQuota_args() {
    }

    public setQueueQuota_args(
      SetQueueQuotaRequest request)
    {
      this();
      this.request = request;
    }

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

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

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

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

    public setQueueQuota_args setRequest(SetQueueQuotaRequest 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((SetQueueQuotaRequest)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 setQueueQuota_args)
        return this.equals((setQueueQuota_args)that);
      return false;
    }

    public boolean equals(setQueueQuota_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(setQueueQuota_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("setQueueQuota_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 setQueueQuota_argsStandardSchemeFactory implements SchemeFactory {
      public setQueueQuota_argsStandardScheme getScheme() {
        return new setQueueQuota_argsStandardScheme();
      }
    }

    private static class setQueueQuota_argsStandardScheme extends StandardScheme {

      public void read(libthrift091.protocol.TProtocol iprot, setQueueQuota_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 SetQueueQuotaRequest();
                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, setQueueQuota_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 setQueueQuota_argsTupleSchemeFactory implements SchemeFactory {
      public setQueueQuota_argsTupleScheme getScheme() {
        return new setQueueQuota_argsTupleScheme();
      }
    }

    private static class setQueueQuota_argsTupleScheme extends TupleScheme {

      @Override
      public void write(libthrift091.protocol.TProtocol prot, setQueueQuota_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, setQueueQuota_args struct) throws libthrift091.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(1);
        if (incoming.get(0)) {
          struct.request = new SetQueueQuotaRequest();
          struct.request.read(iprot);
          struct.setRequestIsSet(true);
        }
      }
    }

  }

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

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

    public setQueueQuota_result() {
    }

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

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

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

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

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

    public setQueueQuota_result setSuccess(SetQueueQuotaResponse 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 setQueueQuota_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((SetQueueQuotaResponse)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 setQueueQuota_result)
        return this.equals((setQueueQuota_result)that);
      return false;
    }

    public boolean equals(setQueueQuota_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(setQueueQuota_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("setQueueQuota_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 setQueueQuota_resultStandardSchemeFactory implements SchemeFactory {
      public setQueueQuota_resultStandardScheme getScheme() {
        return new setQueueQuota_resultStandardScheme();
      }
    }

    private static class setQueueQuota_resultStandardScheme extends StandardScheme {

      public void read(libthrift091.protocol.TProtocol iprot, setQueueQuota_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 SetQueueQuotaResponse();
                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, setQueueQuota_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 setQueueQuota_resultTupleSchemeFactory implements SchemeFactory {
      public setQueueQuota_resultTupleScheme getScheme() {
        return new setQueueQuota_resultTupleScheme();
      }
    }

    private static class setQueueQuota_resultTupleScheme extends TupleScheme {

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

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

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

    public GetQueueInfoRequest request; // required

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

      private static final Map byName = new HashMap();

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

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

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

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

      private final short _thriftId;
      private final String _fieldName;

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

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

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

    public getQueueInfo_args() {
    }

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

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

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

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

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

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

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

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

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

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

      }
    }

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

      }
      throw new IllegalStateException();
    }

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

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

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

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

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

      return true;
    }

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

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

      return list.hashCode();
    }

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

      int lastComparison = 0;

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

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

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

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

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

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

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

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

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

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

    private static class getQueueInfo_argsStandardScheme extends StandardScheme {

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

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

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

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

    }

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

    private static class getQueueInfo_argsTupleScheme extends TupleScheme {

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

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

  }

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

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

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

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

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

      private static final Map byName = new HashMap();

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

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

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

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

      private final short _thriftId;
      private final String _fieldName;

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

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

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

    public getQueueInfo_result() {
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      }
    }

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

      case E:
        return getE();

      }
      throw new IllegalStateException();
    }

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

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

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

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

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

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

      return true;
    }

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

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

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

      return list.hashCode();
    }

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

      int lastComparison = 0;

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

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

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

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

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

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

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

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

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

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

    private static class getQueueInfo_resultStandardScheme extends StandardScheme {

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

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

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

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

    }

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

    private static class getQueueInfo_resultTupleScheme extends TupleScheme {

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

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

  }

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

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

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

    public ListQueueRequest request; // required

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

      private static final Map byName = new HashMap();

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

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

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

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

      private final short _thriftId;
      private final String _fieldName;

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

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

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

    public listQueue_args() {
    }

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

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

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

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

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

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

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

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

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

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

      }
    }

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

      }
      throw new IllegalStateException();
    }

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

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

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

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

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

      return true;
    }

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

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

      return list.hashCode();
    }

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

      int lastComparison = 0;

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

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

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

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

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

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

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

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

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

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

    private static class listQueue_argsStandardScheme extends StandardScheme {

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

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

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

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

    }

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

    private static class listQueue_argsTupleScheme extends TupleScheme {

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

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

  }

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

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

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

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

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

      private static final Map byName = new HashMap();

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

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

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

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

      private final short _thriftId;
      private final String _fieldName;

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

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

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

    public listQueue_result() {
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      }
    }

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

      case E:
        return getE();

      }
      throw new IllegalStateException();
    }

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

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

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

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

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

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

      return true;
    }

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

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

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

      return list.hashCode();
    }

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

      int lastComparison = 0;

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

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

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

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

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

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

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

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

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

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

    private static class listQueue_resultStandardScheme extends StandardScheme {

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

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

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

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

    }

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

    private static class listQueue_resultTupleScheme extends TupleScheme {

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

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

  }

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

    public SetQueueRedrivePolicyRequest 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, SetQueueRedrivePolicyRequest.class)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(setQueueRedrivePolicy_args.class, metaDataMap);
    }

    public setQueueRedrivePolicy_args() {
    }

    public setQueueRedrivePolicy_args(
      SetQueueRedrivePolicyRequest request)
    {
      this();
      this.request = request;
    }

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

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

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

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

    public setQueueRedrivePolicy_args setRequest(SetQueueRedrivePolicyRequest 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((SetQueueRedrivePolicyRequest)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 setQueueRedrivePolicy_args)
        return this.equals((setQueueRedrivePolicy_args)that);
      return false;
    }

    public boolean equals(setQueueRedrivePolicy_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(setQueueRedrivePolicy_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("setQueueRedrivePolicy_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 setQueueRedrivePolicy_argsStandardSchemeFactory implements SchemeFactory {
      public setQueueRedrivePolicy_argsStandardScheme getScheme() {
        return new setQueueRedrivePolicy_argsStandardScheme();
      }
    }

    private static class setQueueRedrivePolicy_argsStandardScheme extends StandardScheme {

      public void read(libthrift091.protocol.TProtocol iprot, setQueueRedrivePolicy_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 SetQueueRedrivePolicyRequest();
                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, setQueueRedrivePolicy_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 setQueueRedrivePolicy_argsTupleSchemeFactory implements SchemeFactory {
      public setQueueRedrivePolicy_argsTupleScheme getScheme() {
        return new setQueueRedrivePolicy_argsTupleScheme();
      }
    }

    private static class setQueueRedrivePolicy_argsTupleScheme extends TupleScheme {

      @Override
      public void write(libthrift091.protocol.TProtocol prot, setQueueRedrivePolicy_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, setQueueRedrivePolicy_args struct) throws libthrift091.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(1);
        if (incoming.get(0)) {
          struct.request = new SetQueueRedrivePolicyRequest();
          struct.request.read(iprot);
          struct.setRequestIsSet(true);
        }
      }
    }

  }

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

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

    public setQueueRedrivePolicy_result() {
    }

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

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

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

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

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

    public setQueueRedrivePolicy_result setSuccess(SetQueueRedrivePolicyResponse 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 setQueueRedrivePolicy_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((SetQueueRedrivePolicyResponse)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 setQueueRedrivePolicy_result)
        return this.equals((setQueueRedrivePolicy_result)that);
      return false;
    }

    public boolean equals(setQueueRedrivePolicy_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(setQueueRedrivePolicy_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("setQueueRedrivePolicy_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 setQueueRedrivePolicy_resultStandardSchemeFactory implements SchemeFactory {
      public setQueueRedrivePolicy_resultStandardScheme getScheme() {
        return new setQueueRedrivePolicy_resultStandardScheme();
      }
    }

    private static class setQueueRedrivePolicy_resultStandardScheme extends StandardScheme {

      public void read(libthrift091.protocol.TProtocol iprot, setQueueRedrivePolicy_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 SetQueueRedrivePolicyResponse();
                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, setQueueRedrivePolicy_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 setQueueRedrivePolicy_resultTupleSchemeFactory implements SchemeFactory {
      public setQueueRedrivePolicy_resultTupleScheme getScheme() {
        return new setQueueRedrivePolicy_resultTupleScheme();
      }
    }

    private static class setQueueRedrivePolicy_resultTupleScheme extends TupleScheme {

      @Override
      public void write(libthrift091.protocol.TProtocol prot, setQueueRedrivePolicy_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, setQueueRedrivePolicy_result struct) throws libthrift091.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(2);
        if (incoming.get(0)) {
          struct.success = new SetQueueRedrivePolicyResponse();
          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 removeQueueRedrivePolicy_args implements libthrift091.TBase, java.io.Serializable, Cloneable, Comparable   {
    private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("removeQueueRedrivePolicy_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 removeQueueRedrivePolicy_argsStandardSchemeFactory());
      schemes.put(TupleScheme.class, new removeQueueRedrivePolicy_argsTupleSchemeFactory());
    }

    public RemoveQueueRedrivePolicyRequest 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, RemoveQueueRedrivePolicyRequest.class)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(removeQueueRedrivePolicy_args.class, metaDataMap);
    }

    public removeQueueRedrivePolicy_args() {
    }

    public removeQueueRedrivePolicy_args(
      RemoveQueueRedrivePolicyRequest request)
    {
      this();
      this.request = request;
    }

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

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

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

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

    public removeQueueRedrivePolicy_args setRequest(RemoveQueueRedrivePolicyRequest 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((RemoveQueueRedrivePolicyRequest)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 removeQueueRedrivePolicy_args)
        return this.equals((removeQueueRedrivePolicy_args)that);
      return false;
    }

    public boolean equals(removeQueueRedrivePolicy_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(removeQueueRedrivePolicy_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("removeQueueRedrivePolicy_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 removeQueueRedrivePolicy_argsStandardSchemeFactory implements SchemeFactory {
      public removeQueueRedrivePolicy_argsStandardScheme getScheme() {
        return new removeQueueRedrivePolicy_argsStandardScheme();
      }
    }

    private static class removeQueueRedrivePolicy_argsStandardScheme extends StandardScheme {

      public void read(libthrift091.protocol.TProtocol iprot, removeQueueRedrivePolicy_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 RemoveQueueRedrivePolicyRequest();
                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, removeQueueRedrivePolicy_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 removeQueueRedrivePolicy_argsTupleSchemeFactory implements SchemeFactory {
      public removeQueueRedrivePolicy_argsTupleScheme getScheme() {
        return new removeQueueRedrivePolicy_argsTupleScheme();
      }
    }

    private static class removeQueueRedrivePolicy_argsTupleScheme extends TupleScheme {

      @Override
      public void write(libthrift091.protocol.TProtocol prot, removeQueueRedrivePolicy_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, removeQueueRedrivePolicy_args struct) throws libthrift091.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(1);
        if (incoming.get(0)) {
          struct.request = new RemoveQueueRedrivePolicyRequest();
          struct.request.read(iprot);
          struct.setRequestIsSet(true);
        }
      }
    }

  }

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

    public removeQueueRedrivePolicy_result() {
    }

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

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

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

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

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

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

    public boolean equals(removeQueueRedrivePolicy_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(removeQueueRedrivePolicy_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("removeQueueRedrivePolicy_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 removeQueueRedrivePolicy_resultStandardSchemeFactory implements SchemeFactory {
      public removeQueueRedrivePolicy_resultStandardScheme getScheme() {
        return new removeQueueRedrivePolicy_resultStandardScheme();
      }
    }

    private static class removeQueueRedrivePolicy_resultStandardScheme extends StandardScheme {

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

    private static class removeQueueRedrivePolicy_resultTupleScheme extends TupleScheme {

      @Override
      public void write(libthrift091.protocol.TProtocol prot, removeQueueRedrivePolicy_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, removeQueueRedrivePolicy_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 setPermission_args implements libthrift091.TBase, java.io.Serializable, Cloneable, Comparable   {
    private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("setPermission_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 setPermission_argsStandardSchemeFactory());
      schemes.put(TupleScheme.class, new setPermission_argsTupleSchemeFactory());
    }

    public SetPermissionRequest 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, SetPermissionRequest.class)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(setPermission_args.class, metaDataMap);
    }

    public setPermission_args() {
    }

    public setPermission_args(
      SetPermissionRequest request)
    {
      this();
      this.request = request;
    }

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

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

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

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

    public setPermission_args setRequest(SetPermissionRequest 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((SetPermissionRequest)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 setPermission_args)
        return this.equals((setPermission_args)that);
      return false;
    }

    public boolean equals(setPermission_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(setPermission_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("setPermission_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 setPermission_argsStandardSchemeFactory implements SchemeFactory {
      public setPermission_argsStandardScheme getScheme() {
        return new setPermission_argsStandardScheme();
      }
    }

    private static class setPermission_argsStandardScheme extends StandardScheme {

      public void read(libthrift091.protocol.TProtocol iprot, setPermission_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 SetPermissionRequest();
                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, setPermission_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 setPermission_argsTupleSchemeFactory implements SchemeFactory {
      public setPermission_argsTupleScheme getScheme() {
        return new setPermission_argsTupleScheme();
      }
    }

    private static class setPermission_argsTupleScheme extends TupleScheme {

      @Override
      public void write(libthrift091.protocol.TProtocol prot, setPermission_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, setPermission_args struct) throws libthrift091.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(1);
        if (incoming.get(0)) {
          struct.request = new SetPermissionRequest();
          struct.request.read(iprot);
          struct.setRequestIsSet(true);
        }
      }
    }

  }

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

    public setPermission_result() {
    }

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

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

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

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

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

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

    public boolean equals(setPermission_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(setPermission_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("setPermission_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 setPermission_resultStandardSchemeFactory implements SchemeFactory {
      public setPermission_resultStandardScheme getScheme() {
        return new setPermission_resultStandardScheme();
      }
    }

    private static class setPermission_resultStandardScheme extends StandardScheme {

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

    private static class setPermission_resultTupleScheme extends TupleScheme {

      @Override
      public void write(libthrift091.protocol.TProtocol prot, setPermission_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, setPermission_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 revokePermission_args implements libthrift091.TBase, java.io.Serializable, Cloneable, Comparable   {
    private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("revokePermission_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 revokePermission_argsStandardSchemeFactory());
      schemes.put(TupleScheme.class, new revokePermission_argsTupleSchemeFactory());
    }

    public RevokePermissionRequest 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, RevokePermissionRequest.class)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(revokePermission_args.class, metaDataMap);
    }

    public revokePermission_args() {
    }

    public revokePermission_args(
      RevokePermissionRequest request)
    {
      this();
      this.request = request;
    }

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

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

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

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

    public revokePermission_args setRequest(RevokePermissionRequest 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((RevokePermissionRequest)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 revokePermission_args)
        return this.equals((revokePermission_args)that);
      return false;
    }

    public boolean equals(revokePermission_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(revokePermission_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("revokePermission_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 revokePermission_argsStandardSchemeFactory implements SchemeFactory {
      public revokePermission_argsStandardScheme getScheme() {
        return new revokePermission_argsStandardScheme();
      }
    }

    private static class revokePermission_argsStandardScheme extends StandardScheme {

      public void read(libthrift091.protocol.TProtocol iprot, revokePermission_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 RevokePermissionRequest();
                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, revokePermission_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 revokePermission_argsTupleSchemeFactory implements SchemeFactory {
      public revokePermission_argsTupleScheme getScheme() {
        return new revokePermission_argsTupleScheme();
      }
    }

    private static class revokePermission_argsTupleScheme extends TupleScheme {

      @Override
      public void write(libthrift091.protocol.TProtocol prot, revokePermission_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, revokePermission_args struct) throws libthrift091.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(1);
        if (incoming.get(0)) {
          struct.request = new RevokePermissionRequest();
          struct.request.read(iprot);
          struct.setRequestIsSet(true);
        }
      }
    }

  }

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

    public revokePermission_result() {
    }

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

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

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

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

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

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

    public boolean equals(revokePermission_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(revokePermission_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("revokePermission_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 revokePermission_resultStandardSchemeFactory implements SchemeFactory {
      public revokePermission_resultStandardScheme getScheme() {
        return new revokePermission_resultStandardScheme();
      }
    }

    private static class revokePermission_resultStandardScheme extends StandardScheme {

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

    private static class revokePermission_resultTupleScheme extends TupleScheme {

      @Override
      public void write(libthrift091.protocol.TProtocol prot, revokePermission_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, revokePermission_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 queryPermission_args implements libthrift091.TBase, java.io.Serializable, Cloneable, Comparable   {
    private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("queryPermission_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 queryPermission_argsStandardSchemeFactory());
      schemes.put(TupleScheme.class, new queryPermission_argsTupleSchemeFactory());
    }

    public QueryPermissionRequest 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, QueryPermissionRequest.class)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(queryPermission_args.class, metaDataMap);
    }

    public queryPermission_args() {
    }

    public queryPermission_args(
      QueryPermissionRequest request)
    {
      this();
      this.request = request;
    }

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

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

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

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

    public queryPermission_args setRequest(QueryPermissionRequest 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((QueryPermissionRequest)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 queryPermission_args)
        return this.equals((queryPermission_args)that);
      return false;
    }

    public boolean equals(queryPermission_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(queryPermission_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("queryPermission_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 queryPermission_argsStandardSchemeFactory implements SchemeFactory {
      public queryPermission_argsStandardScheme getScheme() {
        return new queryPermission_argsStandardScheme();
      }
    }

    private static class queryPermission_argsStandardScheme extends StandardScheme {

      public void read(libthrift091.protocol.TProtocol iprot, queryPermission_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 QueryPermissionRequest();
                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, queryPermission_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 queryPermission_argsTupleSchemeFactory implements SchemeFactory {
      public queryPermission_argsTupleScheme getScheme() {
        return new queryPermission_argsTupleScheme();
      }
    }

    private static class queryPermission_argsTupleScheme extends TupleScheme {

      @Override
      public void write(libthrift091.protocol.TProtocol prot, queryPermission_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, queryPermission_args struct) throws libthrift091.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(1);
        if (incoming.get(0)) {
          struct.request = new QueryPermissionRequest();
          struct.request.read(iprot);
          struct.setRequestIsSet(true);
        }
      }
    }

  }

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

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

    public queryPermission_result() {
    }

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

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

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

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

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

    public queryPermission_result setSuccess(QueryPermissionResponse 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 queryPermission_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((QueryPermissionResponse)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 queryPermission_result)
        return this.equals((queryPermission_result)that);
      return false;
    }

    public boolean equals(queryPermission_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(queryPermission_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("queryPermission_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 queryPermission_resultStandardSchemeFactory implements SchemeFactory {
      public queryPermission_resultStandardScheme getScheme() {
        return new queryPermission_resultStandardScheme();
      }
    }

    private static class queryPermission_resultStandardScheme extends StandardScheme {

      public void read(libthrift091.protocol.TProtocol iprot, queryPermission_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 QueryPermissionResponse();
                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, queryPermission_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 queryPermission_resultTupleSchemeFactory implements SchemeFactory {
      public queryPermission_resultTupleScheme getScheme() {
        return new queryPermission_resultTupleScheme();
      }
    }

    private static class queryPermission_resultTupleScheme extends TupleScheme {

      @Override
      public void write(libthrift091.protocol.TProtocol prot, queryPermission_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, queryPermission_result struct) throws libthrift091.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(2);
        if (incoming.get(0)) {
          struct.success = new QueryPermissionResponse();
          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 queryPermissionForId_args implements libthrift091.TBase, java.io.Serializable, Cloneable, Comparable   {
    private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("queryPermissionForId_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 queryPermissionForId_argsStandardSchemeFactory());
      schemes.put(TupleScheme.class, new queryPermissionForId_argsTupleSchemeFactory());
    }

    public QueryPermissionForIdRequest 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, QueryPermissionForIdRequest.class)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(queryPermissionForId_args.class, metaDataMap);
    }

    public queryPermissionForId_args() {
    }

    public queryPermissionForId_args(
      QueryPermissionForIdRequest request)
    {
      this();
      this.request = request;
    }

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

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

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

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

    public queryPermissionForId_args setRequest(QueryPermissionForIdRequest 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((QueryPermissionForIdRequest)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 queryPermissionForId_args)
        return this.equals((queryPermissionForId_args)that);
      return false;
    }

    public boolean equals(queryPermissionForId_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(queryPermissionForId_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("queryPermissionForId_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 queryPermissionForId_argsStandardSchemeFactory implements SchemeFactory {
      public queryPermissionForId_argsStandardScheme getScheme() {
        return new queryPermissionForId_argsStandardScheme();
      }
    }

    private static class queryPermissionForId_argsStandardScheme extends StandardScheme {

      public void read(libthrift091.protocol.TProtocol iprot, queryPermissionForId_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 QueryPermissionForIdRequest();
                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, queryPermissionForId_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 queryPermissionForId_argsTupleSchemeFactory implements SchemeFactory {
      public queryPermissionForId_argsTupleScheme getScheme() {
        return new queryPermissionForId_argsTupleScheme();
      }
    }

    private static class queryPermissionForId_argsTupleScheme extends TupleScheme {

      @Override
      public void write(libthrift091.protocol.TProtocol prot, queryPermissionForId_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, queryPermissionForId_args struct) throws libthrift091.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(1);
        if (incoming.get(0)) {
          struct.request = new QueryPermissionForIdRequest();
          struct.request.read(iprot);
          struct.setRequestIsSet(true);
        }
      }
    }

  }

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

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

    public queryPermissionForId_result() {
    }

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

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

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

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

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

    public queryPermissionForId_result setSuccess(QueryPermissionForIdResponse 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 queryPermissionForId_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((QueryPermissionForIdResponse)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 queryPermissionForId_result)
        return this.equals((queryPermissionForId_result)that);
      return false;
    }

    public boolean equals(queryPermissionForId_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(queryPermissionForId_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("queryPermissionForId_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 queryPermissionForId_resultStandardSchemeFactory implements SchemeFactory {
      public queryPermissionForId_resultStandardScheme getScheme() {
        return new queryPermissionForId_resultStandardScheme();
      }
    }

    private static class queryPermissionForId_resultStandardScheme extends StandardScheme {

      public void read(libthrift091.protocol.TProtocol iprot, queryPermissionForId_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 QueryPermissionForIdResponse();
                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, queryPermissionForId_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 queryPermissionForId_resultTupleSchemeFactory implements SchemeFactory {
      public queryPermissionForId_resultTupleScheme getScheme() {
        return new queryPermissionForId_resultTupleScheme();
      }
    }

    private static class queryPermissionForId_resultTupleScheme extends TupleScheme {

      @Override
      public void write(libthrift091.protocol.TProtocol prot, queryPermissionForId_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, queryPermissionForId_result struct) throws libthrift091.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(2);
        if (incoming.get(0)) {
          struct.success = new QueryPermissionForIdResponse();
          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 listPermissions_args implements libthrift091.TBase, java.io.Serializable, Cloneable, Comparable   {
    private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("listPermissions_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 listPermissions_argsStandardSchemeFactory());
      schemes.put(TupleScheme.class, new listPermissions_argsTupleSchemeFactory());
    }

    public ListPermissionsRequest 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, ListPermissionsRequest.class)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(listPermissions_args.class, metaDataMap);
    }

    public listPermissions_args() {
    }

    public listPermissions_args(
      ListPermissionsRequest request)
    {
      this();
      this.request = request;
    }

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

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

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

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

    public listPermissions_args setRequest(ListPermissionsRequest 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((ListPermissionsRequest)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 listPermissions_args)
        return this.equals((listPermissions_args)that);
      return false;
    }

    public boolean equals(listPermissions_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(listPermissions_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("listPermissions_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 listPermissions_argsStandardSchemeFactory implements SchemeFactory {
      public listPermissions_argsStandardScheme getScheme() {
        return new listPermissions_argsStandardScheme();
      }
    }

    private static class listPermissions_argsStandardScheme extends StandardScheme {

      public void read(libthrift091.protocol.TProtocol iprot, listPermissions_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 ListPermissionsRequest();
                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, listPermissions_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 listPermissions_argsTupleSchemeFactory implements SchemeFactory {
      public listPermissions_argsTupleScheme getScheme() {
        return new listPermissions_argsTupleScheme();
      }
    }

    private static class listPermissions_argsTupleScheme extends TupleScheme {

      @Override
      public void write(libthrift091.protocol.TProtocol prot, listPermissions_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, listPermissions_args struct) throws libthrift091.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(1);
        if (incoming.get(0)) {
          struct.request = new ListPermissionsRequest();
          struct.request.read(iprot);
          struct.setRequestIsSet(true);
        }
      }
    }

  }

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

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

    public listPermissions_result() {
    }

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

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

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

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

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

    public listPermissions_result setSuccess(ListPermissionsResponse 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 listPermissions_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((ListPermissionsResponse)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 listPermissions_result)
        return this.equals((listPermissions_result)that);
      return false;
    }

    public boolean equals(listPermissions_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(listPermissions_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("listPermissions_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 listPermissions_resultStandardSchemeFactory implements SchemeFactory {
      public listPermissions_resultStandardScheme getScheme() {
        return new listPermissions_resultStandardScheme();
      }
    }

    private static class listPermissions_resultStandardScheme extends StandardScheme {

      public void read(libthrift091.protocol.TProtocol iprot, listPermissions_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 ListPermissionsResponse();
                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, listPermissions_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 listPermissions_resultTupleSchemeFactory implements SchemeFactory {
      public listPermissions_resultTupleScheme getScheme() {
        return new listPermissions_resultTupleScheme();
      }
    }

    private static class listPermissions_resultTupleScheme extends TupleScheme {

      @Override
      public void write(libthrift091.protocol.TProtocol prot, listPermissions_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, listPermissions_result struct) throws libthrift091.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(2);
        if (incoming.get(0)) {
          struct.success = new ListPermissionsResponse();
          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 createTag_args implements libthrift091.TBase, java.io.Serializable, Cloneable, Comparable   {
    private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("createTag_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 createTag_argsStandardSchemeFactory());
      schemes.put(TupleScheme.class, new createTag_argsTupleSchemeFactory());
    }

    public CreateTagRequest 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, CreateTagRequest.class)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(createTag_args.class, metaDataMap);
    }

    public createTag_args() {
    }

    public createTag_args(
      CreateTagRequest request)
    {
      this();
      this.request = request;
    }

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

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

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

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

    public createTag_args setRequest(CreateTagRequest 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((CreateTagRequest)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 createTag_args)
        return this.equals((createTag_args)that);
      return false;
    }

    public boolean equals(createTag_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(createTag_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("createTag_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 createTag_argsStandardSchemeFactory implements SchemeFactory {
      public createTag_argsStandardScheme getScheme() {
        return new createTag_argsStandardScheme();
      }
    }

    private static class createTag_argsStandardScheme extends StandardScheme {

      public void read(libthrift091.protocol.TProtocol iprot, createTag_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 CreateTagRequest();
                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, createTag_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 createTag_argsTupleSchemeFactory implements SchemeFactory {
      public createTag_argsTupleScheme getScheme() {
        return new createTag_argsTupleScheme();
      }
    }

    private static class createTag_argsTupleScheme extends TupleScheme {

      @Override
      public void write(libthrift091.protocol.TProtocol prot, createTag_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, createTag_args struct) throws libthrift091.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(1);
        if (incoming.get(0)) {
          struct.request = new CreateTagRequest();
          struct.request.read(iprot);
          struct.setRequestIsSet(true);
        }
      }
    }

  }

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

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

    public createTag_result() {
    }

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

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

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

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

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

    public createTag_result setSuccess(CreateTagResponse 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 createTag_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((CreateTagResponse)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 createTag_result)
        return this.equals((createTag_result)that);
      return false;
    }

    public boolean equals(createTag_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(createTag_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("createTag_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 createTag_resultStandardSchemeFactory implements SchemeFactory {
      public createTag_resultStandardScheme getScheme() {
        return new createTag_resultStandardScheme();
      }
    }

    private static class createTag_resultStandardScheme extends StandardScheme {

      public void read(libthrift091.protocol.TProtocol iprot, createTag_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 CreateTagResponse();
                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, createTag_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 createTag_resultTupleSchemeFactory implements SchemeFactory {
      public createTag_resultTupleScheme getScheme() {
        return new createTag_resultTupleScheme();
      }
    }

    private static class createTag_resultTupleScheme extends TupleScheme {

      @Override
      public void write(libthrift091.protocol.TProtocol prot, createTag_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, createTag_result struct) throws libthrift091.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(2);
        if (incoming.get(0)) {
          struct.success = new CreateTagResponse();
          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 deleteTag_args implements libthrift091.TBase, java.io.Serializable, Cloneable, Comparable   {
    private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("deleteTag_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 deleteTag_argsStandardSchemeFactory());
      schemes.put(TupleScheme.class, new deleteTag_argsTupleSchemeFactory());
    }

    public DeleteTagRequest 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, DeleteTagRequest.class)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(deleteTag_args.class, metaDataMap);
    }

    public deleteTag_args() {
    }

    public deleteTag_args(
      DeleteTagRequest request)
    {
      this();
      this.request = request;
    }

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

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

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

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

    public deleteTag_args setRequest(DeleteTagRequest 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((DeleteTagRequest)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 deleteTag_args)
        return this.equals((deleteTag_args)that);
      return false;
    }

    public boolean equals(deleteTag_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(deleteTag_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("deleteTag_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 deleteTag_argsStandardSchemeFactory implements SchemeFactory {
      public deleteTag_argsStandardScheme getScheme() {
        return new deleteTag_argsStandardScheme();
      }
    }

    private static class deleteTag_argsStandardScheme extends StandardScheme {

      public void read(libthrift091.protocol.TProtocol iprot, deleteTag_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 DeleteTagRequest();
                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, deleteTag_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 deleteTag_argsTupleSchemeFactory implements SchemeFactory {
      public deleteTag_argsTupleScheme getScheme() {
        return new deleteTag_argsTupleScheme();
      }
    }

    private static class deleteTag_argsTupleScheme extends TupleScheme {

      @Override
      public void write(libthrift091.protocol.TProtocol prot, deleteTag_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, deleteTag_args struct) throws libthrift091.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(1);
        if (incoming.get(0)) {
          struct.request = new DeleteTagRequest();
          struct.request.read(iprot);
          struct.setRequestIsSet(true);
        }
      }
    }

  }

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

    public deleteTag_result() {
    }

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

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

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

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

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

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

    public boolean equals(deleteTag_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(deleteTag_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("deleteTag_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 deleteTag_resultStandardSchemeFactory implements SchemeFactory {
      public deleteTag_resultStandardScheme getScheme() {
        return new deleteTag_resultStandardScheme();
      }
    }

    private static class deleteTag_resultStandardScheme extends StandardScheme {

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

    private static class deleteTag_resultTupleScheme extends TupleScheme {

      @Override
      public void write(libthrift091.protocol.TProtocol prot, deleteTag_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, deleteTag_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 getTagInfo_args implements libthrift091.TBase, java.io.Serializable, Cloneable, Comparable   {
    private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("getTagInfo_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 getTagInfo_argsStandardSchemeFactory());
      schemes.put(TupleScheme.class, new getTagInfo_argsTupleSchemeFactory());
    }

    public GetTagInfoRequest 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, GetTagInfoRequest.class)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(getTagInfo_args.class, metaDataMap);
    }

    public getTagInfo_args() {
    }

    public getTagInfo_args(
      GetTagInfoRequest request)
    {
      this();
      this.request = request;
    }

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

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

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

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

    public getTagInfo_args setRequest(GetTagInfoRequest 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((GetTagInfoRequest)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 getTagInfo_args)
        return this.equals((getTagInfo_args)that);
      return false;
    }

    public boolean equals(getTagInfo_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(getTagInfo_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("getTagInfo_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 getTagInfo_argsStandardSchemeFactory implements SchemeFactory {
      public getTagInfo_argsStandardScheme getScheme() {
        return new getTagInfo_argsStandardScheme();
      }
    }

    private static class getTagInfo_argsStandardScheme extends StandardScheme {

      public void read(libthrift091.protocol.TProtocol iprot, getTagInfo_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 GetTagInfoRequest();
                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, getTagInfo_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 getTagInfo_argsTupleSchemeFactory implements SchemeFactory {
      public getTagInfo_argsTupleScheme getScheme() {
        return new getTagInfo_argsTupleScheme();
      }
    }

    private static class getTagInfo_argsTupleScheme extends TupleScheme {

      @Override
      public void write(libthrift091.protocol.TProtocol prot, getTagInfo_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, getTagInfo_args struct) throws libthrift091.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(1);
        if (incoming.get(0)) {
          struct.request = new GetTagInfoRequest();
          struct.request.read(iprot);
          struct.setRequestIsSet(true);
        }
      }
    }

  }

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

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

    public getTagInfo_result() {
    }

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

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

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

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

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

    public getTagInfo_result setSuccess(GetTagInfoResponse 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 getTagInfo_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((GetTagInfoResponse)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 getTagInfo_result)
        return this.equals((getTagInfo_result)that);
      return false;
    }

    public boolean equals(getTagInfo_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(getTagInfo_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("getTagInfo_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 getTagInfo_resultStandardSchemeFactory implements SchemeFactory {
      public getTagInfo_resultStandardScheme getScheme() {
        return new getTagInfo_resultStandardScheme();
      }
    }

    private static class getTagInfo_resultStandardScheme extends StandardScheme {

      public void read(libthrift091.protocol.TProtocol iprot, getTagInfo_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 GetTagInfoResponse();
                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, getTagInfo_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 getTagInfo_resultTupleSchemeFactory implements SchemeFactory {
      public getTagInfo_resultTupleScheme getScheme() {
        return new getTagInfo_resultTupleScheme();
      }
    }

    private static class getTagInfo_resultTupleScheme extends TupleScheme {

      @Override
      public void write(libthrift091.protocol.TProtocol prot, getTagInfo_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, getTagInfo_result struct) throws libthrift091.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(2);
        if (incoming.get(0)) {
          struct.success = new GetTagInfoResponse();
          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 listTag_args implements libthrift091.TBase, java.io.Serializable, Cloneable, Comparable   {
    private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("listTag_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 listTag_argsStandardSchemeFactory());
      schemes.put(TupleScheme.class, new listTag_argsTupleSchemeFactory());
    }

    public ListTagRequest 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, ListTagRequest.class)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(listTag_args.class, metaDataMap);
    }

    public listTag_args() {
    }

    public listTag_args(
      ListTagRequest request)
    {
      this();
      this.request = request;
    }

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

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

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

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

    public listTag_args setRequest(ListTagRequest 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((ListTagRequest)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 listTag_args)
        return this.equals((listTag_args)that);
      return false;
    }

    public boolean equals(listTag_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(listTag_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("listTag_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 listTag_argsStandardSchemeFactory implements SchemeFactory {
      public listTag_argsStandardScheme getScheme() {
        return new listTag_argsStandardScheme();
      }
    }

    private static class listTag_argsStandardScheme extends StandardScheme {

      public void read(libthrift091.protocol.TProtocol iprot, listTag_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 ListTagRequest();
                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, listTag_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 listTag_argsTupleSchemeFactory implements SchemeFactory {
      public listTag_argsTupleScheme getScheme() {
        return new listTag_argsTupleScheme();
      }
    }

    private static class listTag_argsTupleScheme extends TupleScheme {

      @Override
      public void write(libthrift091.protocol.TProtocol prot, listTag_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, listTag_args struct) throws libthrift091.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(1);
        if (incoming.get(0)) {
          struct.request = new ListTagRequest();
          struct.request.read(iprot);
          struct.setRequestIsSet(true);
        }
      }
    }

  }

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

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

    public listTag_result() {
    }

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

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

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

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

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

    public listTag_result setSuccess(ListTagResponse 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 listTag_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((ListTagResponse)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 listTag_result)
        return this.equals((listTag_result)that);
      return false;
    }

    public boolean equals(listTag_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(listTag_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("listTag_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 listTag_resultStandardSchemeFactory implements SchemeFactory {
      public listTag_resultStandardScheme getScheme() {
        return new listTag_resultStandardScheme();
      }
    }

    private static class listTag_resultStandardScheme extends StandardScheme {

      public void read(libthrift091.protocol.TProtocol iprot, listTag_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 ListTagResponse();
                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, listTag_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 listTag_resultTupleSchemeFactory implements SchemeFactory {
      public listTag_resultTupleScheme getScheme() {
        return new listTag_resultTupleScheme();
      }
    }

    private static class listTag_resultTupleScheme extends TupleScheme {

      @Override
      public void write(libthrift091.protocol.TProtocol prot, listTag_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, listTag_result struct) throws libthrift091.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(2);
        if (incoming.get(0)) {
          struct.success = new ListTagResponse();
          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 queryMetric_args implements libthrift091.TBase, java.io.Serializable, Cloneable, Comparable   {
    private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("queryMetric_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 queryMetric_argsStandardSchemeFactory());
      schemes.put(TupleScheme.class, new queryMetric_argsTupleSchemeFactory());
    }

    public QueryMetricRequest 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, QueryMetricRequest.class)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(queryMetric_args.class, metaDataMap);
    }

    public queryMetric_args() {
    }

    public queryMetric_args(
      QueryMetricRequest request)
    {
      this();
      this.request = request;
    }

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

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

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

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

    public queryMetric_args setRequest(QueryMetricRequest 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((QueryMetricRequest)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 queryMetric_args)
        return this.equals((queryMetric_args)that);
      return false;
    }

    public boolean equals(queryMetric_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(queryMetric_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("queryMetric_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 queryMetric_argsStandardSchemeFactory implements SchemeFactory {
      public queryMetric_argsStandardScheme getScheme() {
        return new queryMetric_argsStandardScheme();
      }
    }

    private static class queryMetric_argsStandardScheme extends StandardScheme {

      public void read(libthrift091.protocol.TProtocol iprot, queryMetric_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 QueryMetricRequest();
                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, queryMetric_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 queryMetric_argsTupleSchemeFactory implements SchemeFactory {
      public queryMetric_argsTupleScheme getScheme() {
        return new queryMetric_argsTupleScheme();
      }
    }

    private static class queryMetric_argsTupleScheme extends TupleScheme {

      @Override
      public void write(libthrift091.protocol.TProtocol prot, queryMetric_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, queryMetric_args struct) throws libthrift091.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(1);
        if (incoming.get(0)) {
          struct.request = new QueryMetricRequest();
          struct.request.read(iprot);
          struct.setRequestIsSet(true);
        }
      }
    }

  }

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

    public TimeSeriesData 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, TimeSeriesData.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(queryMetric_result.class, metaDataMap);
    }

    public queryMetric_result() {
    }

    public queryMetric_result(
      TimeSeriesData success,
      com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException e)
    {
      this();
      this.success = success;
      this.e = e;
    }

    /**
     * Performs a deep copy on other.
     */
    public queryMetric_result(queryMetric_result other) {
      if (other.isSetSuccess()) {
        this.success = new TimeSeriesData(other.success);
      }
      if (other.isSetE()) {
        this.e = new com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException(other.e);
      }
    }

    public queryMetric_result deepCopy() {
      return new queryMetric_result(this);
    }

    @Override
    public void clear() {
      this.success = null;
      this.e = null;
    }

    public TimeSeriesData getSuccess() {
      return this.success;
    }

    public queryMetric_result setSuccess(TimeSeriesData 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 queryMetric_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((TimeSeriesData)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 queryMetric_result)
        return this.equals((queryMetric_result)that);
      return false;
    }

    public boolean equals(queryMetric_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(queryMetric_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("queryMetric_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 queryMetric_resultStandardSchemeFactory implements SchemeFactory {
      public queryMetric_resultStandardScheme getScheme() {
        return new queryMetric_resultStandardScheme();
      }
    }

    private static class queryMetric_resultStandardScheme extends StandardScheme {

      public void read(libthrift091.protocol.TProtocol iprot, queryMetric_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 TimeSeriesData();
                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, queryMetric_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 queryMetric_resultTupleSchemeFactory implements SchemeFactory {
      public queryMetric_resultTupleScheme getScheme() {
        return new queryMetric_resultTupleScheme();
      }
    }

    private static class queryMetric_resultTupleScheme extends TupleScheme {

      @Override
      public void write(libthrift091.protocol.TProtocol prot, queryMetric_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, queryMetric_result struct) throws libthrift091.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(2);
        if (incoming.get(0)) {
          struct.success = new TimeSeriesData();
          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 queryPrivilegedQueue_args implements libthrift091.TBase, java.io.Serializable, Cloneable, Comparable   {
    private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("queryPrivilegedQueue_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 queryPrivilegedQueue_argsStandardSchemeFactory());
      schemes.put(TupleScheme.class, new queryPrivilegedQueue_argsTupleSchemeFactory());
    }

    public QueryPrivilegedQueueRequest 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, QueryPrivilegedQueueRequest.class)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(queryPrivilegedQueue_args.class, metaDataMap);
    }

    public queryPrivilegedQueue_args() {
    }

    public queryPrivilegedQueue_args(
      QueryPrivilegedQueueRequest request)
    {
      this();
      this.request = request;
    }

    /**
     * Performs a deep copy on other.
     */
    public queryPrivilegedQueue_args(queryPrivilegedQueue_args other) {
      if (other.isSetRequest()) {
        this.request = new QueryPrivilegedQueueRequest(other.request);
      }
    }

    public queryPrivilegedQueue_args deepCopy() {
      return new queryPrivilegedQueue_args(this);
    }

    @Override
    public void clear() {
      this.request = null;
    }

    public QueryPrivilegedQueueRequest getRequest() {
      return this.request;
    }

    public queryPrivilegedQueue_args setRequest(QueryPrivilegedQueueRequest 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((QueryPrivilegedQueueRequest)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 queryPrivilegedQueue_args)
        return this.equals((queryPrivilegedQueue_args)that);
      return false;
    }

    public boolean equals(queryPrivilegedQueue_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(queryPrivilegedQueue_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("queryPrivilegedQueue_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 queryPrivilegedQueue_argsStandardSchemeFactory implements SchemeFactory {
      public queryPrivilegedQueue_argsStandardScheme getScheme() {
        return new queryPrivilegedQueue_argsStandardScheme();
      }
    }

    private static class queryPrivilegedQueue_argsStandardScheme extends StandardScheme {

      public void read(libthrift091.protocol.TProtocol iprot, queryPrivilegedQueue_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 QueryPrivilegedQueueRequest();
                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, queryPrivilegedQueue_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 queryPrivilegedQueue_argsTupleSchemeFactory implements SchemeFactory {
      public queryPrivilegedQueue_argsTupleScheme getScheme() {
        return new queryPrivilegedQueue_argsTupleScheme();
      }
    }

    private static class queryPrivilegedQueue_argsTupleScheme extends TupleScheme {

      @Override
      public void write(libthrift091.protocol.TProtocol prot, queryPrivilegedQueue_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, queryPrivilegedQueue_args struct) throws libthrift091.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(1);
        if (incoming.get(0)) {
          struct.request = new QueryPrivilegedQueueRequest();
          struct.request.read(iprot);
          struct.setRequestIsSet(true);
        }
      }
    }

  }

  public static class queryPrivilegedQueue_result implements libthrift091.TBase, java.io.Serializable, Cloneable, Comparable   {
    private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("queryPrivilegedQueue_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 queryPrivilegedQueue_resultStandardSchemeFactory());
      schemes.put(TupleScheme.class, new queryPrivilegedQueue_resultTupleSchemeFactory());
    }

    public QueryPrivilegedQueueResponse 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, QueryPrivilegedQueueResponse.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(queryPrivilegedQueue_result.class, metaDataMap);
    }

    public queryPrivilegedQueue_result() {
    }

    public queryPrivilegedQueue_result(
      QueryPrivilegedQueueResponse success,
      com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException e)
    {
      this();
      this.success = success;
      this.e = e;
    }

    /**
     * Performs a deep copy on other.
     */
    public queryPrivilegedQueue_result(queryPrivilegedQueue_result other) {
      if (other.isSetSuccess()) {
        this.success = new QueryPrivilegedQueueResponse(other.success);
      }
      if (other.isSetE()) {
        this.e = new com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException(other.e);
      }
    }

    public queryPrivilegedQueue_result deepCopy() {
      return new queryPrivilegedQueue_result(this);
    }

    @Override
    public void clear() {
      this.success = null;
      this.e = null;
    }

    public QueryPrivilegedQueueResponse getSuccess() {
      return this.success;
    }

    public queryPrivilegedQueue_result setSuccess(QueryPrivilegedQueueResponse 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 queryPrivilegedQueue_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((QueryPrivilegedQueueResponse)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 queryPrivilegedQueue_result)
        return this.equals((queryPrivilegedQueue_result)that);
      return false;
    }

    public boolean equals(queryPrivilegedQueue_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(queryPrivilegedQueue_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("queryPrivilegedQueue_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 queryPrivilegedQueue_resultStandardSchemeFactory implements SchemeFactory {
      public queryPrivilegedQueue_resultStandardScheme getScheme() {
        return new queryPrivilegedQueue_resultStandardScheme();
      }
    }

    private static class queryPrivilegedQueue_resultStandardScheme extends StandardScheme {

      public void read(libthrift091.protocol.TProtocol iprot, queryPrivilegedQueue_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 QueryPrivilegedQueueResponse();
                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, queryPrivilegedQueue_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 queryPrivilegedQueue_resultTupleSchemeFactory implements SchemeFactory {
      public queryPrivilegedQueue_resultTupleScheme getScheme() {
        return new queryPrivilegedQueue_resultTupleScheme();
      }
    }

    private static class queryPrivilegedQueue_resultTupleScheme extends TupleScheme {

      @Override
      public void write(libthrift091.protocol.TProtocol prot, queryPrivilegedQueue_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, queryPrivilegedQueue_result struct) throws libthrift091.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(2);
        if (incoming.get(0)) {
          struct.success = new QueryPrivilegedQueueResponse();
          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 verifyEMQAdmin_args implements libthrift091.TBase, java.io.Serializable, Cloneable, Comparable   {
    private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("verifyEMQAdmin_args");


    private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>();
    static {
      schemes.put(StandardScheme.class, new verifyEMQAdmin_argsStandardSchemeFactory());
      schemes.put(TupleScheme.class, new verifyEMQAdmin_argsTupleSchemeFactory());
    }


    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements libthrift091.TFieldIdEnum {
;

      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) {
          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;
      }
    }
    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);
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(verifyEMQAdmin_args.class, metaDataMap);
    }

    public verifyEMQAdmin_args() {
    }

    /**
     * Performs a deep copy on other.
     */
    public verifyEMQAdmin_args(verifyEMQAdmin_args other) {
    }

    public verifyEMQAdmin_args deepCopy() {
      return new verifyEMQAdmin_args(this);
    }

    @Override
    public void clear() {
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      }
      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) {
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof verifyEMQAdmin_args)
        return this.equals((verifyEMQAdmin_args)that);
      return false;
    }

    public boolean equals(verifyEMQAdmin_args that) {
      if (that == null)
        return false;

      return true;
    }

    @Override
    public int hashCode() {
      List list = new ArrayList();

      return list.hashCode();
    }

    @Override
    public int compareTo(verifyEMQAdmin_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;

      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("verifyEMQAdmin_args(");
      boolean first = true;

      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 verifyEMQAdmin_argsStandardSchemeFactory implements SchemeFactory {
      public verifyEMQAdmin_argsStandardScheme getScheme() {
        return new verifyEMQAdmin_argsStandardScheme();
      }
    }

    private static class verifyEMQAdmin_argsStandardScheme extends StandardScheme {

      public void read(libthrift091.protocol.TProtocol iprot, verifyEMQAdmin_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) {
            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, verifyEMQAdmin_args struct) throws libthrift091.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class verifyEMQAdmin_argsTupleSchemeFactory implements SchemeFactory {
      public verifyEMQAdmin_argsTupleScheme getScheme() {
        return new verifyEMQAdmin_argsTupleScheme();
      }
    }

    private static class verifyEMQAdmin_argsTupleScheme extends TupleScheme {

      @Override
      public void write(libthrift091.protocol.TProtocol prot, verifyEMQAdmin_args struct) throws libthrift091.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
      }

      @Override
      public void read(libthrift091.protocol.TProtocol prot, verifyEMQAdmin_args struct) throws libthrift091.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
      }
    }

  }

  public static class verifyEMQAdmin_result implements libthrift091.TBase, java.io.Serializable, Cloneable, Comparable   {
    private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("verifyEMQAdmin_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 verifyEMQAdmin_resultStandardSchemeFactory());
      schemes.put(TupleScheme.class, new verifyEMQAdmin_resultTupleSchemeFactory());
    }

    public VerifyEMQAdminResponse 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, VerifyEMQAdminResponse.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(verifyEMQAdmin_result.class, metaDataMap);
    }

    public verifyEMQAdmin_result() {
    }

    public verifyEMQAdmin_result(
      VerifyEMQAdminResponse success,
      com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException e)
    {
      this();
      this.success = success;
      this.e = e;
    }

    /**
     * Performs a deep copy on other.
     */
    public verifyEMQAdmin_result(verifyEMQAdmin_result other) {
      if (other.isSetSuccess()) {
        this.success = new VerifyEMQAdminResponse(other.success);
      }
      if (other.isSetE()) {
        this.e = new com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException(other.e);
      }
    }

    public verifyEMQAdmin_result deepCopy() {
      return new verifyEMQAdmin_result(this);
    }

    @Override
    public void clear() {
      this.success = null;
      this.e = null;
    }

    public VerifyEMQAdminResponse getSuccess() {
      return this.success;
    }

    public verifyEMQAdmin_result setSuccess(VerifyEMQAdminResponse 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 verifyEMQAdmin_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((VerifyEMQAdminResponse)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 verifyEMQAdmin_result)
        return this.equals((verifyEMQAdmin_result)that);
      return false;
    }

    public boolean equals(verifyEMQAdmin_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(verifyEMQAdmin_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("verifyEMQAdmin_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 verifyEMQAdmin_resultStandardSchemeFactory implements SchemeFactory {
      public verifyEMQAdmin_resultStandardScheme getScheme() {
        return new verifyEMQAdmin_resultStandardScheme();
      }
    }

    private static class verifyEMQAdmin_resultStandardScheme extends StandardScheme {

      public void read(libthrift091.protocol.TProtocol iprot, verifyEMQAdmin_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 VerifyEMQAdminResponse();
                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, verifyEMQAdmin_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 verifyEMQAdmin_resultTupleSchemeFactory implements SchemeFactory {
      public verifyEMQAdmin_resultTupleScheme getScheme() {
        return new verifyEMQAdmin_resultTupleScheme();
      }
    }

    private static class verifyEMQAdmin_resultTupleScheme extends TupleScheme {

      @Override
      public void write(libthrift091.protocol.TProtocol prot, verifyEMQAdmin_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, verifyEMQAdmin_result struct) throws libthrift091.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(2);
        if (incoming.get(0)) {
          struct.success = new VerifyEMQAdminResponse();
          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 verifyEMQAdminRole_args implements libthrift091.TBase, java.io.Serializable, Cloneable, Comparable   {
    private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("verifyEMQAdminRole_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 verifyEMQAdminRole_argsStandardSchemeFactory());
      schemes.put(TupleScheme.class, new verifyEMQAdminRole_argsTupleSchemeFactory());
    }

    public VerifyEMQAdminRoleRequest 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, VerifyEMQAdminRoleRequest.class)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(verifyEMQAdminRole_args.class, metaDataMap);
    }

    public verifyEMQAdminRole_args() {
    }

    public verifyEMQAdminRole_args(
      VerifyEMQAdminRoleRequest request)
    {
      this();
      this.request = request;
    }

    /**
     * Performs a deep copy on other.
     */
    public verifyEMQAdminRole_args(verifyEMQAdminRole_args other) {
      if (other.isSetRequest()) {
        this.request = new VerifyEMQAdminRoleRequest(other.request);
      }
    }

    public verifyEMQAdminRole_args deepCopy() {
      return new verifyEMQAdminRole_args(this);
    }

    @Override
    public void clear() {
      this.request = null;
    }

    public VerifyEMQAdminRoleRequest getRequest() {
      return this.request;
    }

    public verifyEMQAdminRole_args setRequest(VerifyEMQAdminRoleRequest 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((VerifyEMQAdminRoleRequest)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 verifyEMQAdminRole_args)
        return this.equals((verifyEMQAdminRole_args)that);
      return false;
    }

    public boolean equals(verifyEMQAdminRole_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(verifyEMQAdminRole_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("verifyEMQAdminRole_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 verifyEMQAdminRole_argsStandardSchemeFactory implements SchemeFactory {
      public verifyEMQAdminRole_argsStandardScheme getScheme() {
        return new verifyEMQAdminRole_argsStandardScheme();
      }
    }

    private static class verifyEMQAdminRole_argsStandardScheme extends StandardScheme {

      public void read(libthrift091.protocol.TProtocol iprot, verifyEMQAdminRole_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 VerifyEMQAdminRoleRequest();
                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, verifyEMQAdminRole_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 verifyEMQAdminRole_argsTupleSchemeFactory implements SchemeFactory {
      public verifyEMQAdminRole_argsTupleScheme getScheme() {
        return new verifyEMQAdminRole_argsTupleScheme();
      }
    }

    private static class verifyEMQAdminRole_argsTupleScheme extends TupleScheme {

      @Override
      public void write(libthrift091.protocol.TProtocol prot, verifyEMQAdminRole_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, verifyEMQAdminRole_args struct) throws libthrift091.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(1);
        if (incoming.get(0)) {
          struct.request = new VerifyEMQAdminRoleRequest();
          struct.request.read(iprot);
          struct.setRequestIsSet(true);
        }
      }
    }

  }

  public static class verifyEMQAdminRole_result implements libthrift091.TBase, java.io.Serializable, Cloneable, Comparable   {
    private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("verifyEMQAdminRole_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 verifyEMQAdminRole_resultStandardSchemeFactory());
      schemes.put(TupleScheme.class, new verifyEMQAdminRole_resultTupleSchemeFactory());
    }

    public VerifyEMQAdminRoleResponse 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, VerifyEMQAdminRoleResponse.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(verifyEMQAdminRole_result.class, metaDataMap);
    }

    public verifyEMQAdminRole_result() {
    }

    public verifyEMQAdminRole_result(
      VerifyEMQAdminRoleResponse success,
      com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException e)
    {
      this();
      this.success = success;
      this.e = e;
    }

    /**
     * Performs a deep copy on other.
     */
    public verifyEMQAdminRole_result(verifyEMQAdminRole_result other) {
      if (other.isSetSuccess()) {
        this.success = new VerifyEMQAdminRoleResponse(other.success);
      }
      if (other.isSetE()) {
        this.e = new com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException(other.e);
      }
    }

    public verifyEMQAdminRole_result deepCopy() {
      return new verifyEMQAdminRole_result(this);
    }

    @Override
    public void clear() {
      this.success = null;
      this.e = null;
    }

    public VerifyEMQAdminRoleResponse getSuccess() {
      return this.success;
    }

    public verifyEMQAdminRole_result setSuccess(VerifyEMQAdminRoleResponse 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 verifyEMQAdminRole_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((VerifyEMQAdminRoleResponse)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 verifyEMQAdminRole_result)
        return this.equals((verifyEMQAdminRole_result)that);
      return false;
    }

    public boolean equals(verifyEMQAdminRole_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(verifyEMQAdminRole_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("verifyEMQAdminRole_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 verifyEMQAdminRole_resultStandardSchemeFactory implements SchemeFactory {
      public verifyEMQAdminRole_resultStandardScheme getScheme() {
        return new verifyEMQAdminRole_resultStandardScheme();
      }
    }

    private static class verifyEMQAdminRole_resultStandardScheme extends StandardScheme {

      public void read(libthrift091.protocol.TProtocol iprot, verifyEMQAdminRole_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 VerifyEMQAdminRoleResponse();
                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, verifyEMQAdminRole_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 verifyEMQAdminRole_resultTupleSchemeFactory implements SchemeFactory {
      public verifyEMQAdminRole_resultTupleScheme getScheme() {
        return new verifyEMQAdminRole_resultTupleScheme();
      }
    }

    private static class verifyEMQAdminRole_resultTupleScheme extends TupleScheme {

      @Override
      public void write(libthrift091.protocol.TProtocol prot, verifyEMQAdminRole_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, verifyEMQAdminRole_result struct) throws libthrift091.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(2);
        if (incoming.get(0)) {
          struct.success = new VerifyEMQAdminRoleResponse();
          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 copyQueue_args implements libthrift091.TBase, java.io.Serializable, Cloneable, Comparable   {
    private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("copyQueue_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 copyQueue_argsStandardSchemeFactory());
      schemes.put(TupleScheme.class, new copyQueue_argsTupleSchemeFactory());
    }

    public CopyQueueRequest 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, CopyQueueRequest.class)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(copyQueue_args.class, metaDataMap);
    }

    public copyQueue_args() {
    }

    public copyQueue_args(
      CopyQueueRequest request)
    {
      this();
      this.request = request;
    }

    /**
     * Performs a deep copy on other.
     */
    public copyQueue_args(copyQueue_args other) {
      if (other.isSetRequest()) {
        this.request = new CopyQueueRequest(other.request);
      }
    }

    public copyQueue_args deepCopy() {
      return new copyQueue_args(this);
    }

    @Override
    public void clear() {
      this.request = null;
    }

    public CopyQueueRequest getRequest() {
      return this.request;
    }

    public copyQueue_args setRequest(CopyQueueRequest 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((CopyQueueRequest)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 copyQueue_args)
        return this.equals((copyQueue_args)that);
      return false;
    }

    public boolean equals(copyQueue_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(copyQueue_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("copyQueue_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 copyQueue_argsStandardSchemeFactory implements SchemeFactory {
      public copyQueue_argsStandardScheme getScheme() {
        return new copyQueue_argsStandardScheme();
      }
    }

    private static class copyQueue_argsStandardScheme extends StandardScheme {

      public void read(libthrift091.protocol.TProtocol iprot, copyQueue_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 CopyQueueRequest();
                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, copyQueue_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 copyQueue_argsTupleSchemeFactory implements SchemeFactory {
      public copyQueue_argsTupleScheme getScheme() {
        return new copyQueue_argsTupleScheme();
      }
    }

    private static class copyQueue_argsTupleScheme extends TupleScheme {

      @Override
      public void write(libthrift091.protocol.TProtocol prot, copyQueue_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, copyQueue_args struct) throws libthrift091.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(1);
        if (incoming.get(0)) {
          struct.request = new CopyQueueRequest();
          struct.request.read(iprot);
          struct.setRequestIsSet(true);
        }
      }
    }

  }

  public static class copyQueue_result implements libthrift091.TBase, java.io.Serializable, Cloneable, Comparable   {
    private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("copyQueue_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 copyQueue_resultStandardSchemeFactory());
      schemes.put(TupleScheme.class, new copyQueue_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(copyQueue_result.class, metaDataMap);
    }

    public copyQueue_result() {
    }

    public copyQueue_result(
      com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException e)
    {
      this();
      this.e = e;
    }

    /**
     * Performs a deep copy on other.
     */
    public copyQueue_result(copyQueue_result other) {
      if (other.isSetE()) {
        this.e = new com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException(other.e);
      }
    }

    public copyQueue_result deepCopy() {
      return new copyQueue_result(this);
    }

    @Override
    public void clear() {
      this.e = null;
    }

    public com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException getE() {
      return this.e;
    }

    public copyQueue_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 copyQueue_result)
        return this.equals((copyQueue_result)that);
      return false;
    }

    public boolean equals(copyQueue_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(copyQueue_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("copyQueue_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 copyQueue_resultStandardSchemeFactory implements SchemeFactory {
      public copyQueue_resultStandardScheme getScheme() {
        return new copyQueue_resultStandardScheme();
      }
    }

    private static class copyQueue_resultStandardScheme extends StandardScheme {

      public void read(libthrift091.protocol.TProtocol iprot, copyQueue_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, copyQueue_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 copyQueue_resultTupleSchemeFactory implements SchemeFactory {
      public copyQueue_resultTupleScheme getScheme() {
        return new copyQueue_resultTupleScheme();
      }
    }

    private static class copyQueue_resultTupleScheme extends TupleScheme {

      @Override
      public void write(libthrift091.protocol.TProtocol prot, copyQueue_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, copyQueue_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 getQueueMeta_args implements libthrift091.TBase, java.io.Serializable, Cloneable, Comparable   {
    private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("getQueueMeta_args");

    private static final libthrift091.protocol.TField QUEUE_NAME_FIELD_DESC = new libthrift091.protocol.TField("queueName", libthrift091.protocol.TType.STRING, (short)1);

    private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>();
    static {
      schemes.put(StandardScheme.class, new getQueueMeta_argsStandardSchemeFactory());
      schemes.put(TupleScheme.class, new getQueueMeta_argsTupleSchemeFactory());
    }

    public String queueName; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements libthrift091.TFieldIdEnum {
      QUEUE_NAME((short)1, "queueName");

      private static final Map byName = new HashMap();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // QUEUE_NAME
            return QUEUE_NAME;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final Map<_Fields, libthrift091.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, libthrift091.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, libthrift091.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.QUEUE_NAME, new libthrift091.meta_data.FieldMetaData("queueName", libthrift091.TFieldRequirementType.DEFAULT, 
          new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.STRING)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(getQueueMeta_args.class, metaDataMap);
    }

    public getQueueMeta_args() {
    }

    public getQueueMeta_args(
      String queueName)
    {
      this();
      this.queueName = queueName;
    }

    /**
     * Performs a deep copy on other.
     */
    public getQueueMeta_args(getQueueMeta_args other) {
      if (other.isSetQueueName()) {
        this.queueName = other.queueName;
      }
    }

    public getQueueMeta_args deepCopy() {
      return new getQueueMeta_args(this);
    }

    @Override
    public void clear() {
      this.queueName = null;
    }

    public String getQueueName() {
      return this.queueName;
    }

    public getQueueMeta_args setQueueName(String queueName) {
      this.queueName = queueName;
      return this;
    }

    public void unsetQueueName() {
      this.queueName = null;
    }

    /** Returns true if field queueName is set (has been assigned a value) and false otherwise */
    public boolean isSetQueueName() {
      return this.queueName != null;
    }

    public void setQueueNameIsSet(boolean value) {
      if (!value) {
        this.queueName = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case QUEUE_NAME:
        if (value == null) {
          unsetQueueName();
        } else {
          setQueueName((String)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case QUEUE_NAME:
        return getQueueName();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case QUEUE_NAME:
        return isSetQueueName();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof getQueueMeta_args)
        return this.equals((getQueueMeta_args)that);
      return false;
    }

    public boolean equals(getQueueMeta_args that) {
      if (that == null)
        return false;

      boolean this_present_queueName = true && this.isSetQueueName();
      boolean that_present_queueName = true && that.isSetQueueName();
      if (this_present_queueName || that_present_queueName) {
        if (!(this_present_queueName && that_present_queueName))
          return false;
        if (!this.queueName.equals(that.queueName))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      List list = new ArrayList();

      boolean present_queueName = true && (isSetQueueName());
      list.add(present_queueName);
      if (present_queueName)
        list.add(queueName);

      return list.hashCode();
    }

    @Override
    public int compareTo(getQueueMeta_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetQueueName()).compareTo(other.isSetQueueName());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetQueueName()) {
        lastComparison = libthrift091.TBaseHelper.compareTo(this.queueName, other.queueName);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      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("getQueueMeta_args(");
      boolean first = true;

      sb.append("queueName:");
      if (this.queueName == null) {
        sb.append("null");
      } else {
        sb.append(this.queueName);
      }
      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 getQueueMeta_argsStandardSchemeFactory implements SchemeFactory {
      public getQueueMeta_argsStandardScheme getScheme() {
        return new getQueueMeta_argsStandardScheme();
      }
    }

    private static class getQueueMeta_argsStandardScheme extends StandardScheme {

      public void read(libthrift091.protocol.TProtocol iprot, getQueueMeta_args struct) throws libthrift091.TException {
        libthrift091.protocol.TField schemeField;
        iprot.readStructBegin();
        while (true)
        {
          schemeField = iprot.readFieldBegin();
          if (schemeField.type == libthrift091.protocol.TType.STOP) { 
            break;
          }
          switch (schemeField.id) {
            case 1: // QUEUE_NAME
              if (schemeField.type == libthrift091.protocol.TType.STRING) {
                struct.queueName = iprot.readString();
                struct.setQueueNameIsSet(true);
              } else { 
                libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            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, getQueueMeta_args struct) throws libthrift091.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.queueName != null) {
          oprot.writeFieldBegin(QUEUE_NAME_FIELD_DESC);
          oprot.writeString(struct.queueName);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class getQueueMeta_argsTupleSchemeFactory implements SchemeFactory {
      public getQueueMeta_argsTupleScheme getScheme() {
        return new getQueueMeta_argsTupleScheme();
      }
    }

    private static class getQueueMeta_argsTupleScheme extends TupleScheme {

      @Override
      public void write(libthrift091.protocol.TProtocol prot, getQueueMeta_args struct) throws libthrift091.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetQueueName()) {
          optionals.set(0);
        }
        oprot.writeBitSet(optionals, 1);
        if (struct.isSetQueueName()) {
          oprot.writeString(struct.queueName);
        }
      }

      @Override
      public void read(libthrift091.protocol.TProtocol prot, getQueueMeta_args struct) throws libthrift091.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(1);
        if (incoming.get(0)) {
          struct.queueName = iprot.readString();
          struct.setQueueNameIsSet(true);
        }
      }
    }

  }

  public static class getQueueMeta_result implements libthrift091.TBase, java.io.Serializable, Cloneable, Comparable   {
    private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("getQueueMeta_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 getQueueMeta_resultStandardSchemeFactory());
      schemes.put(TupleScheme.class, new getQueueMeta_resultTupleSchemeFactory());
    }

    public GetQueueMetaResponse 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, GetQueueMetaResponse.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(getQueueMeta_result.class, metaDataMap);
    }

    public getQueueMeta_result() {
    }

    public getQueueMeta_result(
      GetQueueMetaResponse success,
      com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException e)
    {
      this();
      this.success = success;
      this.e = e;
    }

    /**
     * Performs a deep copy on other.
     */
    public getQueueMeta_result(getQueueMeta_result other) {
      if (other.isSetSuccess()) {
        this.success = new GetQueueMetaResponse(other.success);
      }
      if (other.isSetE()) {
        this.e = new com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException(other.e);
      }
    }

    public getQueueMeta_result deepCopy() {
      return new getQueueMeta_result(this);
    }

    @Override
    public void clear() {
      this.success = null;
      this.e = null;
    }

    public GetQueueMetaResponse getSuccess() {
      return this.success;
    }

    public getQueueMeta_result setSuccess(GetQueueMetaResponse 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 getQueueMeta_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((GetQueueMetaResponse)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 getQueueMeta_result)
        return this.equals((getQueueMeta_result)that);
      return false;
    }

    public boolean equals(getQueueMeta_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(getQueueMeta_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("getQueueMeta_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 getQueueMeta_resultStandardSchemeFactory implements SchemeFactory {
      public getQueueMeta_resultStandardScheme getScheme() {
        return new getQueueMeta_resultStandardScheme();
      }
    }

    private static class getQueueMeta_resultStandardScheme extends StandardScheme {

      public void read(libthrift091.protocol.TProtocol iprot, getQueueMeta_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 GetQueueMetaResponse();
                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, getQueueMeta_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 getQueueMeta_resultTupleSchemeFactory implements SchemeFactory {
      public getQueueMeta_resultTupleScheme getScheme() {
        return new getQueueMeta_resultTupleScheme();
      }
    }

    private static class getQueueMeta_resultTupleScheme extends TupleScheme {

      @Override
      public void write(libthrift091.protocol.TProtocol prot, getQueueMeta_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, getQueueMeta_result struct) throws libthrift091.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(2);
        if (incoming.get(0)) {
          struct.success = new GetQueueMetaResponse();
          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);
        }
      }
    }

  }

}