Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
com.xiaomi.infra.galaxy.emq.thrift.QueueService Maven / Gradle / Ivy
/**
* 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 = "2016-5-10")
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;
/**
* List all the source queues of a dead letter queue;
*
*
* @param request
*/
public ListDeadLetterSourceQueuesResponse listDeadLetterSourceQueues(ListDeadLetterSourceQueuesRequest 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;
}
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 listDeadLetterSourceQueues(ListDeadLetterSourceQueuesRequest 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 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 ListDeadLetterSourceQueuesResponse listDeadLetterSourceQueues(ListDeadLetterSourceQueuesRequest request) throws com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException, libthrift091.TException
{
send_listDeadLetterSourceQueues(request);
return recv_listDeadLetterSourceQueues();
}
public void send_listDeadLetterSourceQueues(ListDeadLetterSourceQueuesRequest request) throws libthrift091.TException
{
listDeadLetterSourceQueues_args args = new listDeadLetterSourceQueues_args();
args.setRequest(request);
sendBase("listDeadLetterSourceQueues", args);
}
public ListDeadLetterSourceQueuesResponse recv_listDeadLetterSourceQueues() throws com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException, libthrift091.TException
{
listDeadLetterSourceQueues_result result = new listDeadLetterSourceQueues_result();
receiveBase(result, "listDeadLetterSourceQueues");
if (result.isSetSuccess()) {
return result.success;
}
if (result.e != null) {
throw result.e;
}
throw new libthrift091.TApplicationException(libthrift091.TApplicationException.MISSING_RESULT, "listDeadLetterSourceQueues failed: unknown result");
}
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 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 listDeadLetterSourceQueues(ListDeadLetterSourceQueuesRequest request, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException {
checkReady();
listDeadLetterSourceQueues_call method_call = new listDeadLetterSourceQueues_call(request, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class listDeadLetterSourceQueues_call extends libthrift091.async.TAsyncMethodCall {
private ListDeadLetterSourceQueuesRequest request;
public listDeadLetterSourceQueues_call(ListDeadLetterSourceQueuesRequest 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("listDeadLetterSourceQueues", libthrift091.protocol.TMessageType.CALL, 0));
listDeadLetterSourceQueues_args args = new listDeadLetterSourceQueues_args();
args.setRequest(request);
args.write(prot);
prot.writeMessageEnd();
}
public ListDeadLetterSourceQueuesResponse 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_listDeadLetterSourceQueues();
}
}
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 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("listDeadLetterSourceQueues", new listDeadLetterSourceQueues());
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());
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 listDeadLetterSourceQueues extends libthrift091.ProcessFunction {
public listDeadLetterSourceQueues() {
super("listDeadLetterSourceQueues");
}
public listDeadLetterSourceQueues_args getEmptyArgsInstance() {
return new listDeadLetterSourceQueues_args();
}
protected boolean isOneway() {
return false;
}
public listDeadLetterSourceQueues_result getResult(I iface, listDeadLetterSourceQueues_args args) throws libthrift091.TException {
listDeadLetterSourceQueues_result result = new listDeadLetterSourceQueues_result();
try {
result.success = iface.listDeadLetterSourceQueues(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 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("listDeadLetterSourceQueues", new listDeadLetterSourceQueues());
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());
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 listDeadLetterSourceQueues extends libthrift091.AsyncProcessFunction {
public listDeadLetterSourceQueues() {
super("listDeadLetterSourceQueues");
}
public listDeadLetterSourceQueues_args getEmptyArgsInstance() {
return new listDeadLetterSourceQueues_args();
}
public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final libthrift091.AsyncProcessFunction fcall = this;
return new AsyncMethodCallback() {
public void onComplete(ListDeadLetterSourceQueuesResponse o) {
listDeadLetterSourceQueues_result result = new listDeadLetterSourceQueues_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;
listDeadLetterSourceQueues_result result = new listDeadLetterSourceQueues_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, listDeadLetterSourceQueues_args args, libthrift091.async.AsyncMethodCallback resultHandler) throws TException {
iface.listDeadLetterSourceQueues(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 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