/** * Autogenerated by Thrift Compiler (0.9.2) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated */ package com.xiaomi.infra.galaxy.emq.thrift; import libthrift091.scheme.IScheme; import libthrift091.scheme.SchemeFactory; import libthrift091.scheme.StandardScheme; import libthrift091.scheme.TupleScheme; import libthrift091.protocol.TTupleProtocol; import libthrift091.protocol.TProtocolException; import libthrift091.EncodingUtils; import libthrift091.TException; import libthrift091.async.AsyncMethodCallback; import libthrift091.server.AbstractNonblockingServer.*; import java.util.List; import java.util.ArrayList; import java.util.Map; import java.util.HashMap; import java.util.EnumMap; import java.util.Set; import java.util.HashSet; import java.util.EnumSet; import java.util.Collections; import java.util.BitSet; import java.nio.ByteBuffer; import java.util.Arrays; import javax.annotation.Generated; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) @Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2016-11-21") 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<ReceiveMessageResponse> 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; } 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 static class Client extends com.xiaomi.infra.galaxy.emq.thrift.EMQBaseService.Client implements Iface { public static class Factory implements libthrift091.TServiceClientFactory<Client> { 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<ReceiveMessageResponse> 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<ReceiveMessageResponse> 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 static class AsyncClient extends com.xiaomi.infra.galaxy.emq.thrift.EMQBaseService.AsyncClient implements AsyncIface { public static class Factory implements libthrift091.async.TAsyncClientFactory<AsyncClient> { 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<ReceiveMessageResponse> 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 static class Processor<I extends Iface> extends com.xiaomi.infra.galaxy.emq.thrift.EMQBaseService.Processor<I> implements libthrift091.TProcessor { private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName()); public Processor(I iface) { super(iface, getProcessMap(new HashMap<String, libthrift091.ProcessFunction<I, ? extends libthrift091.TBase>>())); } protected Processor(I iface, Map<String, libthrift091.ProcessFunction<I, ? extends libthrift091.TBase>> processMap) { super(iface, getProcessMap(processMap)); } private static <I extends Iface> Map<String, libthrift091.ProcessFunction<I, ? extends libthrift091.TBase>> getProcessMap(Map<String, libthrift091.ProcessFunction<I, ? extends libthrift091.TBase>> 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()); return processMap; } public static class sendMessage<I extends Iface> extends libthrift091.ProcessFunction<I, sendMessage_args> { 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<I extends Iface> extends libthrift091.ProcessFunction<I, sendMessageBatch_args> { 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<I extends Iface> extends libthrift091.ProcessFunction<I, receiveMessage_args> { 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<I extends Iface> extends libthrift091.ProcessFunction<I, changeMessageVisibilitySeconds_args> { 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<I extends Iface> extends libthrift091.ProcessFunction<I, changeMessageVisibilitySecondsBatch_args> { 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<I extends Iface> extends libthrift091.ProcessFunction<I, deleteMessage_args> { 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<I extends Iface> extends libthrift091.ProcessFunction<I, deleteMessageBatch_args> { 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<I extends Iface> extends libthrift091.ProcessFunction<I, deadMessage_args> { 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<I extends Iface> extends libthrift091.ProcessFunction<I, deadMessageBatch_args> { 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 AsyncProcessor<I extends AsyncIface> extends com.xiaomi.infra.galaxy.emq.thrift.EMQBaseService.AsyncProcessor<I> { private static final Logger LOGGER = LoggerFactory.getLogger(AsyncProcessor.class.getName()); public AsyncProcessor(I iface) { super(iface, getProcessMap(new HashMap<String, libthrift091.AsyncProcessFunction<I, ? extends libthrift091.TBase, ?>>())); } protected AsyncProcessor(I iface, Map<String, libthrift091.AsyncProcessFunction<I, ? extends libthrift091.TBase, ?>> processMap) { super(iface, getProcessMap(processMap)); } private static <I extends AsyncIface> Map<String, libthrift091.AsyncProcessFunction<I, ? extends libthrift091.TBase,?>> getProcessMap(Map<String, libthrift091.AsyncProcessFunction<I, ? extends libthrift091.TBase, ?>> 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()); return processMap; } public static class sendMessage<I extends AsyncIface> extends libthrift091.AsyncProcessFunction<I, sendMessage_args, SendMessageResponse> { public sendMessage() { super("sendMessage"); } public sendMessage_args getEmptyArgsInstance() { return new sendMessage_args(); } public AsyncMethodCallback<SendMessageResponse> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final libthrift091.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<SendMessageResponse>() { 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<SendMessageResponse> resultHandler) throws TException { iface.sendMessage(args.sendMessageRequest,resultHandler); } } public static class sendMessageBatch<I extends AsyncIface> extends libthrift091.AsyncProcessFunction<I, sendMessageBatch_args, SendMessageBatchResponse> { public sendMessageBatch() { super("sendMessageBatch"); } public sendMessageBatch_args getEmptyArgsInstance() { return new sendMessageBatch_args(); } public AsyncMethodCallback<SendMessageBatchResponse> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final libthrift091.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<SendMessageBatchResponse>() { 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<SendMessageBatchResponse> resultHandler) throws TException { iface.sendMessageBatch(args.sendMessageBatchRequest,resultHandler); } } public static class receiveMessage<I extends AsyncIface> extends libthrift091.AsyncProcessFunction<I, receiveMessage_args, List<ReceiveMessageResponse>> { public receiveMessage() { super("receiveMessage"); } public receiveMessage_args getEmptyArgsInstance() { return new receiveMessage_args(); } public AsyncMethodCallback<List<ReceiveMessageResponse>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final libthrift091.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<List<ReceiveMessageResponse>>() { public void onComplete(List<ReceiveMessageResponse> 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<List<ReceiveMessageResponse>> resultHandler) throws TException { iface.receiveMessage(args.receiveMessageRequest,resultHandler); } } public static class changeMessageVisibilitySeconds<I extends AsyncIface> extends libthrift091.AsyncProcessFunction<I, changeMessageVisibilitySeconds_args, Void> { public changeMessageVisibilitySeconds() { super("changeMessageVisibilitySeconds"); } public changeMessageVisibilitySeconds_args getEmptyArgsInstance() { return new changeMessageVisibilitySeconds_args(); } public AsyncMethodCallback<Void> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final libthrift091.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<Void>() { 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<Void> resultHandler) throws TException { iface.changeMessageVisibilitySeconds(args.changeMessageVisibilityRequest,resultHandler); } } public static class changeMessageVisibilitySecondsBatch<I extends AsyncIface> extends libthrift091.AsyncProcessFunction<I, changeMessageVisibilitySecondsBatch_args, ChangeMessageVisibilityBatchResponse> { public changeMessageVisibilitySecondsBatch() { super("changeMessageVisibilitySecondsBatch"); } public changeMessageVisibilitySecondsBatch_args getEmptyArgsInstance() { return new changeMessageVisibilitySecondsBatch_args(); } public AsyncMethodCallback<ChangeMessageVisibilityBatchResponse> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final libthrift091.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<ChangeMessageVisibilityBatchResponse>() { 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<ChangeMessageVisibilityBatchResponse> resultHandler) throws TException { iface.changeMessageVisibilitySecondsBatch(args.changeMessageVisibilityBatchRequest,resultHandler); } } public static class deleteMessage<I extends AsyncIface> extends libthrift091.AsyncProcessFunction<I, deleteMessage_args, Void> { public deleteMessage() { super("deleteMessage"); } public deleteMessage_args getEmptyArgsInstance() { return new deleteMessage_args(); } public AsyncMethodCallback<Void> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final libthrift091.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<Void>() { 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<Void> resultHandler) throws TException { iface.deleteMessage(args.deleteMessageRequest,resultHandler); } } public static class deleteMessageBatch<I extends AsyncIface> extends libthrift091.AsyncProcessFunction<I, deleteMessageBatch_args, DeleteMessageBatchResponse> { public deleteMessageBatch() { super("deleteMessageBatch"); } public deleteMessageBatch_args getEmptyArgsInstance() { return new deleteMessageBatch_args(); } public AsyncMethodCallback<DeleteMessageBatchResponse> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final libthrift091.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<DeleteMessageBatchResponse>() { 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<DeleteMessageBatchResponse> resultHandler) throws TException { iface.deleteMessageBatch(args.deleteMessageBatchRequest,resultHandler); } } public static class deadMessage<I extends AsyncIface> extends libthrift091.AsyncProcessFunction<I, deadMessage_args, Void> { public deadMessage() { super("deadMessage"); } public deadMessage_args getEmptyArgsInstance() { return new deadMessage_args(); } public AsyncMethodCallback<Void> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final libthrift091.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<Void>() { 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<Void> resultHandler) throws TException { iface.deadMessage(args.deadMessageRequest,resultHandler); } } public static class deadMessageBatch<I extends AsyncIface> extends libthrift091.AsyncProcessFunction<I, deadMessageBatch_args, DeadMessageBatchResponse> { public deadMessageBatch() { super("deadMessageBatch"); } public deadMessageBatch_args getEmptyArgsInstance() { return new deadMessageBatch_args(); } public AsyncMethodCallback<DeadMessageBatchResponse> getResultHandler(final AsyncFrameBuffer fb, final int seqid) { final libthrift091.AsyncProcessFunction fcall = this; return new AsyncMethodCallback<DeadMessageBatchResponse>() { 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<DeadMessageBatchResponse> resultHandler) throws TException { iface.deadMessageBatch(args.deadMessageBatchRequest,resultHandler); } } } public static class sendMessage_args implements libthrift091.TBase<sendMessage_args, sendMessage_args._Fields>, java.io.Serializable, Cloneable, Comparable<sendMessage_args> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); 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 <i>other</i>. */ 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<Object> list = new ArrayList<Object>(); 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<sendMessage_args> { 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<sendMessage_args> { @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<sendMessage_result, sendMessage_result._Fields>, java.io.Serializable, Cloneable, Comparable<sendMessage_result> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); 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 <i>other</i>. */ 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<Object> list = new ArrayList<Object>(); 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<sendMessage_result> { 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<sendMessage_result> { @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<sendMessageBatch_args, sendMessageBatch_args._Fields>, java.io.Serializable, Cloneable, Comparable<sendMessageBatch_args> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); 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 <i>other</i>. */ 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<Object> list = new ArrayList<Object>(); 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<sendMessageBatch_args> { 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<sendMessageBatch_args> { @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<sendMessageBatch_result, sendMessageBatch_result._Fields>, java.io.Serializable, Cloneable, Comparable<sendMessageBatch_result> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); 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 <i>other</i>. */ 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<Object> list = new ArrayList<Object>(); 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<sendMessageBatch_result> { 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<sendMessageBatch_result> { @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<receiveMessage_args, receiveMessage_args._Fields>, java.io.Serializable, Cloneable, Comparable<receiveMessage_args> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); 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 <i>other</i>. */ 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<Object> list = new ArrayList<Object>(); 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<receiveMessage_args> { 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<receiveMessage_args> { @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<receiveMessage_result, receiveMessage_result._Fields>, java.io.Serializable, Cloneable, Comparable<receiveMessage_result> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new receiveMessage_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new receiveMessage_resultTupleSchemeFactory()); } public List<ReceiveMessageResponse> 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<String, _Fields> byName = new HashMap<String, _Fields>(); 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<ReceiveMessageResponse> success, com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException e) { this(); this.success = success; this.e = e; } /** * Performs a deep copy on <i>other</i>. */ public receiveMessage_result(receiveMessage_result other) { if (other.isSetSuccess()) { List<ReceiveMessageResponse> __this__success = new ArrayList<ReceiveMessageResponse>(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<ReceiveMessageResponse> getSuccessIterator() { return (this.success == null) ? null : this.success.iterator(); } public void addToSuccess(ReceiveMessageResponse elem) { if (this.success == null) { this.success = new ArrayList<ReceiveMessageResponse>(); } this.success.add(elem); } public List<ReceiveMessageResponse> getSuccess() { return this.success; } public receiveMessage_result setSuccess(List<ReceiveMessageResponse> 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<ReceiveMessageResponse>)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<Object> list = new ArrayList<Object>(); 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<receiveMessage_result> { 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 _list136 = iprot.readListBegin(); struct.success = new ArrayList<ReceiveMessageResponse>(_list136.size); ReceiveMessageResponse _elem137; for (int _i138 = 0; _i138 < _list136.size; ++_i138) { _elem137 = new ReceiveMessageResponse(); _elem137.read(iprot); struct.success.add(_elem137); } 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 _iter139 : struct.success) { _iter139.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<receiveMessage_result> { @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 _iter140 : struct.success) { _iter140.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 _list141 = new libthrift091.protocol.TList(libthrift091.protocol.TType.STRUCT, iprot.readI32()); struct.success = new ArrayList<ReceiveMessageResponse>(_list141.size); ReceiveMessageResponse _elem142; for (int _i143 = 0; _i143 < _list141.size; ++_i143) { _elem142 = new ReceiveMessageResponse(); _elem142.read(iprot); struct.success.add(_elem142); } } 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<changeMessageVisibilitySeconds_args, changeMessageVisibilitySeconds_args._Fields>, java.io.Serializable, Cloneable, Comparable<changeMessageVisibilitySeconds_args> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); 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 <i>other</i>. */ 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<Object> list = new ArrayList<Object>(); 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<changeMessageVisibilitySeconds_args> { 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<changeMessageVisibilitySeconds_args> { @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<changeMessageVisibilitySeconds_result, changeMessageVisibilitySeconds_result._Fields>, java.io.Serializable, Cloneable, Comparable<changeMessageVisibilitySeconds_result> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); 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 <i>other</i>. */ 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<Object> list = new ArrayList<Object>(); 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<changeMessageVisibilitySeconds_result> { 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<changeMessageVisibilitySeconds_result> { @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<changeMessageVisibilitySecondsBatch_args, changeMessageVisibilitySecondsBatch_args._Fields>, java.io.Serializable, Cloneable, Comparable<changeMessageVisibilitySecondsBatch_args> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); 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 <i>other</i>. */ 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<Object> list = new ArrayList<Object>(); 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<changeMessageVisibilitySecondsBatch_args> { 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<changeMessageVisibilitySecondsBatch_args> { @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<changeMessageVisibilitySecondsBatch_result, changeMessageVisibilitySecondsBatch_result._Fields>, java.io.Serializable, Cloneable, Comparable<changeMessageVisibilitySecondsBatch_result> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); 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 <i>other</i>. */ 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<Object> list = new ArrayList<Object>(); 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<changeMessageVisibilitySecondsBatch_result> { 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<changeMessageVisibilitySecondsBatch_result> { @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<deleteMessage_args, deleteMessage_args._Fields>, java.io.Serializable, Cloneable, Comparable<deleteMessage_args> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); 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 <i>other</i>. */ 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<Object> list = new ArrayList<Object>(); 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<deleteMessage_args> { 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<deleteMessage_args> { @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<deleteMessage_result, deleteMessage_result._Fields>, java.io.Serializable, Cloneable, Comparable<deleteMessage_result> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); 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 <i>other</i>. */ 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<Object> list = new ArrayList<Object>(); 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<deleteMessage_result> { 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<deleteMessage_result> { @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<deleteMessageBatch_args, deleteMessageBatch_args._Fields>, java.io.Serializable, Cloneable, Comparable<deleteMessageBatch_args> { 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<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, 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<String, _Fields> byName = new HashMap<String, _Fields>(); 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 <i>other</i>. */ 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<Object> list = new ArrayList<Object>(); 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<deleteMessageBatch_args> { 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<deleteMessageBatch_args> { @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<deleteMessageBatch_result, deleteMessageBatch_result._Fields>, java.io.Serializable, Cloneable, Comparable<deleteMessageBatch_result> { private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("deleteMessageBatch_result"); private static final libthrift091.protocol.TField SUCCESS_FIELD_DESC = new libthrift091.protocol.TField("success", libthrift091.protocol.TType.STRUCT, (short)0); private static final libthrift091.protocol.TField E_FIELD_DESC = new libthrift091.protocol.TField("e", libthrift091.protocol.TType.STRUCT, (short)1); private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new deleteMessageBatch_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new deleteMessageBatch_resultTupleSchemeFactory()); } public DeleteMessageBatchResponse success; // required public com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException e; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements libthrift091.TFieldIdEnum { SUCCESS((short)0, "success"), E((short)1, "e"); private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; case 1: // E return E; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } // isset id assignments public static final Map<_Fields, libthrift091.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, libthrift091.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, libthrift091.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new libthrift091.meta_data.FieldMetaData("success", libthrift091.TFieldRequirementType.DEFAULT, new libthrift091.meta_data.StructMetaData(libthrift091.protocol.TType.STRUCT, DeleteMessageBatchResponse.class))); tmpMap.put(_Fields.E, new libthrift091.meta_data.FieldMetaData("e", libthrift091.TFieldRequirementType.DEFAULT, new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.STRUCT))); metaDataMap = Collections.unmodifiableMap(tmpMap); libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(deleteMessageBatch_result.class, metaDataMap); } public deleteMessageBatch_result() { } public deleteMessageBatch_result( DeleteMessageBatchResponse success, com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException e) { this(); this.success = success; this.e = e; } /** * Performs a deep copy on <i>other</i>. */ public deleteMessageBatch_result(deleteMessageBatch_result other) { if (other.isSetSuccess()) { this.success = new DeleteMessageBatchResponse(other.success); } if (other.isSetE()) { this.e = new com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException(other.e); } } public deleteMessageBatch_result deepCopy() { return new deleteMessageBatch_result(this); } @Override public void clear() { this.success = null; this.e = null; } public DeleteMessageBatchResponse getSuccess() { return this.success; } public deleteMessageBatch_result setSuccess(DeleteMessageBatchResponse success) { this.success = success; return this; } public void unsetSuccess() { this.success = null; } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return this.success != null; } public void setSuccessIsSet(boolean value) { if (!value) { this.success = null; } } public com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException getE() { return this.e; } public deleteMessageBatch_result setE(com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException e) { this.e = e; return this; } public void unsetE() { this.e = null; } /** Returns true if field e is set (has been assigned a value) and false otherwise */ public boolean isSetE() { return this.e != null; } public void setEIsSet(boolean value) { if (!value) { this.e = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((DeleteMessageBatchResponse)value); } break; case E: if (value == null) { unsetE(); } else { setE((com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); case E: return getE(); } throw new IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new IllegalArgumentException(); } switch (field) { case SUCCESS: return isSetSuccess(); case E: return isSetE(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof deleteMessageBatch_result) return this.equals((deleteMessageBatch_result)that); return false; } public boolean equals(deleteMessageBatch_result that) { if (that == null) return false; boolean this_present_success = true && this.isSetSuccess(); boolean that_present_success = true && that.isSetSuccess(); if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; if (!this.success.equals(that.success)) return false; } boolean this_present_e = true && this.isSetE(); boolean that_present_e = true && that.isSetE(); if (this_present_e || that_present_e) { if (!(this_present_e && that_present_e)) return false; if (!this.e.equals(that.e)) return false; } return true; } @Override public int hashCode() { List<Object> list = new ArrayList<Object>(); boolean present_success = true && (isSetSuccess()); list.add(present_success); if (present_success) list.add(success); boolean present_e = true && (isSetE()); list.add(present_e); if (present_e) list.add(e); return list.hashCode(); } @Override public int compareTo(deleteMessageBatch_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = libthrift091.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetE()).compareTo(other.isSetE()); if (lastComparison != 0) { return lastComparison; } if (isSetE()) { lastComparison = libthrift091.TBaseHelper.compareTo(this.e, other.e); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(libthrift091.protocol.TProtocol iprot) throws libthrift091.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(libthrift091.protocol.TProtocol oprot) throws libthrift091.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("deleteMessageBatch_result("); boolean first = true; sb.append("success:"); if (this.success == null) { sb.append("null"); } else { sb.append(this.success); } first = false; if (!first) sb.append(", "); sb.append("e:"); if (this.e == null) { sb.append("null"); } else { sb.append(this.e); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws libthrift091.TException { // check for required fields // check for sub-struct validity if (success != null) { success.validate(); } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(out))); } catch (libthrift091.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(in))); } catch (libthrift091.TException te) { throw new java.io.IOException(te); } } private static class deleteMessageBatch_resultStandardSchemeFactory implements SchemeFactory { public deleteMessageBatch_resultStandardScheme getScheme() { return new deleteMessageBatch_resultStandardScheme(); } } private static class deleteMessageBatch_resultStandardScheme extends StandardScheme<deleteMessageBatch_result> { public void read(libthrift091.protocol.TProtocol iprot, deleteMessageBatch_result struct) throws libthrift091.TException { libthrift091.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == libthrift091.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == libthrift091.protocol.TType.STRUCT) { struct.success = new DeleteMessageBatchResponse(); struct.success.read(iprot); struct.setSuccessIsSet(true); } else { libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // E if (schemeField.type == libthrift091.protocol.TType.STRUCT) { struct.e = new com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException(); struct.e.read(iprot); struct.setEIsSet(true); } else { libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(libthrift091.protocol.TProtocol oprot, deleteMessageBatch_result struct) throws libthrift091.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); struct.success.write(oprot); oprot.writeFieldEnd(); } if (struct.e != null) { oprot.writeFieldBegin(E_FIELD_DESC); struct.e.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class deleteMessageBatch_resultTupleSchemeFactory implements SchemeFactory { public deleteMessageBatch_resultTupleScheme getScheme() { return new deleteMessageBatch_resultTupleScheme(); } } private static class deleteMessageBatch_resultTupleScheme extends TupleScheme<deleteMessageBatch_result> { @Override public void write(libthrift091.protocol.TProtocol prot, deleteMessageBatch_result struct) throws libthrift091.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } if (struct.isSetE()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetSuccess()) { struct.success.write(oprot); } if (struct.isSetE()) { struct.e.write(oprot); } } @Override public void read(libthrift091.protocol.TProtocol prot, deleteMessageBatch_result struct) throws libthrift091.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.success = new DeleteMessageBatchResponse(); struct.success.read(iprot); struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.e = new com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException(); struct.e.read(iprot); struct.setEIsSet(true); } } } } public static class deadMessage_args implements libthrift091.TBase<deadMessage_args, deadMessage_args._Fields>, java.io.Serializable, Cloneable, Comparable<deadMessage_args> { private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("deadMessage_args"); private static final libthrift091.protocol.TField DEAD_MESSAGE_REQUEST_FIELD_DESC = new libthrift091.protocol.TField("deadMessageRequest", libthrift091.protocol.TType.STRUCT, (short)1); private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new deadMessage_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new deadMessage_argsTupleSchemeFactory()); } public DeadMessageRequest deadMessageRequest; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements libthrift091.TFieldIdEnum { DEAD_MESSAGE_REQUEST((short)1, "deadMessageRequest"); private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // DEAD_MESSAGE_REQUEST return DEAD_MESSAGE_REQUEST; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } // isset id assignments public static final Map<_Fields, libthrift091.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, libthrift091.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, libthrift091.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.DEAD_MESSAGE_REQUEST, new libthrift091.meta_data.FieldMetaData("deadMessageRequest", libthrift091.TFieldRequirementType.DEFAULT, new libthrift091.meta_data.StructMetaData(libthrift091.protocol.TType.STRUCT, DeadMessageRequest.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(deadMessage_args.class, metaDataMap); } public deadMessage_args() { } public deadMessage_args( DeadMessageRequest deadMessageRequest) { this(); this.deadMessageRequest = deadMessageRequest; } /** * Performs a deep copy on <i>other</i>. */ public deadMessage_args(deadMessage_args other) { if (other.isSetDeadMessageRequest()) { this.deadMessageRequest = new DeadMessageRequest(other.deadMessageRequest); } } public deadMessage_args deepCopy() { return new deadMessage_args(this); } @Override public void clear() { this.deadMessageRequest = null; } public DeadMessageRequest getDeadMessageRequest() { return this.deadMessageRequest; } public deadMessage_args setDeadMessageRequest(DeadMessageRequest deadMessageRequest) { this.deadMessageRequest = deadMessageRequest; return this; } public void unsetDeadMessageRequest() { this.deadMessageRequest = null; } /** Returns true if field deadMessageRequest is set (has been assigned a value) and false otherwise */ public boolean isSetDeadMessageRequest() { return this.deadMessageRequest != null; } public void setDeadMessageRequestIsSet(boolean value) { if (!value) { this.deadMessageRequest = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case DEAD_MESSAGE_REQUEST: if (value == null) { unsetDeadMessageRequest(); } else { setDeadMessageRequest((DeadMessageRequest)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case DEAD_MESSAGE_REQUEST: return getDeadMessageRequest(); } throw new IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new IllegalArgumentException(); } switch (field) { case DEAD_MESSAGE_REQUEST: return isSetDeadMessageRequest(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof deadMessage_args) return this.equals((deadMessage_args)that); return false; } public boolean equals(deadMessage_args that) { if (that == null) return false; boolean this_present_deadMessageRequest = true && this.isSetDeadMessageRequest(); boolean that_present_deadMessageRequest = true && that.isSetDeadMessageRequest(); if (this_present_deadMessageRequest || that_present_deadMessageRequest) { if (!(this_present_deadMessageRequest && that_present_deadMessageRequest)) return false; if (!this.deadMessageRequest.equals(that.deadMessageRequest)) return false; } return true; } @Override public int hashCode() { List<Object> list = new ArrayList<Object>(); boolean present_deadMessageRequest = true && (isSetDeadMessageRequest()); list.add(present_deadMessageRequest); if (present_deadMessageRequest) list.add(deadMessageRequest); return list.hashCode(); } @Override public int compareTo(deadMessage_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetDeadMessageRequest()).compareTo(other.isSetDeadMessageRequest()); if (lastComparison != 0) { return lastComparison; } if (isSetDeadMessageRequest()) { lastComparison = libthrift091.TBaseHelper.compareTo(this.deadMessageRequest, other.deadMessageRequest); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(libthrift091.protocol.TProtocol iprot) throws libthrift091.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(libthrift091.protocol.TProtocol oprot) throws libthrift091.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("deadMessage_args("); boolean first = true; sb.append("deadMessageRequest:"); if (this.deadMessageRequest == null) { sb.append("null"); } else { sb.append(this.deadMessageRequest); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws libthrift091.TException { // check for required fields // check for sub-struct validity if (deadMessageRequest != null) { deadMessageRequest.validate(); } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(out))); } catch (libthrift091.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(in))); } catch (libthrift091.TException te) { throw new java.io.IOException(te); } } private static class deadMessage_argsStandardSchemeFactory implements SchemeFactory { public deadMessage_argsStandardScheme getScheme() { return new deadMessage_argsStandardScheme(); } } private static class deadMessage_argsStandardScheme extends StandardScheme<deadMessage_args> { public void read(libthrift091.protocol.TProtocol iprot, deadMessage_args struct) throws libthrift091.TException { libthrift091.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == libthrift091.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // DEAD_MESSAGE_REQUEST if (schemeField.type == libthrift091.protocol.TType.STRUCT) { struct.deadMessageRequest = new DeadMessageRequest(); struct.deadMessageRequest.read(iprot); struct.setDeadMessageRequestIsSet(true); } else { libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(libthrift091.protocol.TProtocol oprot, deadMessage_args struct) throws libthrift091.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.deadMessageRequest != null) { oprot.writeFieldBegin(DEAD_MESSAGE_REQUEST_FIELD_DESC); struct.deadMessageRequest.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class deadMessage_argsTupleSchemeFactory implements SchemeFactory { public deadMessage_argsTupleScheme getScheme() { return new deadMessage_argsTupleScheme(); } } private static class deadMessage_argsTupleScheme extends TupleScheme<deadMessage_args> { @Override public void write(libthrift091.protocol.TProtocol prot, deadMessage_args struct) throws libthrift091.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetDeadMessageRequest()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetDeadMessageRequest()) { struct.deadMessageRequest.write(oprot); } } @Override public void read(libthrift091.protocol.TProtocol prot, deadMessage_args struct) throws libthrift091.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.deadMessageRequest = new DeadMessageRequest(); struct.deadMessageRequest.read(iprot); struct.setDeadMessageRequestIsSet(true); } } } } public static class deadMessage_result implements libthrift091.TBase<deadMessage_result, deadMessage_result._Fields>, java.io.Serializable, Cloneable, Comparable<deadMessage_result> { private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("deadMessage_result"); private static final libthrift091.protocol.TField E_FIELD_DESC = new libthrift091.protocol.TField("e", libthrift091.protocol.TType.STRUCT, (short)1); private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new deadMessage_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new deadMessage_resultTupleSchemeFactory()); } public com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException e; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements libthrift091.TFieldIdEnum { E((short)1, "e"); private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // E return E; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } // isset id assignments public static final Map<_Fields, libthrift091.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, libthrift091.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, libthrift091.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.E, new libthrift091.meta_data.FieldMetaData("e", libthrift091.TFieldRequirementType.DEFAULT, new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.STRUCT))); metaDataMap = Collections.unmodifiableMap(tmpMap); libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(deadMessage_result.class, metaDataMap); } public deadMessage_result() { } public deadMessage_result( com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException e) { this(); this.e = e; } /** * Performs a deep copy on <i>other</i>. */ public deadMessage_result(deadMessage_result other) { if (other.isSetE()) { this.e = new com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException(other.e); } } public deadMessage_result deepCopy() { return new deadMessage_result(this); } @Override public void clear() { this.e = null; } public com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException getE() { return this.e; } public deadMessage_result setE(com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException e) { this.e = e; return this; } public void unsetE() { this.e = null; } /** Returns true if field e is set (has been assigned a value) and false otherwise */ public boolean isSetE() { return this.e != null; } public void setEIsSet(boolean value) { if (!value) { this.e = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case E: if (value == null) { unsetE(); } else { setE((com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case E: return getE(); } throw new IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new IllegalArgumentException(); } switch (field) { case E: return isSetE(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof deadMessage_result) return this.equals((deadMessage_result)that); return false; } public boolean equals(deadMessage_result that) { if (that == null) return false; boolean this_present_e = true && this.isSetE(); boolean that_present_e = true && that.isSetE(); if (this_present_e || that_present_e) { if (!(this_present_e && that_present_e)) return false; if (!this.e.equals(that.e)) return false; } return true; } @Override public int hashCode() { List<Object> list = new ArrayList<Object>(); boolean present_e = true && (isSetE()); list.add(present_e); if (present_e) list.add(e); return list.hashCode(); } @Override public int compareTo(deadMessage_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetE()).compareTo(other.isSetE()); if (lastComparison != 0) { return lastComparison; } if (isSetE()) { lastComparison = libthrift091.TBaseHelper.compareTo(this.e, other.e); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(libthrift091.protocol.TProtocol iprot) throws libthrift091.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(libthrift091.protocol.TProtocol oprot) throws libthrift091.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("deadMessage_result("); boolean first = true; sb.append("e:"); if (this.e == null) { sb.append("null"); } else { sb.append(this.e); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws libthrift091.TException { // check for required fields // check for sub-struct validity } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(out))); } catch (libthrift091.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(in))); } catch (libthrift091.TException te) { throw new java.io.IOException(te); } } private static class deadMessage_resultStandardSchemeFactory implements SchemeFactory { public deadMessage_resultStandardScheme getScheme() { return new deadMessage_resultStandardScheme(); } } private static class deadMessage_resultStandardScheme extends StandardScheme<deadMessage_result> { public void read(libthrift091.protocol.TProtocol iprot, deadMessage_result struct) throws libthrift091.TException { libthrift091.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == libthrift091.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // E if (schemeField.type == libthrift091.protocol.TType.STRUCT) { struct.e = new com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException(); struct.e.read(iprot); struct.setEIsSet(true); } else { libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(libthrift091.protocol.TProtocol oprot, deadMessage_result struct) throws libthrift091.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.e != null) { oprot.writeFieldBegin(E_FIELD_DESC); struct.e.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class deadMessage_resultTupleSchemeFactory implements SchemeFactory { public deadMessage_resultTupleScheme getScheme() { return new deadMessage_resultTupleScheme(); } } private static class deadMessage_resultTupleScheme extends TupleScheme<deadMessage_result> { @Override public void write(libthrift091.protocol.TProtocol prot, deadMessage_result struct) throws libthrift091.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetE()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetE()) { struct.e.write(oprot); } } @Override public void read(libthrift091.protocol.TProtocol prot, deadMessage_result struct) throws libthrift091.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.e = new com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException(); struct.e.read(iprot); struct.setEIsSet(true); } } } } public static class deadMessageBatch_args implements libthrift091.TBase<deadMessageBatch_args, deadMessageBatch_args._Fields>, java.io.Serializable, Cloneable, Comparable<deadMessageBatch_args> { private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("deadMessageBatch_args"); private static final libthrift091.protocol.TField DEAD_MESSAGE_BATCH_REQUEST_FIELD_DESC = new libthrift091.protocol.TField("deadMessageBatchRequest", libthrift091.protocol.TType.STRUCT, (short)1); private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new deadMessageBatch_argsStandardSchemeFactory()); schemes.put(TupleScheme.class, new deadMessageBatch_argsTupleSchemeFactory()); } public DeadMessageBatchRequest deadMessageBatchRequest; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements libthrift091.TFieldIdEnum { DEAD_MESSAGE_BATCH_REQUEST((short)1, "deadMessageBatchRequest"); private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // DEAD_MESSAGE_BATCH_REQUEST return DEAD_MESSAGE_BATCH_REQUEST; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } // isset id assignments public static final Map<_Fields, libthrift091.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, libthrift091.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, libthrift091.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.DEAD_MESSAGE_BATCH_REQUEST, new libthrift091.meta_data.FieldMetaData("deadMessageBatchRequest", libthrift091.TFieldRequirementType.DEFAULT, new libthrift091.meta_data.StructMetaData(libthrift091.protocol.TType.STRUCT, DeadMessageBatchRequest.class))); metaDataMap = Collections.unmodifiableMap(tmpMap); libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(deadMessageBatch_args.class, metaDataMap); } public deadMessageBatch_args() { } public deadMessageBatch_args( DeadMessageBatchRequest deadMessageBatchRequest) { this(); this.deadMessageBatchRequest = deadMessageBatchRequest; } /** * Performs a deep copy on <i>other</i>. */ public deadMessageBatch_args(deadMessageBatch_args other) { if (other.isSetDeadMessageBatchRequest()) { this.deadMessageBatchRequest = new DeadMessageBatchRequest(other.deadMessageBatchRequest); } } public deadMessageBatch_args deepCopy() { return new deadMessageBatch_args(this); } @Override public void clear() { this.deadMessageBatchRequest = null; } public DeadMessageBatchRequest getDeadMessageBatchRequest() { return this.deadMessageBatchRequest; } public deadMessageBatch_args setDeadMessageBatchRequest(DeadMessageBatchRequest deadMessageBatchRequest) { this.deadMessageBatchRequest = deadMessageBatchRequest; return this; } public void unsetDeadMessageBatchRequest() { this.deadMessageBatchRequest = null; } /** Returns true if field deadMessageBatchRequest is set (has been assigned a value) and false otherwise */ public boolean isSetDeadMessageBatchRequest() { return this.deadMessageBatchRequest != null; } public void setDeadMessageBatchRequestIsSet(boolean value) { if (!value) { this.deadMessageBatchRequest = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case DEAD_MESSAGE_BATCH_REQUEST: if (value == null) { unsetDeadMessageBatchRequest(); } else { setDeadMessageBatchRequest((DeadMessageBatchRequest)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case DEAD_MESSAGE_BATCH_REQUEST: return getDeadMessageBatchRequest(); } throw new IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new IllegalArgumentException(); } switch (field) { case DEAD_MESSAGE_BATCH_REQUEST: return isSetDeadMessageBatchRequest(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof deadMessageBatch_args) return this.equals((deadMessageBatch_args)that); return false; } public boolean equals(deadMessageBatch_args that) { if (that == null) return false; boolean this_present_deadMessageBatchRequest = true && this.isSetDeadMessageBatchRequest(); boolean that_present_deadMessageBatchRequest = true && that.isSetDeadMessageBatchRequest(); if (this_present_deadMessageBatchRequest || that_present_deadMessageBatchRequest) { if (!(this_present_deadMessageBatchRequest && that_present_deadMessageBatchRequest)) return false; if (!this.deadMessageBatchRequest.equals(that.deadMessageBatchRequest)) return false; } return true; } @Override public int hashCode() { List<Object> list = new ArrayList<Object>(); boolean present_deadMessageBatchRequest = true && (isSetDeadMessageBatchRequest()); list.add(present_deadMessageBatchRequest); if (present_deadMessageBatchRequest) list.add(deadMessageBatchRequest); return list.hashCode(); } @Override public int compareTo(deadMessageBatch_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetDeadMessageBatchRequest()).compareTo(other.isSetDeadMessageBatchRequest()); if (lastComparison != 0) { return lastComparison; } if (isSetDeadMessageBatchRequest()) { lastComparison = libthrift091.TBaseHelper.compareTo(this.deadMessageBatchRequest, other.deadMessageBatchRequest); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(libthrift091.protocol.TProtocol iprot) throws libthrift091.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(libthrift091.protocol.TProtocol oprot) throws libthrift091.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("deadMessageBatch_args("); boolean first = true; sb.append("deadMessageBatchRequest:"); if (this.deadMessageBatchRequest == null) { sb.append("null"); } else { sb.append(this.deadMessageBatchRequest); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws libthrift091.TException { // check for required fields // check for sub-struct validity if (deadMessageBatchRequest != null) { deadMessageBatchRequest.validate(); } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(out))); } catch (libthrift091.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(in))); } catch (libthrift091.TException te) { throw new java.io.IOException(te); } } private static class deadMessageBatch_argsStandardSchemeFactory implements SchemeFactory { public deadMessageBatch_argsStandardScheme getScheme() { return new deadMessageBatch_argsStandardScheme(); } } private static class deadMessageBatch_argsStandardScheme extends StandardScheme<deadMessageBatch_args> { public void read(libthrift091.protocol.TProtocol iprot, deadMessageBatch_args struct) throws libthrift091.TException { libthrift091.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == libthrift091.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // DEAD_MESSAGE_BATCH_REQUEST if (schemeField.type == libthrift091.protocol.TType.STRUCT) { struct.deadMessageBatchRequest = new DeadMessageBatchRequest(); struct.deadMessageBatchRequest.read(iprot); struct.setDeadMessageBatchRequestIsSet(true); } else { libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(libthrift091.protocol.TProtocol oprot, deadMessageBatch_args struct) throws libthrift091.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.deadMessageBatchRequest != null) { oprot.writeFieldBegin(DEAD_MESSAGE_BATCH_REQUEST_FIELD_DESC); struct.deadMessageBatchRequest.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class deadMessageBatch_argsTupleSchemeFactory implements SchemeFactory { public deadMessageBatch_argsTupleScheme getScheme() { return new deadMessageBatch_argsTupleScheme(); } } private static class deadMessageBatch_argsTupleScheme extends TupleScheme<deadMessageBatch_args> { @Override public void write(libthrift091.protocol.TProtocol prot, deadMessageBatch_args struct) throws libthrift091.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetDeadMessageBatchRequest()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetDeadMessageBatchRequest()) { struct.deadMessageBatchRequest.write(oprot); } } @Override public void read(libthrift091.protocol.TProtocol prot, deadMessageBatch_args struct) throws libthrift091.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.deadMessageBatchRequest = new DeadMessageBatchRequest(); struct.deadMessageBatchRequest.read(iprot); struct.setDeadMessageBatchRequestIsSet(true); } } } } public static class deadMessageBatch_result implements libthrift091.TBase<deadMessageBatch_result, deadMessageBatch_result._Fields>, java.io.Serializable, Cloneable, Comparable<deadMessageBatch_result> { private static final libthrift091.protocol.TStruct STRUCT_DESC = new libthrift091.protocol.TStruct("deadMessageBatch_result"); private static final libthrift091.protocol.TField SUCCESS_FIELD_DESC = new libthrift091.protocol.TField("success", libthrift091.protocol.TType.STRUCT, (short)0); private static final libthrift091.protocol.TField E_FIELD_DESC = new libthrift091.protocol.TField("e", libthrift091.protocol.TType.STRUCT, (short)1); private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new deadMessageBatch_resultStandardSchemeFactory()); schemes.put(TupleScheme.class, new deadMessageBatch_resultTupleSchemeFactory()); } public DeadMessageBatchResponse success; // required public com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException e; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements libthrift091.TFieldIdEnum { SUCCESS((short)0, "success"), E((short)1, "e"); private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 0: // SUCCESS return SUCCESS; case 1: // E return E; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } // isset id assignments public static final Map<_Fields, libthrift091.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, libthrift091.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, libthrift091.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.SUCCESS, new libthrift091.meta_data.FieldMetaData("success", libthrift091.TFieldRequirementType.DEFAULT, new libthrift091.meta_data.StructMetaData(libthrift091.protocol.TType.STRUCT, DeadMessageBatchResponse.class))); tmpMap.put(_Fields.E, new libthrift091.meta_data.FieldMetaData("e", libthrift091.TFieldRequirementType.DEFAULT, new libthrift091.meta_data.FieldValueMetaData(libthrift091.protocol.TType.STRUCT))); metaDataMap = Collections.unmodifiableMap(tmpMap); libthrift091.meta_data.FieldMetaData.addStructMetaDataMap(deadMessageBatch_result.class, metaDataMap); } public deadMessageBatch_result() { } public deadMessageBatch_result( DeadMessageBatchResponse success, com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException e) { this(); this.success = success; this.e = e; } /** * Performs a deep copy on <i>other</i>. */ public deadMessageBatch_result(deadMessageBatch_result other) { if (other.isSetSuccess()) { this.success = new DeadMessageBatchResponse(other.success); } if (other.isSetE()) { this.e = new com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException(other.e); } } public deadMessageBatch_result deepCopy() { return new deadMessageBatch_result(this); } @Override public void clear() { this.success = null; this.e = null; } public DeadMessageBatchResponse getSuccess() { return this.success; } public deadMessageBatch_result setSuccess(DeadMessageBatchResponse success) { this.success = success; return this; } public void unsetSuccess() { this.success = null; } /** Returns true if field success is set (has been assigned a value) and false otherwise */ public boolean isSetSuccess() { return this.success != null; } public void setSuccessIsSet(boolean value) { if (!value) { this.success = null; } } public com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException getE() { return this.e; } public deadMessageBatch_result setE(com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException e) { this.e = e; return this; } public void unsetE() { this.e = null; } /** Returns true if field e is set (has been assigned a value) and false otherwise */ public boolean isSetE() { return this.e != null; } public void setEIsSet(boolean value) { if (!value) { this.e = null; } } public void setFieldValue(_Fields field, Object value) { switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); } else { setSuccess((DeadMessageBatchResponse)value); } break; case E: if (value == null) { unsetE(); } else { setE((com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SUCCESS: return getSuccess(); case E: return getE(); } throw new IllegalStateException(); } /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new IllegalArgumentException(); } switch (field) { case SUCCESS: return isSetSuccess(); case E: return isSetE(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof deadMessageBatch_result) return this.equals((deadMessageBatch_result)that); return false; } public boolean equals(deadMessageBatch_result that) { if (that == null) return false; boolean this_present_success = true && this.isSetSuccess(); boolean that_present_success = true && that.isSetSuccess(); if (this_present_success || that_present_success) { if (!(this_present_success && that_present_success)) return false; if (!this.success.equals(that.success)) return false; } boolean this_present_e = true && this.isSetE(); boolean that_present_e = true && that.isSetE(); if (this_present_e || that_present_e) { if (!(this_present_e && that_present_e)) return false; if (!this.e.equals(that.e)) return false; } return true; } @Override public int hashCode() { List<Object> list = new ArrayList<Object>(); boolean present_success = true && (isSetSuccess()); list.add(present_success); if (present_success) list.add(success); boolean present_e = true && (isSetE()); list.add(present_e); if (present_e) list.add(e); return list.hashCode(); } @Override public int compareTo(deadMessageBatch_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { lastComparison = libthrift091.TBaseHelper.compareTo(this.success, other.success); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetE()).compareTo(other.isSetE()); if (lastComparison != 0) { return lastComparison; } if (isSetE()) { lastComparison = libthrift091.TBaseHelper.compareTo(this.e, other.e); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(libthrift091.protocol.TProtocol iprot) throws libthrift091.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(libthrift091.protocol.TProtocol oprot) throws libthrift091.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("deadMessageBatch_result("); boolean first = true; sb.append("success:"); if (this.success == null) { sb.append("null"); } else { sb.append(this.success); } first = false; if (!first) sb.append(", "); sb.append("e:"); if (this.e == null) { sb.append("null"); } else { sb.append(this.e); } first = false; sb.append(")"); return sb.toString(); } public void validate() throws libthrift091.TException { // check for required fields // check for sub-struct validity if (success != null) { success.validate(); } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(out))); } catch (libthrift091.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { read(new libthrift091.protocol.TCompactProtocol(new libthrift091.transport.TIOStreamTransport(in))); } catch (libthrift091.TException te) { throw new java.io.IOException(te); } } private static class deadMessageBatch_resultStandardSchemeFactory implements SchemeFactory { public deadMessageBatch_resultStandardScheme getScheme() { return new deadMessageBatch_resultStandardScheme(); } } private static class deadMessageBatch_resultStandardScheme extends StandardScheme<deadMessageBatch_result> { public void read(libthrift091.protocol.TProtocol iprot, deadMessageBatch_result struct) throws libthrift091.TException { libthrift091.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == libthrift091.protocol.TType.STOP) { break; } switch (schemeField.id) { case 0: // SUCCESS if (schemeField.type == libthrift091.protocol.TType.STRUCT) { struct.success = new DeadMessageBatchResponse(); struct.success.read(iprot); struct.setSuccessIsSet(true); } else { libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 1: // E if (schemeField.type == libthrift091.protocol.TType.STRUCT) { struct.e = new com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException(); struct.e.read(iprot); struct.setEIsSet(true); } else { libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: libthrift091.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(libthrift091.protocol.TProtocol oprot, deadMessageBatch_result struct) throws libthrift091.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.success != null) { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); struct.success.write(oprot); oprot.writeFieldEnd(); } if (struct.e != null) { oprot.writeFieldBegin(E_FIELD_DESC); struct.e.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class deadMessageBatch_resultTupleSchemeFactory implements SchemeFactory { public deadMessageBatch_resultTupleScheme getScheme() { return new deadMessageBatch_resultTupleScheme(); } } private static class deadMessageBatch_resultTupleScheme extends TupleScheme<deadMessageBatch_result> { @Override public void write(libthrift091.protocol.TProtocol prot, deadMessageBatch_result struct) throws libthrift091.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetSuccess()) { optionals.set(0); } if (struct.isSetE()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetSuccess()) { struct.success.write(oprot); } if (struct.isSetE()) { struct.e.write(oprot); } } @Override public void read(libthrift091.protocol.TProtocol prot, deadMessageBatch_result struct) throws libthrift091.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { struct.success = new DeadMessageBatchResponse(); struct.success.read(iprot); struct.setSuccessIsSet(true); } if (incoming.get(1)) { struct.e = new com.xiaomi.infra.galaxy.emq.thrift.GalaxyEmqServiceException(); struct.e.read(iprot); struct.setEIsSet(true); } } } } }