/**
* Autogenerated by Thrift Compiler (0.9.1)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.wso2.carbon.databridge.commons.thrift.service.secure;
import org.apache.thrift.scheme.IScheme;
import org.apache.thrift.scheme.SchemeFactory;
import org.apache.thrift.scheme.StandardScheme;
import org.apache.thrift.scheme.TupleScheme;
import org.apache.thrift.protocol.TTupleProtocol;
import org.apache.thrift.protocol.TProtocolException;
import org.apache.thrift.EncodingUtils;
import org.apache.thrift.TException;
import org.apache.thrift.async.AsyncMethodCallback;
import org.apache.thrift.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 org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class ThriftSecureEventTransmissionService {
public interface Iface {
public String connect(String userName, String password) throws org.wso2.carbon.databridge.commons.thrift.exception.ThriftAuthenticationException, TException;
public void disconnect(String sessionId) throws TException;
public String defineStream(String sessionId, String streamDefinition) throws org.wso2.carbon.databridge.commons.thrift.exception.ThriftDifferentStreamDefinitionAlreadyDefinedException, org.wso2.carbon.databridge.commons.thrift.exception.ThriftMalformedStreamDefinitionException, org.wso2.carbon.databridge.commons.thrift.exception.ThriftStreamDefinitionException, org.wso2.carbon.databridge.commons.thrift.exception.ThriftSessionExpiredException, TException;
public String findStreamId(String sessionId, String streamName, String streamVersion) throws org.wso2.carbon.databridge.commons.thrift.exception.ThriftNoStreamDefinitionExistException, org.wso2.carbon.databridge.commons.thrift.exception.ThriftSessionExpiredException, TException;
public void publish(org.wso2.carbon.databridge.commons.thrift.data.ThriftEventBundle eventBundle) throws org.wso2.carbon.databridge.commons.thrift.exception.ThriftUndefinedEventTypeException, org.wso2.carbon.databridge.commons.thrift.exception.ThriftSessionExpiredException, TException;
public boolean deleteStreamById(String sessionId, String streamId) throws org.wso2.carbon.databridge.commons.thrift.exception.ThriftSessionExpiredException, TException;
public boolean deleteStreamByNameVersion(String sessionId, String streamName, String streamVersion) throws org.wso2.carbon.databridge.commons.thrift.exception.ThriftSessionExpiredException, TException;
}
public interface AsyncIface {
public void connect(String userName, String password, AsyncMethodCallback resultHandler) throws TException;
public void disconnect(String sessionId, AsyncMethodCallback resultHandler) throws TException;
public void defineStream(String sessionId, String streamDefinition, AsyncMethodCallback resultHandler) throws TException;
public void findStreamId(String sessionId, String streamName, String streamVersion, AsyncMethodCallback resultHandler) throws TException;
public void publish(org.wso2.carbon.databridge.commons.thrift.data.ThriftEventBundle eventBundle, AsyncMethodCallback resultHandler) throws TException;
public void deleteStreamById(String sessionId, String streamId, AsyncMethodCallback resultHandler) throws TException;
public void deleteStreamByNameVersion(String sessionId, String streamName, String streamVersion, AsyncMethodCallback resultHandler) throws TException;
}
public static class Client extends org.apache.thrift.TServiceClient implements Iface {
public static class Factory implements org.apache.thrift.TServiceClientFactory<Client> {
public Factory() {}
public Client getClient(org.apache.thrift.protocol.TProtocol prot) {
return new Client(prot);
}
public Client getClient(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {
return new Client(iprot, oprot);
}
}
public Client(org.apache.thrift.protocol.TProtocol prot)
{
super(prot, prot);
}
public Client(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {
super(iprot, oprot);
}
public String connect(String userName, String password) throws org.wso2.carbon.databridge.commons.thrift.exception.ThriftAuthenticationException, TException
{
send_connect(userName, password);
return recv_connect();
}
public void send_connect(String userName, String password) throws TException
{
connect_args args = new connect_args();
args.setUserName(userName);
args.setPassword(password);
sendBase("connect", args);
}
public String recv_connect() throws org.wso2.carbon.databridge.commons.thrift.exception.ThriftAuthenticationException, TException
{
connect_result result = new connect_result();
receiveBase(result, "connect");
if (result.isSetSuccess()) {
return result.success;
}
if (result.ae != null) {
throw result.ae;
}
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "connect failed: unknown result");
}
public void disconnect(String sessionId) throws TException
{
send_disconnect(sessionId);
recv_disconnect();
}
public void send_disconnect(String sessionId) throws TException
{
disconnect_args args = new disconnect_args();
args.setSessionId(sessionId);
sendBase("disconnect", args);
}
public void recv_disconnect() throws TException
{
disconnect_result result = new disconnect_result();
receiveBase(result, "disconnect");
return;
}
public String defineStream(String sessionId, String streamDefinition) throws org.wso2.carbon.databridge.commons.thrift.exception.ThriftDifferentStreamDefinitionAlreadyDefinedException, org.wso2.carbon.databridge.commons.thrift.exception.ThriftMalformedStreamDefinitionException, org.wso2.carbon.databridge.commons.thrift.exception.ThriftStreamDefinitionException, org.wso2.carbon.databridge.commons.thrift.exception.ThriftSessionExpiredException, TException
{
send_defineStream(sessionId, streamDefinition);
return recv_defineStream();
}
public void send_defineStream(String sessionId, String streamDefinition) throws TException
{
defineStream_args args = new defineStream_args();
args.setSessionId(sessionId);
args.setStreamDefinition(streamDefinition);
sendBase("defineStream", args);
}
public String recv_defineStream() throws org.wso2.carbon.databridge.commons.thrift.exception.ThriftDifferentStreamDefinitionAlreadyDefinedException, org.wso2.carbon.databridge.commons.thrift.exception.ThriftMalformedStreamDefinitionException, org.wso2.carbon.databridge.commons.thrift.exception.ThriftStreamDefinitionException, org.wso2.carbon.databridge.commons.thrift.exception.ThriftSessionExpiredException, TException
{
defineStream_result result = new defineStream_result();
receiveBase(result, "defineStream");
if (result.isSetSuccess()) {
return result.success;
}
if (result.ade != null) {
throw result.ade;
}
if (result.mtd != null) {
throw result.mtd;
}
if (result.tde != null) {
throw result.tde;
}
if (result.se != null) {
throw result.se;
}
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "defineStream failed: unknown result");
}
public String findStreamId(String sessionId, String streamName, String streamVersion) throws org.wso2.carbon.databridge.commons.thrift.exception.ThriftNoStreamDefinitionExistException, org.wso2.carbon.databridge.commons.thrift.exception.ThriftSessionExpiredException, TException
{
send_findStreamId(sessionId, streamName, streamVersion);
return recv_findStreamId();
}
public void send_findStreamId(String sessionId, String streamName, String streamVersion) throws TException
{
findStreamId_args args = new findStreamId_args();
args.setSessionId(sessionId);
args.setStreamName(streamName);
args.setStreamVersion(streamVersion);
sendBase("findStreamId", args);
}
public String recv_findStreamId() throws org.wso2.carbon.databridge.commons.thrift.exception.ThriftNoStreamDefinitionExistException, org.wso2.carbon.databridge.commons.thrift.exception.ThriftSessionExpiredException, TException
{
findStreamId_result result = new findStreamId_result();
receiveBase(result, "findStreamId");
if (result.isSetSuccess()) {
return result.success;
}
if (result.tnde != null) {
throw result.tnde;
}
if (result.se != null) {
throw result.se;
}
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "findStreamId failed: unknown result");
}
public void publish(org.wso2.carbon.databridge.commons.thrift.data.ThriftEventBundle eventBundle) throws org.wso2.carbon.databridge.commons.thrift.exception.ThriftUndefinedEventTypeException, org.wso2.carbon.databridge.commons.thrift.exception.ThriftSessionExpiredException, TException
{
send_publish(eventBundle);
recv_publish();
}
public void send_publish(org.wso2.carbon.databridge.commons.thrift.data.ThriftEventBundle eventBundle) throws TException
{
publish_args args = new publish_args();
args.setEventBundle(eventBundle);
sendBase("publish", args);
}
public void recv_publish() throws org.wso2.carbon.databridge.commons.thrift.exception.ThriftUndefinedEventTypeException, org.wso2.carbon.databridge.commons.thrift.exception.ThriftSessionExpiredException, TException
{
publish_result result = new publish_result();
receiveBase(result, "publish");
if (result.ue != null) {
throw result.ue;
}
if (result.se != null) {
throw result.se;
}
return;
}
public boolean deleteStreamById(String sessionId, String streamId) throws org.wso2.carbon.databridge.commons.thrift.exception.ThriftSessionExpiredException, TException
{
send_deleteStreamById(sessionId, streamId);
return recv_deleteStreamById();
}
public void send_deleteStreamById(String sessionId, String streamId) throws TException
{
deleteStreamById_args args = new deleteStreamById_args();
args.setSessionId(sessionId);
args.setStreamId(streamId);
sendBase("deleteStreamById", args);
}
public boolean recv_deleteStreamById() throws org.wso2.carbon.databridge.commons.thrift.exception.ThriftSessionExpiredException, TException
{
deleteStreamById_result result = new deleteStreamById_result();
receiveBase(result, "deleteStreamById");
if (result.isSetSuccess()) {
return result.success;
}
if (result.se != null) {
throw result.se;
}
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "deleteStreamById failed: unknown result");
}
public boolean deleteStreamByNameVersion(String sessionId, String streamName, String streamVersion) throws org.wso2.carbon.databridge.commons.thrift.exception.ThriftSessionExpiredException, TException
{
send_deleteStreamByNameVersion(sessionId, streamName, streamVersion);
return recv_deleteStreamByNameVersion();
}
public void send_deleteStreamByNameVersion(String sessionId, String streamName, String streamVersion) throws TException
{
deleteStreamByNameVersion_args args = new deleteStreamByNameVersion_args();
args.setSessionId(sessionId);
args.setStreamName(streamName);
args.setStreamVersion(streamVersion);
sendBase("deleteStreamByNameVersion", args);
}
public boolean recv_deleteStreamByNameVersion() throws org.wso2.carbon.databridge.commons.thrift.exception.ThriftSessionExpiredException, TException
{
deleteStreamByNameVersion_result result = new deleteStreamByNameVersion_result();
receiveBase(result, "deleteStreamByNameVersion");
if (result.isSetSuccess()) {
return result.success;
}
if (result.se != null) {
throw result.se;
}
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "deleteStreamByNameVersion failed: unknown result");
}
}
public static class AsyncClient extends org.apache.thrift.async.TAsyncClient implements AsyncIface {
public static class Factory implements org.apache.thrift.async.TAsyncClientFactory<AsyncClient> {
private org.apache.thrift.async.TAsyncClientManager clientManager;
private org.apache.thrift.protocol.TProtocolFactory protocolFactory;
public Factory(org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.protocol.TProtocolFactory protocolFactory) {
this.clientManager = clientManager;
this.protocolFactory = protocolFactory;
}
public AsyncClient getAsyncClient(org.apache.thrift.transport.TNonblockingTransport transport) {
return new AsyncClient(protocolFactory, clientManager, transport);
}
}
public AsyncClient(org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.transport.TNonblockingTransport transport) {
super(protocolFactory, clientManager, transport);
}
public void connect(String userName, String password, AsyncMethodCallback resultHandler) throws TException {
checkReady();
connect_call method_call = new connect_call(userName, password, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class connect_call extends org.apache.thrift.async.TAsyncMethodCall {
private String userName;
private String password;
public connect_call(String userName, String password, AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws TException {
super(client, protocolFactory, transport, resultHandler, false);
this.userName = userName;
this.password = password;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("connect", org.apache.thrift.protocol.TMessageType.CALL, 0));
connect_args args = new connect_args();
args.setUserName(userName);
args.setPassword(password);
args.write(prot);
prot.writeMessageEnd();
}
public String getResult() throws org.wso2.carbon.databridge.commons.thrift.exception.ThriftAuthenticationException, TException {
if (getState() != State.RESPONSE_READ) {
throw new IllegalStateException("Method call not finished!");
}
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
return (new Client(prot)).recv_connect();
}
}
public void disconnect(String sessionId, AsyncMethodCallback resultHandler) throws TException {
checkReady();
disconnect_call method_call = new disconnect_call(sessionId, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class disconnect_call extends org.apache.thrift.async.TAsyncMethodCall {
private String sessionId;
public disconnect_call(String sessionId, AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws TException {
super(client, protocolFactory, transport, resultHandler, false);
this.sessionId = sessionId;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("disconnect", org.apache.thrift.protocol.TMessageType.CALL, 0));
disconnect_args args = new disconnect_args();
args.setSessionId(sessionId);
args.write(prot);
prot.writeMessageEnd();
}
public void getResult() throws TException {
if (getState() != State.RESPONSE_READ) {
throw new IllegalStateException("Method call not finished!");
}
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
(new Client(prot)).recv_disconnect();
}
}
public void defineStream(String sessionId, String streamDefinition, AsyncMethodCallback resultHandler) throws TException {
checkReady();
defineStream_call method_call = new defineStream_call(sessionId, streamDefinition, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class defineStream_call extends org.apache.thrift.async.TAsyncMethodCall {
private String sessionId;
private String streamDefinition;
public defineStream_call(String sessionId, String streamDefinition, AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws TException {
super(client, protocolFactory, transport, resultHandler, false);
this.sessionId = sessionId;
this.streamDefinition = streamDefinition;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("defineStream", org.apache.thrift.protocol.TMessageType.CALL, 0));
defineStream_args args = new defineStream_args();
args.setSessionId(sessionId);
args.setStreamDefinition(streamDefinition);
args.write(prot);
prot.writeMessageEnd();
}
public String getResult() throws org.wso2.carbon.databridge.commons.thrift.exception.ThriftDifferentStreamDefinitionAlreadyDefinedException, org.wso2.carbon.databridge.commons.thrift.exception.ThriftMalformedStreamDefinitionException, org.wso2.carbon.databridge.commons.thrift.exception.ThriftStreamDefinitionException, org.wso2.carbon.databridge.commons.thrift.exception.ThriftSessionExpiredException, TException {
if (getState() != State.RESPONSE_READ) {
throw new IllegalStateException("Method call not finished!");
}
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
return (new Client(prot)).recv_defineStream();
}
}
public void findStreamId(String sessionId, String streamName, String streamVersion, AsyncMethodCallback resultHandler) throws TException {
checkReady();
findStreamId_call method_call = new findStreamId_call(sessionId, streamName, streamVersion, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class findStreamId_call extends org.apache.thrift.async.TAsyncMethodCall {
private String sessionId;
private String streamName;
private String streamVersion;
public findStreamId_call(String sessionId, String streamName, String streamVersion, AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws TException {
super(client, protocolFactory, transport, resultHandler, false);
this.sessionId = sessionId;
this.streamName = streamName;
this.streamVersion = streamVersion;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("findStreamId", org.apache.thrift.protocol.TMessageType.CALL, 0));
findStreamId_args args = new findStreamId_args();
args.setSessionId(sessionId);
args.setStreamName(streamName);
args.setStreamVersion(streamVersion);
args.write(prot);
prot.writeMessageEnd();
}
public String getResult() throws org.wso2.carbon.databridge.commons.thrift.exception.ThriftNoStreamDefinitionExistException, org.wso2.carbon.databridge.commons.thrift.exception.ThriftSessionExpiredException, TException {
if (getState() != State.RESPONSE_READ) {
throw new IllegalStateException("Method call not finished!");
}
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
return (new Client(prot)).recv_findStreamId();
}
}
public void publish(org.wso2.carbon.databridge.commons.thrift.data.ThriftEventBundle eventBundle, AsyncMethodCallback resultHandler) throws TException {
checkReady();
publish_call method_call = new publish_call(eventBundle, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class publish_call extends org.apache.thrift.async.TAsyncMethodCall {
private org.wso2.carbon.databridge.commons.thrift.data.ThriftEventBundle eventBundle;
public publish_call(org.wso2.carbon.databridge.commons.thrift.data.ThriftEventBundle eventBundle, AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws TException {
super(client, protocolFactory, transport, resultHandler, false);
this.eventBundle = eventBundle;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("publish", org.apache.thrift.protocol.TMessageType.CALL, 0));
publish_args args = new publish_args();
args.setEventBundle(eventBundle);
args.write(prot);
prot.writeMessageEnd();
}
public void getResult() throws org.wso2.carbon.databridge.commons.thrift.exception.ThriftUndefinedEventTypeException, org.wso2.carbon.databridge.commons.thrift.exception.ThriftSessionExpiredException, TException {
if (getState() != State.RESPONSE_READ) {
throw new IllegalStateException("Method call not finished!");
}
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
(new Client(prot)).recv_publish();
}
}
public void deleteStreamById(String sessionId, String streamId, AsyncMethodCallback resultHandler) throws TException {
checkReady();
deleteStreamById_call method_call = new deleteStreamById_call(sessionId, streamId, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class deleteStreamById_call extends org.apache.thrift.async.TAsyncMethodCall {
private String sessionId;
private String streamId;
public deleteStreamById_call(String sessionId, String streamId, AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws TException {
super(client, protocolFactory, transport, resultHandler, false);
this.sessionId = sessionId;
this.streamId = streamId;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("deleteStreamById", org.apache.thrift.protocol.TMessageType.CALL, 0));
deleteStreamById_args args = new deleteStreamById_args();
args.setSessionId(sessionId);
args.setStreamId(streamId);
args.write(prot);
prot.writeMessageEnd();
}
public boolean getResult() throws org.wso2.carbon.databridge.commons.thrift.exception.ThriftSessionExpiredException, TException {
if (getState() != State.RESPONSE_READ) {
throw new IllegalStateException("Method call not finished!");
}
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
return (new Client(prot)).recv_deleteStreamById();
}
}
public void deleteStreamByNameVersion(String sessionId, String streamName, String streamVersion, AsyncMethodCallback resultHandler) throws TException {
checkReady();
deleteStreamByNameVersion_call method_call = new deleteStreamByNameVersion_call(sessionId, streamName, streamVersion, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class deleteStreamByNameVersion_call extends org.apache.thrift.async.TAsyncMethodCall {
private String sessionId;
private String streamName;
private String streamVersion;
public deleteStreamByNameVersion_call(String sessionId, String streamName, String streamVersion, AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws TException {
super(client, protocolFactory, transport, resultHandler, false);
this.sessionId = sessionId;
this.streamName = streamName;
this.streamVersion = streamVersion;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("deleteStreamByNameVersion", org.apache.thrift.protocol.TMessageType.CALL, 0));
deleteStreamByNameVersion_args args = new deleteStreamByNameVersion_args();
args.setSessionId(sessionId);
args.setStreamName(streamName);
args.setStreamVersion(streamVersion);
args.write(prot);
prot.writeMessageEnd();
}
public boolean getResult() throws org.wso2.carbon.databridge.commons.thrift.exception.ThriftSessionExpiredException, TException {
if (getState() != State.RESPONSE_READ) {
throw new IllegalStateException("Method call not finished!");
}
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
return (new Client(prot)).recv_deleteStreamByNameVersion();
}
}
}
public static class Processor<I extends Iface> extends org.apache.thrift.TBaseProcessor<I> implements org.apache.thrift.TProcessor {
private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
public Processor(I iface) {
super(iface, getProcessMap(new HashMap<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>>()));
}
protected Processor(I iface, Map<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> processMap) {
super(iface, getProcessMap(processMap));
}
private static <I extends Iface> Map<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> getProcessMap(Map<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> processMap) {
processMap.put("connect", new connect());
processMap.put("disconnect", new disconnect());
processMap.put("defineStream", new defineStream());
processMap.put("findStreamId", new findStreamId());
processMap.put("publish", new publish());
processMap.put("deleteStreamById", new deleteStreamById());
processMap.put("deleteStreamByNameVersion", new deleteStreamByNameVersion());
return processMap;
}
public static class connect<I extends Iface> extends org.apache.thrift.ProcessFunction<I, connect_args> {
public connect() {
super("connect");
}
public connect_args getEmptyArgsInstance() {
return new connect_args();
}
protected boolean isOneway() {
return false;
}
public connect_result getResult(I iface, connect_args args) throws TException {
connect_result result = new connect_result();
try {
result.success = iface.connect(args.userName, args.password);
} catch (org.wso2.carbon.databridge.commons.thrift.exception.ThriftAuthenticationException ae) {
result.ae = ae;
}
return result;
}
}
public static class disconnect<I extends Iface> extends org.apache.thrift.ProcessFunction<I, disconnect_args> {
public disconnect() {
super("disconnect");
}
public disconnect_args getEmptyArgsInstance() {
return new disconnect_args();
}
protected boolean isOneway() {
return false;
}
public disconnect_result getResult(I iface, disconnect_args args) throws TException {
disconnect_result result = new disconnect_result();
iface.disconnect(args.sessionId);
return result;
}
}
public static class defineStream<I extends Iface> extends org.apache.thrift.ProcessFunction<I, defineStream_args> {
public defineStream() {
super("defineStream");
}
public defineStream_args getEmptyArgsInstance() {
return new defineStream_args();
}
protected boolean isOneway() {
return false;
}
public defineStream_result getResult(I iface, defineStream_args args) throws TException {
defineStream_result result = new defineStream_result();
try {
result.success = iface.defineStream(args.sessionId, args.streamDefinition);
} catch (org.wso2.carbon.databridge.commons.thrift.exception.ThriftDifferentStreamDefinitionAlreadyDefinedException ade) {
result.ade = ade;
} catch (org.wso2.carbon.databridge.commons.thrift.exception.ThriftMalformedStreamDefinitionException mtd) {
result.mtd = mtd;
} catch (org.wso2.carbon.databridge.commons.thrift.exception.ThriftStreamDefinitionException tde) {
result.tde = tde;
} catch (org.wso2.carbon.databridge.commons.thrift.exception.ThriftSessionExpiredException se) {
result.se = se;
}
return result;
}
}
public static class findStreamId<I extends Iface> extends org.apache.thrift.ProcessFunction<I, findStreamId_args> {
public findStreamId() {
super("findStreamId");
}
public findStreamId_args getEmptyArgsInstance() {
return new findStreamId_args();
}
protected boolean isOneway() {
return false;
}
public findStreamId_result getResult(I iface, findStreamId_args args) throws TException {
findStreamId_result result = new findStreamId_result();
try {
result.success = iface.findStreamId(args.sessionId, args.streamName, args.streamVersion);
} catch (org.wso2.carbon.databridge.commons.thrift.exception.ThriftNoStreamDefinitionExistException tnde) {
result.tnde = tnde;
} catch (org.wso2.carbon.databridge.commons.thrift.exception.ThriftSessionExpiredException se) {
result.se = se;
}
return result;
}
}
public static class publish<I extends Iface> extends org.apache.thrift.ProcessFunction<I, publish_args> {
public publish() {
super("publish");
}
public publish_args getEmptyArgsInstance() {
return new publish_args();
}
protected boolean isOneway() {
return false;
}
public publish_result getResult(I iface, publish_args args) throws TException {
publish_result result = new publish_result();
try {
iface.publish(args.eventBundle);
} catch (org.wso2.carbon.databridge.commons.thrift.exception.ThriftUndefinedEventTypeException ue) {
result.ue = ue;
} catch (org.wso2.carbon.databridge.commons.thrift.exception.ThriftSessionExpiredException se) {
result.se = se;
}
return result;
}
}
public static class deleteStreamById<I extends Iface> extends org.apache.thrift.ProcessFunction<I, deleteStreamById_args> {
public deleteStreamById() {
super("deleteStreamById");
}
public deleteStreamById_args getEmptyArgsInstance() {
return new deleteStreamById_args();
}
protected boolean isOneway() {
return false;
}
public deleteStreamById_result getResult(I iface, deleteStreamById_args args) throws TException {
deleteStreamById_result result = new deleteStreamById_result();
try {
result.success = iface.deleteStreamById(args.sessionId, args.streamId);
result.setSuccessIsSet(true);
} catch (org.wso2.carbon.databridge.commons.thrift.exception.ThriftSessionExpiredException se) {
result.se = se;
}
return result;
}
}
public static class deleteStreamByNameVersion<I extends Iface> extends org.apache.thrift.ProcessFunction<I, deleteStreamByNameVersion_args> {
public deleteStreamByNameVersion() {
super("deleteStreamByNameVersion");
}
public deleteStreamByNameVersion_args getEmptyArgsInstance() {
return new deleteStreamByNameVersion_args();
}
protected boolean isOneway() {
return false;
}
public deleteStreamByNameVersion_result getResult(I iface, deleteStreamByNameVersion_args args) throws TException {
deleteStreamByNameVersion_result result = new deleteStreamByNameVersion_result();
try {
result.success = iface.deleteStreamByNameVersion(args.sessionId, args.streamName, args.streamVersion);
result.setSuccessIsSet(true);
} catch (org.wso2.carbon.databridge.commons.thrift.exception.ThriftSessionExpiredException se) {
result.se = se;
}
return result;
}
}
}
public static class AsyncProcessor<I extends AsyncIface> extends org.apache.thrift.TBaseAsyncProcessor<I> {
private static final Logger LOGGER = LoggerFactory.getLogger(AsyncProcessor.class.getName());
public AsyncProcessor(I iface) {
super(iface, getProcessMap(new HashMap<String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase, ?>>()));
}
protected AsyncProcessor(I iface, Map<String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase, ?>> processMap) {
super(iface, getProcessMap(processMap));
}
private static <I extends AsyncIface> Map<String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase,?>> getProcessMap(Map<String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase, ?>> processMap) {
processMap.put("connect", new connect());
processMap.put("disconnect", new disconnect());
processMap.put("defineStream", new defineStream());
processMap.put("findStreamId", new findStreamId());
processMap.put("publish", new publish());
processMap.put("deleteStreamById", new deleteStreamById());
processMap.put("deleteStreamByNameVersion", new deleteStreamByNameVersion());
return processMap;
}
public static class connect<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, connect_args, String> {
public connect() {
super("connect");
}
public connect_args getEmptyArgsInstance() {
return new connect_args();
}
public AsyncMethodCallback<String> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
return new AsyncMethodCallback<String>() {
public void onComplete(String o) {
connect_result result = new connect_result();
result.success = o;
try {
fcall.sendResponse(fb,result, org.apache.thrift.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 = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TBase msg;
connect_result result = new connect_result();
if (e instanceof org.wso2.carbon.databridge.commons.thrift.exception.ThriftAuthenticationException) {
result.ae = (org.wso2.carbon.databridge.commons.thrift.exception.ThriftAuthenticationException) e;
result.setAeIsSet(true);
msg = result;
}
else
{
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.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, connect_args args, AsyncMethodCallback<String> resultHandler) throws TException {
iface.connect(args.userName, args.password,resultHandler);
}
}
public static class disconnect<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, disconnect_args, Void> {
public disconnect() {
super("disconnect");
}
public disconnect_args getEmptyArgsInstance() {
return new disconnect_args();
}
public AsyncMethodCallback<Void> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
return new AsyncMethodCallback<Void>() {
public void onComplete(Void o) {
disconnect_result result = new disconnect_result();
try {
fcall.sendResponse(fb,result, org.apache.thrift.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 = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TBase msg;
disconnect_result result = new disconnect_result();
{
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.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, disconnect_args args, AsyncMethodCallback<Void> resultHandler) throws TException {
iface.disconnect(args.sessionId,resultHandler);
}
}
public static class defineStream<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, defineStream_args, String> {
public defineStream() {
super("defineStream");
}
public defineStream_args getEmptyArgsInstance() {
return new defineStream_args();
}
public AsyncMethodCallback<String> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
return new AsyncMethodCallback<String>() {
public void onComplete(String o) {
defineStream_result result = new defineStream_result();
result.success = o;
try {
fcall.sendResponse(fb,result, org.apache.thrift.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 = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TBase msg;
defineStream_result result = new defineStream_result();
if (e instanceof org.wso2.carbon.databridge.commons.thrift.exception.ThriftDifferentStreamDefinitionAlreadyDefinedException) {
result.ade = (org.wso2.carbon.databridge.commons.thrift.exception.ThriftDifferentStreamDefinitionAlreadyDefinedException) e;
result.setAdeIsSet(true);
msg = result;
}
else if (e instanceof org.wso2.carbon.databridge.commons.thrift.exception.ThriftMalformedStreamDefinitionException) {
result.mtd = (org.wso2.carbon.databridge.commons.thrift.exception.ThriftMalformedStreamDefinitionException) e;
result.setMtdIsSet(true);
msg = result;
}
else if (e instanceof org.wso2.carbon.databridge.commons.thrift.exception.ThriftStreamDefinitionException) {
result.tde = (org.wso2.carbon.databridge.commons.thrift.exception.ThriftStreamDefinitionException) e;
result.setTdeIsSet(true);
msg = result;
}
else if (e instanceof org.wso2.carbon.databridge.commons.thrift.exception.ThriftSessionExpiredException) {
result.se = (org.wso2.carbon.databridge.commons.thrift.exception.ThriftSessionExpiredException) e;
result.setSeIsSet(true);
msg = result;
}
else
{
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.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, defineStream_args args, AsyncMethodCallback<String> resultHandler) throws TException {
iface.defineStream(args.sessionId, args.streamDefinition,resultHandler);
}
}
public static class findStreamId<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, findStreamId_args, String> {
public findStreamId() {
super("findStreamId");
}
public findStreamId_args getEmptyArgsInstance() {
return new findStreamId_args();
}
public AsyncMethodCallback<String> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
return new AsyncMethodCallback<String>() {
public void onComplete(String o) {
findStreamId_result result = new findStreamId_result();
result.success = o;
try {
fcall.sendResponse(fb,result, org.apache.thrift.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 = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TBase msg;
findStreamId_result result = new findStreamId_result();
if (e instanceof org.wso2.carbon.databridge.commons.thrift.exception.ThriftNoStreamDefinitionExistException) {
result.tnde = (org.wso2.carbon.databridge.commons.thrift.exception.ThriftNoStreamDefinitionExistException) e;
result.setTndeIsSet(true);
msg = result;
}
else if (e instanceof org.wso2.carbon.databridge.commons.thrift.exception.ThriftSessionExpiredException) {
result.se = (org.wso2.carbon.databridge.commons.thrift.exception.ThriftSessionExpiredException) e;
result.setSeIsSet(true);
msg = result;
}
else
{
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.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, findStreamId_args args, AsyncMethodCallback<String> resultHandler) throws TException {
iface.findStreamId(args.sessionId, args.streamName, args.streamVersion,resultHandler);
}
}
public static class publish<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, publish_args, Void> {
public publish() {
super("publish");
}
public publish_args getEmptyArgsInstance() {
return new publish_args();
}
public AsyncMethodCallback<Void> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
return new AsyncMethodCallback<Void>() {
public void onComplete(Void o) {
publish_result result = new publish_result();
try {
fcall.sendResponse(fb,result, org.apache.thrift.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 = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TBase msg;
publish_result result = new publish_result();
if (e instanceof org.wso2.carbon.databridge.commons.thrift.exception.ThriftUndefinedEventTypeException) {
result.ue = (org.wso2.carbon.databridge.commons.thrift.exception.ThriftUndefinedEventTypeException) e;
result.setUeIsSet(true);
msg = result;
}
else if (e instanceof org.wso2.carbon.databridge.commons.thrift.exception.ThriftSessionExpiredException) {
result.se = (org.wso2.carbon.databridge.commons.thrift.exception.ThriftSessionExpiredException) e;
result.setSeIsSet(true);
msg = result;
}
else
{
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.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, publish_args args, AsyncMethodCallback<Void> resultHandler) throws TException {
iface.publish(args.eventBundle,resultHandler);
}
}
public static class deleteStreamById<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, deleteStreamById_args, Boolean> {
public deleteStreamById() {
super("deleteStreamById");
}
public deleteStreamById_args getEmptyArgsInstance() {
return new deleteStreamById_args();
}
public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
return new AsyncMethodCallback<Boolean>() {
public void onComplete(Boolean o) {
deleteStreamById_result result = new deleteStreamById_result();
result.success = o;
result.setSuccessIsSet(true);
try {
fcall.sendResponse(fb,result, org.apache.thrift.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 = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TBase msg;
deleteStreamById_result result = new deleteStreamById_result();
if (e instanceof org.wso2.carbon.databridge.commons.thrift.exception.ThriftSessionExpiredException) {
result.se = (org.wso2.carbon.databridge.commons.thrift.exception.ThriftSessionExpiredException) e;
result.setSeIsSet(true);
msg = result;
}
else
{
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.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, deleteStreamById_args args, AsyncMethodCallback<Boolean> resultHandler) throws TException {
iface.deleteStreamById(args.sessionId, args.streamId,resultHandler);
}
}
public static class deleteStreamByNameVersion<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, deleteStreamByNameVersion_args, Boolean> {
public deleteStreamByNameVersion() {
super("deleteStreamByNameVersion");
}
public deleteStreamByNameVersion_args getEmptyArgsInstance() {
return new deleteStreamByNameVersion_args();
}
public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
return new AsyncMethodCallback<Boolean>() {
public void onComplete(Boolean o) {
deleteStreamByNameVersion_result result = new deleteStreamByNameVersion_result();
result.success = o;
result.setSuccessIsSet(true);
try {
fcall.sendResponse(fb,result, org.apache.thrift.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 = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TBase msg;
deleteStreamByNameVersion_result result = new deleteStreamByNameVersion_result();
if (e instanceof org.wso2.carbon.databridge.commons.thrift.exception.ThriftSessionExpiredException) {
result.se = (org.wso2.carbon.databridge.commons.thrift.exception.ThriftSessionExpiredException) e;
result.setSeIsSet(true);
msg = result;
}
else
{
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.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, deleteStreamByNameVersion_args args, AsyncMethodCallback<Boolean> resultHandler) throws TException {
iface.deleteStreamByNameVersion(args.sessionId, args.streamName, args.streamVersion,resultHandler);
}
}
}
public static class connect_args implements org.apache.thrift.TBase<connect_args, connect_args._Fields>, java.io.Serializable, Cloneable, Comparable<connect_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("connect_args");
private static final org.apache.thrift.protocol.TField USER_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("userName", org.apache.thrift.protocol.TType.STRING, (short)1);
private static final org.apache.thrift.protocol.TField PASSWORD_FIELD_DESC = new org.apache.thrift.protocol.TField("password", org.apache.thrift.protocol.TType.STRING, (short)2);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new connect_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new connect_argsTupleSchemeFactory());
}
public String userName; // required
public String password; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
USER_NAME((short)1, "userName"),
PASSWORD((short)2, "password");
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: // USER_NAME
return USER_NAME;
case 2: // PASSWORD
return PASSWORD;
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, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.USER_NAME, new org.apache.thrift.meta_data.FieldMetaData("userName", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.PASSWORD, new org.apache.thrift.meta_data.FieldMetaData("password", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(connect_args.class, metaDataMap);
}
public connect_args() {
}
public connect_args(
String userName,
String password)
{
this();
this.userName = userName;
this.password = password;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public connect_args(connect_args other) {
if (other.isSetUserName()) {
this.userName = other.userName;
}
if (other.isSetPassword()) {
this.password = other.password;
}
}
public connect_args deepCopy() {
return new connect_args(this);
}
@Override
public void clear() {
this.userName = null;
this.password = null;
}
public String getUserName() {
return this.userName;
}
public connect_args setUserName(String userName) {
this.userName = userName;
return this;
}
public void unsetUserName() {
this.userName = null;
}
/** Returns true if field userName is set (has been assigned a value) and false otherwise */
public boolean isSetUserName() {
return this.userName != null;
}
public void setUserNameIsSet(boolean value) {
if (!value) {
this.userName = null;
}
}
public String getPassword() {
return this.password;
}
public connect_args setPassword(String password) {
this.password = password;
return this;
}
public void unsetPassword() {
this.password = null;
}
/** Returns true if field password is set (has been assigned a value) and false otherwise */
public boolean isSetPassword() {
return this.password != null;
}
public void setPasswordIsSet(boolean value) {
if (!value) {
this.password = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case USER_NAME:
if (value == null) {
unsetUserName();
} else {
setUserName((String)value);
}
break;
case PASSWORD:
if (value == null) {
unsetPassword();
} else {
setPassword((String)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case USER_NAME:
return getUserName();
case PASSWORD:
return getPassword();
}
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 USER_NAME:
return isSetUserName();
case PASSWORD:
return isSetPassword();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof connect_args)
return this.equals((connect_args)that);
return false;
}
public boolean equals(connect_args that) {
if (that == null)
return false;
boolean this_present_userName = true && this.isSetUserName();
boolean that_present_userName = true && that.isSetUserName();
if (this_present_userName || that_present_userName) {
if (!(this_present_userName && that_present_userName))
return false;
if (!this.userName.equals(that.userName))
return false;
}
boolean this_present_password = true && this.isSetPassword();
boolean that_present_password = true && that.isSetPassword();
if (this_present_password || that_present_password) {
if (!(this_present_password && that_present_password))
return false;
if (!this.password.equals(that.password))
return false;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
@Override
public int compareTo(connect_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetUserName()).compareTo(other.isSetUserName());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetUserName()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userName, other.userName);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetPassword()).compareTo(other.isSetPassword());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetPassword()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.password, other.password);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws TException {
schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws TException {
schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("connect_args(");
boolean first = true;
sb.append("userName:");
if (this.userName == null) {
sb.append("null");
} else {
sb.append(this.userName);
}
first = false;
if (!first) sb.append(", ");
sb.append("password:");
if (this.password == null) {
sb.append("null");
} else {
sb.append(this.password);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws TException {
// check for required fields
// check for sub-struct validity
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (TException te) {
throw new java.io.IOException(te);
}
}
private static class connect_argsStandardSchemeFactory implements SchemeFactory {
public connect_argsStandardScheme getScheme() {
return new connect_argsStandardScheme();
}
}
private static class connect_argsStandardScheme extends StandardScheme<connect_args> {
public void read(org.apache.thrift.protocol.TProtocol iprot, connect_args struct) throws TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
{
schemeField = iprot.readFieldBegin();
if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (schemeField.id) {
case 1: // USER_NAME
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.userName = iprot.readString();
struct.setUserNameIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // PASSWORD
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.password = iprot.readString();
struct.setPasswordIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
org.apache.thrift.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(org.apache.thrift.protocol.TProtocol oprot, connect_args struct) throws TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.userName != null) {
oprot.writeFieldBegin(USER_NAME_FIELD_DESC);
oprot.writeString(struct.userName);
oprot.writeFieldEnd();
}
if (struct.password != null) {
oprot.writeFieldBegin(PASSWORD_FIELD_DESC);
oprot.writeString(struct.password);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class connect_argsTupleSchemeFactory implements SchemeFactory {
public connect_argsTupleScheme getScheme() {
return new connect_argsTupleScheme();
}
}
private static class connect_argsTupleScheme extends TupleScheme<connect_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, connect_args struct) throws TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetUserName()) {
optionals.set(0);
}
if (struct.isSetPassword()) {
optionals.set(1);
}
oprot.writeBitSet(optionals, 2);
if (struct.isSetUserName()) {
oprot.writeString(struct.userName);
}
if (struct.isSetPassword()) {
oprot.writeString(struct.password);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, connect_args struct) throws TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
struct.userName = iprot.readString();
struct.setUserNameIsSet(true);
}
if (incoming.get(1)) {
struct.password = iprot.readString();
struct.setPasswordIsSet(true);
}
}
}
}
public static class connect_result implements org.apache.thrift.TBase<connect_result, connect_result._Fields>, java.io.Serializable, Cloneable, Comparable<connect_result> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("connect_result");
private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRING, (short)0);
private static final org.apache.thrift.protocol.TField AE_FIELD_DESC = new org.apache.thrift.protocol.TField("ae", org.apache.thrift.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 connect_resultStandardSchemeFactory());
schemes.put(TupleScheme.class, new connect_resultTupleSchemeFactory());
}
public String success; // required
public org.wso2.carbon.databridge.commons.thrift.exception.ThriftAuthenticationException ae; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
SUCCESS((short)0, "success"),
AE((short)1, "ae");
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: // AE
return AE;
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, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.AE, new org.apache.thrift.meta_data.FieldMetaData("ae", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(connect_result.class, metaDataMap);
}
public connect_result() {
}
public connect_result(
String success,
org.wso2.carbon.databridge.commons.thrift.exception.ThriftAuthenticationException ae)
{
this();
this.success = success;
this.ae = ae;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public connect_result(connect_result other) {
if (other.isSetSuccess()) {
this.success = other.success;
}
if (other.isSetAe()) {
this.ae = new org.wso2.carbon.databridge.commons.thrift.exception.ThriftAuthenticationException(other.ae);
}
}
public connect_result deepCopy() {
return new connect_result(this);
}
@Override
public void clear() {
this.success = null;
this.ae = null;
}
public String getSuccess() {
return this.success;
}
public connect_result setSuccess(String 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 org.wso2.carbon.databridge.commons.thrift.exception.ThriftAuthenticationException getAe() {
return this.ae;
}
public connect_result setAe(org.wso2.carbon.databridge.commons.thrift.exception.ThriftAuthenticationException ae) {
this.ae = ae;
return this;
}
public void unsetAe() {
this.ae = null;
}
/** Returns true if field ae is set (has been assigned a value) and false otherwise */
public boolean isSetAe() {
return this.ae != null;
}
public void setAeIsSet(boolean value) {
if (!value) {
this.ae = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
setSuccess((String)value);
}
break;
case AE:
if (value == null) {
unsetAe();
} else {
setAe((org.wso2.carbon.databridge.commons.thrift.exception.ThriftAuthenticationException)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return getSuccess();
case AE:
return getAe();
}
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 AE:
return isSetAe();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof connect_result)
return this.equals((connect_result)that);
return false;
}
public boolean equals(connect_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_ae = true && this.isSetAe();
boolean that_present_ae = true && that.isSetAe();
if (this_present_ae || that_present_ae) {
if (!(this_present_ae && that_present_ae))
return false;
if (!this.ae.equals(that.ae))
return false;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
@Override
public int compareTo(connect_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 = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetAe()).compareTo(other.isSetAe());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetAe()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ae, other.ae);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws TException {
schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws TException {
schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("connect_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("ae:");
if (this.ae == null) {
sb.append("null");
} else {
sb.append(this.ae);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws TException {
// check for required fields
// check for sub-struct validity
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (TException te) {
throw new java.io.IOException(te);
}
}
private static class connect_resultStandardSchemeFactory implements SchemeFactory {
public connect_resultStandardScheme getScheme() {
return new connect_resultStandardScheme();
}
}
private static class connect_resultStandardScheme extends StandardScheme<connect_result> {
public void read(org.apache.thrift.protocol.TProtocol iprot, connect_result struct) throws TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
{
schemeField = iprot.readFieldBegin();
if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (schemeField.id) {
case 0: // SUCCESS
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.success = iprot.readString();
struct.setSuccessIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 1: // AE
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.ae = new org.wso2.carbon.databridge.commons.thrift.exception.ThriftAuthenticationException();
struct.ae.read(iprot);
struct.setAeIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
org.apache.thrift.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(org.apache.thrift.protocol.TProtocol oprot, connect_result struct) throws TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.success != null) {
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
oprot.writeString(struct.success);
oprot.writeFieldEnd();
}
if (struct.ae != null) {
oprot.writeFieldBegin(AE_FIELD_DESC);
struct.ae.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class connect_resultTupleSchemeFactory implements SchemeFactory {
public connect_resultTupleScheme getScheme() {
return new connect_resultTupleScheme();
}
}
private static class connect_resultTupleScheme extends TupleScheme<connect_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, connect_result struct) throws TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetSuccess()) {
optionals.set(0);
}
if (struct.isSetAe()) {
optionals.set(1);
}
oprot.writeBitSet(optionals, 2);
if (struct.isSetSuccess()) {
oprot.writeString(struct.success);
}
if (struct.isSetAe()) {
struct.ae.write(oprot);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, connect_result struct) throws TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
struct.success = iprot.readString();
struct.setSuccessIsSet(true);
}
if (incoming.get(1)) {
struct.ae = new org.wso2.carbon.databridge.commons.thrift.exception.ThriftAuthenticationException();
struct.ae.read(iprot);
struct.setAeIsSet(true);
}
}
}
}
public static class disconnect_args implements org.apache.thrift.TBase<disconnect_args, disconnect_args._Fields>, java.io.Serializable, Cloneable, Comparable<disconnect_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("disconnect_args");
private static final org.apache.thrift.protocol.TField SESSION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("sessionId", org.apache.thrift.protocol.TType.STRING, (short)1);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new disconnect_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new disconnect_argsTupleSchemeFactory());
}
public String sessionId; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
SESSION_ID((short)1, "sessionId");
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: // SESSION_ID
return SESSION_ID;
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, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.SESSION_ID, new org.apache.thrift.meta_data.FieldMetaData("sessionId", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(disconnect_args.class, metaDataMap);
}
public disconnect_args() {
}
public disconnect_args(
String sessionId)
{
this();
this.sessionId = sessionId;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public disconnect_args(disconnect_args other) {
if (other.isSetSessionId()) {
this.sessionId = other.sessionId;
}
}
public disconnect_args deepCopy() {
return new disconnect_args(this);
}
@Override
public void clear() {
this.sessionId = null;
}
public String getSessionId() {
return this.sessionId;
}
public disconnect_args setSessionId(String sessionId) {
this.sessionId = sessionId;
return this;
}
public void unsetSessionId() {
this.sessionId = null;
}
/** Returns true if field sessionId is set (has been assigned a value) and false otherwise */
public boolean isSetSessionId() {
return this.sessionId != null;
}
public void setSessionIdIsSet(boolean value) {
if (!value) {
this.sessionId = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case SESSION_ID:
if (value == null) {
unsetSessionId();
} else {
setSessionId((String)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case SESSION_ID:
return getSessionId();
}
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 SESSION_ID:
return isSetSessionId();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof disconnect_args)
return this.equals((disconnect_args)that);
return false;
}
public boolean equals(disconnect_args that) {
if (that == null)
return false;
boolean this_present_sessionId = true && this.isSetSessionId();
boolean that_present_sessionId = true && that.isSetSessionId();
if (this_present_sessionId || that_present_sessionId) {
if (!(this_present_sessionId && that_present_sessionId))
return false;
if (!this.sessionId.equals(that.sessionId))
return false;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
@Override
public int compareTo(disconnect_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetSessionId()).compareTo(other.isSetSessionId());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSessionId()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionId, other.sessionId);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws TException {
schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws TException {
schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("disconnect_args(");
boolean first = true;
sb.append("sessionId:");
if (this.sessionId == null) {
sb.append("null");
} else {
sb.append(this.sessionId);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws TException {
// check for required fields
// check for sub-struct validity
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (TException te) {
throw new java.io.IOException(te);
}
}
private static class disconnect_argsStandardSchemeFactory implements SchemeFactory {
public disconnect_argsStandardScheme getScheme() {
return new disconnect_argsStandardScheme();
}
}
private static class disconnect_argsStandardScheme extends StandardScheme<disconnect_args> {
public void read(org.apache.thrift.protocol.TProtocol iprot, disconnect_args struct) throws TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
{
schemeField = iprot.readFieldBegin();
if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (schemeField.id) {
case 1: // SESSION_ID
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.sessionId = iprot.readString();
struct.setSessionIdIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
org.apache.thrift.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(org.apache.thrift.protocol.TProtocol oprot, disconnect_args struct) throws TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.sessionId != null) {
oprot.writeFieldBegin(SESSION_ID_FIELD_DESC);
oprot.writeString(struct.sessionId);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class disconnect_argsTupleSchemeFactory implements SchemeFactory {
public disconnect_argsTupleScheme getScheme() {
return new disconnect_argsTupleScheme();
}
}
private static class disconnect_argsTupleScheme extends TupleScheme<disconnect_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, disconnect_args struct) throws TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetSessionId()) {
optionals.set(0);
}
oprot.writeBitSet(optionals, 1);
if (struct.isSetSessionId()) {
oprot.writeString(struct.sessionId);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, disconnect_args struct) throws TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.sessionId = iprot.readString();
struct.setSessionIdIsSet(true);
}
}
}
}
public static class disconnect_result implements org.apache.thrift.TBase<disconnect_result, disconnect_result._Fields>, java.io.Serializable, Cloneable, Comparable<disconnect_result> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("disconnect_result");
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new disconnect_resultStandardSchemeFactory());
schemes.put(TupleScheme.class, new disconnect_resultTupleSchemeFactory());
}
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
;
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) {
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(String name) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
_Fields(short thriftId, String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public String getFieldName() {
return _fieldName;
}
}
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(disconnect_result.class, metaDataMap);
}
public disconnect_result() {
}
/**
* Performs a deep copy on <i>other</i>.
*/
public disconnect_result(disconnect_result other) {
}
public disconnect_result deepCopy() {
return new disconnect_result(this);
}
@Override
public void clear() {
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
}
throw new IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
}
switch (field) {
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof disconnect_result)
return this.equals((disconnect_result)that);
return false;
}
public boolean equals(disconnect_result that) {
if (that == null)
return false;
return true;
}
@Override
public int hashCode() {
return 0;
}
@Override
public int compareTo(disconnect_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws TException {
schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws TException {
schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("disconnect_result(");
boolean first = true;
sb.append(")");
return sb.toString();
}
public void validate() throws TException {
// check for required fields
// check for sub-struct validity
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (TException te) {
throw new java.io.IOException(te);
}
}
private static class disconnect_resultStandardSchemeFactory implements SchemeFactory {
public disconnect_resultStandardScheme getScheme() {
return new disconnect_resultStandardScheme();
}
}
private static class disconnect_resultStandardScheme extends StandardScheme<disconnect_result> {
public void read(org.apache.thrift.protocol.TProtocol iprot, disconnect_result struct) throws TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
{
schemeField = iprot.readFieldBegin();
if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (schemeField.id) {
default:
org.apache.thrift.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(org.apache.thrift.protocol.TProtocol oprot, disconnect_result struct) throws TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class disconnect_resultTupleSchemeFactory implements SchemeFactory {
public disconnect_resultTupleScheme getScheme() {
return new disconnect_resultTupleScheme();
}
}
private static class disconnect_resultTupleScheme extends TupleScheme<disconnect_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, disconnect_result struct) throws TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, disconnect_result struct) throws TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
}
}
}
public static class defineStream_args implements org.apache.thrift.TBase<defineStream_args, defineStream_args._Fields>, java.io.Serializable, Cloneable, Comparable<defineStream_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("defineStream_args");
private static final org.apache.thrift.protocol.TField SESSION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("sessionId", org.apache.thrift.protocol.TType.STRING, (short)1);
private static final org.apache.thrift.protocol.TField STREAM_DEFINITION_FIELD_DESC = new org.apache.thrift.protocol.TField("streamDefinition", org.apache.thrift.protocol.TType.STRING, (short)2);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new defineStream_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new defineStream_argsTupleSchemeFactory());
}
public String sessionId; // required
public String streamDefinition; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
SESSION_ID((short)1, "sessionId"),
STREAM_DEFINITION((short)2, "streamDefinition");
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: // SESSION_ID
return SESSION_ID;
case 2: // STREAM_DEFINITION
return STREAM_DEFINITION;
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, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.SESSION_ID, new org.apache.thrift.meta_data.FieldMetaData("sessionId", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.STREAM_DEFINITION, new org.apache.thrift.meta_data.FieldMetaData("streamDefinition", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(defineStream_args.class, metaDataMap);
}
public defineStream_args() {
}
public defineStream_args(
String sessionId,
String streamDefinition)
{
this();
this.sessionId = sessionId;
this.streamDefinition = streamDefinition;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public defineStream_args(defineStream_args other) {
if (other.isSetSessionId()) {
this.sessionId = other.sessionId;
}
if (other.isSetStreamDefinition()) {
this.streamDefinition = other.streamDefinition;
}
}
public defineStream_args deepCopy() {
return new defineStream_args(this);
}
@Override
public void clear() {
this.sessionId = null;
this.streamDefinition = null;
}
public String getSessionId() {
return this.sessionId;
}
public defineStream_args setSessionId(String sessionId) {
this.sessionId = sessionId;
return this;
}
public void unsetSessionId() {
this.sessionId = null;
}
/** Returns true if field sessionId is set (has been assigned a value) and false otherwise */
public boolean isSetSessionId() {
return this.sessionId != null;
}
public void setSessionIdIsSet(boolean value) {
if (!value) {
this.sessionId = null;
}
}
public String getStreamDefinition() {
return this.streamDefinition;
}
public defineStream_args setStreamDefinition(String streamDefinition) {
this.streamDefinition = streamDefinition;
return this;
}
public void unsetStreamDefinition() {
this.streamDefinition = null;
}
/** Returns true if field streamDefinition is set (has been assigned a value) and false otherwise */
public boolean isSetStreamDefinition() {
return this.streamDefinition != null;
}
public void setStreamDefinitionIsSet(boolean value) {
if (!value) {
this.streamDefinition = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case SESSION_ID:
if (value == null) {
unsetSessionId();
} else {
setSessionId((String)value);
}
break;
case STREAM_DEFINITION:
if (value == null) {
unsetStreamDefinition();
} else {
setStreamDefinition((String)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case SESSION_ID:
return getSessionId();
case STREAM_DEFINITION:
return getStreamDefinition();
}
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 SESSION_ID:
return isSetSessionId();
case STREAM_DEFINITION:
return isSetStreamDefinition();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof defineStream_args)
return this.equals((defineStream_args)that);
return false;
}
public boolean equals(defineStream_args that) {
if (that == null)
return false;
boolean this_present_sessionId = true && this.isSetSessionId();
boolean that_present_sessionId = true && that.isSetSessionId();
if (this_present_sessionId || that_present_sessionId) {
if (!(this_present_sessionId && that_present_sessionId))
return false;
if (!this.sessionId.equals(that.sessionId))
return false;
}
boolean this_present_streamDefinition = true && this.isSetStreamDefinition();
boolean that_present_streamDefinition = true && that.isSetStreamDefinition();
if (this_present_streamDefinition || that_present_streamDefinition) {
if (!(this_present_streamDefinition && that_present_streamDefinition))
return false;
if (!this.streamDefinition.equals(that.streamDefinition))
return false;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
@Override
public int compareTo(defineStream_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetSessionId()).compareTo(other.isSetSessionId());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSessionId()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionId, other.sessionId);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetStreamDefinition()).compareTo(other.isSetStreamDefinition());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetStreamDefinition()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.streamDefinition, other.streamDefinition);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws TException {
schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws TException {
schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("defineStream_args(");
boolean first = true;
sb.append("sessionId:");
if (this.sessionId == null) {
sb.append("null");
} else {
sb.append(this.sessionId);
}
first = false;
if (!first) sb.append(", ");
sb.append("streamDefinition:");
if (this.streamDefinition == null) {
sb.append("null");
} else {
sb.append(this.streamDefinition);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws TException {
// check for required fields
// check for sub-struct validity
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (TException te) {
throw new java.io.IOException(te);
}
}
private static class defineStream_argsStandardSchemeFactory implements SchemeFactory {
public defineStream_argsStandardScheme getScheme() {
return new defineStream_argsStandardScheme();
}
}
private static class defineStream_argsStandardScheme extends StandardScheme<defineStream_args> {
public void read(org.apache.thrift.protocol.TProtocol iprot, defineStream_args struct) throws TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
{
schemeField = iprot.readFieldBegin();
if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (schemeField.id) {
case 1: // SESSION_ID
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.sessionId = iprot.readString();
struct.setSessionIdIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // STREAM_DEFINITION
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.streamDefinition = iprot.readString();
struct.setStreamDefinitionIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
org.apache.thrift.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(org.apache.thrift.protocol.TProtocol oprot, defineStream_args struct) throws TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.sessionId != null) {
oprot.writeFieldBegin(SESSION_ID_FIELD_DESC);
oprot.writeString(struct.sessionId);
oprot.writeFieldEnd();
}
if (struct.streamDefinition != null) {
oprot.writeFieldBegin(STREAM_DEFINITION_FIELD_DESC);
oprot.writeString(struct.streamDefinition);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class defineStream_argsTupleSchemeFactory implements SchemeFactory {
public defineStream_argsTupleScheme getScheme() {
return new defineStream_argsTupleScheme();
}
}
private static class defineStream_argsTupleScheme extends TupleScheme<defineStream_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, defineStream_args struct) throws TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetSessionId()) {
optionals.set(0);
}
if (struct.isSetStreamDefinition()) {
optionals.set(1);
}
oprot.writeBitSet(optionals, 2);
if (struct.isSetSessionId()) {
oprot.writeString(struct.sessionId);
}
if (struct.isSetStreamDefinition()) {
oprot.writeString(struct.streamDefinition);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, defineStream_args struct) throws TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
struct.sessionId = iprot.readString();
struct.setSessionIdIsSet(true);
}
if (incoming.get(1)) {
struct.streamDefinition = iprot.readString();
struct.setStreamDefinitionIsSet(true);
}
}
}
}
public static class defineStream_result implements org.apache.thrift.TBase<defineStream_result, defineStream_result._Fields>, java.io.Serializable, Cloneable, Comparable<defineStream_result> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("defineStream_result");
private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRING, (short)0);
private static final org.apache.thrift.protocol.TField ADE_FIELD_DESC = new org.apache.thrift.protocol.TField("ade", org.apache.thrift.protocol.TType.STRUCT, (short)1);
private static final org.apache.thrift.protocol.TField MTD_FIELD_DESC = new org.apache.thrift.protocol.TField("mtd", org.apache.thrift.protocol.TType.STRUCT, (short)2);
private static final org.apache.thrift.protocol.TField TDE_FIELD_DESC = new org.apache.thrift.protocol.TField("tde", org.apache.thrift.protocol.TType.STRUCT, (short)3);
private static final org.apache.thrift.protocol.TField SE_FIELD_DESC = new org.apache.thrift.protocol.TField("se", org.apache.thrift.protocol.TType.STRUCT, (short)4);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new defineStream_resultStandardSchemeFactory());
schemes.put(TupleScheme.class, new defineStream_resultTupleSchemeFactory());
}
public String success; // required
public org.wso2.carbon.databridge.commons.thrift.exception.ThriftDifferentStreamDefinitionAlreadyDefinedException ade; // required
public org.wso2.carbon.databridge.commons.thrift.exception.ThriftMalformedStreamDefinitionException mtd; // required
public org.wso2.carbon.databridge.commons.thrift.exception.ThriftStreamDefinitionException tde; // required
public org.wso2.carbon.databridge.commons.thrift.exception.ThriftSessionExpiredException se; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
SUCCESS((short)0, "success"),
ADE((short)1, "ade"),
MTD((short)2, "mtd"),
TDE((short)3, "tde"),
SE((short)4, "se");
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: // ADE
return ADE;
case 2: // MTD
return MTD;
case 3: // TDE
return TDE;
case 4: // SE
return SE;
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, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.ADE, new org.apache.thrift.meta_data.FieldMetaData("ade", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
tmpMap.put(_Fields.MTD, new org.apache.thrift.meta_data.FieldMetaData("mtd", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
tmpMap.put(_Fields.TDE, new org.apache.thrift.meta_data.FieldMetaData("tde", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
tmpMap.put(_Fields.SE, new org.apache.thrift.meta_data.FieldMetaData("se", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(defineStream_result.class, metaDataMap);
}
public defineStream_result() {
}
public defineStream_result(
String success,
org.wso2.carbon.databridge.commons.thrift.exception.ThriftDifferentStreamDefinitionAlreadyDefinedException ade,
org.wso2.carbon.databridge.commons.thrift.exception.ThriftMalformedStreamDefinitionException mtd,
org.wso2.carbon.databridge.commons.thrift.exception.ThriftStreamDefinitionException tde,
org.wso2.carbon.databridge.commons.thrift.exception.ThriftSessionExpiredException se)
{
this();
this.success = success;
this.ade = ade;
this.mtd = mtd;
this.tde = tde;
this.se = se;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public defineStream_result(defineStream_result other) {
if (other.isSetSuccess()) {
this.success = other.success;
}
if (other.isSetAde()) {
this.ade = new org.wso2.carbon.databridge.commons.thrift.exception.ThriftDifferentStreamDefinitionAlreadyDefinedException(other.ade);
}
if (other.isSetMtd()) {
this.mtd = new org.wso2.carbon.databridge.commons.thrift.exception.ThriftMalformedStreamDefinitionException(other.mtd);
}
if (other.isSetTde()) {
this.tde = new org.wso2.carbon.databridge.commons.thrift.exception.ThriftStreamDefinitionException(other.tde);
}
if (other.isSetSe()) {
this.se = new org.wso2.carbon.databridge.commons.thrift.exception.ThriftSessionExpiredException(other.se);
}
}
public defineStream_result deepCopy() {
return new defineStream_result(this);
}
@Override
public void clear() {
this.success = null;
this.ade = null;
this.mtd = null;
this.tde = null;
this.se = null;
}
public String getSuccess() {
return this.success;
}
public defineStream_result setSuccess(String 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 org.wso2.carbon.databridge.commons.thrift.exception.ThriftDifferentStreamDefinitionAlreadyDefinedException getAde() {
return this.ade;
}
public defineStream_result setAde(org.wso2.carbon.databridge.commons.thrift.exception.ThriftDifferentStreamDefinitionAlreadyDefinedException ade) {
this.ade = ade;
return this;
}
public void unsetAde() {
this.ade = null;
}
/** Returns true if field ade is set (has been assigned a value) and false otherwise */
public boolean isSetAde() {
return this.ade != null;
}
public void setAdeIsSet(boolean value) {
if (!value) {
this.ade = null;
}
}
public org.wso2.carbon.databridge.commons.thrift.exception.ThriftMalformedStreamDefinitionException getMtd() {
return this.mtd;
}
public defineStream_result setMtd(org.wso2.carbon.databridge.commons.thrift.exception.ThriftMalformedStreamDefinitionException mtd) {
this.mtd = mtd;
return this;
}
public void unsetMtd() {
this.mtd = null;
}
/** Returns true if field mtd is set (has been assigned a value) and false otherwise */
public boolean isSetMtd() {
return this.mtd != null;
}
public void setMtdIsSet(boolean value) {
if (!value) {
this.mtd = null;
}
}
public org.wso2.carbon.databridge.commons.thrift.exception.ThriftStreamDefinitionException getTde() {
return this.tde;
}
public defineStream_result setTde(org.wso2.carbon.databridge.commons.thrift.exception.ThriftStreamDefinitionException tde) {
this.tde = tde;
return this;
}
public void unsetTde() {
this.tde = null;
}
/** Returns true if field tde is set (has been assigned a value) and false otherwise */
public boolean isSetTde() {
return this.tde != null;
}
public void setTdeIsSet(boolean value) {
if (!value) {
this.tde = null;
}
}
public org.wso2.carbon.databridge.commons.thrift.exception.ThriftSessionExpiredException getSe() {
return this.se;
}
public defineStream_result setSe(org.wso2.carbon.databridge.commons.thrift.exception.ThriftSessionExpiredException se) {
this.se = se;
return this;
}
public void unsetSe() {
this.se = null;
}
/** Returns true if field se is set (has been assigned a value) and false otherwise */
public boolean isSetSe() {
return this.se != null;
}
public void setSeIsSet(boolean value) {
if (!value) {
this.se = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
setSuccess((String)value);
}
break;
case ADE:
if (value == null) {
unsetAde();
} else {
setAde((org.wso2.carbon.databridge.commons.thrift.exception.ThriftDifferentStreamDefinitionAlreadyDefinedException)value);
}
break;
case MTD:
if (value == null) {
unsetMtd();
} else {
setMtd((org.wso2.carbon.databridge.commons.thrift.exception.ThriftMalformedStreamDefinitionException)value);
}
break;
case TDE:
if (value == null) {
unsetTde();
} else {
setTde((org.wso2.carbon.databridge.commons.thrift.exception.ThriftStreamDefinitionException)value);
}
break;
case SE:
if (value == null) {
unsetSe();
} else {
setSe((org.wso2.carbon.databridge.commons.thrift.exception.ThriftSessionExpiredException)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return getSuccess();
case ADE:
return getAde();
case MTD:
return getMtd();
case TDE:
return getTde();
case SE:
return getSe();
}
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 ADE:
return isSetAde();
case MTD:
return isSetMtd();
case TDE:
return isSetTde();
case SE:
return isSetSe();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof defineStream_result)
return this.equals((defineStream_result)that);
return false;
}
public boolean equals(defineStream_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_ade = true && this.isSetAde();
boolean that_present_ade = true && that.isSetAde();
if (this_present_ade || that_present_ade) {
if (!(this_present_ade && that_present_ade))
return false;
if (!this.ade.equals(that.ade))
return false;
}
boolean this_present_mtd = true && this.isSetMtd();
boolean that_present_mtd = true && that.isSetMtd();
if (this_present_mtd || that_present_mtd) {
if (!(this_present_mtd && that_present_mtd))
return false;
if (!this.mtd.equals(that.mtd))
return false;
}
boolean this_present_tde = true && this.isSetTde();
boolean that_present_tde = true && that.isSetTde();
if (this_present_tde || that_present_tde) {
if (!(this_present_tde && that_present_tde))
return false;
if (!this.tde.equals(that.tde))
return false;
}
boolean this_present_se = true && this.isSetSe();
boolean that_present_se = true && that.isSetSe();
if (this_present_se || that_present_se) {
if (!(this_present_se && that_present_se))
return false;
if (!this.se.equals(that.se))
return false;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
@Override
public int compareTo(defineStream_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 = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetAde()).compareTo(other.isSetAde());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetAde()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ade, other.ade);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetMtd()).compareTo(other.isSetMtd());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetMtd()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.mtd, other.mtd);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetTde()).compareTo(other.isSetTde());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetTde()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tde, other.tde);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetSe()).compareTo(other.isSetSe());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSe()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.se, other.se);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws TException {
schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws TException {
schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("defineStream_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("ade:");
if (this.ade == null) {
sb.append("null");
} else {
sb.append(this.ade);
}
first = false;
if (!first) sb.append(", ");
sb.append("mtd:");
if (this.mtd == null) {
sb.append("null");
} else {
sb.append(this.mtd);
}
first = false;
if (!first) sb.append(", ");
sb.append("tde:");
if (this.tde == null) {
sb.append("null");
} else {
sb.append(this.tde);
}
first = false;
if (!first) sb.append(", ");
sb.append("se:");
if (this.se == null) {
sb.append("null");
} else {
sb.append(this.se);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws TException {
// check for required fields
// check for sub-struct validity
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (TException te) {
throw new java.io.IOException(te);
}
}
private static class defineStream_resultStandardSchemeFactory implements SchemeFactory {
public defineStream_resultStandardScheme getScheme() {
return new defineStream_resultStandardScheme();
}
}
private static class defineStream_resultStandardScheme extends StandardScheme<defineStream_result> {
public void read(org.apache.thrift.protocol.TProtocol iprot, defineStream_result struct) throws TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
{
schemeField = iprot.readFieldBegin();
if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (schemeField.id) {
case 0: // SUCCESS
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.success = iprot.readString();
struct.setSuccessIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 1: // ADE
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.ade = new org.wso2.carbon.databridge.commons.thrift.exception.ThriftDifferentStreamDefinitionAlreadyDefinedException();
struct.ade.read(iprot);
struct.setAdeIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // MTD
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.mtd = new org.wso2.carbon.databridge.commons.thrift.exception.ThriftMalformedStreamDefinitionException();
struct.mtd.read(iprot);
struct.setMtdIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 3: // TDE
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.tde = new org.wso2.carbon.databridge.commons.thrift.exception.ThriftStreamDefinitionException();
struct.tde.read(iprot);
struct.setTdeIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 4: // SE
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.se = new org.wso2.carbon.databridge.commons.thrift.exception.ThriftSessionExpiredException();
struct.se.read(iprot);
struct.setSeIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
org.apache.thrift.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(org.apache.thrift.protocol.TProtocol oprot, defineStream_result struct) throws TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.success != null) {
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
oprot.writeString(struct.success);
oprot.writeFieldEnd();
}
if (struct.ade != null) {
oprot.writeFieldBegin(ADE_FIELD_DESC);
struct.ade.write(oprot);
oprot.writeFieldEnd();
}
if (struct.mtd != null) {
oprot.writeFieldBegin(MTD_FIELD_DESC);
struct.mtd.write(oprot);
oprot.writeFieldEnd();
}
if (struct.tde != null) {
oprot.writeFieldBegin(TDE_FIELD_DESC);
struct.tde.write(oprot);
oprot.writeFieldEnd();
}
if (struct.se != null) {
oprot.writeFieldBegin(SE_FIELD_DESC);
struct.se.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class defineStream_resultTupleSchemeFactory implements SchemeFactory {
public defineStream_resultTupleScheme getScheme() {
return new defineStream_resultTupleScheme();
}
}
private static class defineStream_resultTupleScheme extends TupleScheme<defineStream_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, defineStream_result struct) throws TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetSuccess()) {
optionals.set(0);
}
if (struct.isSetAde()) {
optionals.set(1);
}
if (struct.isSetMtd()) {
optionals.set(2);
}
if (struct.isSetTde()) {
optionals.set(3);
}
if (struct.isSetSe()) {
optionals.set(4);
}
oprot.writeBitSet(optionals, 5);
if (struct.isSetSuccess()) {
oprot.writeString(struct.success);
}
if (struct.isSetAde()) {
struct.ade.write(oprot);
}
if (struct.isSetMtd()) {
struct.mtd.write(oprot);
}
if (struct.isSetTde()) {
struct.tde.write(oprot);
}
if (struct.isSetSe()) {
struct.se.write(oprot);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, defineStream_result struct) throws TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(5);
if (incoming.get(0)) {
struct.success = iprot.readString();
struct.setSuccessIsSet(true);
}
if (incoming.get(1)) {
struct.ade = new org.wso2.carbon.databridge.commons.thrift.exception.ThriftDifferentStreamDefinitionAlreadyDefinedException();
struct.ade.read(iprot);
struct.setAdeIsSet(true);
}
if (incoming.get(2)) {
struct.mtd = new org.wso2.carbon.databridge.commons.thrift.exception.ThriftMalformedStreamDefinitionException();
struct.mtd.read(iprot);
struct.setMtdIsSet(true);
}
if (incoming.get(3)) {
struct.tde = new org.wso2.carbon.databridge.commons.thrift.exception.ThriftStreamDefinitionException();
struct.tde.read(iprot);
struct.setTdeIsSet(true);
}
if (incoming.get(4)) {
struct.se = new org.wso2.carbon.databridge.commons.thrift.exception.ThriftSessionExpiredException();
struct.se.read(iprot);
struct.setSeIsSet(true);
}
}
}
}
public static class findStreamId_args implements org.apache.thrift.TBase<findStreamId_args, findStreamId_args._Fields>, java.io.Serializable, Cloneable, Comparable<findStreamId_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("findStreamId_args");
private static final org.apache.thrift.protocol.TField SESSION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("sessionId", org.apache.thrift.protocol.TType.STRING, (short)1);
private static final org.apache.thrift.protocol.TField STREAM_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("streamName", org.apache.thrift.protocol.TType.STRING, (short)2);
private static final org.apache.thrift.protocol.TField STREAM_VERSION_FIELD_DESC = new org.apache.thrift.protocol.TField("streamVersion", org.apache.thrift.protocol.TType.STRING, (short)3);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new findStreamId_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new findStreamId_argsTupleSchemeFactory());
}
public String sessionId; // required
public String streamName; // required
public String streamVersion; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
SESSION_ID((short)1, "sessionId"),
STREAM_NAME((short)2, "streamName"),
STREAM_VERSION((short)3, "streamVersion");
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: // SESSION_ID
return SESSION_ID;
case 2: // STREAM_NAME
return STREAM_NAME;
case 3: // STREAM_VERSION
return STREAM_VERSION;
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, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.SESSION_ID, new org.apache.thrift.meta_data.FieldMetaData("sessionId", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.STREAM_NAME, new org.apache.thrift.meta_data.FieldMetaData("streamName", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.STREAM_VERSION, new org.apache.thrift.meta_data.FieldMetaData("streamVersion", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(findStreamId_args.class, metaDataMap);
}
public findStreamId_args() {
}
public findStreamId_args(
String sessionId,
String streamName,
String streamVersion)
{
this();
this.sessionId = sessionId;
this.streamName = streamName;
this.streamVersion = streamVersion;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public findStreamId_args(findStreamId_args other) {
if (other.isSetSessionId()) {
this.sessionId = other.sessionId;
}
if (other.isSetStreamName()) {
this.streamName = other.streamName;
}
if (other.isSetStreamVersion()) {
this.streamVersion = other.streamVersion;
}
}
public findStreamId_args deepCopy() {
return new findStreamId_args(this);
}
@Override
public void clear() {
this.sessionId = null;
this.streamName = null;
this.streamVersion = null;
}
public String getSessionId() {
return this.sessionId;
}
public findStreamId_args setSessionId(String sessionId) {
this.sessionId = sessionId;
return this;
}
public void unsetSessionId() {
this.sessionId = null;
}
/** Returns true if field sessionId is set (has been assigned a value) and false otherwise */
public boolean isSetSessionId() {
return this.sessionId != null;
}
public void setSessionIdIsSet(boolean value) {
if (!value) {
this.sessionId = null;
}
}
public String getStreamName() {
return this.streamName;
}
public findStreamId_args setStreamName(String streamName) {
this.streamName = streamName;
return this;
}
public void unsetStreamName() {
this.streamName = null;
}
/** Returns true if field streamName is set (has been assigned a value) and false otherwise */
public boolean isSetStreamName() {
return this.streamName != null;
}
public void setStreamNameIsSet(boolean value) {
if (!value) {
this.streamName = null;
}
}
public String getStreamVersion() {
return this.streamVersion;
}
public findStreamId_args setStreamVersion(String streamVersion) {
this.streamVersion = streamVersion;
return this;
}
public void unsetStreamVersion() {
this.streamVersion = null;
}
/** Returns true if field streamVersion is set (has been assigned a value) and false otherwise */
public boolean isSetStreamVersion() {
return this.streamVersion != null;
}
public void setStreamVersionIsSet(boolean value) {
if (!value) {
this.streamVersion = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case SESSION_ID:
if (value == null) {
unsetSessionId();
} else {
setSessionId((String)value);
}
break;
case STREAM_NAME:
if (value == null) {
unsetStreamName();
} else {
setStreamName((String)value);
}
break;
case STREAM_VERSION:
if (value == null) {
unsetStreamVersion();
} else {
setStreamVersion((String)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case SESSION_ID:
return getSessionId();
case STREAM_NAME:
return getStreamName();
case STREAM_VERSION:
return getStreamVersion();
}
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 SESSION_ID:
return isSetSessionId();
case STREAM_NAME:
return isSetStreamName();
case STREAM_VERSION:
return isSetStreamVersion();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof findStreamId_args)
return this.equals((findStreamId_args)that);
return false;
}
public boolean equals(findStreamId_args that) {
if (that == null)
return false;
boolean this_present_sessionId = true && this.isSetSessionId();
boolean that_present_sessionId = true && that.isSetSessionId();
if (this_present_sessionId || that_present_sessionId) {
if (!(this_present_sessionId && that_present_sessionId))
return false;
if (!this.sessionId.equals(that.sessionId))
return false;
}
boolean this_present_streamName = true && this.isSetStreamName();
boolean that_present_streamName = true && that.isSetStreamName();
if (this_present_streamName || that_present_streamName) {
if (!(this_present_streamName && that_present_streamName))
return false;
if (!this.streamName.equals(that.streamName))
return false;
}
boolean this_present_streamVersion = true && this.isSetStreamVersion();
boolean that_present_streamVersion = true && that.isSetStreamVersion();
if (this_present_streamVersion || that_present_streamVersion) {
if (!(this_present_streamVersion && that_present_streamVersion))
return false;
if (!this.streamVersion.equals(that.streamVersion))
return false;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
@Override
public int compareTo(findStreamId_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetSessionId()).compareTo(other.isSetSessionId());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSessionId()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionId, other.sessionId);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetStreamName()).compareTo(other.isSetStreamName());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetStreamName()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.streamName, other.streamName);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetStreamVersion()).compareTo(other.isSetStreamVersion());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetStreamVersion()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.streamVersion, other.streamVersion);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws TException {
schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws TException {
schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("findStreamId_args(");
boolean first = true;
sb.append("sessionId:");
if (this.sessionId == null) {
sb.append("null");
} else {
sb.append(this.sessionId);
}
first = false;
if (!first) sb.append(", ");
sb.append("streamName:");
if (this.streamName == null) {
sb.append("null");
} else {
sb.append(this.streamName);
}
first = false;
if (!first) sb.append(", ");
sb.append("streamVersion:");
if (this.streamVersion == null) {
sb.append("null");
} else {
sb.append(this.streamVersion);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws TException {
// check for required fields
// check for sub-struct validity
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (TException te) {
throw new java.io.IOException(te);
}
}
private static class findStreamId_argsStandardSchemeFactory implements SchemeFactory {
public findStreamId_argsStandardScheme getScheme() {
return new findStreamId_argsStandardScheme();
}
}
private static class findStreamId_argsStandardScheme extends StandardScheme<findStreamId_args> {
public void read(org.apache.thrift.protocol.TProtocol iprot, findStreamId_args struct) throws TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
{
schemeField = iprot.readFieldBegin();
if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (schemeField.id) {
case 1: // SESSION_ID
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.sessionId = iprot.readString();
struct.setSessionIdIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // STREAM_NAME
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.streamName = iprot.readString();
struct.setStreamNameIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 3: // STREAM_VERSION
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.streamVersion = iprot.readString();
struct.setStreamVersionIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
org.apache.thrift.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(org.apache.thrift.protocol.TProtocol oprot, findStreamId_args struct) throws TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.sessionId != null) {
oprot.writeFieldBegin(SESSION_ID_FIELD_DESC);
oprot.writeString(struct.sessionId);
oprot.writeFieldEnd();
}
if (struct.streamName != null) {
oprot.writeFieldBegin(STREAM_NAME_FIELD_DESC);
oprot.writeString(struct.streamName);
oprot.writeFieldEnd();
}
if (struct.streamVersion != null) {
oprot.writeFieldBegin(STREAM_VERSION_FIELD_DESC);
oprot.writeString(struct.streamVersion);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class findStreamId_argsTupleSchemeFactory implements SchemeFactory {
public findStreamId_argsTupleScheme getScheme() {
return new findStreamId_argsTupleScheme();
}
}
private static class findStreamId_argsTupleScheme extends TupleScheme<findStreamId_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, findStreamId_args struct) throws TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetSessionId()) {
optionals.set(0);
}
if (struct.isSetStreamName()) {
optionals.set(1);
}
if (struct.isSetStreamVersion()) {
optionals.set(2);
}
oprot.writeBitSet(optionals, 3);
if (struct.isSetSessionId()) {
oprot.writeString(struct.sessionId);
}
if (struct.isSetStreamName()) {
oprot.writeString(struct.streamName);
}
if (struct.isSetStreamVersion()) {
oprot.writeString(struct.streamVersion);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, findStreamId_args struct) throws TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(3);
if (incoming.get(0)) {
struct.sessionId = iprot.readString();
struct.setSessionIdIsSet(true);
}
if (incoming.get(1)) {
struct.streamName = iprot.readString();
struct.setStreamNameIsSet(true);
}
if (incoming.get(2)) {
struct.streamVersion = iprot.readString();
struct.setStreamVersionIsSet(true);
}
}
}
}
public static class findStreamId_result implements org.apache.thrift.TBase<findStreamId_result, findStreamId_result._Fields>, java.io.Serializable, Cloneable, Comparable<findStreamId_result> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("findStreamId_result");
private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRING, (short)0);
private static final org.apache.thrift.protocol.TField TNDE_FIELD_DESC = new org.apache.thrift.protocol.TField("tnde", org.apache.thrift.protocol.TType.STRUCT, (short)1);
private static final org.apache.thrift.protocol.TField SE_FIELD_DESC = new org.apache.thrift.protocol.TField("se", org.apache.thrift.protocol.TType.STRUCT, (short)2);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new findStreamId_resultStandardSchemeFactory());
schemes.put(TupleScheme.class, new findStreamId_resultTupleSchemeFactory());
}
public String success; // required
public org.wso2.carbon.databridge.commons.thrift.exception.ThriftNoStreamDefinitionExistException tnde; // required
public org.wso2.carbon.databridge.commons.thrift.exception.ThriftSessionExpiredException se; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
SUCCESS((short)0, "success"),
TNDE((short)1, "tnde"),
SE((short)2, "se");
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: // TNDE
return TNDE;
case 2: // SE
return SE;
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, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.TNDE, new org.apache.thrift.meta_data.FieldMetaData("tnde", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
tmpMap.put(_Fields.SE, new org.apache.thrift.meta_data.FieldMetaData("se", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(findStreamId_result.class, metaDataMap);
}
public findStreamId_result() {
}
public findStreamId_result(
String success,
org.wso2.carbon.databridge.commons.thrift.exception.ThriftNoStreamDefinitionExistException tnde,
org.wso2.carbon.databridge.commons.thrift.exception.ThriftSessionExpiredException se)
{
this();
this.success = success;
this.tnde = tnde;
this.se = se;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public findStreamId_result(findStreamId_result other) {
if (other.isSetSuccess()) {
this.success = other.success;
}
if (other.isSetTnde()) {
this.tnde = new org.wso2.carbon.databridge.commons.thrift.exception.ThriftNoStreamDefinitionExistException(other.tnde);
}
if (other.isSetSe()) {
this.se = new org.wso2.carbon.databridge.commons.thrift.exception.ThriftSessionExpiredException(other.se);
}
}
public findStreamId_result deepCopy() {
return new findStreamId_result(this);
}
@Override
public void clear() {
this.success = null;
this.tnde = null;
this.se = null;
}
public String getSuccess() {
return this.success;
}
public findStreamId_result setSuccess(String 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 org.wso2.carbon.databridge.commons.thrift.exception.ThriftNoStreamDefinitionExistException getTnde() {
return this.tnde;
}
public findStreamId_result setTnde(org.wso2.carbon.databridge.commons.thrift.exception.ThriftNoStreamDefinitionExistException tnde) {
this.tnde = tnde;
return this;
}
public void unsetTnde() {
this.tnde = null;
}
/** Returns true if field tnde is set (has been assigned a value) and false otherwise */
public boolean isSetTnde() {
return this.tnde != null;
}
public void setTndeIsSet(boolean value) {
if (!value) {
this.tnde = null;
}
}
public org.wso2.carbon.databridge.commons.thrift.exception.ThriftSessionExpiredException getSe() {
return this.se;
}
public findStreamId_result setSe(org.wso2.carbon.databridge.commons.thrift.exception.ThriftSessionExpiredException se) {
this.se = se;
return this;
}
public void unsetSe() {
this.se = null;
}
/** Returns true if field se is set (has been assigned a value) and false otherwise */
public boolean isSetSe() {
return this.se != null;
}
public void setSeIsSet(boolean value) {
if (!value) {
this.se = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
setSuccess((String)value);
}
break;
case TNDE:
if (value == null) {
unsetTnde();
} else {
setTnde((org.wso2.carbon.databridge.commons.thrift.exception.ThriftNoStreamDefinitionExistException)value);
}
break;
case SE:
if (value == null) {
unsetSe();
} else {
setSe((org.wso2.carbon.databridge.commons.thrift.exception.ThriftSessionExpiredException)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return getSuccess();
case TNDE:
return getTnde();
case SE:
return getSe();
}
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 TNDE:
return isSetTnde();
case SE:
return isSetSe();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof findStreamId_result)
return this.equals((findStreamId_result)that);
return false;
}
public boolean equals(findStreamId_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_tnde = true && this.isSetTnde();
boolean that_present_tnde = true && that.isSetTnde();
if (this_present_tnde || that_present_tnde) {
if (!(this_present_tnde && that_present_tnde))
return false;
if (!this.tnde.equals(that.tnde))
return false;
}
boolean this_present_se = true && this.isSetSe();
boolean that_present_se = true && that.isSetSe();
if (this_present_se || that_present_se) {
if (!(this_present_se && that_present_se))
return false;
if (!this.se.equals(that.se))
return false;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
@Override
public int compareTo(findStreamId_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 = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetTnde()).compareTo(other.isSetTnde());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetTnde()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tnde, other.tnde);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetSe()).compareTo(other.isSetSe());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSe()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.se, other.se);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws TException {
schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws TException {
schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("findStreamId_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("tnde:");
if (this.tnde == null) {
sb.append("null");
} else {
sb.append(this.tnde);
}
first = false;
if (!first) sb.append(", ");
sb.append("se:");
if (this.se == null) {
sb.append("null");
} else {
sb.append(this.se);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws TException {
// check for required fields
// check for sub-struct validity
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (TException te) {
throw new java.io.IOException(te);
}
}
private static class findStreamId_resultStandardSchemeFactory implements SchemeFactory {
public findStreamId_resultStandardScheme getScheme() {
return new findStreamId_resultStandardScheme();
}
}
private static class findStreamId_resultStandardScheme extends StandardScheme<findStreamId_result> {
public void read(org.apache.thrift.protocol.TProtocol iprot, findStreamId_result struct) throws TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
{
schemeField = iprot.readFieldBegin();
if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (schemeField.id) {
case 0: // SUCCESS
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.success = iprot.readString();
struct.setSuccessIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 1: // TNDE
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.tnde = new org.wso2.carbon.databridge.commons.thrift.exception.ThriftNoStreamDefinitionExistException();
struct.tnde.read(iprot);
struct.setTndeIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // SE
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.se = new org.wso2.carbon.databridge.commons.thrift.exception.ThriftSessionExpiredException();
struct.se.read(iprot);
struct.setSeIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
org.apache.thrift.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(org.apache.thrift.protocol.TProtocol oprot, findStreamId_result struct) throws TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.success != null) {
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
oprot.writeString(struct.success);
oprot.writeFieldEnd();
}
if (struct.tnde != null) {
oprot.writeFieldBegin(TNDE_FIELD_DESC);
struct.tnde.write(oprot);
oprot.writeFieldEnd();
}
if (struct.se != null) {
oprot.writeFieldBegin(SE_FIELD_DESC);
struct.se.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class findStreamId_resultTupleSchemeFactory implements SchemeFactory {
public findStreamId_resultTupleScheme getScheme() {
return new findStreamId_resultTupleScheme();
}
}
private static class findStreamId_resultTupleScheme extends TupleScheme<findStreamId_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, findStreamId_result struct) throws TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetSuccess()) {
optionals.set(0);
}
if (struct.isSetTnde()) {
optionals.set(1);
}
if (struct.isSetSe()) {
optionals.set(2);
}
oprot.writeBitSet(optionals, 3);
if (struct.isSetSuccess()) {
oprot.writeString(struct.success);
}
if (struct.isSetTnde()) {
struct.tnde.write(oprot);
}
if (struct.isSetSe()) {
struct.se.write(oprot);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, findStreamId_result struct) throws TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(3);
if (incoming.get(0)) {
struct.success = iprot.readString();
struct.setSuccessIsSet(true);
}
if (incoming.get(1)) {
struct.tnde = new org.wso2.carbon.databridge.commons.thrift.exception.ThriftNoStreamDefinitionExistException();
struct.tnde.read(iprot);
struct.setTndeIsSet(true);
}
if (incoming.get(2)) {
struct.se = new org.wso2.carbon.databridge.commons.thrift.exception.ThriftSessionExpiredException();
struct.se.read(iprot);
struct.setSeIsSet(true);
}
}
}
}
public static class publish_args implements org.apache.thrift.TBase<publish_args, publish_args._Fields>, java.io.Serializable, Cloneable, Comparable<publish_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("publish_args");
private static final org.apache.thrift.protocol.TField EVENT_BUNDLE_FIELD_DESC = new org.apache.thrift.protocol.TField("eventBundle", org.apache.thrift.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 publish_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new publish_argsTupleSchemeFactory());
}
public org.wso2.carbon.databridge.commons.thrift.data.ThriftEventBundle eventBundle; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
EVENT_BUNDLE((short)1, "eventBundle");
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: // EVENT_BUNDLE
return EVENT_BUNDLE;
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, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.EVENT_BUNDLE, new org.apache.thrift.meta_data.FieldMetaData("eventBundle", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.wso2.carbon.databridge.commons.thrift.data.ThriftEventBundle.class)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(publish_args.class, metaDataMap);
}
public publish_args() {
}
public publish_args(
org.wso2.carbon.databridge.commons.thrift.data.ThriftEventBundle eventBundle)
{
this();
this.eventBundle = eventBundle;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public publish_args(publish_args other) {
if (other.isSetEventBundle()) {
this.eventBundle = new org.wso2.carbon.databridge.commons.thrift.data.ThriftEventBundle(other.eventBundle);
}
}
public publish_args deepCopy() {
return new publish_args(this);
}
@Override
public void clear() {
this.eventBundle = null;
}
public org.wso2.carbon.databridge.commons.thrift.data.ThriftEventBundle getEventBundle() {
return this.eventBundle;
}
public publish_args setEventBundle(org.wso2.carbon.databridge.commons.thrift.data.ThriftEventBundle eventBundle) {
this.eventBundle = eventBundle;
return this;
}
public void unsetEventBundle() {
this.eventBundle = null;
}
/** Returns true if field eventBundle is set (has been assigned a value) and false otherwise */
public boolean isSetEventBundle() {
return this.eventBundle != null;
}
public void setEventBundleIsSet(boolean value) {
if (!value) {
this.eventBundle = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case EVENT_BUNDLE:
if (value == null) {
unsetEventBundle();
} else {
setEventBundle((org.wso2.carbon.databridge.commons.thrift.data.ThriftEventBundle)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case EVENT_BUNDLE:
return getEventBundle();
}
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 EVENT_BUNDLE:
return isSetEventBundle();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof publish_args)
return this.equals((publish_args)that);
return false;
}
public boolean equals(publish_args that) {
if (that == null)
return false;
boolean this_present_eventBundle = true && this.isSetEventBundle();
boolean that_present_eventBundle = true && that.isSetEventBundle();
if (this_present_eventBundle || that_present_eventBundle) {
if (!(this_present_eventBundle && that_present_eventBundle))
return false;
if (!this.eventBundle.equals(that.eventBundle))
return false;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
@Override
public int compareTo(publish_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetEventBundle()).compareTo(other.isSetEventBundle());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetEventBundle()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.eventBundle, other.eventBundle);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws TException {
schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws TException {
schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("publish_args(");
boolean first = true;
sb.append("eventBundle:");
if (this.eventBundle == null) {
sb.append("null");
} else {
sb.append(this.eventBundle);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws TException {
// check for required fields
// check for sub-struct validity
if (eventBundle != null) {
eventBundle.validate();
}
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (TException te) {
throw new java.io.IOException(te);
}
}
private static class publish_argsStandardSchemeFactory implements SchemeFactory {
public publish_argsStandardScheme getScheme() {
return new publish_argsStandardScheme();
}
}
private static class publish_argsStandardScheme extends StandardScheme<publish_args> {
public void read(org.apache.thrift.protocol.TProtocol iprot, publish_args struct) throws TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
{
schemeField = iprot.readFieldBegin();
if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (schemeField.id) {
case 1: // EVENT_BUNDLE
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.eventBundle = new org.wso2.carbon.databridge.commons.thrift.data.ThriftEventBundle();
struct.eventBundle.read(iprot);
struct.setEventBundleIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
org.apache.thrift.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(org.apache.thrift.protocol.TProtocol oprot, publish_args struct) throws TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.eventBundle != null) {
oprot.writeFieldBegin(EVENT_BUNDLE_FIELD_DESC);
struct.eventBundle.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class publish_argsTupleSchemeFactory implements SchemeFactory {
public publish_argsTupleScheme getScheme() {
return new publish_argsTupleScheme();
}
}
private static class publish_argsTupleScheme extends TupleScheme<publish_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, publish_args struct) throws TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetEventBundle()) {
optionals.set(0);
}
oprot.writeBitSet(optionals, 1);
if (struct.isSetEventBundle()) {
struct.eventBundle.write(oprot);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, publish_args struct) throws TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.eventBundle = new org.wso2.carbon.databridge.commons.thrift.data.ThriftEventBundle();
struct.eventBundle.read(iprot);
struct.setEventBundleIsSet(true);
}
}
}
}
public static class publish_result implements org.apache.thrift.TBase<publish_result, publish_result._Fields>, java.io.Serializable, Cloneable, Comparable<publish_result> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("publish_result");
private static final org.apache.thrift.protocol.TField UE_FIELD_DESC = new org.apache.thrift.protocol.TField("ue", org.apache.thrift.protocol.TType.STRUCT, (short)1);
private static final org.apache.thrift.protocol.TField SE_FIELD_DESC = new org.apache.thrift.protocol.TField("se", org.apache.thrift.protocol.TType.STRUCT, (short)2);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new publish_resultStandardSchemeFactory());
schemes.put(TupleScheme.class, new publish_resultTupleSchemeFactory());
}
public org.wso2.carbon.databridge.commons.thrift.exception.ThriftUndefinedEventTypeException ue; // required
public org.wso2.carbon.databridge.commons.thrift.exception.ThriftSessionExpiredException se; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
UE((short)1, "ue"),
SE((short)2, "se");
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: // UE
return UE;
case 2: // SE
return SE;
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, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.UE, new org.apache.thrift.meta_data.FieldMetaData("ue", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
tmpMap.put(_Fields.SE, new org.apache.thrift.meta_data.FieldMetaData("se", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(publish_result.class, metaDataMap);
}
public publish_result() {
}
public publish_result(
org.wso2.carbon.databridge.commons.thrift.exception.ThriftUndefinedEventTypeException ue,
org.wso2.carbon.databridge.commons.thrift.exception.ThriftSessionExpiredException se)
{
this();
this.ue = ue;
this.se = se;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public publish_result(publish_result other) {
if (other.isSetUe()) {
this.ue = new org.wso2.carbon.databridge.commons.thrift.exception.ThriftUndefinedEventTypeException(other.ue);
}
if (other.isSetSe()) {
this.se = new org.wso2.carbon.databridge.commons.thrift.exception.ThriftSessionExpiredException(other.se);
}
}
public publish_result deepCopy() {
return new publish_result(this);
}
@Override
public void clear() {
this.ue = null;
this.se = null;
}
public org.wso2.carbon.databridge.commons.thrift.exception.ThriftUndefinedEventTypeException getUe() {
return this.ue;
}
public publish_result setUe(org.wso2.carbon.databridge.commons.thrift.exception.ThriftUndefinedEventTypeException ue) {
this.ue = ue;
return this;
}
public void unsetUe() {
this.ue = null;
}
/** Returns true if field ue is set (has been assigned a value) and false otherwise */
public boolean isSetUe() {
return this.ue != null;
}
public void setUeIsSet(boolean value) {
if (!value) {
this.ue = null;
}
}
public org.wso2.carbon.databridge.commons.thrift.exception.ThriftSessionExpiredException getSe() {
return this.se;
}
public publish_result setSe(org.wso2.carbon.databridge.commons.thrift.exception.ThriftSessionExpiredException se) {
this.se = se;
return this;
}
public void unsetSe() {
this.se = null;
}
/** Returns true if field se is set (has been assigned a value) and false otherwise */
public boolean isSetSe() {
return this.se != null;
}
public void setSeIsSet(boolean value) {
if (!value) {
this.se = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case UE:
if (value == null) {
unsetUe();
} else {
setUe((org.wso2.carbon.databridge.commons.thrift.exception.ThriftUndefinedEventTypeException)value);
}
break;
case SE:
if (value == null) {
unsetSe();
} else {
setSe((org.wso2.carbon.databridge.commons.thrift.exception.ThriftSessionExpiredException)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case UE:
return getUe();
case SE:
return getSe();
}
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 UE:
return isSetUe();
case SE:
return isSetSe();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof publish_result)
return this.equals((publish_result)that);
return false;
}
public boolean equals(publish_result that) {
if (that == null)
return false;
boolean this_present_ue = true && this.isSetUe();
boolean that_present_ue = true && that.isSetUe();
if (this_present_ue || that_present_ue) {
if (!(this_present_ue && that_present_ue))
return false;
if (!this.ue.equals(that.ue))
return false;
}
boolean this_present_se = true && this.isSetSe();
boolean that_present_se = true && that.isSetSe();
if (this_present_se || that_present_se) {
if (!(this_present_se && that_present_se))
return false;
if (!this.se.equals(that.se))
return false;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
@Override
public int compareTo(publish_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetUe()).compareTo(other.isSetUe());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetUe()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ue, other.ue);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetSe()).compareTo(other.isSetSe());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSe()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.se, other.se);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws TException {
schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws TException {
schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("publish_result(");
boolean first = true;
sb.append("ue:");
if (this.ue == null) {
sb.append("null");
} else {
sb.append(this.ue);
}
first = false;
if (!first) sb.append(", ");
sb.append("se:");
if (this.se == null) {
sb.append("null");
} else {
sb.append(this.se);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws TException {
// check for required fields
// check for sub-struct validity
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (TException te) {
throw new java.io.IOException(te);
}
}
private static class publish_resultStandardSchemeFactory implements SchemeFactory {
public publish_resultStandardScheme getScheme() {
return new publish_resultStandardScheme();
}
}
private static class publish_resultStandardScheme extends StandardScheme<publish_result> {
public void read(org.apache.thrift.protocol.TProtocol iprot, publish_result struct) throws TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
{
schemeField = iprot.readFieldBegin();
if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (schemeField.id) {
case 1: // UE
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.ue = new org.wso2.carbon.databridge.commons.thrift.exception.ThriftUndefinedEventTypeException();
struct.ue.read(iprot);
struct.setUeIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // SE
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.se = new org.wso2.carbon.databridge.commons.thrift.exception.ThriftSessionExpiredException();
struct.se.read(iprot);
struct.setSeIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
org.apache.thrift.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(org.apache.thrift.protocol.TProtocol oprot, publish_result struct) throws TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.ue != null) {
oprot.writeFieldBegin(UE_FIELD_DESC);
struct.ue.write(oprot);
oprot.writeFieldEnd();
}
if (struct.se != null) {
oprot.writeFieldBegin(SE_FIELD_DESC);
struct.se.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class publish_resultTupleSchemeFactory implements SchemeFactory {
public publish_resultTupleScheme getScheme() {
return new publish_resultTupleScheme();
}
}
private static class publish_resultTupleScheme extends TupleScheme<publish_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, publish_result struct) throws TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetUe()) {
optionals.set(0);
}
if (struct.isSetSe()) {
optionals.set(1);
}
oprot.writeBitSet(optionals, 2);
if (struct.isSetUe()) {
struct.ue.write(oprot);
}
if (struct.isSetSe()) {
struct.se.write(oprot);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, publish_result struct) throws TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
struct.ue = new org.wso2.carbon.databridge.commons.thrift.exception.ThriftUndefinedEventTypeException();
struct.ue.read(iprot);
struct.setUeIsSet(true);
}
if (incoming.get(1)) {
struct.se = new org.wso2.carbon.databridge.commons.thrift.exception.ThriftSessionExpiredException();
struct.se.read(iprot);
struct.setSeIsSet(true);
}
}
}
}
public static class deleteStreamById_args implements org.apache.thrift.TBase<deleteStreamById_args, deleteStreamById_args._Fields>, java.io.Serializable, Cloneable, Comparable<deleteStreamById_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("deleteStreamById_args");
private static final org.apache.thrift.protocol.TField SESSION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("sessionId", org.apache.thrift.protocol.TType.STRING, (short)1);
private static final org.apache.thrift.protocol.TField STREAM_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("streamId", org.apache.thrift.protocol.TType.STRING, (short)2);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new deleteStreamById_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new deleteStreamById_argsTupleSchemeFactory());
}
public String sessionId; // required
public String streamId; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
SESSION_ID((short)1, "sessionId"),
STREAM_ID((short)2, "streamId");
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: // SESSION_ID
return SESSION_ID;
case 2: // STREAM_ID
return STREAM_ID;
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, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.SESSION_ID, new org.apache.thrift.meta_data.FieldMetaData("sessionId", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.STREAM_ID, new org.apache.thrift.meta_data.FieldMetaData("streamId", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(deleteStreamById_args.class, metaDataMap);
}
public deleteStreamById_args() {
}
public deleteStreamById_args(
String sessionId,
String streamId)
{
this();
this.sessionId = sessionId;
this.streamId = streamId;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public deleteStreamById_args(deleteStreamById_args other) {
if (other.isSetSessionId()) {
this.sessionId = other.sessionId;
}
if (other.isSetStreamId()) {
this.streamId = other.streamId;
}
}
public deleteStreamById_args deepCopy() {
return new deleteStreamById_args(this);
}
@Override
public void clear() {
this.sessionId = null;
this.streamId = null;
}
public String getSessionId() {
return this.sessionId;
}
public deleteStreamById_args setSessionId(String sessionId) {
this.sessionId = sessionId;
return this;
}
public void unsetSessionId() {
this.sessionId = null;
}
/** Returns true if field sessionId is set (has been assigned a value) and false otherwise */
public boolean isSetSessionId() {
return this.sessionId != null;
}
public void setSessionIdIsSet(boolean value) {
if (!value) {
this.sessionId = null;
}
}
public String getStreamId() {
return this.streamId;
}
public deleteStreamById_args setStreamId(String streamId) {
this.streamId = streamId;
return this;
}
public void unsetStreamId() {
this.streamId = null;
}
/** Returns true if field streamId is set (has been assigned a value) and false otherwise */
public boolean isSetStreamId() {
return this.streamId != null;
}
public void setStreamIdIsSet(boolean value) {
if (!value) {
this.streamId = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case SESSION_ID:
if (value == null) {
unsetSessionId();
} else {
setSessionId((String)value);
}
break;
case STREAM_ID:
if (value == null) {
unsetStreamId();
} else {
setStreamId((String)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case SESSION_ID:
return getSessionId();
case STREAM_ID:
return getStreamId();
}
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 SESSION_ID:
return isSetSessionId();
case STREAM_ID:
return isSetStreamId();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof deleteStreamById_args)
return this.equals((deleteStreamById_args)that);
return false;
}
public boolean equals(deleteStreamById_args that) {
if (that == null)
return false;
boolean this_present_sessionId = true && this.isSetSessionId();
boolean that_present_sessionId = true && that.isSetSessionId();
if (this_present_sessionId || that_present_sessionId) {
if (!(this_present_sessionId && that_present_sessionId))
return false;
if (!this.sessionId.equals(that.sessionId))
return false;
}
boolean this_present_streamId = true && this.isSetStreamId();
boolean that_present_streamId = true && that.isSetStreamId();
if (this_present_streamId || that_present_streamId) {
if (!(this_present_streamId && that_present_streamId))
return false;
if (!this.streamId.equals(that.streamId))
return false;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
@Override
public int compareTo(deleteStreamById_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetSessionId()).compareTo(other.isSetSessionId());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSessionId()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionId, other.sessionId);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetStreamId()).compareTo(other.isSetStreamId());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetStreamId()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.streamId, other.streamId);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws TException {
schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws TException {
schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("deleteStreamById_args(");
boolean first = true;
sb.append("sessionId:");
if (this.sessionId == null) {
sb.append("null");
} else {
sb.append(this.sessionId);
}
first = false;
if (!first) sb.append(", ");
sb.append("streamId:");
if (this.streamId == null) {
sb.append("null");
} else {
sb.append(this.streamId);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws TException {
// check for required fields
// check for sub-struct validity
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (TException te) {
throw new java.io.IOException(te);
}
}
private static class deleteStreamById_argsStandardSchemeFactory implements SchemeFactory {
public deleteStreamById_argsStandardScheme getScheme() {
return new deleteStreamById_argsStandardScheme();
}
}
private static class deleteStreamById_argsStandardScheme extends StandardScheme<deleteStreamById_args> {
public void read(org.apache.thrift.protocol.TProtocol iprot, deleteStreamById_args struct) throws TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
{
schemeField = iprot.readFieldBegin();
if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (schemeField.id) {
case 1: // SESSION_ID
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.sessionId = iprot.readString();
struct.setSessionIdIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // STREAM_ID
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.streamId = iprot.readString();
struct.setStreamIdIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
org.apache.thrift.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(org.apache.thrift.protocol.TProtocol oprot, deleteStreamById_args struct) throws TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.sessionId != null) {
oprot.writeFieldBegin(SESSION_ID_FIELD_DESC);
oprot.writeString(struct.sessionId);
oprot.writeFieldEnd();
}
if (struct.streamId != null) {
oprot.writeFieldBegin(STREAM_ID_FIELD_DESC);
oprot.writeString(struct.streamId);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class deleteStreamById_argsTupleSchemeFactory implements SchemeFactory {
public deleteStreamById_argsTupleScheme getScheme() {
return new deleteStreamById_argsTupleScheme();
}
}
private static class deleteStreamById_argsTupleScheme extends TupleScheme<deleteStreamById_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, deleteStreamById_args struct) throws TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetSessionId()) {
optionals.set(0);
}
if (struct.isSetStreamId()) {
optionals.set(1);
}
oprot.writeBitSet(optionals, 2);
if (struct.isSetSessionId()) {
oprot.writeString(struct.sessionId);
}
if (struct.isSetStreamId()) {
oprot.writeString(struct.streamId);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, deleteStreamById_args struct) throws TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
struct.sessionId = iprot.readString();
struct.setSessionIdIsSet(true);
}
if (incoming.get(1)) {
struct.streamId = iprot.readString();
struct.setStreamIdIsSet(true);
}
}
}
}
public static class deleteStreamById_result implements org.apache.thrift.TBase<deleteStreamById_result, deleteStreamById_result._Fields>, java.io.Serializable, Cloneable, Comparable<deleteStreamById_result> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("deleteStreamById_result");
private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.BOOL, (short)0);
private static final org.apache.thrift.protocol.TField SE_FIELD_DESC = new org.apache.thrift.protocol.TField("se", org.apache.thrift.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 deleteStreamById_resultStandardSchemeFactory());
schemes.put(TupleScheme.class, new deleteStreamById_resultTupleSchemeFactory());
}
public boolean success; // required
public org.wso2.carbon.databridge.commons.thrift.exception.ThriftSessionExpiredException se; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
SUCCESS((short)0, "success"),
SE((short)1, "se");
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: // SE
return SE;
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
private static final int __SUCCESS_ISSET_ID = 0;
private byte __isset_bitfield = 0;
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
tmpMap.put(_Fields.SE, new org.apache.thrift.meta_data.FieldMetaData("se", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(deleteStreamById_result.class, metaDataMap);
}
public deleteStreamById_result() {
}
public deleteStreamById_result(
boolean success,
org.wso2.carbon.databridge.commons.thrift.exception.ThriftSessionExpiredException se)
{
this();
this.success = success;
setSuccessIsSet(true);
this.se = se;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public deleteStreamById_result(deleteStreamById_result other) {
__isset_bitfield = other.__isset_bitfield;
this.success = other.success;
if (other.isSetSe()) {
this.se = new org.wso2.carbon.databridge.commons.thrift.exception.ThriftSessionExpiredException(other.se);
}
}
public deleteStreamById_result deepCopy() {
return new deleteStreamById_result(this);
}
@Override
public void clear() {
setSuccessIsSet(false);
this.success = false;
this.se = null;
}
public boolean isSuccess() {
return this.success;
}
public deleteStreamById_result setSuccess(boolean success) {
this.success = success;
setSuccessIsSet(true);
return this;
}
public void unsetSuccess() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID);
}
/** Returns true if field success is set (has been assigned a value) and false otherwise */
public boolean isSetSuccess() {
return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID);
}
public void setSuccessIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value);
}
public org.wso2.carbon.databridge.commons.thrift.exception.ThriftSessionExpiredException getSe() {
return this.se;
}
public deleteStreamById_result setSe(org.wso2.carbon.databridge.commons.thrift.exception.ThriftSessionExpiredException se) {
this.se = se;
return this;
}
public void unsetSe() {
this.se = null;
}
/** Returns true if field se is set (has been assigned a value) and false otherwise */
public boolean isSetSe() {
return this.se != null;
}
public void setSeIsSet(boolean value) {
if (!value) {
this.se = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
setSuccess((Boolean)value);
}
break;
case SE:
if (value == null) {
unsetSe();
} else {
setSe((org.wso2.carbon.databridge.commons.thrift.exception.ThriftSessionExpiredException)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return Boolean.valueOf(isSuccess());
case SE:
return getSe();
}
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 SE:
return isSetSe();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof deleteStreamById_result)
return this.equals((deleteStreamById_result)that);
return false;
}
public boolean equals(deleteStreamById_result that) {
if (that == null)
return false;
boolean this_present_success = true;
boolean that_present_success = true;
if (this_present_success || that_present_success) {
if (!(this_present_success && that_present_success))
return false;
if (this.success != that.success)
return false;
}
boolean this_present_se = true && this.isSetSe();
boolean that_present_se = true && that.isSetSe();
if (this_present_se || that_present_se) {
if (!(this_present_se && that_present_se))
return false;
if (!this.se.equals(that.se))
return false;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
@Override
public int compareTo(deleteStreamById_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 = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetSe()).compareTo(other.isSetSe());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSe()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.se, other.se);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws TException {
schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws TException {
schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("deleteStreamById_result(");
boolean first = true;
sb.append("success:");
sb.append(this.success);
first = false;
if (!first) sb.append(", ");
sb.append("se:");
if (this.se == null) {
sb.append("null");
} else {
sb.append(this.se);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws TException {
// check for required fields
// check for sub-struct validity
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
try {
// it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
__isset_bitfield = 0;
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (TException te) {
throw new java.io.IOException(te);
}
}
private static class deleteStreamById_resultStandardSchemeFactory implements SchemeFactory {
public deleteStreamById_resultStandardScheme getScheme() {
return new deleteStreamById_resultStandardScheme();
}
}
private static class deleteStreamById_resultStandardScheme extends StandardScheme<deleteStreamById_result> {
public void read(org.apache.thrift.protocol.TProtocol iprot, deleteStreamById_result struct) throws TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
{
schemeField = iprot.readFieldBegin();
if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (schemeField.id) {
case 0: // SUCCESS
if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
struct.success = iprot.readBool();
struct.setSuccessIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 1: // SE
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.se = new org.wso2.carbon.databridge.commons.thrift.exception.ThriftSessionExpiredException();
struct.se.read(iprot);
struct.setSeIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
org.apache.thrift.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(org.apache.thrift.protocol.TProtocol oprot, deleteStreamById_result struct) throws TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.isSetSuccess()) {
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
oprot.writeBool(struct.success);
oprot.writeFieldEnd();
}
if (struct.se != null) {
oprot.writeFieldBegin(SE_FIELD_DESC);
struct.se.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class deleteStreamById_resultTupleSchemeFactory implements SchemeFactory {
public deleteStreamById_resultTupleScheme getScheme() {
return new deleteStreamById_resultTupleScheme();
}
}
private static class deleteStreamById_resultTupleScheme extends TupleScheme<deleteStreamById_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, deleteStreamById_result struct) throws TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetSuccess()) {
optionals.set(0);
}
if (struct.isSetSe()) {
optionals.set(1);
}
oprot.writeBitSet(optionals, 2);
if (struct.isSetSuccess()) {
oprot.writeBool(struct.success);
}
if (struct.isSetSe()) {
struct.se.write(oprot);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, deleteStreamById_result struct) throws TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
struct.success = iprot.readBool();
struct.setSuccessIsSet(true);
}
if (incoming.get(1)) {
struct.se = new org.wso2.carbon.databridge.commons.thrift.exception.ThriftSessionExpiredException();
struct.se.read(iprot);
struct.setSeIsSet(true);
}
}
}
}
public static class deleteStreamByNameVersion_args implements org.apache.thrift.TBase<deleteStreamByNameVersion_args, deleteStreamByNameVersion_args._Fields>, java.io.Serializable, Cloneable, Comparable<deleteStreamByNameVersion_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("deleteStreamByNameVersion_args");
private static final org.apache.thrift.protocol.TField SESSION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("sessionId", org.apache.thrift.protocol.TType.STRING, (short)1);
private static final org.apache.thrift.protocol.TField STREAM_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("streamName", org.apache.thrift.protocol.TType.STRING, (short)2);
private static final org.apache.thrift.protocol.TField STREAM_VERSION_FIELD_DESC = new org.apache.thrift.protocol.TField("streamVersion", org.apache.thrift.protocol.TType.STRING, (short)3);
private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new deleteStreamByNameVersion_argsStandardSchemeFactory());
schemes.put(TupleScheme.class, new deleteStreamByNameVersion_argsTupleSchemeFactory());
}
public String sessionId; // required
public String streamName; // required
public String streamVersion; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
SESSION_ID((short)1, "sessionId"),
STREAM_NAME((short)2, "streamName"),
STREAM_VERSION((short)3, "streamVersion");
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: // SESSION_ID
return SESSION_ID;
case 2: // STREAM_NAME
return STREAM_NAME;
case 3: // STREAM_VERSION
return STREAM_VERSION;
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, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.SESSION_ID, new org.apache.thrift.meta_data.FieldMetaData("sessionId", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.STREAM_NAME, new org.apache.thrift.meta_data.FieldMetaData("streamName", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.STREAM_VERSION, new org.apache.thrift.meta_data.FieldMetaData("streamVersion", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(deleteStreamByNameVersion_args.class, metaDataMap);
}
public deleteStreamByNameVersion_args() {
}
public deleteStreamByNameVersion_args(
String sessionId,
String streamName,
String streamVersion)
{
this();
this.sessionId = sessionId;
this.streamName = streamName;
this.streamVersion = streamVersion;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public deleteStreamByNameVersion_args(deleteStreamByNameVersion_args other) {
if (other.isSetSessionId()) {
this.sessionId = other.sessionId;
}
if (other.isSetStreamName()) {
this.streamName = other.streamName;
}
if (other.isSetStreamVersion()) {
this.streamVersion = other.streamVersion;
}
}
public deleteStreamByNameVersion_args deepCopy() {
return new deleteStreamByNameVersion_args(this);
}
@Override
public void clear() {
this.sessionId = null;
this.streamName = null;
this.streamVersion = null;
}
public String getSessionId() {
return this.sessionId;
}
public deleteStreamByNameVersion_args setSessionId(String sessionId) {
this.sessionId = sessionId;
return this;
}
public void unsetSessionId() {
this.sessionId = null;
}
/** Returns true if field sessionId is set (has been assigned a value) and false otherwise */
public boolean isSetSessionId() {
return this.sessionId != null;
}
public void setSessionIdIsSet(boolean value) {
if (!value) {
this.sessionId = null;
}
}
public String getStreamName() {
return this.streamName;
}
public deleteStreamByNameVersion_args setStreamName(String streamName) {
this.streamName = streamName;
return this;
}
public void unsetStreamName() {
this.streamName = null;
}
/** Returns true if field streamName is set (has been assigned a value) and false otherwise */
public boolean isSetStreamName() {
return this.streamName != null;
}
public void setStreamNameIsSet(boolean value) {
if (!value) {
this.streamName = null;
}
}
public String getStreamVersion() {
return this.streamVersion;
}
public deleteStreamByNameVersion_args setStreamVersion(String streamVersion) {
this.streamVersion = streamVersion;
return this;
}
public void unsetStreamVersion() {
this.streamVersion = null;
}
/** Returns true if field streamVersion is set (has been assigned a value) and false otherwise */
public boolean isSetStreamVersion() {
return this.streamVersion != null;
}
public void setStreamVersionIsSet(boolean value) {
if (!value) {
this.streamVersion = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case SESSION_ID:
if (value == null) {
unsetSessionId();
} else {
setSessionId((String)value);
}
break;
case STREAM_NAME:
if (value == null) {
unsetStreamName();
} else {
setStreamName((String)value);
}
break;
case STREAM_VERSION:
if (value == null) {
unsetStreamVersion();
} else {
setStreamVersion((String)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case SESSION_ID:
return getSessionId();
case STREAM_NAME:
return getStreamName();
case STREAM_VERSION:
return getStreamVersion();
}
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 SESSION_ID:
return isSetSessionId();
case STREAM_NAME:
return isSetStreamName();
case STREAM_VERSION:
return isSetStreamVersion();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof deleteStreamByNameVersion_args)
return this.equals((deleteStreamByNameVersion_args)that);
return false;
}
public boolean equals(deleteStreamByNameVersion_args that) {
if (that == null)
return false;
boolean this_present_sessionId = true && this.isSetSessionId();
boolean that_present_sessionId = true && that.isSetSessionId();
if (this_present_sessionId || that_present_sessionId) {
if (!(this_present_sessionId && that_present_sessionId))
return false;
if (!this.sessionId.equals(that.sessionId))
return false;
}
boolean this_present_streamName = true && this.isSetStreamName();
boolean that_present_streamName = true && that.isSetStreamName();
if (this_present_streamName || that_present_streamName) {
if (!(this_present_streamName && that_present_streamName))
return false;
if (!this.streamName.equals(that.streamName))
return false;
}
boolean this_present_streamVersion = true && this.isSetStreamVersion();
boolean that_present_streamVersion = true && that.isSetStreamVersion();
if (this_present_streamVersion || that_present_streamVersion) {
if (!(this_present_streamVersion && that_present_streamVersion))
return false;
if (!this.streamVersion.equals(that.streamVersion))
return false;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
@Override
public int compareTo(deleteStreamByNameVersion_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetSessionId()).compareTo(other.isSetSessionId());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSessionId()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionId, other.sessionId);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetStreamName()).compareTo(other.isSetStreamName());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetStreamName()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.streamName, other.streamName);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetStreamVersion()).compareTo(other.isSetStreamVersion());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetStreamVersion()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.streamVersion, other.streamVersion);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws TException {
schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws TException {
schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("deleteStreamByNameVersion_args(");
boolean first = true;
sb.append("sessionId:");
if (this.sessionId == null) {
sb.append("null");
} else {
sb.append(this.sessionId);
}
first = false;
if (!first) sb.append(", ");
sb.append("streamName:");
if (this.streamName == null) {
sb.append("null");
} else {
sb.append(this.streamName);
}
first = false;
if (!first) sb.append(", ");
sb.append("streamVersion:");
if (this.streamVersion == null) {
sb.append("null");
} else {
sb.append(this.streamVersion);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws TException {
// check for required fields
// check for sub-struct validity
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (TException te) {
throw new java.io.IOException(te);
}
}
private static class deleteStreamByNameVersion_argsStandardSchemeFactory implements SchemeFactory {
public deleteStreamByNameVersion_argsStandardScheme getScheme() {
return new deleteStreamByNameVersion_argsStandardScheme();
}
}
private static class deleteStreamByNameVersion_argsStandardScheme extends StandardScheme<deleteStreamByNameVersion_args> {
public void read(org.apache.thrift.protocol.TProtocol iprot, deleteStreamByNameVersion_args struct) throws TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
{
schemeField = iprot.readFieldBegin();
if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (schemeField.id) {
case 1: // SESSION_ID
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.sessionId = iprot.readString();
struct.setSessionIdIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // STREAM_NAME
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.streamName = iprot.readString();
struct.setStreamNameIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 3: // STREAM_VERSION
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.streamVersion = iprot.readString();
struct.setStreamVersionIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
org.apache.thrift.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(org.apache.thrift.protocol.TProtocol oprot, deleteStreamByNameVersion_args struct) throws TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.sessionId != null) {
oprot.writeFieldBegin(SESSION_ID_FIELD_DESC);
oprot.writeString(struct.sessionId);
oprot.writeFieldEnd();
}
if (struct.streamName != null) {
oprot.writeFieldBegin(STREAM_NAME_FIELD_DESC);
oprot.writeString(struct.streamName);
oprot.writeFieldEnd();
}
if (struct.streamVersion != null) {
oprot.writeFieldBegin(STREAM_VERSION_FIELD_DESC);
oprot.writeString(struct.streamVersion);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class deleteStreamByNameVersion_argsTupleSchemeFactory implements SchemeFactory {
public deleteStreamByNameVersion_argsTupleScheme getScheme() {
return new deleteStreamByNameVersion_argsTupleScheme();
}
}
private static class deleteStreamByNameVersion_argsTupleScheme extends TupleScheme<deleteStreamByNameVersion_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, deleteStreamByNameVersion_args struct) throws TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetSessionId()) {
optionals.set(0);
}
if (struct.isSetStreamName()) {
optionals.set(1);
}
if (struct.isSetStreamVersion()) {
optionals.set(2);
}
oprot.writeBitSet(optionals, 3);
if (struct.isSetSessionId()) {
oprot.writeString(struct.sessionId);
}
if (struct.isSetStreamName()) {
oprot.writeString(struct.streamName);
}
if (struct.isSetStreamVersion()) {
oprot.writeString(struct.streamVersion);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, deleteStreamByNameVersion_args struct) throws TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(3);
if (incoming.get(0)) {
struct.sessionId = iprot.readString();
struct.setSessionIdIsSet(true);
}
if (incoming.get(1)) {
struct.streamName = iprot.readString();
struct.setStreamNameIsSet(true);
}
if (incoming.get(2)) {
struct.streamVersion = iprot.readString();
struct.setStreamVersionIsSet(true);
}
}
}
}
public static class deleteStreamByNameVersion_result implements org.apache.thrift.TBase<deleteStreamByNameVersion_result, deleteStreamByNameVersion_result._Fields>, java.io.Serializable, Cloneable, Comparable<deleteStreamByNameVersion_result> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("deleteStreamByNameVersion_result");
private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.BOOL, (short)0);
private static final org.apache.thrift.protocol.TField SE_FIELD_DESC = new org.apache.thrift.protocol.TField("se", org.apache.thrift.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 deleteStreamByNameVersion_resultStandardSchemeFactory());
schemes.put(TupleScheme.class, new deleteStreamByNameVersion_resultTupleSchemeFactory());
}
public boolean success; // required
public org.wso2.carbon.databridge.commons.thrift.exception.ThriftSessionExpiredException se; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
SUCCESS((short)0, "success"),
SE((short)1, "se");
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: // SE
return SE;
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
private static final int __SUCCESS_ISSET_ID = 0;
private byte __isset_bitfield = 0;
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
tmpMap.put(_Fields.SE, new org.apache.thrift.meta_data.FieldMetaData("se", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(deleteStreamByNameVersion_result.class, metaDataMap);
}
public deleteStreamByNameVersion_result() {
}
public deleteStreamByNameVersion_result(
boolean success,
org.wso2.carbon.databridge.commons.thrift.exception.ThriftSessionExpiredException se)
{
this();
this.success = success;
setSuccessIsSet(true);
this.se = se;
}
/**
* Performs a deep copy on <i>other</i>.
*/
public deleteStreamByNameVersion_result(deleteStreamByNameVersion_result other) {
__isset_bitfield = other.__isset_bitfield;
this.success = other.success;
if (other.isSetSe()) {
this.se = new org.wso2.carbon.databridge.commons.thrift.exception.ThriftSessionExpiredException(other.se);
}
}
public deleteStreamByNameVersion_result deepCopy() {
return new deleteStreamByNameVersion_result(this);
}
@Override
public void clear() {
setSuccessIsSet(false);
this.success = false;
this.se = null;
}
public boolean isSuccess() {
return this.success;
}
public deleteStreamByNameVersion_result setSuccess(boolean success) {
this.success = success;
setSuccessIsSet(true);
return this;
}
public void unsetSuccess() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID);
}
/** Returns true if field success is set (has been assigned a value) and false otherwise */
public boolean isSetSuccess() {
return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID);
}
public void setSuccessIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value);
}
public org.wso2.carbon.databridge.commons.thrift.exception.ThriftSessionExpiredException getSe() {
return this.se;
}
public deleteStreamByNameVersion_result setSe(org.wso2.carbon.databridge.commons.thrift.exception.ThriftSessionExpiredException se) {
this.se = se;
return this;
}
public void unsetSe() {
this.se = null;
}
/** Returns true if field se is set (has been assigned a value) and false otherwise */
public boolean isSetSe() {
return this.se != null;
}
public void setSeIsSet(boolean value) {
if (!value) {
this.se = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
setSuccess((Boolean)value);
}
break;
case SE:
if (value == null) {
unsetSe();
} else {
setSe((org.wso2.carbon.databridge.commons.thrift.exception.ThriftSessionExpiredException)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return Boolean.valueOf(isSuccess());
case SE:
return getSe();
}
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 SE:
return isSetSe();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof deleteStreamByNameVersion_result)
return this.equals((deleteStreamByNameVersion_result)that);
return false;
}
public boolean equals(deleteStreamByNameVersion_result that) {
if (that == null)
return false;
boolean this_present_success = true;
boolean that_present_success = true;
if (this_present_success || that_present_success) {
if (!(this_present_success && that_present_success))
return false;
if (this.success != that.success)
return false;
}
boolean this_present_se = true && this.isSetSe();
boolean that_present_se = true && that.isSetSe();
if (this_present_se || that_present_se) {
if (!(this_present_se && that_present_se))
return false;
if (!this.se.equals(that.se))
return false;
}
return true;
}
@Override
public int hashCode() {
return 0;
}
@Override
public int compareTo(deleteStreamByNameVersion_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 = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetSe()).compareTo(other.isSetSe());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSe()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.se, other.se);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws TException {
schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws TException {
schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("deleteStreamByNameVersion_result(");
boolean first = true;
sb.append("success:");
sb.append(this.success);
first = false;
if (!first) sb.append(", ");
sb.append("se:");
if (this.se == null) {
sb.append("null");
} else {
sb.append(this.se);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws TException {
// check for required fields
// check for sub-struct validity
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
try {
// it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
__isset_bitfield = 0;
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (TException te) {
throw new java.io.IOException(te);
}
}
private static class deleteStreamByNameVersion_resultStandardSchemeFactory implements SchemeFactory {
public deleteStreamByNameVersion_resultStandardScheme getScheme() {
return new deleteStreamByNameVersion_resultStandardScheme();
}
}
private static class deleteStreamByNameVersion_resultStandardScheme extends StandardScheme<deleteStreamByNameVersion_result> {
public void read(org.apache.thrift.protocol.TProtocol iprot, deleteStreamByNameVersion_result struct) throws TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
{
schemeField = iprot.readFieldBegin();
if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (schemeField.id) {
case 0: // SUCCESS
if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
struct.success = iprot.readBool();
struct.setSuccessIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 1: // SE
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.se = new org.wso2.carbon.databridge.commons.thrift.exception.ThriftSessionExpiredException();
struct.se.read(iprot);
struct.setSeIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
org.apache.thrift.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(org.apache.thrift.protocol.TProtocol oprot, deleteStreamByNameVersion_result struct) throws TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.isSetSuccess()) {
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
oprot.writeBool(struct.success);
oprot.writeFieldEnd();
}
if (struct.se != null) {
oprot.writeFieldBegin(SE_FIELD_DESC);
struct.se.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class deleteStreamByNameVersion_resultTupleSchemeFactory implements SchemeFactory {
public deleteStreamByNameVersion_resultTupleScheme getScheme() {
return new deleteStreamByNameVersion_resultTupleScheme();
}
}
private static class deleteStreamByNameVersion_resultTupleScheme extends TupleScheme<deleteStreamByNameVersion_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, deleteStreamByNameVersion_result struct) throws TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetSuccess()) {
optionals.set(0);
}
if (struct.isSetSe()) {
optionals.set(1);
}
oprot.writeBitSet(optionals, 2);
if (struct.isSetSuccess()) {
oprot.writeBool(struct.success);
}
if (struct.isSetSe()) {
struct.se.write(oprot);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, deleteStreamByNameVersion_result struct) throws TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
struct.success = iprot.readBool();
struct.setSuccessIsSet(true);
}
if (incoming.get(1)) {
struct.se = new org.wso2.carbon.databridge.commons.thrift.exception.ThriftSessionExpiredException();
struct.se.read(iprot);
struct.setSeIsSet(true);
}
}
}
}
}