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.MessageService 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 = "2017-9-13")
public class MessageService {
public interface Iface extends com.xiaomi.infra.galaxy.emq.thrift.EMQBaseService.Iface {
/**
* Send message;
*
*
* @param sendMessageRequest
*/
public SendMessageResponse sendMessage(SendMessageRequest sendMessageRequest) throws com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException, libthrift091.TException;
/**
* Send message batch;
*
*
* @param sendMessageBatchRequest
*/
public SendMessageBatchResponse sendMessageBatch(SendMessageBatchRequest sendMessageBatchRequest) throws com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException, libthrift091.TException;
/**
* Receive message;
*
*
* @param receiveMessageRequest
*/
public List receiveMessage(ReceiveMessageRequest receiveMessageRequest) throws com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException, libthrift091.TException;
/**
* Change message invisibility seconds;
*
*
* @param changeMessageVisibilityRequest
*/
public void changeMessageVisibilitySeconds(ChangeMessageVisibilityRequest changeMessageVisibilityRequest) throws com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException, libthrift091.TException;
/**
* Change message invisibility seconds batch;
*
*
* @param changeMessageVisibilityBatchRequest
*/
public ChangeMessageVisibilityBatchResponse changeMessageVisibilitySecondsBatch(ChangeMessageVisibilityBatchRequest changeMessageVisibilityBatchRequest) throws com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException, libthrift091.TException;
/**
* Delete message;
*
*
* @param deleteMessageRequest
*/
public void deleteMessage(DeleteMessageRequest deleteMessageRequest) throws com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException, libthrift091.TException;
/**
* Delete message batch;
*
*
* @param deleteMessageBatchRequest
*/
public DeleteMessageBatchResponse deleteMessageBatch(DeleteMessageBatchRequest deleteMessageBatchRequest) throws com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException, libthrift091.TException;
/**
* Dead message;
*
*
* @param deadMessageRequest
*/
public void deadMessage(DeadMessageRequest deadMessageRequest) throws com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException, libthrift091.TException;
/**
* Dead message batch;
*
*
* @param deadMessageBatchRequest
*/
public DeadMessageBatchResponse deadMessageBatch(DeadMessageBatchRequest deadMessageBatchRequest) throws com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException, libthrift091.TException;
/**
* Peek message;
*
*
* @param peekMessageRequest
*/
public List peekMessage(PeekMessageRequest peekMessageRequest) throws com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException, libthrift091.TException;
/**
* Delete peek message;
*
*
* @param deletePeekMessageRequest
*/
public void deletePeekMessage(DeletePeekMessageRequest deletePeekMessageRequest) throws com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException, libthrift091.TException;
/**
* Delete peek message batch;
*
*
* @param deletePeekMessageBatchRequest
*/
public DeletePeekMessageBatchResponse deletePeekMessageBatch(DeletePeekMessageBatchRequest deletePeekMessageBatchRequest) throws com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException, libthrift091.TException;
}
public interface AsyncIface extends com.xiaomi.infra.galaxy.emq.thrift.EMQBaseService .AsyncIface {
public void sendMessage(SendMessageRequest sendMessageRequest, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException;
public void sendMessageBatch(SendMessageBatchRequest sendMessageBatchRequest, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException;
public void receiveMessage(ReceiveMessageRequest receiveMessageRequest, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException;
public void changeMessageVisibilitySeconds(ChangeMessageVisibilityRequest changeMessageVisibilityRequest, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException;
public void changeMessageVisibilitySecondsBatch(ChangeMessageVisibilityBatchRequest changeMessageVisibilityBatchRequest, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException;
public void deleteMessage(DeleteMessageRequest deleteMessageRequest, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException;
public void deleteMessageBatch(DeleteMessageBatchRequest deleteMessageBatchRequest, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException;
public void deadMessage(DeadMessageRequest deadMessageRequest, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException;
public void deadMessageBatch(DeadMessageBatchRequest deadMessageBatchRequest, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException;
public void peekMessage(PeekMessageRequest peekMessageRequest, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException;
public void deletePeekMessage(DeletePeekMessageRequest deletePeekMessageRequest, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException;
public void deletePeekMessageBatch(DeletePeekMessageBatchRequest deletePeekMessageBatchRequest, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException;
}
public static class Client extends com.xiaomi.infra.galaxy.emq.thrift.EMQBaseService.Client implements Iface {
public static class Factory implements libthrift091.TServiceClientFactory {
public Factory() {}
public Client getClient(libthrift091.protocol.TProtocol prot) {
return new Client(prot);
}
public Client getClient(libthrift091.protocol.TProtocol iprot, libthrift091.protocol.TProtocol oprot) {
return new Client(iprot, oprot);
}
}
public Client(libthrift091.protocol.TProtocol prot)
{
super(prot, prot);
}
public Client(libthrift091.protocol.TProtocol iprot, libthrift091.protocol.TProtocol oprot) {
super(iprot, oprot);
}
public SendMessageResponse sendMessage(SendMessageRequest sendMessageRequest) throws com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException, libthrift091.TException
{
send_sendMessage(sendMessageRequest);
return recv_sendMessage();
}
public void send_sendMessage(SendMessageRequest sendMessageRequest) throws libthrift091.TException
{
sendMessage_args args = new sendMessage_args();
args.setSendMessageRequest(sendMessageRequest);
sendBase("sendMessage", args);
}
public SendMessageResponse recv_sendMessage() throws com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException, libthrift091.TException
{
sendMessage_result result = new sendMessage_result();
receiveBase(result, "sendMessage");
if (result.isSetSuccess()) {
return result.success;
}
if (result.e != null) {
throw result.e;
}
throw new libthrift091.TApplicationException(libthrift091.TApplicationException.MISSING_RESULT, "sendMessage failed: unknown result");
}
public SendMessageBatchResponse sendMessageBatch(SendMessageBatchRequest sendMessageBatchRequest) throws com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException, libthrift091.TException
{
send_sendMessageBatch(sendMessageBatchRequest);
return recv_sendMessageBatch();
}
public void send_sendMessageBatch(SendMessageBatchRequest sendMessageBatchRequest) throws libthrift091.TException
{
sendMessageBatch_args args = new sendMessageBatch_args();
args.setSendMessageBatchRequest(sendMessageBatchRequest);
sendBase("sendMessageBatch", args);
}
public SendMessageBatchResponse recv_sendMessageBatch() throws com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException, libthrift091.TException
{
sendMessageBatch_result result = new sendMessageBatch_result();
receiveBase(result, "sendMessageBatch");
if (result.isSetSuccess()) {
return result.success;
}
if (result.e != null) {
throw result.e;
}
throw new libthrift091.TApplicationException(libthrift091.TApplicationException.MISSING_RESULT, "sendMessageBatch failed: unknown result");
}
public List receiveMessage(ReceiveMessageRequest receiveMessageRequest) throws com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException, libthrift091.TException
{
send_receiveMessage(receiveMessageRequest);
return recv_receiveMessage();
}
public void send_receiveMessage(ReceiveMessageRequest receiveMessageRequest) throws libthrift091.TException
{
receiveMessage_args args = new receiveMessage_args();
args.setReceiveMessageRequest(receiveMessageRequest);
sendBase("receiveMessage", args);
}
public List recv_receiveMessage() throws com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException, libthrift091.TException
{
receiveMessage_result result = new receiveMessage_result();
receiveBase(result, "receiveMessage");
if (result.isSetSuccess()) {
return result.success;
}
if (result.e != null) {
throw result.e;
}
throw new libthrift091.TApplicationException(libthrift091.TApplicationException.MISSING_RESULT, "receiveMessage failed: unknown result");
}
public void changeMessageVisibilitySeconds(ChangeMessageVisibilityRequest changeMessageVisibilityRequest) throws com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException, libthrift091.TException
{
send_changeMessageVisibilitySeconds(changeMessageVisibilityRequest);
recv_changeMessageVisibilitySeconds();
}
public void send_changeMessageVisibilitySeconds(ChangeMessageVisibilityRequest changeMessageVisibilityRequest) throws libthrift091.TException
{
changeMessageVisibilitySeconds_args args = new changeMessageVisibilitySeconds_args();
args.setChangeMessageVisibilityRequest(changeMessageVisibilityRequest);
sendBase("changeMessageVisibilitySeconds", args);
}
public void recv_changeMessageVisibilitySeconds() throws com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException, libthrift091.TException
{
changeMessageVisibilitySeconds_result result = new changeMessageVisibilitySeconds_result();
receiveBase(result, "changeMessageVisibilitySeconds");
if (result.e != null) {
throw result.e;
}
return;
}
public ChangeMessageVisibilityBatchResponse changeMessageVisibilitySecondsBatch(ChangeMessageVisibilityBatchRequest changeMessageVisibilityBatchRequest) throws com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException, libthrift091.TException
{
send_changeMessageVisibilitySecondsBatch(changeMessageVisibilityBatchRequest);
return recv_changeMessageVisibilitySecondsBatch();
}
public void send_changeMessageVisibilitySecondsBatch(ChangeMessageVisibilityBatchRequest changeMessageVisibilityBatchRequest) throws libthrift091.TException
{
changeMessageVisibilitySecondsBatch_args args = new changeMessageVisibilitySecondsBatch_args();
args.setChangeMessageVisibilityBatchRequest(changeMessageVisibilityBatchRequest);
sendBase("changeMessageVisibilitySecondsBatch", args);
}
public ChangeMessageVisibilityBatchResponse recv_changeMessageVisibilitySecondsBatch() throws com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException, libthrift091.TException
{
changeMessageVisibilitySecondsBatch_result result = new changeMessageVisibilitySecondsBatch_result();
receiveBase(result, "changeMessageVisibilitySecondsBatch");
if (result.isSetSuccess()) {
return result.success;
}
if (result.e != null) {
throw result.e;
}
throw new libthrift091.TApplicationException(libthrift091.TApplicationException.MISSING_RESULT, "changeMessageVisibilitySecondsBatch failed: unknown result");
}
public void deleteMessage(DeleteMessageRequest deleteMessageRequest) throws com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException, libthrift091.TException
{
send_deleteMessage(deleteMessageRequest);
recv_deleteMessage();
}
public void send_deleteMessage(DeleteMessageRequest deleteMessageRequest) throws libthrift091.TException
{
deleteMessage_args args = new deleteMessage_args();
args.setDeleteMessageRequest(deleteMessageRequest);
sendBase("deleteMessage", args);
}
public void recv_deleteMessage() throws com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException, libthrift091.TException
{
deleteMessage_result result = new deleteMessage_result();
receiveBase(result, "deleteMessage");
if (result.e != null) {
throw result.e;
}
return;
}
public DeleteMessageBatchResponse deleteMessageBatch(DeleteMessageBatchRequest deleteMessageBatchRequest) throws com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException, libthrift091.TException
{
send_deleteMessageBatch(deleteMessageBatchRequest);
return recv_deleteMessageBatch();
}
public void send_deleteMessageBatch(DeleteMessageBatchRequest deleteMessageBatchRequest) throws libthrift091.TException
{
deleteMessageBatch_args args = new deleteMessageBatch_args();
args.setDeleteMessageBatchRequest(deleteMessageBatchRequest);
sendBase("deleteMessageBatch", args);
}
public DeleteMessageBatchResponse recv_deleteMessageBatch() throws com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException, libthrift091.TException
{
deleteMessageBatch_result result = new deleteMessageBatch_result();
receiveBase(result, "deleteMessageBatch");
if (result.isSetSuccess()) {
return result.success;
}
if (result.e != null) {
throw result.e;
}
throw new libthrift091.TApplicationException(libthrift091.TApplicationException.MISSING_RESULT, "deleteMessageBatch failed: unknown result");
}
public void deadMessage(DeadMessageRequest deadMessageRequest) throws com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException, libthrift091.TException
{
send_deadMessage(deadMessageRequest);
recv_deadMessage();
}
public void send_deadMessage(DeadMessageRequest deadMessageRequest) throws libthrift091.TException
{
deadMessage_args args = new deadMessage_args();
args.setDeadMessageRequest(deadMessageRequest);
sendBase("deadMessage", args);
}
public void recv_deadMessage() throws com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException, libthrift091.TException
{
deadMessage_result result = new deadMessage_result();
receiveBase(result, "deadMessage");
if (result.e != null) {
throw result.e;
}
return;
}
public DeadMessageBatchResponse deadMessageBatch(DeadMessageBatchRequest deadMessageBatchRequest) throws com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException, libthrift091.TException
{
send_deadMessageBatch(deadMessageBatchRequest);
return recv_deadMessageBatch();
}
public void send_deadMessageBatch(DeadMessageBatchRequest deadMessageBatchRequest) throws libthrift091.TException
{
deadMessageBatch_args args = new deadMessageBatch_args();
args.setDeadMessageBatchRequest(deadMessageBatchRequest);
sendBase("deadMessageBatch", args);
}
public DeadMessageBatchResponse recv_deadMessageBatch() throws com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException, libthrift091.TException
{
deadMessageBatch_result result = new deadMessageBatch_result();
receiveBase(result, "deadMessageBatch");
if (result.isSetSuccess()) {
return result.success;
}
if (result.e != null) {
throw result.e;
}
throw new libthrift091.TApplicationException(libthrift091.TApplicationException.MISSING_RESULT, "deadMessageBatch failed: unknown result");
}
public List peekMessage(PeekMessageRequest peekMessageRequest) throws com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException, libthrift091.TException
{
send_peekMessage(peekMessageRequest);
return recv_peekMessage();
}
public void send_peekMessage(PeekMessageRequest peekMessageRequest) throws libthrift091.TException
{
peekMessage_args args = new peekMessage_args();
args.setPeekMessageRequest(peekMessageRequest);
sendBase("peekMessage", args);
}
public List recv_peekMessage() throws com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException, libthrift091.TException
{
peekMessage_result result = new peekMessage_result();
receiveBase(result, "peekMessage");
if (result.isSetSuccess()) {
return result.success;
}
if (result.e != null) {
throw result.e;
}
throw new libthrift091.TApplicationException(libthrift091.TApplicationException.MISSING_RESULT, "peekMessage failed: unknown result");
}
public void deletePeekMessage(DeletePeekMessageRequest deletePeekMessageRequest) throws com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException, libthrift091.TException
{
send_deletePeekMessage(deletePeekMessageRequest);
recv_deletePeekMessage();
}
public void send_deletePeekMessage(DeletePeekMessageRequest deletePeekMessageRequest) throws libthrift091.TException
{
deletePeekMessage_args args = new deletePeekMessage_args();
args.setDeletePeekMessageRequest(deletePeekMessageRequest);
sendBase("deletePeekMessage", args);
}
public void recv_deletePeekMessage() throws com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException, libthrift091.TException
{
deletePeekMessage_result result = new deletePeekMessage_result();
receiveBase(result, "deletePeekMessage");
if (result.e != null) {
throw result.e;
}
return;
}
public DeletePeekMessageBatchResponse deletePeekMessageBatch(DeletePeekMessageBatchRequest deletePeekMessageBatchRequest) throws com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException, libthrift091.TException
{
send_deletePeekMessageBatch(deletePeekMessageBatchRequest);
return recv_deletePeekMessageBatch();
}
public void send_deletePeekMessageBatch(DeletePeekMessageBatchRequest deletePeekMessageBatchRequest) throws libthrift091.TException
{
deletePeekMessageBatch_args args = new deletePeekMessageBatch_args();
args.setDeletePeekMessageBatchRequest(deletePeekMessageBatchRequest);
sendBase("deletePeekMessageBatch", args);
}
public DeletePeekMessageBatchResponse recv_deletePeekMessageBatch() throws com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException, libthrift091.TException
{
deletePeekMessageBatch_result result = new deletePeekMessageBatch_result();
receiveBase(result, "deletePeekMessageBatch");
if (result.isSetSuccess()) {
return result.success;
}
if (result.e != null) {
throw result.e;
}
throw new libthrift091.TApplicationException(libthrift091.TApplicationException.MISSING_RESULT, "deletePeekMessageBatch failed: unknown result");
}
}
public static class AsyncClient extends com.xiaomi.infra.galaxy.emq.thrift.EMQBaseService.AsyncClient implements AsyncIface {
public static class Factory implements libthrift091.async.TAsyncClientFactory {
private libthrift091.async.TAsyncClientManager clientManager;
private libthrift091.protocol.TProtocolFactory protocolFactory;
public Factory(libthrift091.async.TAsyncClientManager clientManager, libthrift091.protocol.TProtocolFactory protocolFactory) {
this.clientManager = clientManager;
this.protocolFactory = protocolFactory;
}
public AsyncClient getAsyncClient(libthrift091.transport.TNonblockingTransport transport) {
return new AsyncClient(protocolFactory, clientManager, transport);
}
}
public AsyncClient(libthrift091.protocol.TProtocolFactory protocolFactory, libthrift091.async.TAsyncClientManager clientManager, libthrift091.transport.TNonblockingTransport transport) {
super(protocolFactory, clientManager, transport);
}
public void sendMessage(SendMessageRequest sendMessageRequest, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException {
checkReady();
sendMessage_call method_call = new sendMessage_call(sendMessageRequest, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class sendMessage_call extends libthrift091.async.TAsyncMethodCall {
private SendMessageRequest sendMessageRequest;
public sendMessage_call(SendMessageRequest sendMessageRequest, libthrift091.async.AsyncMethodCallback resultHandler, libthrift091.async.TAsyncClient client, libthrift091.protocol.TProtocolFactory protocolFactory, libthrift091.transport.TNonblockingTransport transport) throws libthrift091.TException {
super(client, protocolFactory, transport, resultHandler, false);
this.sendMessageRequest = sendMessageRequest;
}
public void write_args(libthrift091.protocol.TProtocol prot) throws libthrift091.TException {
prot.writeMessageBegin(new libthrift091.protocol.TMessage("sendMessage", libthrift091.protocol.TMessageType.CALL, 0));
sendMessage_args args = new sendMessage_args();
args.setSendMessageRequest(sendMessageRequest);
args.write(prot);
prot.writeMessageEnd();
}
public SendMessageResponse getResult() throws com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException, libthrift091.TException {
if (getState() != libthrift091.async.TAsyncMethodCall.State.RESPONSE_READ) {
throw new IllegalStateException("Method call not finished!");
}
libthrift091.transport.TMemoryInputTransport memoryTransport = new libthrift091.transport.TMemoryInputTransport(getFrameBuffer().array());
libthrift091.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
return (new Client(prot)).recv_sendMessage();
}
}
public void sendMessageBatch(SendMessageBatchRequest sendMessageBatchRequest, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException {
checkReady();
sendMessageBatch_call method_call = new sendMessageBatch_call(sendMessageBatchRequest, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class sendMessageBatch_call extends libthrift091.async.TAsyncMethodCall {
private SendMessageBatchRequest sendMessageBatchRequest;
public sendMessageBatch_call(SendMessageBatchRequest sendMessageBatchRequest, libthrift091.async.AsyncMethodCallback resultHandler, libthrift091.async.TAsyncClient client, libthrift091.protocol.TProtocolFactory protocolFactory, libthrift091.transport.TNonblockingTransport transport) throws libthrift091.TException {
super(client, protocolFactory, transport, resultHandler, false);
this.sendMessageBatchRequest = sendMessageBatchRequest;
}
public void write_args(libthrift091.protocol.TProtocol prot) throws libthrift091.TException {
prot.writeMessageBegin(new libthrift091.protocol.TMessage("sendMessageBatch", libthrift091.protocol.TMessageType.CALL, 0));
sendMessageBatch_args args = new sendMessageBatch_args();
args.setSendMessageBatchRequest(sendMessageBatchRequest);
args.write(prot);
prot.writeMessageEnd();
}
public SendMessageBatchResponse getResult() throws com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException, libthrift091.TException {
if (getState() != libthrift091.async.TAsyncMethodCall.State.RESPONSE_READ) {
throw new IllegalStateException("Method call not finished!");
}
libthrift091.transport.TMemoryInputTransport memoryTransport = new libthrift091.transport.TMemoryInputTransport(getFrameBuffer().array());
libthrift091.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
return (new Client(prot)).recv_sendMessageBatch();
}
}
public void receiveMessage(ReceiveMessageRequest receiveMessageRequest, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException {
checkReady();
receiveMessage_call method_call = new receiveMessage_call(receiveMessageRequest, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class receiveMessage_call extends libthrift091.async.TAsyncMethodCall {
private ReceiveMessageRequest receiveMessageRequest;
public receiveMessage_call(ReceiveMessageRequest receiveMessageRequest, libthrift091.async.AsyncMethodCallback resultHandler, libthrift091.async.TAsyncClient client, libthrift091.protocol.TProtocolFactory protocolFactory, libthrift091.transport.TNonblockingTransport transport) throws libthrift091.TException {
super(client, protocolFactory, transport, resultHandler, false);
this.receiveMessageRequest = receiveMessageRequest;
}
public void write_args(libthrift091.protocol.TProtocol prot) throws libthrift091.TException {
prot.writeMessageBegin(new libthrift091.protocol.TMessage("receiveMessage", libthrift091.protocol.TMessageType.CALL, 0));
receiveMessage_args args = new receiveMessage_args();
args.setReceiveMessageRequest(receiveMessageRequest);
args.write(prot);
prot.writeMessageEnd();
}
public List getResult() throws com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException, libthrift091.TException {
if (getState() != libthrift091.async.TAsyncMethodCall.State.RESPONSE_READ) {
throw new IllegalStateException("Method call not finished!");
}
libthrift091.transport.TMemoryInputTransport memoryTransport = new libthrift091.transport.TMemoryInputTransport(getFrameBuffer().array());
libthrift091.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
return (new Client(prot)).recv_receiveMessage();
}
}
public void changeMessageVisibilitySeconds(ChangeMessageVisibilityRequest changeMessageVisibilityRequest, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException {
checkReady();
changeMessageVisibilitySeconds_call method_call = new changeMessageVisibilitySeconds_call(changeMessageVisibilityRequest, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class changeMessageVisibilitySeconds_call extends libthrift091.async.TAsyncMethodCall {
private ChangeMessageVisibilityRequest changeMessageVisibilityRequest;
public changeMessageVisibilitySeconds_call(ChangeMessageVisibilityRequest changeMessageVisibilityRequest, libthrift091.async.AsyncMethodCallback resultHandler, libthrift091.async.TAsyncClient client, libthrift091.protocol.TProtocolFactory protocolFactory, libthrift091.transport.TNonblockingTransport transport) throws libthrift091.TException {
super(client, protocolFactory, transport, resultHandler, false);
this.changeMessageVisibilityRequest = changeMessageVisibilityRequest;
}
public void write_args(libthrift091.protocol.TProtocol prot) throws libthrift091.TException {
prot.writeMessageBegin(new libthrift091.protocol.TMessage("changeMessageVisibilitySeconds", libthrift091.protocol.TMessageType.CALL, 0));
changeMessageVisibilitySeconds_args args = new changeMessageVisibilitySeconds_args();
args.setChangeMessageVisibilityRequest(changeMessageVisibilityRequest);
args.write(prot);
prot.writeMessageEnd();
}
public void getResult() throws com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException, libthrift091.TException {
if (getState() != libthrift091.async.TAsyncMethodCall.State.RESPONSE_READ) {
throw new IllegalStateException("Method call not finished!");
}
libthrift091.transport.TMemoryInputTransport memoryTransport = new libthrift091.transport.TMemoryInputTransport(getFrameBuffer().array());
libthrift091.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
(new Client(prot)).recv_changeMessageVisibilitySeconds();
}
}
public void changeMessageVisibilitySecondsBatch(ChangeMessageVisibilityBatchRequest changeMessageVisibilityBatchRequest, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException {
checkReady();
changeMessageVisibilitySecondsBatch_call method_call = new changeMessageVisibilitySecondsBatch_call(changeMessageVisibilityBatchRequest, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class changeMessageVisibilitySecondsBatch_call extends libthrift091.async.TAsyncMethodCall {
private ChangeMessageVisibilityBatchRequest changeMessageVisibilityBatchRequest;
public changeMessageVisibilitySecondsBatch_call(ChangeMessageVisibilityBatchRequest changeMessageVisibilityBatchRequest, libthrift091.async.AsyncMethodCallback resultHandler, libthrift091.async.TAsyncClient client, libthrift091.protocol.TProtocolFactory protocolFactory, libthrift091.transport.TNonblockingTransport transport) throws libthrift091.TException {
super(client, protocolFactory, transport, resultHandler, false);
this.changeMessageVisibilityBatchRequest = changeMessageVisibilityBatchRequest;
}
public void write_args(libthrift091.protocol.TProtocol prot) throws libthrift091.TException {
prot.writeMessageBegin(new libthrift091.protocol.TMessage("changeMessageVisibilitySecondsBatch", libthrift091.protocol.TMessageType.CALL, 0));
changeMessageVisibilitySecondsBatch_args args = new changeMessageVisibilitySecondsBatch_args();
args.setChangeMessageVisibilityBatchRequest(changeMessageVisibilityBatchRequest);
args.write(prot);
prot.writeMessageEnd();
}
public ChangeMessageVisibilityBatchResponse getResult() throws com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException, libthrift091.TException {
if (getState() != libthrift091.async.TAsyncMethodCall.State.RESPONSE_READ) {
throw new IllegalStateException("Method call not finished!");
}
libthrift091.transport.TMemoryInputTransport memoryTransport = new libthrift091.transport.TMemoryInputTransport(getFrameBuffer().array());
libthrift091.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
return (new Client(prot)).recv_changeMessageVisibilitySecondsBatch();
}
}
public void deleteMessage(DeleteMessageRequest deleteMessageRequest, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException {
checkReady();
deleteMessage_call method_call = new deleteMessage_call(deleteMessageRequest, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class deleteMessage_call extends libthrift091.async.TAsyncMethodCall {
private DeleteMessageRequest deleteMessageRequest;
public deleteMessage_call(DeleteMessageRequest deleteMessageRequest, libthrift091.async.AsyncMethodCallback resultHandler, libthrift091.async.TAsyncClient client, libthrift091.protocol.TProtocolFactory protocolFactory, libthrift091.transport.TNonblockingTransport transport) throws libthrift091.TException {
super(client, protocolFactory, transport, resultHandler, false);
this.deleteMessageRequest = deleteMessageRequest;
}
public void write_args(libthrift091.protocol.TProtocol prot) throws libthrift091.TException {
prot.writeMessageBegin(new libthrift091.protocol.TMessage("deleteMessage", libthrift091.protocol.TMessageType.CALL, 0));
deleteMessage_args args = new deleteMessage_args();
args.setDeleteMessageRequest(deleteMessageRequest);
args.write(prot);
prot.writeMessageEnd();
}
public void getResult() throws com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException, libthrift091.TException {
if (getState() != libthrift091.async.TAsyncMethodCall.State.RESPONSE_READ) {
throw new IllegalStateException("Method call not finished!");
}
libthrift091.transport.TMemoryInputTransport memoryTransport = new libthrift091.transport.TMemoryInputTransport(getFrameBuffer().array());
libthrift091.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
(new Client(prot)).recv_deleteMessage();
}
}
public void deleteMessageBatch(DeleteMessageBatchRequest deleteMessageBatchRequest, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException {
checkReady();
deleteMessageBatch_call method_call = new deleteMessageBatch_call(deleteMessageBatchRequest, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class deleteMessageBatch_call extends libthrift091.async.TAsyncMethodCall {
private DeleteMessageBatchRequest deleteMessageBatchRequest;
public deleteMessageBatch_call(DeleteMessageBatchRequest deleteMessageBatchRequest, libthrift091.async.AsyncMethodCallback resultHandler, libthrift091.async.TAsyncClient client, libthrift091.protocol.TProtocolFactory protocolFactory, libthrift091.transport.TNonblockingTransport transport) throws libthrift091.TException {
super(client, protocolFactory, transport, resultHandler, false);
this.deleteMessageBatchRequest = deleteMessageBatchRequest;
}
public void write_args(libthrift091.protocol.TProtocol prot) throws libthrift091.TException {
prot.writeMessageBegin(new libthrift091.protocol.TMessage("deleteMessageBatch", libthrift091.protocol.TMessageType.CALL, 0));
deleteMessageBatch_args args = new deleteMessageBatch_args();
args.setDeleteMessageBatchRequest(deleteMessageBatchRequest);
args.write(prot);
prot.writeMessageEnd();
}
public DeleteMessageBatchResponse getResult() throws com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException, libthrift091.TException {
if (getState() != libthrift091.async.TAsyncMethodCall.State.RESPONSE_READ) {
throw new IllegalStateException("Method call not finished!");
}
libthrift091.transport.TMemoryInputTransport memoryTransport = new libthrift091.transport.TMemoryInputTransport(getFrameBuffer().array());
libthrift091.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
return (new Client(prot)).recv_deleteMessageBatch();
}
}
public void deadMessage(DeadMessageRequest deadMessageRequest, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException {
checkReady();
deadMessage_call method_call = new deadMessage_call(deadMessageRequest, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class deadMessage_call extends libthrift091.async.TAsyncMethodCall {
private DeadMessageRequest deadMessageRequest;
public deadMessage_call(DeadMessageRequest deadMessageRequest, libthrift091.async.AsyncMethodCallback resultHandler, libthrift091.async.TAsyncClient client, libthrift091.protocol.TProtocolFactory protocolFactory, libthrift091.transport.TNonblockingTransport transport) throws libthrift091.TException {
super(client, protocolFactory, transport, resultHandler, false);
this.deadMessageRequest = deadMessageRequest;
}
public void write_args(libthrift091.protocol.TProtocol prot) throws libthrift091.TException {
prot.writeMessageBegin(new libthrift091.protocol.TMessage("deadMessage", libthrift091.protocol.TMessageType.CALL, 0));
deadMessage_args args = new deadMessage_args();
args.setDeadMessageRequest(deadMessageRequest);
args.write(prot);
prot.writeMessageEnd();
}
public void getResult() throws com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException, libthrift091.TException {
if (getState() != libthrift091.async.TAsyncMethodCall.State.RESPONSE_READ) {
throw new IllegalStateException("Method call not finished!");
}
libthrift091.transport.TMemoryInputTransport memoryTransport = new libthrift091.transport.TMemoryInputTransport(getFrameBuffer().array());
libthrift091.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
(new Client(prot)).recv_deadMessage();
}
}
public void deadMessageBatch(DeadMessageBatchRequest deadMessageBatchRequest, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException {
checkReady();
deadMessageBatch_call method_call = new deadMessageBatch_call(deadMessageBatchRequest, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class deadMessageBatch_call extends libthrift091.async.TAsyncMethodCall {
private DeadMessageBatchRequest deadMessageBatchRequest;
public deadMessageBatch_call(DeadMessageBatchRequest deadMessageBatchRequest, libthrift091.async.AsyncMethodCallback resultHandler, libthrift091.async.TAsyncClient client, libthrift091.protocol.TProtocolFactory protocolFactory, libthrift091.transport.TNonblockingTransport transport) throws libthrift091.TException {
super(client, protocolFactory, transport, resultHandler, false);
this.deadMessageBatchRequest = deadMessageBatchRequest;
}
public void write_args(libthrift091.protocol.TProtocol prot) throws libthrift091.TException {
prot.writeMessageBegin(new libthrift091.protocol.TMessage("deadMessageBatch", libthrift091.protocol.TMessageType.CALL, 0));
deadMessageBatch_args args = new deadMessageBatch_args();
args.setDeadMessageBatchRequest(deadMessageBatchRequest);
args.write(prot);
prot.writeMessageEnd();
}
public DeadMessageBatchResponse getResult() throws com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException, libthrift091.TException {
if (getState() != libthrift091.async.TAsyncMethodCall.State.RESPONSE_READ) {
throw new IllegalStateException("Method call not finished!");
}
libthrift091.transport.TMemoryInputTransport memoryTransport = new libthrift091.transport.TMemoryInputTransport(getFrameBuffer().array());
libthrift091.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
return (new Client(prot)).recv_deadMessageBatch();
}
}
public void peekMessage(PeekMessageRequest peekMessageRequest, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException {
checkReady();
peekMessage_call method_call = new peekMessage_call(peekMessageRequest, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class peekMessage_call extends libthrift091.async.TAsyncMethodCall {
private PeekMessageRequest peekMessageRequest;
public peekMessage_call(PeekMessageRequest peekMessageRequest, libthrift091.async.AsyncMethodCallback resultHandler, libthrift091.async.TAsyncClient client, libthrift091.protocol.TProtocolFactory protocolFactory, libthrift091.transport.TNonblockingTransport transport) throws libthrift091.TException {
super(client, protocolFactory, transport, resultHandler, false);
this.peekMessageRequest = peekMessageRequest;
}
public void write_args(libthrift091.protocol.TProtocol prot) throws libthrift091.TException {
prot.writeMessageBegin(new libthrift091.protocol.TMessage("peekMessage", libthrift091.protocol.TMessageType.CALL, 0));
peekMessage_args args = new peekMessage_args();
args.setPeekMessageRequest(peekMessageRequest);
args.write(prot);
prot.writeMessageEnd();
}
public List getResult() throws com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException, libthrift091.TException {
if (getState() != libthrift091.async.TAsyncMethodCall.State.RESPONSE_READ) {
throw new IllegalStateException("Method call not finished!");
}
libthrift091.transport.TMemoryInputTransport memoryTransport = new libthrift091.transport.TMemoryInputTransport(getFrameBuffer().array());
libthrift091.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
return (new Client(prot)).recv_peekMessage();
}
}
public void deletePeekMessage(DeletePeekMessageRequest deletePeekMessageRequest, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException {
checkReady();
deletePeekMessage_call method_call = new deletePeekMessage_call(deletePeekMessageRequest, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class deletePeekMessage_call extends libthrift091.async.TAsyncMethodCall {
private DeletePeekMessageRequest deletePeekMessageRequest;
public deletePeekMessage_call(DeletePeekMessageRequest deletePeekMessageRequest, libthrift091.async.AsyncMethodCallback resultHandler, libthrift091.async.TAsyncClient client, libthrift091.protocol.TProtocolFactory protocolFactory, libthrift091.transport.TNonblockingTransport transport) throws libthrift091.TException {
super(client, protocolFactory, transport, resultHandler, false);
this.deletePeekMessageRequest = deletePeekMessageRequest;
}
public void write_args(libthrift091.protocol.TProtocol prot) throws libthrift091.TException {
prot.writeMessageBegin(new libthrift091.protocol.TMessage("deletePeekMessage", libthrift091.protocol.TMessageType.CALL, 0));
deletePeekMessage_args args = new deletePeekMessage_args();
args.setDeletePeekMessageRequest(deletePeekMessageRequest);
args.write(prot);
prot.writeMessageEnd();
}
public void getResult() throws com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException, libthrift091.TException {
if (getState() != libthrift091.async.TAsyncMethodCall.State.RESPONSE_READ) {
throw new IllegalStateException("Method call not finished!");
}
libthrift091.transport.TMemoryInputTransport memoryTransport = new libthrift091.transport.TMemoryInputTransport(getFrameBuffer().array());
libthrift091.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
(new Client(prot)).recv_deletePeekMessage();
}
}
public void deletePeekMessageBatch(DeletePeekMessageBatchRequest deletePeekMessageBatchRequest, libthrift091.async.AsyncMethodCallback resultHandler) throws libthrift091.TException {
checkReady();
deletePeekMessageBatch_call method_call = new deletePeekMessageBatch_call(deletePeekMessageBatchRequest, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class deletePeekMessageBatch_call extends libthrift091.async.TAsyncMethodCall {
private DeletePeekMessageBatchRequest deletePeekMessageBatchRequest;
public deletePeekMessageBatch_call(DeletePeekMessageBatchRequest deletePeekMessageBatchRequest, libthrift091.async.AsyncMethodCallback resultHandler, libthrift091.async.TAsyncClient client, libthrift091.protocol.TProtocolFactory protocolFactory, libthrift091.transport.TNonblockingTransport transport) throws libthrift091.TException {
super(client, protocolFactory, transport, resultHandler, false);
this.deletePeekMessageBatchRequest = deletePeekMessageBatchRequest;
}
public void write_args(libthrift091.protocol.TProtocol prot) throws libthrift091.TException {
prot.writeMessageBegin(new libthrift091.protocol.TMessage("deletePeekMessageBatch", libthrift091.protocol.TMessageType.CALL, 0));
deletePeekMessageBatch_args args = new deletePeekMessageBatch_args();
args.setDeletePeekMessageBatchRequest(deletePeekMessageBatchRequest);
args.write(prot);
prot.writeMessageEnd();
}
public DeletePeekMessageBatchResponse getResult() throws com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException, libthrift091.TException {
if (getState() != libthrift091.async.TAsyncMethodCall.State.RESPONSE_READ) {
throw new IllegalStateException("Method call not finished!");
}
libthrift091.transport.TMemoryInputTransport memoryTransport = new libthrift091.transport.TMemoryInputTransport(getFrameBuffer().array());
libthrift091.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
return (new Client(prot)).recv_deletePeekMessageBatch();
}
}
}
public static class Processor extends com.xiaomi.infra.galaxy.emq.thrift.EMQBaseService.Processor implements libthrift091.TProcessor {
private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
public Processor(I iface) {
super(iface, getProcessMap(new HashMap>()));
}
protected Processor(I iface, Map> processMap) {
super(iface, getProcessMap(processMap));
}
private static Map> getProcessMap(Map> processMap) {
processMap.put("sendMessage", new sendMessage());
processMap.put("sendMessageBatch", new sendMessageBatch());
processMap.put("receiveMessage", new receiveMessage());
processMap.put("changeMessageVisibilitySeconds", new changeMessageVisibilitySeconds());
processMap.put("changeMessageVisibilitySecondsBatch", new changeMessageVisibilitySecondsBatch());
processMap.put("deleteMessage", new deleteMessage());
processMap.put("deleteMessageBatch", new deleteMessageBatch());
processMap.put("deadMessage", new deadMessage());
processMap.put("deadMessageBatch", new deadMessageBatch());
processMap.put("peekMessage", new peekMessage());
processMap.put("deletePeekMessage", new deletePeekMessage());
processMap.put("deletePeekMessageBatch", new deletePeekMessageBatch());
return processMap;
}
public static class sendMessage extends libthrift091.ProcessFunction {
public sendMessage() {
super("sendMessage");
}
public sendMessage_args getEmptyArgsInstance() {
return new sendMessage_args();
}
protected boolean isOneway() {
return false;
}
public sendMessage_result getResult(I iface, sendMessage_args args) throws libthrift091.TException {
sendMessage_result result = new sendMessage_result();
try {
result.success = iface.sendMessage(args.sendMessageRequest);
} catch (com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException e) {
result.e = e;
}
return result;
}
}
public static class sendMessageBatch extends libthrift091.ProcessFunction {
public sendMessageBatch() {
super("sendMessageBatch");
}
public sendMessageBatch_args getEmptyArgsInstance() {
return new sendMessageBatch_args();
}
protected boolean isOneway() {
return false;
}
public sendMessageBatch_result getResult(I iface, sendMessageBatch_args args) throws libthrift091.TException {
sendMessageBatch_result result = new sendMessageBatch_result();
try {
result.success = iface.sendMessageBatch(args.sendMessageBatchRequest);
} catch (com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException e) {
result.e = e;
}
return result;
}
}
public static class receiveMessage extends libthrift091.ProcessFunction {
public receiveMessage() {
super("receiveMessage");
}
public receiveMessage_args getEmptyArgsInstance() {
return new receiveMessage_args();
}
protected boolean isOneway() {
return false;
}
public receiveMessage_result getResult(I iface, receiveMessage_args args) throws libthrift091.TException {
receiveMessage_result result = new receiveMessage_result();
try {
result.success = iface.receiveMessage(args.receiveMessageRequest);
} catch (com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException e) {
result.e = e;
}
return result;
}
}
public static class changeMessageVisibilitySeconds extends libthrift091.ProcessFunction {
public changeMessageVisibilitySeconds() {
super("changeMessageVisibilitySeconds");
}
public changeMessageVisibilitySeconds_args getEmptyArgsInstance() {
return new changeMessageVisibilitySeconds_args();
}
protected boolean isOneway() {
return false;
}
public changeMessageVisibilitySeconds_result getResult(I iface, changeMessageVisibilitySeconds_args args) throws libthrift091.TException {
changeMessageVisibilitySeconds_result result = new changeMessageVisibilitySeconds_result();
try {
iface.changeMessageVisibilitySeconds(args.changeMessageVisibilityRequest);
} catch (com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException e) {
result.e = e;
}
return result;
}
}
public static class changeMessageVisibilitySecondsBatch extends libthrift091.ProcessFunction {
public changeMessageVisibilitySecondsBatch() {
super("changeMessageVisibilitySecondsBatch");
}
public changeMessageVisibilitySecondsBatch_args getEmptyArgsInstance() {
return new changeMessageVisibilitySecondsBatch_args();
}
protected boolean isOneway() {
return false;
}
public changeMessageVisibilitySecondsBatch_result getResult(I iface, changeMessageVisibilitySecondsBatch_args args) throws libthrift091.TException {
changeMessageVisibilitySecondsBatch_result result = new changeMessageVisibilitySecondsBatch_result();
try {
result.success = iface.changeMessageVisibilitySecondsBatch(args.changeMessageVisibilityBatchRequest);
} catch (com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException e) {
result.e = e;
}
return result;
}
}
public static class deleteMessage extends libthrift091.ProcessFunction {
public deleteMessage() {
super("deleteMessage");
}
public deleteMessage_args getEmptyArgsInstance() {
return new deleteMessage_args();
}
protected boolean isOneway() {
return false;
}
public deleteMessage_result getResult(I iface, deleteMessage_args args) throws libthrift091.TException {
deleteMessage_result result = new deleteMessage_result();
try {
iface.deleteMessage(args.deleteMessageRequest);
} catch (com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException e) {
result.e = e;
}
return result;
}
}
public static class deleteMessageBatch extends libthrift091.ProcessFunction {
public deleteMessageBatch() {
super("deleteMessageBatch");
}
public deleteMessageBatch_args getEmptyArgsInstance() {
return new deleteMessageBatch_args();
}
protected boolean isOneway() {
return false;
}
public deleteMessageBatch_result getResult(I iface, deleteMessageBatch_args args) throws libthrift091.TException {
deleteMessageBatch_result result = new deleteMessageBatch_result();
try {
result.success = iface.deleteMessageBatch(args.deleteMessageBatchRequest);
} catch (com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException e) {
result.e = e;
}
return result;
}
}
public static class deadMessage extends libthrift091.ProcessFunction {
public deadMessage() {
super("deadMessage");
}
public deadMessage_args getEmptyArgsInstance() {
return new deadMessage_args();
}
protected boolean isOneway() {
return false;
}
public deadMessage_result getResult(I iface, deadMessage_args args) throws libthrift091.TException {
deadMessage_result result = new deadMessage_result();
try {
iface.deadMessage(args.deadMessageRequest);
} catch (com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException e) {
result.e = e;
}
return result;
}
}
public static class deadMessageBatch extends libthrift091.ProcessFunction {
public deadMessageBatch() {
super("deadMessageBatch");
}
public deadMessageBatch_args getEmptyArgsInstance() {
return new deadMessageBatch_args();
}
protected boolean isOneway() {
return false;
}
public deadMessageBatch_result getResult(I iface, deadMessageBatch_args args) throws libthrift091.TException {
deadMessageBatch_result result = new deadMessageBatch_result();
try {
result.success = iface.deadMessageBatch(args.deadMessageBatchRequest);
} catch (com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException e) {
result.e = e;
}
return result;
}
}
public static class peekMessage extends libthrift091.ProcessFunction {
public peekMessage() {
super("peekMessage");
}
public peekMessage_args getEmptyArgsInstance() {
return new peekMessage_args();
}
protected boolean isOneway() {
return false;
}
public peekMessage_result getResult(I iface, peekMessage_args args) throws libthrift091.TException {
peekMessage_result result = new peekMessage_result();
try {
result.success = iface.peekMessage(args.peekMessageRequest);
} catch (com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException e) {
result.e = e;
}
return result;
}
}
public static class deletePeekMessage extends libthrift091.ProcessFunction {
public deletePeekMessage() {
super("deletePeekMessage");
}
public deletePeekMessage_args getEmptyArgsInstance() {
return new deletePeekMessage_args();
}
protected boolean isOneway() {
return false;
}
public deletePeekMessage_result getResult(I iface, deletePeekMessage_args args) throws libthrift091.TException {
deletePeekMessage_result result = new deletePeekMessage_result();
try {
iface.deletePeekMessage(args.deletePeekMessageRequest);
} catch (com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException e) {
result.e = e;
}
return result;
}
}
public static class deletePeekMessageBatch extends libthrift091.ProcessFunction {
public deletePeekMessageBatch() {
super("deletePeekMessageBatch");
}
public deletePeekMessageBatch_args getEmptyArgsInstance() {
return new deletePeekMessageBatch_args();
}
protected boolean isOneway() {
return false;
}
public deletePeekMessageBatch_result getResult(I iface, deletePeekMessageBatch_args args) throws libthrift091.TException {
deletePeekMessageBatch_result result = new deletePeekMessageBatch_result();
try {
result.success = iface.deletePeekMessageBatch(args.deletePeekMessageBatchRequest);
} catch (com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException e) {
result.e = e;
}
return result;
}
}
}
public static class AsyncProcessor extends com.xiaomi.infra.galaxy.emq.thrift.EMQBaseService.AsyncProcessor {
private static final Logger LOGGER = LoggerFactory.getLogger(AsyncProcessor.class.getName());
public AsyncProcessor(I iface) {
super(iface, getProcessMap(new HashMap>()));
}
protected AsyncProcessor(I iface, Map> processMap) {
super(iface, getProcessMap(processMap));
}
private static Map> getProcessMap(Map> processMap) {
processMap.put("sendMessage", new sendMessage());
processMap.put("sendMessageBatch", new sendMessageBatch());
processMap.put("receiveMessage", new receiveMessage());
processMap.put("changeMessageVisibilitySeconds", new changeMessageVisibilitySeconds());
processMap.put("changeMessageVisibilitySecondsBatch", new changeMessageVisibilitySecondsBatch());
processMap.put("deleteMessage", new deleteMessage());
processMap.put("deleteMessageBatch", new deleteMessageBatch());
processMap.put("deadMessage", new deadMessage());
processMap.put("deadMessageBatch", new deadMessageBatch());
processMap.put("peekMessage", new peekMessage());
processMap.put("deletePeekMessage", new deletePeekMessage());
processMap.put("deletePeekMessageBatch", new deletePeekMessageBatch());
return processMap;
}
public static class sendMessage extends libthrift091.AsyncProcessFunction {
public sendMessage() {
super("sendMessage");
}
public sendMessage_args getEmptyArgsInstance() {
return new sendMessage_args();
}
public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final libthrift091.AsyncProcessFunction fcall = this;
return new AsyncMethodCallback() {
public void onComplete(SendMessageResponse o) {
sendMessage_result result = new sendMessage_result();
result.success = o;
try {
fcall.sendResponse(fb,result, libthrift091.protocol.TMessageType.REPLY,seqid);
return;
} catch (Exception e) {
LOGGER.error("Exception writing to internal frame buffer", e);
}
fb.close();
}
public void onError(Exception e) {
byte msgType = libthrift091.protocol.TMessageType.REPLY;
libthrift091.TBase msg;
sendMessage_result result = new sendMessage_result();
if (e instanceof com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException) {
result.e = (com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException) e;
result.setEIsSet(true);
msg = result;
}
else
{
msgType = libthrift091.protocol.TMessageType.EXCEPTION;
msg = (libthrift091.TBase)new libthrift091.TApplicationException(libthrift091.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
return;
} catch (Exception ex) {
LOGGER.error("Exception writing to internal frame buffer", ex);
}
fb.close();
}
};
}
protected boolean isOneway() {
return false;
}
public void start(I iface, sendMessage_args args, libthrift091.async.AsyncMethodCallback resultHandler) throws TException {
iface.sendMessage(args.sendMessageRequest,resultHandler);
}
}
public static class sendMessageBatch extends libthrift091.AsyncProcessFunction {
public sendMessageBatch() {
super("sendMessageBatch");
}
public sendMessageBatch_args getEmptyArgsInstance() {
return new sendMessageBatch_args();
}
public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final libthrift091.AsyncProcessFunction fcall = this;
return new AsyncMethodCallback() {
public void onComplete(SendMessageBatchResponse o) {
sendMessageBatch_result result = new sendMessageBatch_result();
result.success = o;
try {
fcall.sendResponse(fb,result, libthrift091.protocol.TMessageType.REPLY,seqid);
return;
} catch (Exception e) {
LOGGER.error("Exception writing to internal frame buffer", e);
}
fb.close();
}
public void onError(Exception e) {
byte msgType = libthrift091.protocol.TMessageType.REPLY;
libthrift091.TBase msg;
sendMessageBatch_result result = new sendMessageBatch_result();
if (e instanceof com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException) {
result.e = (com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException) e;
result.setEIsSet(true);
msg = result;
}
else
{
msgType = libthrift091.protocol.TMessageType.EXCEPTION;
msg = (libthrift091.TBase)new libthrift091.TApplicationException(libthrift091.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
return;
} catch (Exception ex) {
LOGGER.error("Exception writing to internal frame buffer", ex);
}
fb.close();
}
};
}
protected boolean isOneway() {
return false;
}
public void start(I iface, sendMessageBatch_args args, libthrift091.async.AsyncMethodCallback resultHandler) throws TException {
iface.sendMessageBatch(args.sendMessageBatchRequest,resultHandler);
}
}
public static class receiveMessage extends libthrift091.AsyncProcessFunction> {
public receiveMessage() {
super("receiveMessage");
}
public receiveMessage_args getEmptyArgsInstance() {
return new receiveMessage_args();
}
public AsyncMethodCallback> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final libthrift091.AsyncProcessFunction fcall = this;
return new AsyncMethodCallback>() {
public void onComplete(List o) {
receiveMessage_result result = new receiveMessage_result();
result.success = o;
try {
fcall.sendResponse(fb,result, libthrift091.protocol.TMessageType.REPLY,seqid);
return;
} catch (Exception e) {
LOGGER.error("Exception writing to internal frame buffer", e);
}
fb.close();
}
public void onError(Exception e) {
byte msgType = libthrift091.protocol.TMessageType.REPLY;
libthrift091.TBase msg;
receiveMessage_result result = new receiveMessage_result();
if (e instanceof com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException) {
result.e = (com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException) e;
result.setEIsSet(true);
msg = result;
}
else
{
msgType = libthrift091.protocol.TMessageType.EXCEPTION;
msg = (libthrift091.TBase)new libthrift091.TApplicationException(libthrift091.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
return;
} catch (Exception ex) {
LOGGER.error("Exception writing to internal frame buffer", ex);
}
fb.close();
}
};
}
protected boolean isOneway() {
return false;
}
public void start(I iface, receiveMessage_args args, libthrift091.async.AsyncMethodCallback> resultHandler) throws TException {
iface.receiveMessage(args.receiveMessageRequest,resultHandler);
}
}
public static class changeMessageVisibilitySeconds extends libthrift091.AsyncProcessFunction {
public changeMessageVisibilitySeconds() {
super("changeMessageVisibilitySeconds");
}
public changeMessageVisibilitySeconds_args getEmptyArgsInstance() {
return new changeMessageVisibilitySeconds_args();
}
public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final libthrift091.AsyncProcessFunction fcall = this;
return new AsyncMethodCallback() {
public void onComplete(Void o) {
changeMessageVisibilitySeconds_result result = new changeMessageVisibilitySeconds_result();
try {
fcall.sendResponse(fb,result, libthrift091.protocol.TMessageType.REPLY,seqid);
return;
} catch (Exception e) {
LOGGER.error("Exception writing to internal frame buffer", e);
}
fb.close();
}
public void onError(Exception e) {
byte msgType = libthrift091.protocol.TMessageType.REPLY;
libthrift091.TBase msg;
changeMessageVisibilitySeconds_result result = new changeMessageVisibilitySeconds_result();
if (e instanceof com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException) {
result.e = (com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException) e;
result.setEIsSet(true);
msg = result;
}
else
{
msgType = libthrift091.protocol.TMessageType.EXCEPTION;
msg = (libthrift091.TBase)new libthrift091.TApplicationException(libthrift091.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
return;
} catch (Exception ex) {
LOGGER.error("Exception writing to internal frame buffer", ex);
}
fb.close();
}
};
}
protected boolean isOneway() {
return false;
}
public void start(I iface, changeMessageVisibilitySeconds_args args, libthrift091.async.AsyncMethodCallback resultHandler) throws TException {
iface.changeMessageVisibilitySeconds(args.changeMessageVisibilityRequest,resultHandler);
}
}
public static class changeMessageVisibilitySecondsBatch extends libthrift091.AsyncProcessFunction {
public changeMessageVisibilitySecondsBatch() {
super("changeMessageVisibilitySecondsBatch");
}
public changeMessageVisibilitySecondsBatch_args getEmptyArgsInstance() {
return new changeMessageVisibilitySecondsBatch_args();
}
public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final libthrift091.AsyncProcessFunction fcall = this;
return new AsyncMethodCallback() {
public void onComplete(ChangeMessageVisibilityBatchResponse o) {
changeMessageVisibilitySecondsBatch_result result = new changeMessageVisibilitySecondsBatch_result();
result.success = o;
try {
fcall.sendResponse(fb,result, libthrift091.protocol.TMessageType.REPLY,seqid);
return;
} catch (Exception e) {
LOGGER.error("Exception writing to internal frame buffer", e);
}
fb.close();
}
public void onError(Exception e) {
byte msgType = libthrift091.protocol.TMessageType.REPLY;
libthrift091.TBase msg;
changeMessageVisibilitySecondsBatch_result result = new changeMessageVisibilitySecondsBatch_result();
if (e instanceof com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException) {
result.e = (com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException) e;
result.setEIsSet(true);
msg = result;
}
else
{
msgType = libthrift091.protocol.TMessageType.EXCEPTION;
msg = (libthrift091.TBase)new libthrift091.TApplicationException(libthrift091.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
return;
} catch (Exception ex) {
LOGGER.error("Exception writing to internal frame buffer", ex);
}
fb.close();
}
};
}
protected boolean isOneway() {
return false;
}
public void start(I iface, changeMessageVisibilitySecondsBatch_args args, libthrift091.async.AsyncMethodCallback resultHandler) throws TException {
iface.changeMessageVisibilitySecondsBatch(args.changeMessageVisibilityBatchRequest,resultHandler);
}
}
public static class deleteMessage extends libthrift091.AsyncProcessFunction {
public deleteMessage() {
super("deleteMessage");
}
public deleteMessage_args getEmptyArgsInstance() {
return new deleteMessage_args();
}
public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final libthrift091.AsyncProcessFunction fcall = this;
return new AsyncMethodCallback() {
public void onComplete(Void o) {
deleteMessage_result result = new deleteMessage_result();
try {
fcall.sendResponse(fb,result, libthrift091.protocol.TMessageType.REPLY,seqid);
return;
} catch (Exception e) {
LOGGER.error("Exception writing to internal frame buffer", e);
}
fb.close();
}
public void onError(Exception e) {
byte msgType = libthrift091.protocol.TMessageType.REPLY;
libthrift091.TBase msg;
deleteMessage_result result = new deleteMessage_result();
if (e instanceof com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException) {
result.e = (com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException) e;
result.setEIsSet(true);
msg = result;
}
else
{
msgType = libthrift091.protocol.TMessageType.EXCEPTION;
msg = (libthrift091.TBase)new libthrift091.TApplicationException(libthrift091.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
return;
} catch (Exception ex) {
LOGGER.error("Exception writing to internal frame buffer", ex);
}
fb.close();
}
};
}
protected boolean isOneway() {
return false;
}
public void start(I iface, deleteMessage_args args, libthrift091.async.AsyncMethodCallback resultHandler) throws TException {
iface.deleteMessage(args.deleteMessageRequest,resultHandler);
}
}
public static class deleteMessageBatch extends libthrift091.AsyncProcessFunction {
public deleteMessageBatch() {
super("deleteMessageBatch");
}
public deleteMessageBatch_args getEmptyArgsInstance() {
return new deleteMessageBatch_args();
}
public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final libthrift091.AsyncProcessFunction fcall = this;
return new AsyncMethodCallback() {
public void onComplete(DeleteMessageBatchResponse o) {
deleteMessageBatch_result result = new deleteMessageBatch_result();
result.success = o;
try {
fcall.sendResponse(fb,result, libthrift091.protocol.TMessageType.REPLY,seqid);
return;
} catch (Exception e) {
LOGGER.error("Exception writing to internal frame buffer", e);
}
fb.close();
}
public void onError(Exception e) {
byte msgType = libthrift091.protocol.TMessageType.REPLY;
libthrift091.TBase msg;
deleteMessageBatch_result result = new deleteMessageBatch_result();
if (e instanceof com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException) {
result.e = (com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException) e;
result.setEIsSet(true);
msg = result;
}
else
{
msgType = libthrift091.protocol.TMessageType.EXCEPTION;
msg = (libthrift091.TBase)new libthrift091.TApplicationException(libthrift091.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
return;
} catch (Exception ex) {
LOGGER.error("Exception writing to internal frame buffer", ex);
}
fb.close();
}
};
}
protected boolean isOneway() {
return false;
}
public void start(I iface, deleteMessageBatch_args args, libthrift091.async.AsyncMethodCallback resultHandler) throws TException {
iface.deleteMessageBatch(args.deleteMessageBatchRequest,resultHandler);
}
}
public static class deadMessage extends libthrift091.AsyncProcessFunction {
public deadMessage() {
super("deadMessage");
}
public deadMessage_args getEmptyArgsInstance() {
return new deadMessage_args();
}
public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final libthrift091.AsyncProcessFunction fcall = this;
return new AsyncMethodCallback() {
public void onComplete(Void o) {
deadMessage_result result = new deadMessage_result();
try {
fcall.sendResponse(fb,result, libthrift091.protocol.TMessageType.REPLY,seqid);
return;
} catch (Exception e) {
LOGGER.error("Exception writing to internal frame buffer", e);
}
fb.close();
}
public void onError(Exception e) {
byte msgType = libthrift091.protocol.TMessageType.REPLY;
libthrift091.TBase msg;
deadMessage_result result = new deadMessage_result();
if (e instanceof com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException) {
result.e = (com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException) e;
result.setEIsSet(true);
msg = result;
}
else
{
msgType = libthrift091.protocol.TMessageType.EXCEPTION;
msg = (libthrift091.TBase)new libthrift091.TApplicationException(libthrift091.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
return;
} catch (Exception ex) {
LOGGER.error("Exception writing to internal frame buffer", ex);
}
fb.close();
}
};
}
protected boolean isOneway() {
return false;
}
public void start(I iface, deadMessage_args args, libthrift091.async.AsyncMethodCallback resultHandler) throws TException {
iface.deadMessage(args.deadMessageRequest,resultHandler);
}
}
public static class deadMessageBatch extends libthrift091.AsyncProcessFunction {
public deadMessageBatch() {
super("deadMessageBatch");
}
public deadMessageBatch_args getEmptyArgsInstance() {
return new deadMessageBatch_args();
}
public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final libthrift091.AsyncProcessFunction fcall = this;
return new AsyncMethodCallback() {
public void onComplete(DeadMessageBatchResponse o) {
deadMessageBatch_result result = new deadMessageBatch_result();
result.success = o;
try {
fcall.sendResponse(fb,result, libthrift091.protocol.TMessageType.REPLY,seqid);
return;
} catch (Exception e) {
LOGGER.error("Exception writing to internal frame buffer", e);
}
fb.close();
}
public void onError(Exception e) {
byte msgType = libthrift091.protocol.TMessageType.REPLY;
libthrift091.TBase msg;
deadMessageBatch_result result = new deadMessageBatch_result();
if (e instanceof com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException) {
result.e = (com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException) e;
result.setEIsSet(true);
msg = result;
}
else
{
msgType = libthrift091.protocol.TMessageType.EXCEPTION;
msg = (libthrift091.TBase)new libthrift091.TApplicationException(libthrift091.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
return;
} catch (Exception ex) {
LOGGER.error("Exception writing to internal frame buffer", ex);
}
fb.close();
}
};
}
protected boolean isOneway() {
return false;
}
public void start(I iface, deadMessageBatch_args args, libthrift091.async.AsyncMethodCallback resultHandler) throws TException {
iface.deadMessageBatch(args.deadMessageBatchRequest,resultHandler);
}
}
public static class peekMessage extends libthrift091.AsyncProcessFunction> {
public peekMessage() {
super("peekMessage");
}
public peekMessage_args getEmptyArgsInstance() {
return new peekMessage_args();
}
public AsyncMethodCallback> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final libthrift091.AsyncProcessFunction fcall = this;
return new AsyncMethodCallback>() {
public void onComplete(List o) {
peekMessage_result result = new peekMessage_result();
result.success = o;
try {
fcall.sendResponse(fb,result, libthrift091.protocol.TMessageType.REPLY,seqid);
return;
} catch (Exception e) {
LOGGER.error("Exception writing to internal frame buffer", e);
}
fb.close();
}
public void onError(Exception e) {
byte msgType = libthrift091.protocol.TMessageType.REPLY;
libthrift091.TBase msg;
peekMessage_result result = new peekMessage_result();
if (e instanceof com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException) {
result.e = (com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException) e;
result.setEIsSet(true);
msg = result;
}
else
{
msgType = libthrift091.protocol.TMessageType.EXCEPTION;
msg = (libthrift091.TBase)new libthrift091.TApplicationException(libthrift091.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
return;
} catch (Exception ex) {
LOGGER.error("Exception writing to internal frame buffer", ex);
}
fb.close();
}
};
}
protected boolean isOneway() {
return false;
}
public void start(I iface, peekMessage_args args, libthrift091.async.AsyncMethodCallback> resultHandler) throws TException {
iface.peekMessage(args.peekMessageRequest,resultHandler);
}
}
public static class deletePeekMessage extends libthrift091.AsyncProcessFunction {
public deletePeekMessage() {
super("deletePeekMessage");
}
public deletePeekMessage_args getEmptyArgsInstance() {
return new deletePeekMessage_args();
}
public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final libthrift091.AsyncProcessFunction fcall = this;
return new AsyncMethodCallback() {
public void onComplete(Void o) {
deletePeekMessage_result result = new deletePeekMessage_result();
try {
fcall.sendResponse(fb,result, libthrift091.protocol.TMessageType.REPLY,seqid);
return;
} catch (Exception e) {
LOGGER.error("Exception writing to internal frame buffer", e);
}
fb.close();
}
public void onError(Exception e) {
byte msgType = libthrift091.protocol.TMessageType.REPLY;
libthrift091.TBase msg;
deletePeekMessage_result result = new deletePeekMessage_result();
if (e instanceof com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException) {
result.e = (com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException) e;
result.setEIsSet(true);
msg = result;
}
else
{
msgType = libthrift091.protocol.TMessageType.EXCEPTION;
msg = (libthrift091.TBase)new libthrift091.TApplicationException(libthrift091.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
return;
} catch (Exception ex) {
LOGGER.error("Exception writing to internal frame buffer", ex);
}
fb.close();
}
};
}
protected boolean isOneway() {
return false;
}
public void start(I iface, deletePeekMessage_args args, libthrift091.async.AsyncMethodCallback resultHandler) throws TException {
iface.deletePeekMessage(args.deletePeekMessageRequest,resultHandler);
}
}
public static class deletePeekMessageBatch extends libthrift091.AsyncProcessFunction {
public deletePeekMessageBatch() {
super("deletePeekMessageBatch");
}
public deletePeekMessageBatch_args getEmptyArgsInstance() {
return new deletePeekMessageBatch_args();
}
public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final libthrift091.AsyncProcessFunction fcall = this;
return new AsyncMethodCallback() {
public void onComplete(DeletePeekMessageBatchResponse o) {
deletePeekMessageBatch_result result = new deletePeekMessageBatch_result();
result.success = o;
try {
fcall.sendResponse(fb,result, libthrift091.protocol.TMessageType.REPLY,seqid);
return;
} catch (Exception e) {
LOGGER.error("Exception writing to internal frame buffer", e);
}
fb.close();
}
public void onError(Exception e) {
byte msgType = libthrift091.protocol.TMessageType.REPLY;
libthrift091.TBase msg;
deletePeekMessageBatch_result result = new deletePeekMessageBatch_result();
if (e instanceof com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException) {
result.e = (com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException) e;
result.setEIsSet(true);
msg = result;
}
else
{
msgType = libthrift091.protocol.TMessageType.EXCEPTION;
msg = (libthrift091.TBase)new libthrift091.TApplicationException(libthrift091.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
return;
} catch (Exception ex) {
LOGGER.error("Exception writing to internal frame buffer", ex);
}
fb.close();
}
};
}
protected boolean isOneway() {
return false;
}
public void start(I iface, deletePeekMessageBatch_args args, libthrift091.async.AsyncMethodCallback resultHandler) throws TException {
iface.deletePeekMessageBatch(args.deletePeekMessageBatchRequest,resultHandler);
}
}
}
public static class sendMessage_args implements libthrift091.TBase, java.io.Serializable, Cloneable, Comparable {
private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("sendMessage_args");
private static final libthrift091.protocol.TField SEND_MESSAGE_REQUEST_FIELD_DESC = new libthrift091.protocol.TField("sendMessageRequest", libthrift091.protocol.TType.STRUCT, (short)1);
private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new sendMessage_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new sendMessage_argsTupleSchemeFactory());
}
public SendMessageRequest sendMessageRequest; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements libthrift091.TFieldIdEnum {
SEND_MESSAGE_REQUEST((short)1, "sendMessageRequest");
private static final Map byName = new HashMap();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 1: // SEND_MESSAGE_REQUEST
return SEND_MESSAGE_REQUEST;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(String name) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
_Fields(short thriftId, String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final Map<_Fields, libthrift091.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, libthrift091.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, libthrift091.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.SEND_MESSAGE_REQUEST, new libthrift091.meta_data.FieldMetaData("sendMessageRequest", libthrift091.TFieldRequirementType.DEFAULT,
new libthrift091.meta_data.StructMetaData(libthrift091.protocol.TType.STRUCT, SendMessageRequest.class)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(sendMessage_args.class, metaDataMap);
}
public sendMessage_args() {
}
public sendMessage_args(
SendMessageRequest sendMessageRequest)
{
this();
this.sendMessageRequest = sendMessageRequest;
}
/**
* Performs a deep copy on other .
*/
public sendMessage_args(sendMessage_args other) {
if (other.isSetSendMessageRequest()) {
this.sendMessageRequest = new SendMessageRequest(other.sendMessageRequest);
}
}
public sendMessage_args deepCopy() {
return new sendMessage_args(this);
}
@Override
public void clear() {
this.sendMessageRequest = null;
}
public SendMessageRequest getSendMessageRequest() {
return this.sendMessageRequest;
}
public sendMessage_args setSendMessageRequest(SendMessageRequest sendMessageRequest) {
this.sendMessageRequest = sendMessageRequest;
return this;
}
public void unsetSendMessageRequest() {
this.sendMessageRequest = null;
}
/** Returns true if field sendMessageRequest is set (has been assigned a value) and false otherwise */
public boolean isSetSendMessageRequest() {
return this.sendMessageRequest != null;
}
public void setSendMessageRequestIsSet(boolean value) {
if (!value) {
this.sendMessageRequest = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case SEND_MESSAGE_REQUEST:
if (value == null) {
unsetSendMessageRequest();
} else {
setSendMessageRequest((SendMessageRequest)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case SEND_MESSAGE_REQUEST:
return getSendMessageRequest();
}
throw new IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
}
switch (field) {
case SEND_MESSAGE_REQUEST:
return isSetSendMessageRequest();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof sendMessage_args)
return this.equals((sendMessage_args)that);
return false;
}
public boolean equals(sendMessage_args that) {
if (that == null)
return false;
boolean this_present_sendMessageRequest = true && this.isSetSendMessageRequest();
boolean that_present_sendMessageRequest = true && that.isSetSendMessageRequest();
if (this_present_sendMessageRequest || that_present_sendMessageRequest) {
if (!(this_present_sendMessageRequest && that_present_sendMessageRequest))
return false;
if (!this.sendMessageRequest.equals(that.sendMessageRequest))
return false;
}
return true;
}
@Override
public int hashCode() {
List list = new ArrayList();
boolean present_sendMessageRequest = true && (isSetSendMessageRequest());
list.add(present_sendMessageRequest);
if (present_sendMessageRequest)
list.add(sendMessageRequest);
return list.hashCode();
}
@Override
public int compareTo(sendMessage_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetSendMessageRequest()).compareTo(other.isSetSendMessageRequest());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSendMessageRequest()) {
lastComparison = libthrift091.TBaseHelper.compareTo(this.sendMessageRequest, other.sendMessageRequest);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(libthrift091.protocol.TProtocol iprot) throws libthrift091.TException {
schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
}
public void write(libthrift091.protocol.TProtocol oprot) throws libthrift091.TException {
schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("sendMessage_args(");
boolean first = true;
sb.append("sendMessageRequest:");
if (this.sendMessageRequest == null) {
sb.append("null");
} else {
sb.append(this.sendMessageRequest);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws libthrift091.TException {
// check for required fields
// check for sub-struct validity
if (sendMessageRequest != null) {
sendMessageRequest.validate();
}
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(out)));
} catch (libthrift091.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
try {
read(new libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(in)));
} catch (libthrift091.TException te) {
throw new java.io.IOException(te);
}
}
private static class sendMessage_argsStandardSchemeFactory implements SchemeFactory {
public sendMessage_argsStandardScheme getScheme() {
return new sendMessage_argsStandardScheme();
}
}
private static class sendMessage_argsStandardScheme extends StandardScheme {
public void read(libthrift091.protocol.TProtocol iprot, sendMessage_args struct) throws libthrift091.TException {
libthrift091.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
{
schemeField = iprot.readFieldBegin();
if (schemeField.type == libthrift091.protocol.TType.STOP) {
break;
}
switch (schemeField.id) {
case 1: // SEND_MESSAGE_REQUEST
if (schemeField.type == libthrift091.protocol.TType.STRUCT) {
struct.sendMessageRequest = new SendMessageRequest();
struct.sendMessageRequest.read(iprot);
struct.setSendMessageRequestIsSet(true);
} else {
libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
public void write(libthrift091.protocol.TProtocol oprot, sendMessage_args struct) throws libthrift091.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.sendMessageRequest != null) {
oprot.writeFieldBegin(SEND_MESSAGE_REQUEST_FIELD_DESC);
struct.sendMessageRequest.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class sendMessage_argsTupleSchemeFactory implements SchemeFactory {
public sendMessage_argsTupleScheme getScheme() {
return new sendMessage_argsTupleScheme();
}
}
private static class sendMessage_argsTupleScheme extends TupleScheme {
@Override
public void write(libthrift091.protocol.TProtocol prot, sendMessage_args struct) throws libthrift091.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetSendMessageRequest()) {
optionals.set(0);
}
oprot.writeBitSet(optionals, 1);
if (struct.isSetSendMessageRequest()) {
struct.sendMessageRequest.write(oprot);
}
}
@Override
public void read(libthrift091.protocol.TProtocol prot, sendMessage_args struct) throws libthrift091.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.sendMessageRequest = new SendMessageRequest();
struct.sendMessageRequest.read(iprot);
struct.setSendMessageRequestIsSet(true);
}
}
}
}
public static class sendMessage_result implements libthrift091.TBase, java.io.Serializable, Cloneable, Comparable {
private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("sendMessage_result");
private static final libthrift091.protocol.TField SUCCESS_FIELD_DESC = new libthrift091.protocol.TField("success", libthrift091.protocol.TType.STRUCT, (short)0);
private static final libthrift091.protocol.TField E_FIELD_DESC = new libthrift091.protocol.TField("e", libthrift091.protocol.TType.STRUCT, (short)1);
private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new sendMessage_resultStandardSchemeFactory());
schemes.put(TupleScheme.class, new sendMessage_resultTupleSchemeFactory());
}
public SendMessageResponse success; // required
public com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException e; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements libthrift091.TFieldIdEnum {
SUCCESS((short)0, "success"),
E((short)1, "e");
private static final Map byName = new HashMap();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 0: // SUCCESS
return SUCCESS;
case 1: // E
return E;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(String name) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
_Fields(short thriftId, String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final Map<_Fields, libthrift091.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, libthrift091.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, libthrift091.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.SUCCESS, new libthrift091.meta_data.FieldMetaData("success", libthrift091.TFieldRequirementType.DEFAULT,
new libthrift091.meta_data.StructMetaData(libthrift091.protocol.TType.STRUCT, SendMessageResponse.class)));
tmpMap.put(_Fields.E, new libthrift091.meta_data.FieldMetaData("e", libthrift091.TFieldRequirementType.DEFAULT,
new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.STRUCT)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(sendMessage_result.class, metaDataMap);
}
public sendMessage_result() {
}
public sendMessage_result(
SendMessageResponse success,
com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException e)
{
this();
this.success = success;
this.e = e;
}
/**
* Performs a deep copy on other .
*/
public sendMessage_result(sendMessage_result other) {
if (other.isSetSuccess()) {
this.success = new SendMessageResponse(other.success);
}
if (other.isSetE()) {
this.e = new com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException(other.e);
}
}
public sendMessage_result deepCopy() {
return new sendMessage_result(this);
}
@Override
public void clear() {
this.success = null;
this.e = null;
}
public SendMessageResponse getSuccess() {
return this.success;
}
public sendMessage_result setSuccess(SendMessageResponse success) {
this.success = success;
return this;
}
public void unsetSuccess() {
this.success = null;
}
/** Returns true if field success is set (has been assigned a value) and false otherwise */
public boolean isSetSuccess() {
return this.success != null;
}
public void setSuccessIsSet(boolean value) {
if (!value) {
this.success = null;
}
}
public com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException getE() {
return this.e;
}
public sendMessage_result setE(com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException e) {
this.e = e;
return this;
}
public void unsetE() {
this.e = null;
}
/** Returns true if field e is set (has been assigned a value) and false otherwise */
public boolean isSetE() {
return this.e != null;
}
public void setEIsSet(boolean value) {
if (!value) {
this.e = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
setSuccess((SendMessageResponse)value);
}
break;
case E:
if (value == null) {
unsetE();
} else {
setE((com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return getSuccess();
case E:
return getE();
}
throw new IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
}
switch (field) {
case SUCCESS:
return isSetSuccess();
case E:
return isSetE();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof sendMessage_result)
return this.equals((sendMessage_result)that);
return false;
}
public boolean equals(sendMessage_result that) {
if (that == null)
return false;
boolean this_present_success = true && this.isSetSuccess();
boolean that_present_success = true && that.isSetSuccess();
if (this_present_success || that_present_success) {
if (!(this_present_success && that_present_success))
return false;
if (!this.success.equals(that.success))
return false;
}
boolean this_present_e = true && this.isSetE();
boolean that_present_e = true && that.isSetE();
if (this_present_e || that_present_e) {
if (!(this_present_e && that_present_e))
return false;
if (!this.e.equals(that.e))
return false;
}
return true;
}
@Override
public int hashCode() {
List list = new ArrayList();
boolean present_success = true && (isSetSuccess());
list.add(present_success);
if (present_success)
list.add(success);
boolean present_e = true && (isSetE());
list.add(present_e);
if (present_e)
list.add(e);
return list.hashCode();
}
@Override
public int compareTo(sendMessage_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSuccess()) {
lastComparison = libthrift091.TBaseHelper.compareTo(this.success, other.success);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetE()).compareTo(other.isSetE());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetE()) {
lastComparison = libthrift091.TBaseHelper.compareTo(this.e, other.e);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(libthrift091.protocol.TProtocol iprot) throws libthrift091.TException {
schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
}
public void write(libthrift091.protocol.TProtocol oprot) throws libthrift091.TException {
schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("sendMessage_result(");
boolean first = true;
sb.append("success:");
if (this.success == null) {
sb.append("null");
} else {
sb.append(this.success);
}
first = false;
if (!first) sb.append(", ");
sb.append("e:");
if (this.e == null) {
sb.append("null");
} else {
sb.append(this.e);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws libthrift091.TException {
// check for required fields
// check for sub-struct validity
if (success != null) {
success.validate();
}
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(out)));
} catch (libthrift091.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
try {
read(new libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(in)));
} catch (libthrift091.TException te) {
throw new java.io.IOException(te);
}
}
private static class sendMessage_resultStandardSchemeFactory implements SchemeFactory {
public sendMessage_resultStandardScheme getScheme() {
return new sendMessage_resultStandardScheme();
}
}
private static class sendMessage_resultStandardScheme extends StandardScheme {
public void read(libthrift091.protocol.TProtocol iprot, sendMessage_result struct) throws libthrift091.TException {
libthrift091.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
{
schemeField = iprot.readFieldBegin();
if (schemeField.type == libthrift091.protocol.TType.STOP) {
break;
}
switch (schemeField.id) {
case 0: // SUCCESS
if (schemeField.type == libthrift091.protocol.TType.STRUCT) {
struct.success = new SendMessageResponse();
struct.success.read(iprot);
struct.setSuccessIsSet(true);
} else {
libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 1: // E
if (schemeField.type == libthrift091.protocol.TType.STRUCT) {
struct.e = new com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException();
struct.e.read(iprot);
struct.setEIsSet(true);
} else {
libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
public void write(libthrift091.protocol.TProtocol oprot, sendMessage_result struct) throws libthrift091.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.success != null) {
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
struct.success.write(oprot);
oprot.writeFieldEnd();
}
if (struct.e != null) {
oprot.writeFieldBegin(E_FIELD_DESC);
struct.e.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class sendMessage_resultTupleSchemeFactory implements SchemeFactory {
public sendMessage_resultTupleScheme getScheme() {
return new sendMessage_resultTupleScheme();
}
}
private static class sendMessage_resultTupleScheme extends TupleScheme {
@Override
public void write(libthrift091.protocol.TProtocol prot, sendMessage_result struct) throws libthrift091.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetSuccess()) {
optionals.set(0);
}
if (struct.isSetE()) {
optionals.set(1);
}
oprot.writeBitSet(optionals, 2);
if (struct.isSetSuccess()) {
struct.success.write(oprot);
}
if (struct.isSetE()) {
struct.e.write(oprot);
}
}
@Override
public void read(libthrift091.protocol.TProtocol prot, sendMessage_result struct) throws libthrift091.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
struct.success = new SendMessageResponse();
struct.success.read(iprot);
struct.setSuccessIsSet(true);
}
if (incoming.get(1)) {
struct.e = new com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException();
struct.e.read(iprot);
struct.setEIsSet(true);
}
}
}
}
public static class sendMessageBatch_args implements libthrift091.TBase, java.io.Serializable, Cloneable, Comparable {
private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("sendMessageBatch_args");
private static final libthrift091.protocol.TField SEND_MESSAGE_BATCH_REQUEST_FIELD_DESC = new libthrift091.protocol.TField("sendMessageBatchRequest", libthrift091.protocol.TType.STRUCT, (short)1);
private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new sendMessageBatch_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new sendMessageBatch_argsTupleSchemeFactory());
}
public SendMessageBatchRequest sendMessageBatchRequest; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements libthrift091.TFieldIdEnum {
SEND_MESSAGE_BATCH_REQUEST((short)1, "sendMessageBatchRequest");
private static final Map byName = new HashMap();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 1: // SEND_MESSAGE_BATCH_REQUEST
return SEND_MESSAGE_BATCH_REQUEST;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(String name) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
_Fields(short thriftId, String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final Map<_Fields, libthrift091.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, libthrift091.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, libthrift091.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.SEND_MESSAGE_BATCH_REQUEST, new libthrift091.meta_data.FieldMetaData("sendMessageBatchRequest", libthrift091.TFieldRequirementType.DEFAULT,
new libthrift091.meta_data.StructMetaData(libthrift091.protocol.TType.STRUCT, SendMessageBatchRequest.class)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(sendMessageBatch_args.class, metaDataMap);
}
public sendMessageBatch_args() {
}
public sendMessageBatch_args(
SendMessageBatchRequest sendMessageBatchRequest)
{
this();
this.sendMessageBatchRequest = sendMessageBatchRequest;
}
/**
* Performs a deep copy on other .
*/
public sendMessageBatch_args(sendMessageBatch_args other) {
if (other.isSetSendMessageBatchRequest()) {
this.sendMessageBatchRequest = new SendMessageBatchRequest(other.sendMessageBatchRequest);
}
}
public sendMessageBatch_args deepCopy() {
return new sendMessageBatch_args(this);
}
@Override
public void clear() {
this.sendMessageBatchRequest = null;
}
public SendMessageBatchRequest getSendMessageBatchRequest() {
return this.sendMessageBatchRequest;
}
public sendMessageBatch_args setSendMessageBatchRequest(SendMessageBatchRequest sendMessageBatchRequest) {
this.sendMessageBatchRequest = sendMessageBatchRequest;
return this;
}
public void unsetSendMessageBatchRequest() {
this.sendMessageBatchRequest = null;
}
/** Returns true if field sendMessageBatchRequest is set (has been assigned a value) and false otherwise */
public boolean isSetSendMessageBatchRequest() {
return this.sendMessageBatchRequest != null;
}
public void setSendMessageBatchRequestIsSet(boolean value) {
if (!value) {
this.sendMessageBatchRequest = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case SEND_MESSAGE_BATCH_REQUEST:
if (value == null) {
unsetSendMessageBatchRequest();
} else {
setSendMessageBatchRequest((SendMessageBatchRequest)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case SEND_MESSAGE_BATCH_REQUEST:
return getSendMessageBatchRequest();
}
throw new IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
}
switch (field) {
case SEND_MESSAGE_BATCH_REQUEST:
return isSetSendMessageBatchRequest();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof sendMessageBatch_args)
return this.equals((sendMessageBatch_args)that);
return false;
}
public boolean equals(sendMessageBatch_args that) {
if (that == null)
return false;
boolean this_present_sendMessageBatchRequest = true && this.isSetSendMessageBatchRequest();
boolean that_present_sendMessageBatchRequest = true && that.isSetSendMessageBatchRequest();
if (this_present_sendMessageBatchRequest || that_present_sendMessageBatchRequest) {
if (!(this_present_sendMessageBatchRequest && that_present_sendMessageBatchRequest))
return false;
if (!this.sendMessageBatchRequest.equals(that.sendMessageBatchRequest))
return false;
}
return true;
}
@Override
public int hashCode() {
List list = new ArrayList();
boolean present_sendMessageBatchRequest = true && (isSetSendMessageBatchRequest());
list.add(present_sendMessageBatchRequest);
if (present_sendMessageBatchRequest)
list.add(sendMessageBatchRequest);
return list.hashCode();
}
@Override
public int compareTo(sendMessageBatch_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetSendMessageBatchRequest()).compareTo(other.isSetSendMessageBatchRequest());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSendMessageBatchRequest()) {
lastComparison = libthrift091.TBaseHelper.compareTo(this.sendMessageBatchRequest, other.sendMessageBatchRequest);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(libthrift091.protocol.TProtocol iprot) throws libthrift091.TException {
schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
}
public void write(libthrift091.protocol.TProtocol oprot) throws libthrift091.TException {
schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("sendMessageBatch_args(");
boolean first = true;
sb.append("sendMessageBatchRequest:");
if (this.sendMessageBatchRequest == null) {
sb.append("null");
} else {
sb.append(this.sendMessageBatchRequest);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws libthrift091.TException {
// check for required fields
// check for sub-struct validity
if (sendMessageBatchRequest != null) {
sendMessageBatchRequest.validate();
}
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(out)));
} catch (libthrift091.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
try {
read(new libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(in)));
} catch (libthrift091.TException te) {
throw new java.io.IOException(te);
}
}
private static class sendMessageBatch_argsStandardSchemeFactory implements SchemeFactory {
public sendMessageBatch_argsStandardScheme getScheme() {
return new sendMessageBatch_argsStandardScheme();
}
}
private static class sendMessageBatch_argsStandardScheme extends StandardScheme {
public void read(libthrift091.protocol.TProtocol iprot, sendMessageBatch_args struct) throws libthrift091.TException {
libthrift091.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
{
schemeField = iprot.readFieldBegin();
if (schemeField.type == libthrift091.protocol.TType.STOP) {
break;
}
switch (schemeField.id) {
case 1: // SEND_MESSAGE_BATCH_REQUEST
if (schemeField.type == libthrift091.protocol.TType.STRUCT) {
struct.sendMessageBatchRequest = new SendMessageBatchRequest();
struct.sendMessageBatchRequest.read(iprot);
struct.setSendMessageBatchRequestIsSet(true);
} else {
libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
public void write(libthrift091.protocol.TProtocol oprot, sendMessageBatch_args struct) throws libthrift091.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.sendMessageBatchRequest != null) {
oprot.writeFieldBegin(SEND_MESSAGE_BATCH_REQUEST_FIELD_DESC);
struct.sendMessageBatchRequest.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class sendMessageBatch_argsTupleSchemeFactory implements SchemeFactory {
public sendMessageBatch_argsTupleScheme getScheme() {
return new sendMessageBatch_argsTupleScheme();
}
}
private static class sendMessageBatch_argsTupleScheme extends TupleScheme {
@Override
public void write(libthrift091.protocol.TProtocol prot, sendMessageBatch_args struct) throws libthrift091.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetSendMessageBatchRequest()) {
optionals.set(0);
}
oprot.writeBitSet(optionals, 1);
if (struct.isSetSendMessageBatchRequest()) {
struct.sendMessageBatchRequest.write(oprot);
}
}
@Override
public void read(libthrift091.protocol.TProtocol prot, sendMessageBatch_args struct) throws libthrift091.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.sendMessageBatchRequest = new SendMessageBatchRequest();
struct.sendMessageBatchRequest.read(iprot);
struct.setSendMessageBatchRequestIsSet(true);
}
}
}
}
public static class sendMessageBatch_result implements libthrift091.TBase, java.io.Serializable, Cloneable, Comparable {
private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("sendMessageBatch_result");
private static final libthrift091.protocol.TField SUCCESS_FIELD_DESC = new libthrift091.protocol.TField("success", libthrift091.protocol.TType.STRUCT, (short)0);
private static final libthrift091.protocol.TField E_FIELD_DESC = new libthrift091.protocol.TField("e", libthrift091.protocol.TType.STRUCT, (short)1);
private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new sendMessageBatch_resultStandardSchemeFactory());
schemes.put(TupleScheme.class, new sendMessageBatch_resultTupleSchemeFactory());
}
public SendMessageBatchResponse success; // required
public com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException e; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements libthrift091.TFieldIdEnum {
SUCCESS((short)0, "success"),
E((short)1, "e");
private static final Map byName = new HashMap();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 0: // SUCCESS
return SUCCESS;
case 1: // E
return E;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(String name) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
_Fields(short thriftId, String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final Map<_Fields, libthrift091.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, libthrift091.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, libthrift091.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.SUCCESS, new libthrift091.meta_data.FieldMetaData("success", libthrift091.TFieldRequirementType.DEFAULT,
new libthrift091.meta_data.StructMetaData(libthrift091.protocol.TType.STRUCT, SendMessageBatchResponse.class)));
tmpMap.put(_Fields.E, new libthrift091.meta_data.FieldMetaData("e", libthrift091.TFieldRequirementType.DEFAULT,
new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.STRUCT)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(sendMessageBatch_result.class, metaDataMap);
}
public sendMessageBatch_result() {
}
public sendMessageBatch_result(
SendMessageBatchResponse success,
com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException e)
{
this();
this.success = success;
this.e = e;
}
/**
* Performs a deep copy on other .
*/
public sendMessageBatch_result(sendMessageBatch_result other) {
if (other.isSetSuccess()) {
this.success = new SendMessageBatchResponse(other.success);
}
if (other.isSetE()) {
this.e = new com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException(other.e);
}
}
public sendMessageBatch_result deepCopy() {
return new sendMessageBatch_result(this);
}
@Override
public void clear() {
this.success = null;
this.e = null;
}
public SendMessageBatchResponse getSuccess() {
return this.success;
}
public sendMessageBatch_result setSuccess(SendMessageBatchResponse success) {
this.success = success;
return this;
}
public void unsetSuccess() {
this.success = null;
}
/** Returns true if field success is set (has been assigned a value) and false otherwise */
public boolean isSetSuccess() {
return this.success != null;
}
public void setSuccessIsSet(boolean value) {
if (!value) {
this.success = null;
}
}
public com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException getE() {
return this.e;
}
public sendMessageBatch_result setE(com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException e) {
this.e = e;
return this;
}
public void unsetE() {
this.e = null;
}
/** Returns true if field e is set (has been assigned a value) and false otherwise */
public boolean isSetE() {
return this.e != null;
}
public void setEIsSet(boolean value) {
if (!value) {
this.e = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
setSuccess((SendMessageBatchResponse)value);
}
break;
case E:
if (value == null) {
unsetE();
} else {
setE((com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return getSuccess();
case E:
return getE();
}
throw new IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
}
switch (field) {
case SUCCESS:
return isSetSuccess();
case E:
return isSetE();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof sendMessageBatch_result)
return this.equals((sendMessageBatch_result)that);
return false;
}
public boolean equals(sendMessageBatch_result that) {
if (that == null)
return false;
boolean this_present_success = true && this.isSetSuccess();
boolean that_present_success = true && that.isSetSuccess();
if (this_present_success || that_present_success) {
if (!(this_present_success && that_present_success))
return false;
if (!this.success.equals(that.success))
return false;
}
boolean this_present_e = true && this.isSetE();
boolean that_present_e = true && that.isSetE();
if (this_present_e || that_present_e) {
if (!(this_present_e && that_present_e))
return false;
if (!this.e.equals(that.e))
return false;
}
return true;
}
@Override
public int hashCode() {
List list = new ArrayList();
boolean present_success = true && (isSetSuccess());
list.add(present_success);
if (present_success)
list.add(success);
boolean present_e = true && (isSetE());
list.add(present_e);
if (present_e)
list.add(e);
return list.hashCode();
}
@Override
public int compareTo(sendMessageBatch_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSuccess()) {
lastComparison = libthrift091.TBaseHelper.compareTo(this.success, other.success);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetE()).compareTo(other.isSetE());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetE()) {
lastComparison = libthrift091.TBaseHelper.compareTo(this.e, other.e);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(libthrift091.protocol.TProtocol iprot) throws libthrift091.TException {
schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
}
public void write(libthrift091.protocol.TProtocol oprot) throws libthrift091.TException {
schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("sendMessageBatch_result(");
boolean first = true;
sb.append("success:");
if (this.success == null) {
sb.append("null");
} else {
sb.append(this.success);
}
first = false;
if (!first) sb.append(", ");
sb.append("e:");
if (this.e == null) {
sb.append("null");
} else {
sb.append(this.e);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws libthrift091.TException {
// check for required fields
// check for sub-struct validity
if (success != null) {
success.validate();
}
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(out)));
} catch (libthrift091.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
try {
read(new libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(in)));
} catch (libthrift091.TException te) {
throw new java.io.IOException(te);
}
}
private static class sendMessageBatch_resultStandardSchemeFactory implements SchemeFactory {
public sendMessageBatch_resultStandardScheme getScheme() {
return new sendMessageBatch_resultStandardScheme();
}
}
private static class sendMessageBatch_resultStandardScheme extends StandardScheme {
public void read(libthrift091.protocol.TProtocol iprot, sendMessageBatch_result struct) throws libthrift091.TException {
libthrift091.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
{
schemeField = iprot.readFieldBegin();
if (schemeField.type == libthrift091.protocol.TType.STOP) {
break;
}
switch (schemeField.id) {
case 0: // SUCCESS
if (schemeField.type == libthrift091.protocol.TType.STRUCT) {
struct.success = new SendMessageBatchResponse();
struct.success.read(iprot);
struct.setSuccessIsSet(true);
} else {
libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 1: // E
if (schemeField.type == libthrift091.protocol.TType.STRUCT) {
struct.e = new com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException();
struct.e.read(iprot);
struct.setEIsSet(true);
} else {
libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
public void write(libthrift091.protocol.TProtocol oprot, sendMessageBatch_result struct) throws libthrift091.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.success != null) {
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
struct.success.write(oprot);
oprot.writeFieldEnd();
}
if (struct.e != null) {
oprot.writeFieldBegin(E_FIELD_DESC);
struct.e.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class sendMessageBatch_resultTupleSchemeFactory implements SchemeFactory {
public sendMessageBatch_resultTupleScheme getScheme() {
return new sendMessageBatch_resultTupleScheme();
}
}
private static class sendMessageBatch_resultTupleScheme extends TupleScheme {
@Override
public void write(libthrift091.protocol.TProtocol prot, sendMessageBatch_result struct) throws libthrift091.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetSuccess()) {
optionals.set(0);
}
if (struct.isSetE()) {
optionals.set(1);
}
oprot.writeBitSet(optionals, 2);
if (struct.isSetSuccess()) {
struct.success.write(oprot);
}
if (struct.isSetE()) {
struct.e.write(oprot);
}
}
@Override
public void read(libthrift091.protocol.TProtocol prot, sendMessageBatch_result struct) throws libthrift091.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
struct.success = new SendMessageBatchResponse();
struct.success.read(iprot);
struct.setSuccessIsSet(true);
}
if (incoming.get(1)) {
struct.e = new com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException();
struct.e.read(iprot);
struct.setEIsSet(true);
}
}
}
}
public static class receiveMessage_args implements libthrift091.TBase, java.io.Serializable, Cloneable, Comparable {
private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("receiveMessage_args");
private static final libthrift091.protocol.TField RECEIVE_MESSAGE_REQUEST_FIELD_DESC = new libthrift091.protocol.TField("receiveMessageRequest", libthrift091.protocol.TType.STRUCT, (short)1);
private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new receiveMessage_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new receiveMessage_argsTupleSchemeFactory());
}
public ReceiveMessageRequest receiveMessageRequest; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements libthrift091.TFieldIdEnum {
RECEIVE_MESSAGE_REQUEST((short)1, "receiveMessageRequest");
private static final Map byName = new HashMap();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 1: // RECEIVE_MESSAGE_REQUEST
return RECEIVE_MESSAGE_REQUEST;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(String name) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
_Fields(short thriftId, String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final Map<_Fields, libthrift091.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, libthrift091.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, libthrift091.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.RECEIVE_MESSAGE_REQUEST, new libthrift091.meta_data.FieldMetaData("receiveMessageRequest", libthrift091.TFieldRequirementType.DEFAULT,
new libthrift091.meta_data.StructMetaData(libthrift091.protocol.TType.STRUCT, ReceiveMessageRequest.class)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(receiveMessage_args.class, metaDataMap);
}
public receiveMessage_args() {
}
public receiveMessage_args(
ReceiveMessageRequest receiveMessageRequest)
{
this();
this.receiveMessageRequest = receiveMessageRequest;
}
/**
* Performs a deep copy on other .
*/
public receiveMessage_args(receiveMessage_args other) {
if (other.isSetReceiveMessageRequest()) {
this.receiveMessageRequest = new ReceiveMessageRequest(other.receiveMessageRequest);
}
}
public receiveMessage_args deepCopy() {
return new receiveMessage_args(this);
}
@Override
public void clear() {
this.receiveMessageRequest = null;
}
public ReceiveMessageRequest getReceiveMessageRequest() {
return this.receiveMessageRequest;
}
public receiveMessage_args setReceiveMessageRequest(ReceiveMessageRequest receiveMessageRequest) {
this.receiveMessageRequest = receiveMessageRequest;
return this;
}
public void unsetReceiveMessageRequest() {
this.receiveMessageRequest = null;
}
/** Returns true if field receiveMessageRequest is set (has been assigned a value) and false otherwise */
public boolean isSetReceiveMessageRequest() {
return this.receiveMessageRequest != null;
}
public void setReceiveMessageRequestIsSet(boolean value) {
if (!value) {
this.receiveMessageRequest = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case RECEIVE_MESSAGE_REQUEST:
if (value == null) {
unsetReceiveMessageRequest();
} else {
setReceiveMessageRequest((ReceiveMessageRequest)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case RECEIVE_MESSAGE_REQUEST:
return getReceiveMessageRequest();
}
throw new IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
}
switch (field) {
case RECEIVE_MESSAGE_REQUEST:
return isSetReceiveMessageRequest();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof receiveMessage_args)
return this.equals((receiveMessage_args)that);
return false;
}
public boolean equals(receiveMessage_args that) {
if (that == null)
return false;
boolean this_present_receiveMessageRequest = true && this.isSetReceiveMessageRequest();
boolean that_present_receiveMessageRequest = true && that.isSetReceiveMessageRequest();
if (this_present_receiveMessageRequest || that_present_receiveMessageRequest) {
if (!(this_present_receiveMessageRequest && that_present_receiveMessageRequest))
return false;
if (!this.receiveMessageRequest.equals(that.receiveMessageRequest))
return false;
}
return true;
}
@Override
public int hashCode() {
List list = new ArrayList();
boolean present_receiveMessageRequest = true && (isSetReceiveMessageRequest());
list.add(present_receiveMessageRequest);
if (present_receiveMessageRequest)
list.add(receiveMessageRequest);
return list.hashCode();
}
@Override
public int compareTo(receiveMessage_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetReceiveMessageRequest()).compareTo(other.isSetReceiveMessageRequest());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetReceiveMessageRequest()) {
lastComparison = libthrift091.TBaseHelper.compareTo(this.receiveMessageRequest, other.receiveMessageRequest);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(libthrift091.protocol.TProtocol iprot) throws libthrift091.TException {
schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
}
public void write(libthrift091.protocol.TProtocol oprot) throws libthrift091.TException {
schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("receiveMessage_args(");
boolean first = true;
sb.append("receiveMessageRequest:");
if (this.receiveMessageRequest == null) {
sb.append("null");
} else {
sb.append(this.receiveMessageRequest);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws libthrift091.TException {
// check for required fields
// check for sub-struct validity
if (receiveMessageRequest != null) {
receiveMessageRequest.validate();
}
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(out)));
} catch (libthrift091.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
try {
read(new libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(in)));
} catch (libthrift091.TException te) {
throw new java.io.IOException(te);
}
}
private static class receiveMessage_argsStandardSchemeFactory implements SchemeFactory {
public receiveMessage_argsStandardScheme getScheme() {
return new receiveMessage_argsStandardScheme();
}
}
private static class receiveMessage_argsStandardScheme extends StandardScheme {
public void read(libthrift091.protocol.TProtocol iprot, receiveMessage_args struct) throws libthrift091.TException {
libthrift091.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
{
schemeField = iprot.readFieldBegin();
if (schemeField.type == libthrift091.protocol.TType.STOP) {
break;
}
switch (schemeField.id) {
case 1: // RECEIVE_MESSAGE_REQUEST
if (schemeField.type == libthrift091.protocol.TType.STRUCT) {
struct.receiveMessageRequest = new ReceiveMessageRequest();
struct.receiveMessageRequest.read(iprot);
struct.setReceiveMessageRequestIsSet(true);
} else {
libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
public void write(libthrift091.protocol.TProtocol oprot, receiveMessage_args struct) throws libthrift091.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.receiveMessageRequest != null) {
oprot.writeFieldBegin(RECEIVE_MESSAGE_REQUEST_FIELD_DESC);
struct.receiveMessageRequest.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class receiveMessage_argsTupleSchemeFactory implements SchemeFactory {
public receiveMessage_argsTupleScheme getScheme() {
return new receiveMessage_argsTupleScheme();
}
}
private static class receiveMessage_argsTupleScheme extends TupleScheme {
@Override
public void write(libthrift091.protocol.TProtocol prot, receiveMessage_args struct) throws libthrift091.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetReceiveMessageRequest()) {
optionals.set(0);
}
oprot.writeBitSet(optionals, 1);
if (struct.isSetReceiveMessageRequest()) {
struct.receiveMessageRequest.write(oprot);
}
}
@Override
public void read(libthrift091.protocol.TProtocol prot, receiveMessage_args struct) throws libthrift091.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.receiveMessageRequest = new ReceiveMessageRequest();
struct.receiveMessageRequest.read(iprot);
struct.setReceiveMessageRequestIsSet(true);
}
}
}
}
public static class receiveMessage_result implements libthrift091.TBase, java.io.Serializable, Cloneable, Comparable {
private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("receiveMessage_result");
private static final libthrift091.protocol.TField SUCCESS_FIELD_DESC = new libthrift091.protocol.TField("success", libthrift091.protocol.TType.LIST, (short)0);
private static final libthrift091.protocol.TField E_FIELD_DESC = new libthrift091.protocol.TField("e", libthrift091.protocol.TType.STRUCT, (short)1);
private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new receiveMessage_resultStandardSchemeFactory());
schemes.put(TupleScheme.class, new receiveMessage_resultTupleSchemeFactory());
}
public List success; // required
public com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException e; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements libthrift091.TFieldIdEnum {
SUCCESS((short)0, "success"),
E((short)1, "e");
private static final Map byName = new HashMap();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 0: // SUCCESS
return SUCCESS;
case 1: // E
return E;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(String name) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
_Fields(short thriftId, String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final Map<_Fields, libthrift091.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, libthrift091.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, libthrift091.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.SUCCESS, new libthrift091.meta_data.FieldMetaData("success", libthrift091.TFieldRequirementType.DEFAULT,
new libthrift091.meta_data.ListMetaData(libthrift091.protocol.TType.LIST,
new libthrift091.meta_data.StructMetaData(libthrift091.protocol.TType.STRUCT, ReceiveMessageResponse.class))));
tmpMap.put(_Fields.E, new libthrift091.meta_data.FieldMetaData("e", libthrift091.TFieldRequirementType.DEFAULT,
new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.STRUCT)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(receiveMessage_result.class, metaDataMap);
}
public receiveMessage_result() {
}
public receiveMessage_result(
List success,
com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException e)
{
this();
this.success = success;
this.e = e;
}
/**
* Performs a deep copy on other .
*/
public receiveMessage_result(receiveMessage_result other) {
if (other.isSetSuccess()) {
List __this__success = new ArrayList(other.success.size());
for (ReceiveMessageResponse other_element : other.success) {
__this__success.add(new ReceiveMessageResponse(other_element));
}
this.success = __this__success;
}
if (other.isSetE()) {
this.e = new com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException(other.e);
}
}
public receiveMessage_result deepCopy() {
return new receiveMessage_result(this);
}
@Override
public void clear() {
this.success = null;
this.e = null;
}
public int getSuccessSize() {
return (this.success == null) ? 0 : this.success.size();
}
public java.util.Iterator getSuccessIterator() {
return (this.success == null) ? null : this.success.iterator();
}
public void addToSuccess(ReceiveMessageResponse elem) {
if (this.success == null) {
this.success = new ArrayList();
}
this.success.add(elem);
}
public List getSuccess() {
return this.success;
}
public receiveMessage_result setSuccess(List success) {
this.success = success;
return this;
}
public void unsetSuccess() {
this.success = null;
}
/** Returns true if field success is set (has been assigned a value) and false otherwise */
public boolean isSetSuccess() {
return this.success != null;
}
public void setSuccessIsSet(boolean value) {
if (!value) {
this.success = null;
}
}
public com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException getE() {
return this.e;
}
public receiveMessage_result setE(com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException e) {
this.e = e;
return this;
}
public void unsetE() {
this.e = null;
}
/** Returns true if field e is set (has been assigned a value) and false otherwise */
public boolean isSetE() {
return this.e != null;
}
public void setEIsSet(boolean value) {
if (!value) {
this.e = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
setSuccess((List)value);
}
break;
case E:
if (value == null) {
unsetE();
} else {
setE((com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return getSuccess();
case E:
return getE();
}
throw new IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
}
switch (field) {
case SUCCESS:
return isSetSuccess();
case E:
return isSetE();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof receiveMessage_result)
return this.equals((receiveMessage_result)that);
return false;
}
public boolean equals(receiveMessage_result that) {
if (that == null)
return false;
boolean this_present_success = true && this.isSetSuccess();
boolean that_present_success = true && that.isSetSuccess();
if (this_present_success || that_present_success) {
if (!(this_present_success && that_present_success))
return false;
if (!this.success.equals(that.success))
return false;
}
boolean this_present_e = true && this.isSetE();
boolean that_present_e = true && that.isSetE();
if (this_present_e || that_present_e) {
if (!(this_present_e && that_present_e))
return false;
if (!this.e.equals(that.e))
return false;
}
return true;
}
@Override
public int hashCode() {
List list = new ArrayList();
boolean present_success = true && (isSetSuccess());
list.add(present_success);
if (present_success)
list.add(success);
boolean present_e = true && (isSetE());
list.add(present_e);
if (present_e)
list.add(e);
return list.hashCode();
}
@Override
public int compareTo(receiveMessage_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSuccess()) {
lastComparison = libthrift091.TBaseHelper.compareTo(this.success, other.success);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetE()).compareTo(other.isSetE());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetE()) {
lastComparison = libthrift091.TBaseHelper.compareTo(this.e, other.e);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(libthrift091.protocol.TProtocol iprot) throws libthrift091.TException {
schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
}
public void write(libthrift091.protocol.TProtocol oprot) throws libthrift091.TException {
schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("receiveMessage_result(");
boolean first = true;
sb.append("success:");
if (this.success == null) {
sb.append("null");
} else {
sb.append(this.success);
}
first = false;
if (!first) sb.append(", ");
sb.append("e:");
if (this.e == null) {
sb.append("null");
} else {
sb.append(this.e);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws libthrift091.TException {
// check for required fields
// check for sub-struct validity
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(out)));
} catch (libthrift091.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
try {
read(new libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(in)));
} catch (libthrift091.TException te) {
throw new java.io.IOException(te);
}
}
private static class receiveMessage_resultStandardSchemeFactory implements SchemeFactory {
public receiveMessage_resultStandardScheme getScheme() {
return new receiveMessage_resultStandardScheme();
}
}
private static class receiveMessage_resultStandardScheme extends StandardScheme {
public void read(libthrift091.protocol.TProtocol iprot, receiveMessage_result struct) throws libthrift091.TException {
libthrift091.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
{
schemeField = iprot.readFieldBegin();
if (schemeField.type == libthrift091.protocol.TType.STOP) {
break;
}
switch (schemeField.id) {
case 0: // SUCCESS
if (schemeField.type == libthrift091.protocol.TType.LIST) {
{
libthrift091.protocol.TList _list188 = iprot.readListBegin();
struct.success = new ArrayList(_list188.size);
ReceiveMessageResponse _elem189;
for (int _i190 = 0; _i190 < _list188.size; ++_i190)
{
_elem189 = new ReceiveMessageResponse();
_elem189.read(iprot);
struct.success.add(_elem189);
}
iprot.readListEnd();
}
struct.setSuccessIsSet(true);
} else {
libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 1: // E
if (schemeField.type == libthrift091.protocol.TType.STRUCT) {
struct.e = new com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException();
struct.e.read(iprot);
struct.setEIsSet(true);
} else {
libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
public void write(libthrift091.protocol.TProtocol oprot, receiveMessage_result struct) throws libthrift091.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.success != null) {
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
{
oprot.writeListBegin(new libthrift091.protocol.TList(libthrift091.protocol.TType.STRUCT, struct.success.size()));
for (ReceiveMessageResponse _iter191 : struct.success)
{
_iter191.write(oprot);
}
oprot.writeListEnd();
}
oprot.writeFieldEnd();
}
if (struct.e != null) {
oprot.writeFieldBegin(E_FIELD_DESC);
struct.e.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class receiveMessage_resultTupleSchemeFactory implements SchemeFactory {
public receiveMessage_resultTupleScheme getScheme() {
return new receiveMessage_resultTupleScheme();
}
}
private static class receiveMessage_resultTupleScheme extends TupleScheme {
@Override
public void write(libthrift091.protocol.TProtocol prot, receiveMessage_result struct) throws libthrift091.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetSuccess()) {
optionals.set(0);
}
if (struct.isSetE()) {
optionals.set(1);
}
oprot.writeBitSet(optionals, 2);
if (struct.isSetSuccess()) {
{
oprot.writeI32(struct.success.size());
for (ReceiveMessageResponse _iter192 : struct.success)
{
_iter192.write(oprot);
}
}
}
if (struct.isSetE()) {
struct.e.write(oprot);
}
}
@Override
public void read(libthrift091.protocol.TProtocol prot, receiveMessage_result struct) throws libthrift091.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
{
libthrift091.protocol.TList _list193 = new libthrift091.protocol.TList(libthrift091.protocol.TType.STRUCT, iprot.readI32());
struct.success = new ArrayList(_list193.size);
ReceiveMessageResponse _elem194;
for (int _i195 = 0; _i195 < _list193.size; ++_i195)
{
_elem194 = new ReceiveMessageResponse();
_elem194.read(iprot);
struct.success.add(_elem194);
}
}
struct.setSuccessIsSet(true);
}
if (incoming.get(1)) {
struct.e = new com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException();
struct.e.read(iprot);
struct.setEIsSet(true);
}
}
}
}
public static class changeMessageVisibilitySeconds_args implements libthrift091.TBase, java.io.Serializable, Cloneable, Comparable {
private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("changeMessageVisibilitySeconds_args");
private static final libthrift091.protocol.TField CHANGE_MESSAGE_VISIBILITY_REQUEST_FIELD_DESC = new libthrift091.protocol.TField("changeMessageVisibilityRequest", libthrift091.protocol.TType.STRUCT, (short)1);
private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new changeMessageVisibilitySeconds_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new changeMessageVisibilitySeconds_argsTupleSchemeFactory());
}
public ChangeMessageVisibilityRequest changeMessageVisibilityRequest; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements libthrift091.TFieldIdEnum {
CHANGE_MESSAGE_VISIBILITY_REQUEST((short)1, "changeMessageVisibilityRequest");
private static final Map byName = new HashMap();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 1: // CHANGE_MESSAGE_VISIBILITY_REQUEST
return CHANGE_MESSAGE_VISIBILITY_REQUEST;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(String name) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
_Fields(short thriftId, String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final Map<_Fields, libthrift091.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, libthrift091.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, libthrift091.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.CHANGE_MESSAGE_VISIBILITY_REQUEST, new libthrift091.meta_data.FieldMetaData("changeMessageVisibilityRequest", libthrift091.TFieldRequirementType.DEFAULT,
new libthrift091.meta_data.StructMetaData(libthrift091.protocol.TType.STRUCT, ChangeMessageVisibilityRequest.class)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(changeMessageVisibilitySeconds_args.class, metaDataMap);
}
public changeMessageVisibilitySeconds_args() {
}
public changeMessageVisibilitySeconds_args(
ChangeMessageVisibilityRequest changeMessageVisibilityRequest)
{
this();
this.changeMessageVisibilityRequest = changeMessageVisibilityRequest;
}
/**
* Performs a deep copy on other .
*/
public changeMessageVisibilitySeconds_args(changeMessageVisibilitySeconds_args other) {
if (other.isSetChangeMessageVisibilityRequest()) {
this.changeMessageVisibilityRequest = new ChangeMessageVisibilityRequest(other.changeMessageVisibilityRequest);
}
}
public changeMessageVisibilitySeconds_args deepCopy() {
return new changeMessageVisibilitySeconds_args(this);
}
@Override
public void clear() {
this.changeMessageVisibilityRequest = null;
}
public ChangeMessageVisibilityRequest getChangeMessageVisibilityRequest() {
return this.changeMessageVisibilityRequest;
}
public changeMessageVisibilitySeconds_args setChangeMessageVisibilityRequest(ChangeMessageVisibilityRequest changeMessageVisibilityRequest) {
this.changeMessageVisibilityRequest = changeMessageVisibilityRequest;
return this;
}
public void unsetChangeMessageVisibilityRequest() {
this.changeMessageVisibilityRequest = null;
}
/** Returns true if field changeMessageVisibilityRequest is set (has been assigned a value) and false otherwise */
public boolean isSetChangeMessageVisibilityRequest() {
return this.changeMessageVisibilityRequest != null;
}
public void setChangeMessageVisibilityRequestIsSet(boolean value) {
if (!value) {
this.changeMessageVisibilityRequest = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case CHANGE_MESSAGE_VISIBILITY_REQUEST:
if (value == null) {
unsetChangeMessageVisibilityRequest();
} else {
setChangeMessageVisibilityRequest((ChangeMessageVisibilityRequest)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case CHANGE_MESSAGE_VISIBILITY_REQUEST:
return getChangeMessageVisibilityRequest();
}
throw new IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
}
switch (field) {
case CHANGE_MESSAGE_VISIBILITY_REQUEST:
return isSetChangeMessageVisibilityRequest();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof changeMessageVisibilitySeconds_args)
return this.equals((changeMessageVisibilitySeconds_args)that);
return false;
}
public boolean equals(changeMessageVisibilitySeconds_args that) {
if (that == null)
return false;
boolean this_present_changeMessageVisibilityRequest = true && this.isSetChangeMessageVisibilityRequest();
boolean that_present_changeMessageVisibilityRequest = true && that.isSetChangeMessageVisibilityRequest();
if (this_present_changeMessageVisibilityRequest || that_present_changeMessageVisibilityRequest) {
if (!(this_present_changeMessageVisibilityRequest && that_present_changeMessageVisibilityRequest))
return false;
if (!this.changeMessageVisibilityRequest.equals(that.changeMessageVisibilityRequest))
return false;
}
return true;
}
@Override
public int hashCode() {
List list = new ArrayList();
boolean present_changeMessageVisibilityRequest = true && (isSetChangeMessageVisibilityRequest());
list.add(present_changeMessageVisibilityRequest);
if (present_changeMessageVisibilityRequest)
list.add(changeMessageVisibilityRequest);
return list.hashCode();
}
@Override
public int compareTo(changeMessageVisibilitySeconds_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetChangeMessageVisibilityRequest()).compareTo(other.isSetChangeMessageVisibilityRequest());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetChangeMessageVisibilityRequest()) {
lastComparison = libthrift091.TBaseHelper.compareTo(this.changeMessageVisibilityRequest, other.changeMessageVisibilityRequest);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(libthrift091.protocol.TProtocol iprot) throws libthrift091.TException {
schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
}
public void write(libthrift091.protocol.TProtocol oprot) throws libthrift091.TException {
schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("changeMessageVisibilitySeconds_args(");
boolean first = true;
sb.append("changeMessageVisibilityRequest:");
if (this.changeMessageVisibilityRequest == null) {
sb.append("null");
} else {
sb.append(this.changeMessageVisibilityRequest);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws libthrift091.TException {
// check for required fields
// check for sub-struct validity
if (changeMessageVisibilityRequest != null) {
changeMessageVisibilityRequest.validate();
}
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(out)));
} catch (libthrift091.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
try {
read(new libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(in)));
} catch (libthrift091.TException te) {
throw new java.io.IOException(te);
}
}
private static class changeMessageVisibilitySeconds_argsStandardSchemeFactory implements SchemeFactory {
public changeMessageVisibilitySeconds_argsStandardScheme getScheme() {
return new changeMessageVisibilitySeconds_argsStandardScheme();
}
}
private static class changeMessageVisibilitySeconds_argsStandardScheme extends StandardScheme {
public void read(libthrift091.protocol.TProtocol iprot, changeMessageVisibilitySeconds_args struct) throws libthrift091.TException {
libthrift091.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
{
schemeField = iprot.readFieldBegin();
if (schemeField.type == libthrift091.protocol.TType.STOP) {
break;
}
switch (schemeField.id) {
case 1: // CHANGE_MESSAGE_VISIBILITY_REQUEST
if (schemeField.type == libthrift091.protocol.TType.STRUCT) {
struct.changeMessageVisibilityRequest = new ChangeMessageVisibilityRequest();
struct.changeMessageVisibilityRequest.read(iprot);
struct.setChangeMessageVisibilityRequestIsSet(true);
} else {
libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
public void write(libthrift091.protocol.TProtocol oprot, changeMessageVisibilitySeconds_args struct) throws libthrift091.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.changeMessageVisibilityRequest != null) {
oprot.writeFieldBegin(CHANGE_MESSAGE_VISIBILITY_REQUEST_FIELD_DESC);
struct.changeMessageVisibilityRequest.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class changeMessageVisibilitySeconds_argsTupleSchemeFactory implements SchemeFactory {
public changeMessageVisibilitySeconds_argsTupleScheme getScheme() {
return new changeMessageVisibilitySeconds_argsTupleScheme();
}
}
private static class changeMessageVisibilitySeconds_argsTupleScheme extends TupleScheme {
@Override
public void write(libthrift091.protocol.TProtocol prot, changeMessageVisibilitySeconds_args struct) throws libthrift091.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetChangeMessageVisibilityRequest()) {
optionals.set(0);
}
oprot.writeBitSet(optionals, 1);
if (struct.isSetChangeMessageVisibilityRequest()) {
struct.changeMessageVisibilityRequest.write(oprot);
}
}
@Override
public void read(libthrift091.protocol.TProtocol prot, changeMessageVisibilitySeconds_args struct) throws libthrift091.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.changeMessageVisibilityRequest = new ChangeMessageVisibilityRequest();
struct.changeMessageVisibilityRequest.read(iprot);
struct.setChangeMessageVisibilityRequestIsSet(true);
}
}
}
}
public static class changeMessageVisibilitySeconds_result implements libthrift091.TBase, java.io.Serializable, Cloneable, Comparable {
private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("changeMessageVisibilitySeconds_result");
private static final libthrift091.protocol.TField E_FIELD_DESC = new libthrift091.protocol.TField("e", libthrift091.protocol.TType.STRUCT, (short)1);
private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new changeMessageVisibilitySeconds_resultStandardSchemeFactory());
schemes.put(TupleScheme.class, new changeMessageVisibilitySeconds_resultTupleSchemeFactory());
}
public com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException e; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements libthrift091.TFieldIdEnum {
E((short)1, "e");
private static final Map byName = new HashMap();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 1: // E
return E;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(String name) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
_Fields(short thriftId, String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final Map<_Fields, libthrift091.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, libthrift091.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, libthrift091.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.E, new libthrift091.meta_data.FieldMetaData("e", libthrift091.TFieldRequirementType.DEFAULT,
new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.STRUCT)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(changeMessageVisibilitySeconds_result.class, metaDataMap);
}
public changeMessageVisibilitySeconds_result() {
}
public changeMessageVisibilitySeconds_result(
com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException e)
{
this();
this.e = e;
}
/**
* Performs a deep copy on other .
*/
public changeMessageVisibilitySeconds_result(changeMessageVisibilitySeconds_result other) {
if (other.isSetE()) {
this.e = new com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException(other.e);
}
}
public changeMessageVisibilitySeconds_result deepCopy() {
return new changeMessageVisibilitySeconds_result(this);
}
@Override
public void clear() {
this.e = null;
}
public com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException getE() {
return this.e;
}
public changeMessageVisibilitySeconds_result setE(com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException e) {
this.e = e;
return this;
}
public void unsetE() {
this.e = null;
}
/** Returns true if field e is set (has been assigned a value) and false otherwise */
public boolean isSetE() {
return this.e != null;
}
public void setEIsSet(boolean value) {
if (!value) {
this.e = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case E:
if (value == null) {
unsetE();
} else {
setE((com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case E:
return getE();
}
throw new IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
}
switch (field) {
case E:
return isSetE();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof changeMessageVisibilitySeconds_result)
return this.equals((changeMessageVisibilitySeconds_result)that);
return false;
}
public boolean equals(changeMessageVisibilitySeconds_result that) {
if (that == null)
return false;
boolean this_present_e = true && this.isSetE();
boolean that_present_e = true && that.isSetE();
if (this_present_e || that_present_e) {
if (!(this_present_e && that_present_e))
return false;
if (!this.e.equals(that.e))
return false;
}
return true;
}
@Override
public int hashCode() {
List list = new ArrayList();
boolean present_e = true && (isSetE());
list.add(present_e);
if (present_e)
list.add(e);
return list.hashCode();
}
@Override
public int compareTo(changeMessageVisibilitySeconds_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetE()).compareTo(other.isSetE());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetE()) {
lastComparison = libthrift091.TBaseHelper.compareTo(this.e, other.e);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(libthrift091.protocol.TProtocol iprot) throws libthrift091.TException {
schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
}
public void write(libthrift091.protocol.TProtocol oprot) throws libthrift091.TException {
schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("changeMessageVisibilitySeconds_result(");
boolean first = true;
sb.append("e:");
if (this.e == null) {
sb.append("null");
} else {
sb.append(this.e);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws libthrift091.TException {
// check for required fields
// check for sub-struct validity
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(out)));
} catch (libthrift091.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
try {
read(new libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(in)));
} catch (libthrift091.TException te) {
throw new java.io.IOException(te);
}
}
private static class changeMessageVisibilitySeconds_resultStandardSchemeFactory implements SchemeFactory {
public changeMessageVisibilitySeconds_resultStandardScheme getScheme() {
return new changeMessageVisibilitySeconds_resultStandardScheme();
}
}
private static class changeMessageVisibilitySeconds_resultStandardScheme extends StandardScheme {
public void read(libthrift091.protocol.TProtocol iprot, changeMessageVisibilitySeconds_result struct) throws libthrift091.TException {
libthrift091.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
{
schemeField = iprot.readFieldBegin();
if (schemeField.type == libthrift091.protocol.TType.STOP) {
break;
}
switch (schemeField.id) {
case 1: // E
if (schemeField.type == libthrift091.protocol.TType.STRUCT) {
struct.e = new com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException();
struct.e.read(iprot);
struct.setEIsSet(true);
} else {
libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
public void write(libthrift091.protocol.TProtocol oprot, changeMessageVisibilitySeconds_result struct) throws libthrift091.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.e != null) {
oprot.writeFieldBegin(E_FIELD_DESC);
struct.e.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class changeMessageVisibilitySeconds_resultTupleSchemeFactory implements SchemeFactory {
public changeMessageVisibilitySeconds_resultTupleScheme getScheme() {
return new changeMessageVisibilitySeconds_resultTupleScheme();
}
}
private static class changeMessageVisibilitySeconds_resultTupleScheme extends TupleScheme {
@Override
public void write(libthrift091.protocol.TProtocol prot, changeMessageVisibilitySeconds_result struct) throws libthrift091.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetE()) {
optionals.set(0);
}
oprot.writeBitSet(optionals, 1);
if (struct.isSetE()) {
struct.e.write(oprot);
}
}
@Override
public void read(libthrift091.protocol.TProtocol prot, changeMessageVisibilitySeconds_result struct) throws libthrift091.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.e = new com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException();
struct.e.read(iprot);
struct.setEIsSet(true);
}
}
}
}
public static class changeMessageVisibilitySecondsBatch_args implements libthrift091.TBase, java.io.Serializable, Cloneable, Comparable {
private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("changeMessageVisibilitySecondsBatch_args");
private static final libthrift091.protocol.TField CHANGE_MESSAGE_VISIBILITY_BATCH_REQUEST_FIELD_DESC = new libthrift091.protocol.TField("changeMessageVisibilityBatchRequest", libthrift091.protocol.TType.STRUCT, (short)1);
private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new changeMessageVisibilitySecondsBatch_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new changeMessageVisibilitySecondsBatch_argsTupleSchemeFactory());
}
public ChangeMessageVisibilityBatchRequest changeMessageVisibilityBatchRequest; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements libthrift091.TFieldIdEnum {
CHANGE_MESSAGE_VISIBILITY_BATCH_REQUEST((short)1, "changeMessageVisibilityBatchRequest");
private static final Map byName = new HashMap();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 1: // CHANGE_MESSAGE_VISIBILITY_BATCH_REQUEST
return CHANGE_MESSAGE_VISIBILITY_BATCH_REQUEST;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(String name) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
_Fields(short thriftId, String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final Map<_Fields, libthrift091.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, libthrift091.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, libthrift091.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.CHANGE_MESSAGE_VISIBILITY_BATCH_REQUEST, new libthrift091.meta_data.FieldMetaData("changeMessageVisibilityBatchRequest", libthrift091.TFieldRequirementType.DEFAULT,
new libthrift091.meta_data.StructMetaData(libthrift091.protocol.TType.STRUCT, ChangeMessageVisibilityBatchRequest.class)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(changeMessageVisibilitySecondsBatch_args.class, metaDataMap);
}
public changeMessageVisibilitySecondsBatch_args() {
}
public changeMessageVisibilitySecondsBatch_args(
ChangeMessageVisibilityBatchRequest changeMessageVisibilityBatchRequest)
{
this();
this.changeMessageVisibilityBatchRequest = changeMessageVisibilityBatchRequest;
}
/**
* Performs a deep copy on other .
*/
public changeMessageVisibilitySecondsBatch_args(changeMessageVisibilitySecondsBatch_args other) {
if (other.isSetChangeMessageVisibilityBatchRequest()) {
this.changeMessageVisibilityBatchRequest = new ChangeMessageVisibilityBatchRequest(other.changeMessageVisibilityBatchRequest);
}
}
public changeMessageVisibilitySecondsBatch_args deepCopy() {
return new changeMessageVisibilitySecondsBatch_args(this);
}
@Override
public void clear() {
this.changeMessageVisibilityBatchRequest = null;
}
public ChangeMessageVisibilityBatchRequest getChangeMessageVisibilityBatchRequest() {
return this.changeMessageVisibilityBatchRequest;
}
public changeMessageVisibilitySecondsBatch_args setChangeMessageVisibilityBatchRequest(ChangeMessageVisibilityBatchRequest changeMessageVisibilityBatchRequest) {
this.changeMessageVisibilityBatchRequest = changeMessageVisibilityBatchRequest;
return this;
}
public void unsetChangeMessageVisibilityBatchRequest() {
this.changeMessageVisibilityBatchRequest = null;
}
/** Returns true if field changeMessageVisibilityBatchRequest is set (has been assigned a value) and false otherwise */
public boolean isSetChangeMessageVisibilityBatchRequest() {
return this.changeMessageVisibilityBatchRequest != null;
}
public void setChangeMessageVisibilityBatchRequestIsSet(boolean value) {
if (!value) {
this.changeMessageVisibilityBatchRequest = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case CHANGE_MESSAGE_VISIBILITY_BATCH_REQUEST:
if (value == null) {
unsetChangeMessageVisibilityBatchRequest();
} else {
setChangeMessageVisibilityBatchRequest((ChangeMessageVisibilityBatchRequest)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case CHANGE_MESSAGE_VISIBILITY_BATCH_REQUEST:
return getChangeMessageVisibilityBatchRequest();
}
throw new IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
}
switch (field) {
case CHANGE_MESSAGE_VISIBILITY_BATCH_REQUEST:
return isSetChangeMessageVisibilityBatchRequest();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof changeMessageVisibilitySecondsBatch_args)
return this.equals((changeMessageVisibilitySecondsBatch_args)that);
return false;
}
public boolean equals(changeMessageVisibilitySecondsBatch_args that) {
if (that == null)
return false;
boolean this_present_changeMessageVisibilityBatchRequest = true && this.isSetChangeMessageVisibilityBatchRequest();
boolean that_present_changeMessageVisibilityBatchRequest = true && that.isSetChangeMessageVisibilityBatchRequest();
if (this_present_changeMessageVisibilityBatchRequest || that_present_changeMessageVisibilityBatchRequest) {
if (!(this_present_changeMessageVisibilityBatchRequest && that_present_changeMessageVisibilityBatchRequest))
return false;
if (!this.changeMessageVisibilityBatchRequest.equals(that.changeMessageVisibilityBatchRequest))
return false;
}
return true;
}
@Override
public int hashCode() {
List list = new ArrayList();
boolean present_changeMessageVisibilityBatchRequest = true && (isSetChangeMessageVisibilityBatchRequest());
list.add(present_changeMessageVisibilityBatchRequest);
if (present_changeMessageVisibilityBatchRequest)
list.add(changeMessageVisibilityBatchRequest);
return list.hashCode();
}
@Override
public int compareTo(changeMessageVisibilitySecondsBatch_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetChangeMessageVisibilityBatchRequest()).compareTo(other.isSetChangeMessageVisibilityBatchRequest());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetChangeMessageVisibilityBatchRequest()) {
lastComparison = libthrift091.TBaseHelper.compareTo(this.changeMessageVisibilityBatchRequest, other.changeMessageVisibilityBatchRequest);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(libthrift091.protocol.TProtocol iprot) throws libthrift091.TException {
schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
}
public void write(libthrift091.protocol.TProtocol oprot) throws libthrift091.TException {
schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("changeMessageVisibilitySecondsBatch_args(");
boolean first = true;
sb.append("changeMessageVisibilityBatchRequest:");
if (this.changeMessageVisibilityBatchRequest == null) {
sb.append("null");
} else {
sb.append(this.changeMessageVisibilityBatchRequest);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws libthrift091.TException {
// check for required fields
// check for sub-struct validity
if (changeMessageVisibilityBatchRequest != null) {
changeMessageVisibilityBatchRequest.validate();
}
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(out)));
} catch (libthrift091.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
try {
read(new libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(in)));
} catch (libthrift091.TException te) {
throw new java.io.IOException(te);
}
}
private static class changeMessageVisibilitySecondsBatch_argsStandardSchemeFactory implements SchemeFactory {
public changeMessageVisibilitySecondsBatch_argsStandardScheme getScheme() {
return new changeMessageVisibilitySecondsBatch_argsStandardScheme();
}
}
private static class changeMessageVisibilitySecondsBatch_argsStandardScheme extends StandardScheme {
public void read(libthrift091.protocol.TProtocol iprot, changeMessageVisibilitySecondsBatch_args struct) throws libthrift091.TException {
libthrift091.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
{
schemeField = iprot.readFieldBegin();
if (schemeField.type == libthrift091.protocol.TType.STOP) {
break;
}
switch (schemeField.id) {
case 1: // CHANGE_MESSAGE_VISIBILITY_BATCH_REQUEST
if (schemeField.type == libthrift091.protocol.TType.STRUCT) {
struct.changeMessageVisibilityBatchRequest = new ChangeMessageVisibilityBatchRequest();
struct.changeMessageVisibilityBatchRequest.read(iprot);
struct.setChangeMessageVisibilityBatchRequestIsSet(true);
} else {
libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
public void write(libthrift091.protocol.TProtocol oprot, changeMessageVisibilitySecondsBatch_args struct) throws libthrift091.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.changeMessageVisibilityBatchRequest != null) {
oprot.writeFieldBegin(CHANGE_MESSAGE_VISIBILITY_BATCH_REQUEST_FIELD_DESC);
struct.changeMessageVisibilityBatchRequest.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class changeMessageVisibilitySecondsBatch_argsTupleSchemeFactory implements SchemeFactory {
public changeMessageVisibilitySecondsBatch_argsTupleScheme getScheme() {
return new changeMessageVisibilitySecondsBatch_argsTupleScheme();
}
}
private static class changeMessageVisibilitySecondsBatch_argsTupleScheme extends TupleScheme {
@Override
public void write(libthrift091.protocol.TProtocol prot, changeMessageVisibilitySecondsBatch_args struct) throws libthrift091.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetChangeMessageVisibilityBatchRequest()) {
optionals.set(0);
}
oprot.writeBitSet(optionals, 1);
if (struct.isSetChangeMessageVisibilityBatchRequest()) {
struct.changeMessageVisibilityBatchRequest.write(oprot);
}
}
@Override
public void read(libthrift091.protocol.TProtocol prot, changeMessageVisibilitySecondsBatch_args struct) throws libthrift091.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.changeMessageVisibilityBatchRequest = new ChangeMessageVisibilityBatchRequest();
struct.changeMessageVisibilityBatchRequest.read(iprot);
struct.setChangeMessageVisibilityBatchRequestIsSet(true);
}
}
}
}
public static class changeMessageVisibilitySecondsBatch_result implements libthrift091.TBase, java.io.Serializable, Cloneable, Comparable {
private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("changeMessageVisibilitySecondsBatch_result");
private static final libthrift091.protocol.TField SUCCESS_FIELD_DESC = new libthrift091.protocol.TField("success", libthrift091.protocol.TType.STRUCT, (short)0);
private static final libthrift091.protocol.TField E_FIELD_DESC = new libthrift091.protocol.TField("e", libthrift091.protocol.TType.STRUCT, (short)1);
private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new changeMessageVisibilitySecondsBatch_resultStandardSchemeFactory());
schemes.put(TupleScheme.class, new changeMessageVisibilitySecondsBatch_resultTupleSchemeFactory());
}
public ChangeMessageVisibilityBatchResponse success; // required
public com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException e; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements libthrift091.TFieldIdEnum {
SUCCESS((short)0, "success"),
E((short)1, "e");
private static final Map byName = new HashMap();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 0: // SUCCESS
return SUCCESS;
case 1: // E
return E;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(String name) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
_Fields(short thriftId, String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final Map<_Fields, libthrift091.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, libthrift091.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, libthrift091.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.SUCCESS, new libthrift091.meta_data.FieldMetaData("success", libthrift091.TFieldRequirementType.DEFAULT,
new libthrift091.meta_data.StructMetaData(libthrift091.protocol.TType.STRUCT, ChangeMessageVisibilityBatchResponse.class)));
tmpMap.put(_Fields.E, new libthrift091.meta_data.FieldMetaData("e", libthrift091.TFieldRequirementType.DEFAULT,
new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.STRUCT)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(changeMessageVisibilitySecondsBatch_result.class, metaDataMap);
}
public changeMessageVisibilitySecondsBatch_result() {
}
public changeMessageVisibilitySecondsBatch_result(
ChangeMessageVisibilityBatchResponse success,
com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException e)
{
this();
this.success = success;
this.e = e;
}
/**
* Performs a deep copy on other .
*/
public changeMessageVisibilitySecondsBatch_result(changeMessageVisibilitySecondsBatch_result other) {
if (other.isSetSuccess()) {
this.success = new ChangeMessageVisibilityBatchResponse(other.success);
}
if (other.isSetE()) {
this.e = new com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException(other.e);
}
}
public changeMessageVisibilitySecondsBatch_result deepCopy() {
return new changeMessageVisibilitySecondsBatch_result(this);
}
@Override
public void clear() {
this.success = null;
this.e = null;
}
public ChangeMessageVisibilityBatchResponse getSuccess() {
return this.success;
}
public changeMessageVisibilitySecondsBatch_result setSuccess(ChangeMessageVisibilityBatchResponse success) {
this.success = success;
return this;
}
public void unsetSuccess() {
this.success = null;
}
/** Returns true if field success is set (has been assigned a value) and false otherwise */
public boolean isSetSuccess() {
return this.success != null;
}
public void setSuccessIsSet(boolean value) {
if (!value) {
this.success = null;
}
}
public com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException getE() {
return this.e;
}
public changeMessageVisibilitySecondsBatch_result setE(com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException e) {
this.e = e;
return this;
}
public void unsetE() {
this.e = null;
}
/** Returns true if field e is set (has been assigned a value) and false otherwise */
public boolean isSetE() {
return this.e != null;
}
public void setEIsSet(boolean value) {
if (!value) {
this.e = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
setSuccess((ChangeMessageVisibilityBatchResponse)value);
}
break;
case E:
if (value == null) {
unsetE();
} else {
setE((com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return getSuccess();
case E:
return getE();
}
throw new IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
}
switch (field) {
case SUCCESS:
return isSetSuccess();
case E:
return isSetE();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof changeMessageVisibilitySecondsBatch_result)
return this.equals((changeMessageVisibilitySecondsBatch_result)that);
return false;
}
public boolean equals(changeMessageVisibilitySecondsBatch_result that) {
if (that == null)
return false;
boolean this_present_success = true && this.isSetSuccess();
boolean that_present_success = true && that.isSetSuccess();
if (this_present_success || that_present_success) {
if (!(this_present_success && that_present_success))
return false;
if (!this.success.equals(that.success))
return false;
}
boolean this_present_e = true && this.isSetE();
boolean that_present_e = true && that.isSetE();
if (this_present_e || that_present_e) {
if (!(this_present_e && that_present_e))
return false;
if (!this.e.equals(that.e))
return false;
}
return true;
}
@Override
public int hashCode() {
List list = new ArrayList();
boolean present_success = true && (isSetSuccess());
list.add(present_success);
if (present_success)
list.add(success);
boolean present_e = true && (isSetE());
list.add(present_e);
if (present_e)
list.add(e);
return list.hashCode();
}
@Override
public int compareTo(changeMessageVisibilitySecondsBatch_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSuccess()) {
lastComparison = libthrift091.TBaseHelper.compareTo(this.success, other.success);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetE()).compareTo(other.isSetE());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetE()) {
lastComparison = libthrift091.TBaseHelper.compareTo(this.e, other.e);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(libthrift091.protocol.TProtocol iprot) throws libthrift091.TException {
schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
}
public void write(libthrift091.protocol.TProtocol oprot) throws libthrift091.TException {
schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("changeMessageVisibilitySecondsBatch_result(");
boolean first = true;
sb.append("success:");
if (this.success == null) {
sb.append("null");
} else {
sb.append(this.success);
}
first = false;
if (!first) sb.append(", ");
sb.append("e:");
if (this.e == null) {
sb.append("null");
} else {
sb.append(this.e);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws libthrift091.TException {
// check for required fields
// check for sub-struct validity
if (success != null) {
success.validate();
}
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(out)));
} catch (libthrift091.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
try {
read(new libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(in)));
} catch (libthrift091.TException te) {
throw new java.io.IOException(te);
}
}
private static class changeMessageVisibilitySecondsBatch_resultStandardSchemeFactory implements SchemeFactory {
public changeMessageVisibilitySecondsBatch_resultStandardScheme getScheme() {
return new changeMessageVisibilitySecondsBatch_resultStandardScheme();
}
}
private static class changeMessageVisibilitySecondsBatch_resultStandardScheme extends StandardScheme {
public void read(libthrift091.protocol.TProtocol iprot, changeMessageVisibilitySecondsBatch_result struct) throws libthrift091.TException {
libthrift091.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
{
schemeField = iprot.readFieldBegin();
if (schemeField.type == libthrift091.protocol.TType.STOP) {
break;
}
switch (schemeField.id) {
case 0: // SUCCESS
if (schemeField.type == libthrift091.protocol.TType.STRUCT) {
struct.success = new ChangeMessageVisibilityBatchResponse();
struct.success.read(iprot);
struct.setSuccessIsSet(true);
} else {
libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 1: // E
if (schemeField.type == libthrift091.protocol.TType.STRUCT) {
struct.e = new com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException();
struct.e.read(iprot);
struct.setEIsSet(true);
} else {
libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
public void write(libthrift091.protocol.TProtocol oprot, changeMessageVisibilitySecondsBatch_result struct) throws libthrift091.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.success != null) {
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
struct.success.write(oprot);
oprot.writeFieldEnd();
}
if (struct.e != null) {
oprot.writeFieldBegin(E_FIELD_DESC);
struct.e.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class changeMessageVisibilitySecondsBatch_resultTupleSchemeFactory implements SchemeFactory {
public changeMessageVisibilitySecondsBatch_resultTupleScheme getScheme() {
return new changeMessageVisibilitySecondsBatch_resultTupleScheme();
}
}
private static class changeMessageVisibilitySecondsBatch_resultTupleScheme extends TupleScheme {
@Override
public void write(libthrift091.protocol.TProtocol prot, changeMessageVisibilitySecondsBatch_result struct) throws libthrift091.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetSuccess()) {
optionals.set(0);
}
if (struct.isSetE()) {
optionals.set(1);
}
oprot.writeBitSet(optionals, 2);
if (struct.isSetSuccess()) {
struct.success.write(oprot);
}
if (struct.isSetE()) {
struct.e.write(oprot);
}
}
@Override
public void read(libthrift091.protocol.TProtocol prot, changeMessageVisibilitySecondsBatch_result struct) throws libthrift091.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
struct.success = new ChangeMessageVisibilityBatchResponse();
struct.success.read(iprot);
struct.setSuccessIsSet(true);
}
if (incoming.get(1)) {
struct.e = new com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException();
struct.e.read(iprot);
struct.setEIsSet(true);
}
}
}
}
public static class deleteMessage_args implements libthrift091.TBase, java.io.Serializable, Cloneable, Comparable {
private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("deleteMessage_args");
private static final libthrift091.protocol.TField DELETE_MESSAGE_REQUEST_FIELD_DESC = new libthrift091.protocol.TField("deleteMessageRequest", libthrift091.protocol.TType.STRUCT, (short)1);
private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new deleteMessage_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new deleteMessage_argsTupleSchemeFactory());
}
public DeleteMessageRequest deleteMessageRequest; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements libthrift091.TFieldIdEnum {
DELETE_MESSAGE_REQUEST((short)1, "deleteMessageRequest");
private static final Map byName = new HashMap();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 1: // DELETE_MESSAGE_REQUEST
return DELETE_MESSAGE_REQUEST;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(String name) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
_Fields(short thriftId, String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final Map<_Fields, libthrift091.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, libthrift091.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, libthrift091.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.DELETE_MESSAGE_REQUEST, new libthrift091.meta_data.FieldMetaData("deleteMessageRequest", libthrift091.TFieldRequirementType.DEFAULT,
new libthrift091.meta_data.StructMetaData(libthrift091.protocol.TType.STRUCT, DeleteMessageRequest.class)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(deleteMessage_args.class, metaDataMap);
}
public deleteMessage_args() {
}
public deleteMessage_args(
DeleteMessageRequest deleteMessageRequest)
{
this();
this.deleteMessageRequest = deleteMessageRequest;
}
/**
* Performs a deep copy on other .
*/
public deleteMessage_args(deleteMessage_args other) {
if (other.isSetDeleteMessageRequest()) {
this.deleteMessageRequest = new DeleteMessageRequest(other.deleteMessageRequest);
}
}
public deleteMessage_args deepCopy() {
return new deleteMessage_args(this);
}
@Override
public void clear() {
this.deleteMessageRequest = null;
}
public DeleteMessageRequest getDeleteMessageRequest() {
return this.deleteMessageRequest;
}
public deleteMessage_args setDeleteMessageRequest(DeleteMessageRequest deleteMessageRequest) {
this.deleteMessageRequest = deleteMessageRequest;
return this;
}
public void unsetDeleteMessageRequest() {
this.deleteMessageRequest = null;
}
/** Returns true if field deleteMessageRequest is set (has been assigned a value) and false otherwise */
public boolean isSetDeleteMessageRequest() {
return this.deleteMessageRequest != null;
}
public void setDeleteMessageRequestIsSet(boolean value) {
if (!value) {
this.deleteMessageRequest = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case DELETE_MESSAGE_REQUEST:
if (value == null) {
unsetDeleteMessageRequest();
} else {
setDeleteMessageRequest((DeleteMessageRequest)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case DELETE_MESSAGE_REQUEST:
return getDeleteMessageRequest();
}
throw new IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
}
switch (field) {
case DELETE_MESSAGE_REQUEST:
return isSetDeleteMessageRequest();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof deleteMessage_args)
return this.equals((deleteMessage_args)that);
return false;
}
public boolean equals(deleteMessage_args that) {
if (that == null)
return false;
boolean this_present_deleteMessageRequest = true && this.isSetDeleteMessageRequest();
boolean that_present_deleteMessageRequest = true && that.isSetDeleteMessageRequest();
if (this_present_deleteMessageRequest || that_present_deleteMessageRequest) {
if (!(this_present_deleteMessageRequest && that_present_deleteMessageRequest))
return false;
if (!this.deleteMessageRequest.equals(that.deleteMessageRequest))
return false;
}
return true;
}
@Override
public int hashCode() {
List list = new ArrayList();
boolean present_deleteMessageRequest = true && (isSetDeleteMessageRequest());
list.add(present_deleteMessageRequest);
if (present_deleteMessageRequest)
list.add(deleteMessageRequest);
return list.hashCode();
}
@Override
public int compareTo(deleteMessage_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetDeleteMessageRequest()).compareTo(other.isSetDeleteMessageRequest());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetDeleteMessageRequest()) {
lastComparison = libthrift091.TBaseHelper.compareTo(this.deleteMessageRequest, other.deleteMessageRequest);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(libthrift091.protocol.TProtocol iprot) throws libthrift091.TException {
schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
}
public void write(libthrift091.protocol.TProtocol oprot) throws libthrift091.TException {
schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("deleteMessage_args(");
boolean first = true;
sb.append("deleteMessageRequest:");
if (this.deleteMessageRequest == null) {
sb.append("null");
} else {
sb.append(this.deleteMessageRequest);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws libthrift091.TException {
// check for required fields
// check for sub-struct validity
if (deleteMessageRequest != null) {
deleteMessageRequest.validate();
}
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(out)));
} catch (libthrift091.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
try {
read(new libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(in)));
} catch (libthrift091.TException te) {
throw new java.io.IOException(te);
}
}
private static class deleteMessage_argsStandardSchemeFactory implements SchemeFactory {
public deleteMessage_argsStandardScheme getScheme() {
return new deleteMessage_argsStandardScheme();
}
}
private static class deleteMessage_argsStandardScheme extends StandardScheme {
public void read(libthrift091.protocol.TProtocol iprot, deleteMessage_args struct) throws libthrift091.TException {
libthrift091.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
{
schemeField = iprot.readFieldBegin();
if (schemeField.type == libthrift091.protocol.TType.STOP) {
break;
}
switch (schemeField.id) {
case 1: // DELETE_MESSAGE_REQUEST
if (schemeField.type == libthrift091.protocol.TType.STRUCT) {
struct.deleteMessageRequest = new DeleteMessageRequest();
struct.deleteMessageRequest.read(iprot);
struct.setDeleteMessageRequestIsSet(true);
} else {
libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
public void write(libthrift091.protocol.TProtocol oprot, deleteMessage_args struct) throws libthrift091.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.deleteMessageRequest != null) {
oprot.writeFieldBegin(DELETE_MESSAGE_REQUEST_FIELD_DESC);
struct.deleteMessageRequest.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class deleteMessage_argsTupleSchemeFactory implements SchemeFactory {
public deleteMessage_argsTupleScheme getScheme() {
return new deleteMessage_argsTupleScheme();
}
}
private static class deleteMessage_argsTupleScheme extends TupleScheme {
@Override
public void write(libthrift091.protocol.TProtocol prot, deleteMessage_args struct) throws libthrift091.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetDeleteMessageRequest()) {
optionals.set(0);
}
oprot.writeBitSet(optionals, 1);
if (struct.isSetDeleteMessageRequest()) {
struct.deleteMessageRequest.write(oprot);
}
}
@Override
public void read(libthrift091.protocol.TProtocol prot, deleteMessage_args struct) throws libthrift091.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.deleteMessageRequest = new DeleteMessageRequest();
struct.deleteMessageRequest.read(iprot);
struct.setDeleteMessageRequestIsSet(true);
}
}
}
}
public static class deleteMessage_result implements libthrift091.TBase, java.io.Serializable, Cloneable, Comparable {
private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("deleteMessage_result");
private static final libthrift091.protocol.TField E_FIELD_DESC = new libthrift091.protocol.TField("e", libthrift091.protocol.TType.STRUCT, (short)1);
private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new deleteMessage_resultStandardSchemeFactory());
schemes.put(TupleScheme.class, new deleteMessage_resultTupleSchemeFactory());
}
public com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException e; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements libthrift091.TFieldIdEnum {
E((short)1, "e");
private static final Map byName = new HashMap();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 1: // E
return E;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(String name) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
_Fields(short thriftId, String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final Map<_Fields, libthrift091.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, libthrift091.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, libthrift091.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.E, new libthrift091.meta_data.FieldMetaData("e", libthrift091.TFieldRequirementType.DEFAULT,
new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.STRUCT)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(deleteMessage_result.class, metaDataMap);
}
public deleteMessage_result() {
}
public deleteMessage_result(
com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException e)
{
this();
this.e = e;
}
/**
* Performs a deep copy on other .
*/
public deleteMessage_result(deleteMessage_result other) {
if (other.isSetE()) {
this.e = new com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException(other.e);
}
}
public deleteMessage_result deepCopy() {
return new deleteMessage_result(this);
}
@Override
public void clear() {
this.e = null;
}
public com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException getE() {
return this.e;
}
public deleteMessage_result setE(com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException e) {
this.e = e;
return this;
}
public void unsetE() {
this.e = null;
}
/** Returns true if field e is set (has been assigned a value) and false otherwise */
public boolean isSetE() {
return this.e != null;
}
public void setEIsSet(boolean value) {
if (!value) {
this.e = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case E:
if (value == null) {
unsetE();
} else {
setE((com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case E:
return getE();
}
throw new IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
}
switch (field) {
case E:
return isSetE();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof deleteMessage_result)
return this.equals((deleteMessage_result)that);
return false;
}
public boolean equals(deleteMessage_result that) {
if (that == null)
return false;
boolean this_present_e = true && this.isSetE();
boolean that_present_e = true && that.isSetE();
if (this_present_e || that_present_e) {
if (!(this_present_e && that_present_e))
return false;
if (!this.e.equals(that.e))
return false;
}
return true;
}
@Override
public int hashCode() {
List list = new ArrayList();
boolean present_e = true && (isSetE());
list.add(present_e);
if (present_e)
list.add(e);
return list.hashCode();
}
@Override
public int compareTo(deleteMessage_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetE()).compareTo(other.isSetE());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetE()) {
lastComparison = libthrift091.TBaseHelper.compareTo(this.e, other.e);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(libthrift091.protocol.TProtocol iprot) throws libthrift091.TException {
schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
}
public void write(libthrift091.protocol.TProtocol oprot) throws libthrift091.TException {
schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("deleteMessage_result(");
boolean first = true;
sb.append("e:");
if (this.e == null) {
sb.append("null");
} else {
sb.append(this.e);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws libthrift091.TException {
// check for required fields
// check for sub-struct validity
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(out)));
} catch (libthrift091.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
try {
read(new libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(in)));
} catch (libthrift091.TException te) {
throw new java.io.IOException(te);
}
}
private static class deleteMessage_resultStandardSchemeFactory implements SchemeFactory {
public deleteMessage_resultStandardScheme getScheme() {
return new deleteMessage_resultStandardScheme();
}
}
private static class deleteMessage_resultStandardScheme extends StandardScheme {
public void read(libthrift091.protocol.TProtocol iprot, deleteMessage_result struct) throws libthrift091.TException {
libthrift091.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
{
schemeField = iprot.readFieldBegin();
if (schemeField.type == libthrift091.protocol.TType.STOP) {
break;
}
switch (schemeField.id) {
case 1: // E
if (schemeField.type == libthrift091.protocol.TType.STRUCT) {
struct.e = new com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException();
struct.e.read(iprot);
struct.setEIsSet(true);
} else {
libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
public void write(libthrift091.protocol.TProtocol oprot, deleteMessage_result struct) throws libthrift091.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.e != null) {
oprot.writeFieldBegin(E_FIELD_DESC);
struct.e.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class deleteMessage_resultTupleSchemeFactory implements SchemeFactory {
public deleteMessage_resultTupleScheme getScheme() {
return new deleteMessage_resultTupleScheme();
}
}
private static class deleteMessage_resultTupleScheme extends TupleScheme {
@Override
public void write(libthrift091.protocol.TProtocol prot, deleteMessage_result struct) throws libthrift091.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetE()) {
optionals.set(0);
}
oprot.writeBitSet(optionals, 1);
if (struct.isSetE()) {
struct.e.write(oprot);
}
}
@Override
public void read(libthrift091.protocol.TProtocol prot, deleteMessage_result struct) throws libthrift091.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.e = new com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException();
struct.e.read(iprot);
struct.setEIsSet(true);
}
}
}
}
public static class deleteMessageBatch_args implements libthrift091.TBase, java.io.Serializable, Cloneable, Comparable {
private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("deleteMessageBatch_args");
private static final libthrift091.protocol.TField DELETE_MESSAGE_BATCH_REQUEST_FIELD_DESC = new libthrift091.protocol.TField("deleteMessageBatchRequest", libthrift091.protocol.TType.STRUCT, (short)1);
private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new deleteMessageBatch_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new deleteMessageBatch_argsTupleSchemeFactory());
}
public DeleteMessageBatchRequest deleteMessageBatchRequest; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements libthrift091.TFieldIdEnum {
DELETE_MESSAGE_BATCH_REQUEST((short)1, "deleteMessageBatchRequest");
private static final Map byName = new HashMap();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 1: // DELETE_MESSAGE_BATCH_REQUEST
return DELETE_MESSAGE_BATCH_REQUEST;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(String name) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
_Fields(short thriftId, String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final Map<_Fields, libthrift091.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, libthrift091.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, libthrift091.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.DELETE_MESSAGE_BATCH_REQUEST, new libthrift091.meta_data.FieldMetaData("deleteMessageBatchRequest", libthrift091.TFieldRequirementType.DEFAULT,
new libthrift091.meta_data.StructMetaData(libthrift091.protocol.TType.STRUCT, DeleteMessageBatchRequest.class)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(deleteMessageBatch_args.class, metaDataMap);
}
public deleteMessageBatch_args() {
}
public deleteMessageBatch_args(
DeleteMessageBatchRequest deleteMessageBatchRequest)
{
this();
this.deleteMessageBatchRequest = deleteMessageBatchRequest;
}
/**
* Performs a deep copy on other .
*/
public deleteMessageBatch_args(deleteMessageBatch_args other) {
if (other.isSetDeleteMessageBatchRequest()) {
this.deleteMessageBatchRequest = new DeleteMessageBatchRequest(other.deleteMessageBatchRequest);
}
}
public deleteMessageBatch_args deepCopy() {
return new deleteMessageBatch_args(this);
}
@Override
public void clear() {
this.deleteMessageBatchRequest = null;
}
public DeleteMessageBatchRequest getDeleteMessageBatchRequest() {
return this.deleteMessageBatchRequest;
}
public deleteMessageBatch_args setDeleteMessageBatchRequest(DeleteMessageBatchRequest deleteMessageBatchRequest) {
this.deleteMessageBatchRequest = deleteMessageBatchRequest;
return this;
}
public void unsetDeleteMessageBatchRequest() {
this.deleteMessageBatchRequest = null;
}
/** Returns true if field deleteMessageBatchRequest is set (has been assigned a value) and false otherwise */
public boolean isSetDeleteMessageBatchRequest() {
return this.deleteMessageBatchRequest != null;
}
public void setDeleteMessageBatchRequestIsSet(boolean value) {
if (!value) {
this.deleteMessageBatchRequest = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case DELETE_MESSAGE_BATCH_REQUEST:
if (value == null) {
unsetDeleteMessageBatchRequest();
} else {
setDeleteMessageBatchRequest((DeleteMessageBatchRequest)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case DELETE_MESSAGE_BATCH_REQUEST:
return getDeleteMessageBatchRequest();
}
throw new IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
}
switch (field) {
case DELETE_MESSAGE_BATCH_REQUEST:
return isSetDeleteMessageBatchRequest();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof deleteMessageBatch_args)
return this.equals((deleteMessageBatch_args)that);
return false;
}
public boolean equals(deleteMessageBatch_args that) {
if (that == null)
return false;
boolean this_present_deleteMessageBatchRequest = true && this.isSetDeleteMessageBatchRequest();
boolean that_present_deleteMessageBatchRequest = true && that.isSetDeleteMessageBatchRequest();
if (this_present_deleteMessageBatchRequest || that_present_deleteMessageBatchRequest) {
if (!(this_present_deleteMessageBatchRequest && that_present_deleteMessageBatchRequest))
return false;
if (!this.deleteMessageBatchRequest.equals(that.deleteMessageBatchRequest))
return false;
}
return true;
}
@Override
public int hashCode() {
List list = new ArrayList();
boolean present_deleteMessageBatchRequest = true && (isSetDeleteMessageBatchRequest());
list.add(present_deleteMessageBatchRequest);
if (present_deleteMessageBatchRequest)
list.add(deleteMessageBatchRequest);
return list.hashCode();
}
@Override
public int compareTo(deleteMessageBatch_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetDeleteMessageBatchRequest()).compareTo(other.isSetDeleteMessageBatchRequest());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetDeleteMessageBatchRequest()) {
lastComparison = libthrift091.TBaseHelper.compareTo(this.deleteMessageBatchRequest, other.deleteMessageBatchRequest);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(libthrift091.protocol.TProtocol iprot) throws libthrift091.TException {
schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
}
public void write(libthrift091.protocol.TProtocol oprot) throws libthrift091.TException {
schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("deleteMessageBatch_args(");
boolean first = true;
sb.append("deleteMessageBatchRequest:");
if (this.deleteMessageBatchRequest == null) {
sb.append("null");
} else {
sb.append(this.deleteMessageBatchRequest);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws libthrift091.TException {
// check for required fields
// check for sub-struct validity
if (deleteMessageBatchRequest != null) {
deleteMessageBatchRequest.validate();
}
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(out)));
} catch (libthrift091.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
try {
read(new libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(in)));
} catch (libthrift091.TException te) {
throw new java.io.IOException(te);
}
}
private static class deleteMessageBatch_argsStandardSchemeFactory implements SchemeFactory {
public deleteMessageBatch_argsStandardScheme getScheme() {
return new deleteMessageBatch_argsStandardScheme();
}
}
private static class deleteMessageBatch_argsStandardScheme extends StandardScheme {
public void read(libthrift091.protocol.TProtocol iprot, deleteMessageBatch_args struct) throws libthrift091.TException {
libthrift091.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
{
schemeField = iprot.readFieldBegin();
if (schemeField.type == libthrift091.protocol.TType.STOP) {
break;
}
switch (schemeField.id) {
case 1: // DELETE_MESSAGE_BATCH_REQUEST
if (schemeField.type == libthrift091.protocol.TType.STRUCT) {
struct.deleteMessageBatchRequest = new DeleteMessageBatchRequest();
struct.deleteMessageBatchRequest.read(iprot);
struct.setDeleteMessageBatchRequestIsSet(true);
} else {
libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
public void write(libthrift091.protocol.TProtocol oprot, deleteMessageBatch_args struct) throws libthrift091.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.deleteMessageBatchRequest != null) {
oprot.writeFieldBegin(DELETE_MESSAGE_BATCH_REQUEST_FIELD_DESC);
struct.deleteMessageBatchRequest.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class deleteMessageBatch_argsTupleSchemeFactory implements SchemeFactory {
public deleteMessageBatch_argsTupleScheme getScheme() {
return new deleteMessageBatch_argsTupleScheme();
}
}
private static class deleteMessageBatch_argsTupleScheme extends TupleScheme {
@Override
public void write(libthrift091.protocol.TProtocol prot, deleteMessageBatch_args struct) throws libthrift091.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetDeleteMessageBatchRequest()) {
optionals.set(0);
}
oprot.writeBitSet(optionals, 1);
if (struct.isSetDeleteMessageBatchRequest()) {
struct.deleteMessageBatchRequest.write(oprot);
}
}
@Override
public void read(libthrift091.protocol.TProtocol prot, deleteMessageBatch_args struct) throws libthrift091.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.deleteMessageBatchRequest = new DeleteMessageBatchRequest();
struct.deleteMessageBatchRequest.read(iprot);
struct.setDeleteMessageBatchRequestIsSet(true);
}
}
}
}
public static class deleteMessageBatch_result implements libthrift091.TBase