/**
 * 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.event.processor.common.storm.manager.service;

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 StormManagerService {

  public interface Iface {

    public void registerStormReceiver(int tenantId, String executionPlanName, String hostName, int port) throws org.wso2.carbon.event.processor.common.storm.manager.service.exception.NotStormCoordinatorException, org.apache.thrift.TException;

    public void registerCEPPublisher(int tenantId, String executionPlanName, String hostName, int port) throws org.wso2.carbon.event.processor.common.storm.manager.service.exception.NotStormCoordinatorException, org.apache.thrift.TException;

    public String getStormReceiver(int tenantId, String executionPlanName, String cepReceiverHostName) throws org.wso2.carbon.event.processor.common.storm.manager.service.exception.NotStormCoordinatorException, org.wso2.carbon.event.processor.common.storm.manager.service.exception.EndpointNotFoundException, org.apache.thrift.TException;

    public String getCEPPublisher(int tenantId, String executionPlanName, String stormPublisherHostName) throws org.wso2.carbon.event.processor.common.storm.manager.service.exception.NotStormCoordinatorException, org.wso2.carbon.event.processor.common.storm.manager.service.exception.EndpointNotFoundException, org.apache.thrift.TException;

  }

  public interface AsyncIface {

    public void registerStormReceiver(int tenantId, String executionPlanName, String hostName, int port, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void registerCEPPublisher(int tenantId, String executionPlanName, String hostName, int port, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void getStormReceiver(int tenantId, String executionPlanName, String cepReceiverHostName, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void getCEPPublisher(int tenantId, String executionPlanName, String stormPublisherHostName, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.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 void registerStormReceiver(int tenantId, String executionPlanName, String hostName, int port) throws org.wso2.carbon.event.processor.common.storm.manager.service.exception.NotStormCoordinatorException, org.apache.thrift.TException
    {
      send_registerStormReceiver(tenantId, executionPlanName, hostName, port);
      recv_registerStormReceiver();
    }

    public void send_registerStormReceiver(int tenantId, String executionPlanName, String hostName, int port) throws org.apache.thrift.TException
    {
      registerStormReceiver_args args = new registerStormReceiver_args();
      args.setTenantId(tenantId);
      args.setExecutionPlanName(executionPlanName);
      args.setHostName(hostName);
      args.setPort(port);
      sendBase("registerStormReceiver", args);
    }

    public void recv_registerStormReceiver() throws org.wso2.carbon.event.processor.common.storm.manager.service.exception.NotStormCoordinatorException, org.apache.thrift.TException
    {
      registerStormReceiver_result result = new registerStormReceiver_result();
      receiveBase(result, "registerStormReceiver");
      if (result.nsme != null) {
        throw result.nsme;
      }
      return;
    }

    public void registerCEPPublisher(int tenantId, String executionPlanName, String hostName, int port) throws org.wso2.carbon.event.processor.common.storm.manager.service.exception.NotStormCoordinatorException, org.apache.thrift.TException
    {
      send_registerCEPPublisher(tenantId, executionPlanName, hostName, port);
      recv_registerCEPPublisher();
    }

    public void send_registerCEPPublisher(int tenantId, String executionPlanName, String hostName, int port) throws org.apache.thrift.TException
    {
      registerCEPPublisher_args args = new registerCEPPublisher_args();
      args.setTenantId(tenantId);
      args.setExecutionPlanName(executionPlanName);
      args.setHostName(hostName);
      args.setPort(port);
      sendBase("registerCEPPublisher", args);
    }

    public void recv_registerCEPPublisher() throws org.wso2.carbon.event.processor.common.storm.manager.service.exception.NotStormCoordinatorException, org.apache.thrift.TException
    {
      registerCEPPublisher_result result = new registerCEPPublisher_result();
      receiveBase(result, "registerCEPPublisher");
      if (result.nsme != null) {
        throw result.nsme;
      }
      return;
    }

    public String getStormReceiver(int tenantId, String executionPlanName, String cepReceiverHostName) throws org.wso2.carbon.event.processor.common.storm.manager.service.exception.NotStormCoordinatorException, org.wso2.carbon.event.processor.common.storm.manager.service.exception.EndpointNotFoundException, org.apache.thrift.TException
    {
      send_getStormReceiver(tenantId, executionPlanName, cepReceiverHostName);
      return recv_getStormReceiver();
    }

    public void send_getStormReceiver(int tenantId, String executionPlanName, String cepReceiverHostName) throws org.apache.thrift.TException
    {
      getStormReceiver_args args = new getStormReceiver_args();
      args.setTenantId(tenantId);
      args.setExecutionPlanName(executionPlanName);
      args.setCepReceiverHostName(cepReceiverHostName);
      sendBase("getStormReceiver", args);
    }

    public String recv_getStormReceiver() throws org.wso2.carbon.event.processor.common.storm.manager.service.exception.NotStormCoordinatorException, org.wso2.carbon.event.processor.common.storm.manager.service.exception.EndpointNotFoundException, org.apache.thrift.TException
    {
      getStormReceiver_result result = new getStormReceiver_result();
      receiveBase(result, "getStormReceiver");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.nsme != null) {
        throw result.nsme;
      }
      if (result.enfe != null) {
        throw result.enfe;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getStormReceiver failed: unknown result");
    }

    public String getCEPPublisher(int tenantId, String executionPlanName, String stormPublisherHostName) throws org.wso2.carbon.event.processor.common.storm.manager.service.exception.NotStormCoordinatorException, org.wso2.carbon.event.processor.common.storm.manager.service.exception.EndpointNotFoundException, org.apache.thrift.TException
    {
      send_getCEPPublisher(tenantId, executionPlanName, stormPublisherHostName);
      return recv_getCEPPublisher();
    }

    public void send_getCEPPublisher(int tenantId, String executionPlanName, String stormPublisherHostName) throws org.apache.thrift.TException
    {
      getCEPPublisher_args args = new getCEPPublisher_args();
      args.setTenantId(tenantId);
      args.setExecutionPlanName(executionPlanName);
      args.setStormPublisherHostName(stormPublisherHostName);
      sendBase("getCEPPublisher", args);
    }

    public String recv_getCEPPublisher() throws org.wso2.carbon.event.processor.common.storm.manager.service.exception.NotStormCoordinatorException, org.wso2.carbon.event.processor.common.storm.manager.service.exception.EndpointNotFoundException, org.apache.thrift.TException
    {
      getCEPPublisher_result result = new getCEPPublisher_result();
      receiveBase(result, "getCEPPublisher");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.nsme != null) {
        throw result.nsme;
      }
      if (result.enfe != null) {
        throw result.enfe;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getCEPPublisher 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 registerStormReceiver(int tenantId, String executionPlanName, String hostName, int port, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
      checkReady();
      registerStormReceiver_call method_call = new registerStormReceiver_call(tenantId, executionPlanName, hostName, port, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class registerStormReceiver_call extends org.apache.thrift.async.TAsyncMethodCall {
      private int tenantId;
      private String executionPlanName;
      private String hostName;
      private int port;
      public registerStormReceiver_call(int tenantId, String executionPlanName, String hostName, int port, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.tenantId = tenantId;
        this.executionPlanName = executionPlanName;
        this.hostName = hostName;
        this.port = port;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("registerStormReceiver", org.apache.thrift.protocol.TMessageType.CALL, 0));
        registerStormReceiver_args args = new registerStormReceiver_args();
        args.setTenantId(tenantId);
        args.setExecutionPlanName(executionPlanName);
        args.setHostName(hostName);
        args.setPort(port);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public void getResult() throws org.wso2.carbon.event.processor.common.storm.manager.service.exception.NotStormCoordinatorException, org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.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_registerStormReceiver();
      }
    }

    public void registerCEPPublisher(int tenantId, String executionPlanName, String hostName, int port, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
      checkReady();
      registerCEPPublisher_call method_call = new registerCEPPublisher_call(tenantId, executionPlanName, hostName, port, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class registerCEPPublisher_call extends org.apache.thrift.async.TAsyncMethodCall {
      private int tenantId;
      private String executionPlanName;
      private String hostName;
      private int port;
      public registerCEPPublisher_call(int tenantId, String executionPlanName, String hostName, int port, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.tenantId = tenantId;
        this.executionPlanName = executionPlanName;
        this.hostName = hostName;
        this.port = port;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("registerCEPPublisher", org.apache.thrift.protocol.TMessageType.CALL, 0));
        registerCEPPublisher_args args = new registerCEPPublisher_args();
        args.setTenantId(tenantId);
        args.setExecutionPlanName(executionPlanName);
        args.setHostName(hostName);
        args.setPort(port);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public void getResult() throws org.wso2.carbon.event.processor.common.storm.manager.service.exception.NotStormCoordinatorException, org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.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_registerCEPPublisher();
      }
    }

    public void getStormReceiver(int tenantId, String executionPlanName, String cepReceiverHostName, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
      checkReady();
      getStormReceiver_call method_call = new getStormReceiver_call(tenantId, executionPlanName, cepReceiverHostName, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class getStormReceiver_call extends org.apache.thrift.async.TAsyncMethodCall {
      private int tenantId;
      private String executionPlanName;
      private String cepReceiverHostName;
      public getStormReceiver_call(int tenantId, String executionPlanName, String cepReceiverHostName, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.tenantId = tenantId;
        this.executionPlanName = executionPlanName;
        this.cepReceiverHostName = cepReceiverHostName;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getStormReceiver", org.apache.thrift.protocol.TMessageType.CALL, 0));
        getStormReceiver_args args = new getStormReceiver_args();
        args.setTenantId(tenantId);
        args.setExecutionPlanName(executionPlanName);
        args.setCepReceiverHostName(cepReceiverHostName);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public String getResult() throws org.wso2.carbon.event.processor.common.storm.manager.service.exception.NotStormCoordinatorException, org.wso2.carbon.event.processor.common.storm.manager.service.exception.EndpointNotFoundException, org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.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_getStormReceiver();
      }
    }

    public void getCEPPublisher(int tenantId, String executionPlanName, String stormPublisherHostName, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
      checkReady();
      getCEPPublisher_call method_call = new getCEPPublisher_call(tenantId, executionPlanName, stormPublisherHostName, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class getCEPPublisher_call extends org.apache.thrift.async.TAsyncMethodCall {
      private int tenantId;
      private String executionPlanName;
      private String stormPublisherHostName;
      public getCEPPublisher_call(int tenantId, String executionPlanName, String stormPublisherHostName, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.tenantId = tenantId;
        this.executionPlanName = executionPlanName;
        this.stormPublisherHostName = stormPublisherHostName;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getCEPPublisher", org.apache.thrift.protocol.TMessageType.CALL, 0));
        getCEPPublisher_args args = new getCEPPublisher_args();
        args.setTenantId(tenantId);
        args.setExecutionPlanName(executionPlanName);
        args.setStormPublisherHostName(stormPublisherHostName);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public String getResult() throws org.wso2.carbon.event.processor.common.storm.manager.service.exception.NotStormCoordinatorException, org.wso2.carbon.event.processor.common.storm.manager.service.exception.EndpointNotFoundException, org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.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_getCEPPublisher();
      }
    }

  }

  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("registerStormReceiver", new registerStormReceiver());
      processMap.put("registerCEPPublisher", new registerCEPPublisher());
      processMap.put("getStormReceiver", new getStormReceiver());
      processMap.put("getCEPPublisher", new getCEPPublisher());
      return processMap;
    }

    public static class registerStormReceiver<I extends Iface> extends org.apache.thrift.ProcessFunction<I, registerStormReceiver_args> {
      public registerStormReceiver() {
        super("registerStormReceiver");
      }

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

      protected boolean isOneway() {
        return false;
      }

      public registerStormReceiver_result getResult(I iface, registerStormReceiver_args args) throws org.apache.thrift.TException {
        registerStormReceiver_result result = new registerStormReceiver_result();
        try {
          iface.registerStormReceiver(args.tenantId, args.executionPlanName, args.hostName, args.port);
        } catch (org.wso2.carbon.event.processor.common.storm.manager.service.exception.NotStormCoordinatorException nsme) {
          result.nsme = nsme;
        }
        return result;
      }
    }

    public static class registerCEPPublisher<I extends Iface> extends org.apache.thrift.ProcessFunction<I, registerCEPPublisher_args> {
      public registerCEPPublisher() {
        super("registerCEPPublisher");
      }

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

      protected boolean isOneway() {
        return false;
      }

      public registerCEPPublisher_result getResult(I iface, registerCEPPublisher_args args) throws org.apache.thrift.TException {
        registerCEPPublisher_result result = new registerCEPPublisher_result();
        try {
          iface.registerCEPPublisher(args.tenantId, args.executionPlanName, args.hostName, args.port);
        } catch (org.wso2.carbon.event.processor.common.storm.manager.service.exception.NotStormCoordinatorException nsme) {
          result.nsme = nsme;
        }
        return result;
      }
    }

    public static class getStormReceiver<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getStormReceiver_args> {
      public getStormReceiver() {
        super("getStormReceiver");
      }

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

      protected boolean isOneway() {
        return false;
      }

      public getStormReceiver_result getResult(I iface, getStormReceiver_args args) throws org.apache.thrift.TException {
        getStormReceiver_result result = new getStormReceiver_result();
        try {
          result.success = iface.getStormReceiver(args.tenantId, args.executionPlanName, args.cepReceiverHostName);
        } catch (org.wso2.carbon.event.processor.common.storm.manager.service.exception.NotStormCoordinatorException nsme) {
          result.nsme = nsme;
        } catch (org.wso2.carbon.event.processor.common.storm.manager.service.exception.EndpointNotFoundException enfe) {
          result.enfe = enfe;
        }
        return result;
      }
    }

    public static class getCEPPublisher<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getCEPPublisher_args> {
      public getCEPPublisher() {
        super("getCEPPublisher");
      }

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

      protected boolean isOneway() {
        return false;
      }

      public getCEPPublisher_result getResult(I iface, getCEPPublisher_args args) throws org.apache.thrift.TException {
        getCEPPublisher_result result = new getCEPPublisher_result();
        try {
          result.success = iface.getCEPPublisher(args.tenantId, args.executionPlanName, args.stormPublisherHostName);
        } catch (org.wso2.carbon.event.processor.common.storm.manager.service.exception.NotStormCoordinatorException nsme) {
          result.nsme = nsme;
        } catch (org.wso2.carbon.event.processor.common.storm.manager.service.exception.EndpointNotFoundException enfe) {
          result.enfe = enfe;
        }
        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("registerStormReceiver", new registerStormReceiver());
      processMap.put("registerCEPPublisher", new registerCEPPublisher());
      processMap.put("getStormReceiver", new getStormReceiver());
      processMap.put("getCEPPublisher", new getCEPPublisher());
      return processMap;
    }

    public static class registerStormReceiver<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, registerStormReceiver_args, Void> {
      public registerStormReceiver() {
        super("registerStormReceiver");
      }

      public registerStormReceiver_args getEmptyArgsInstance() {
        return new registerStormReceiver_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) {
            registerStormReceiver_result result = new registerStormReceiver_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;
            registerStormReceiver_result result = new registerStormReceiver_result();
            if (e instanceof org.wso2.carbon.event.processor.common.storm.manager.service.exception.NotStormCoordinatorException) {
                        result.nsme = (org.wso2.carbon.event.processor.common.storm.manager.service.exception.NotStormCoordinatorException) e;
                        result.setNsmeIsSet(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, registerStormReceiver_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws TException {
        iface.registerStormReceiver(args.tenantId, args.executionPlanName, args.hostName, args.port,resultHandler);
      }
    }

    public static class registerCEPPublisher<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, registerCEPPublisher_args, Void> {
      public registerCEPPublisher() {
        super("registerCEPPublisher");
      }

      public registerCEPPublisher_args getEmptyArgsInstance() {
        return new registerCEPPublisher_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) {
            registerCEPPublisher_result result = new registerCEPPublisher_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;
            registerCEPPublisher_result result = new registerCEPPublisher_result();
            if (e instanceof org.wso2.carbon.event.processor.common.storm.manager.service.exception.NotStormCoordinatorException) {
                        result.nsme = (org.wso2.carbon.event.processor.common.storm.manager.service.exception.NotStormCoordinatorException) e;
                        result.setNsmeIsSet(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, registerCEPPublisher_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws TException {
        iface.registerCEPPublisher(args.tenantId, args.executionPlanName, args.hostName, args.port,resultHandler);
      }
    }

    public static class getStormReceiver<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getStormReceiver_args, String> {
      public getStormReceiver() {
        super("getStormReceiver");
      }

      public getStormReceiver_args getEmptyArgsInstance() {
        return new getStormReceiver_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) {
            getStormReceiver_result result = new getStormReceiver_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;
            getStormReceiver_result result = new getStormReceiver_result();
            if (e instanceof org.wso2.carbon.event.processor.common.storm.manager.service.exception.NotStormCoordinatorException) {
                        result.nsme = (org.wso2.carbon.event.processor.common.storm.manager.service.exception.NotStormCoordinatorException) e;
                        result.setNsmeIsSet(true);
                        msg = result;
            }
            else             if (e instanceof org.wso2.carbon.event.processor.common.storm.manager.service.exception.EndpointNotFoundException) {
                        result.enfe = (org.wso2.carbon.event.processor.common.storm.manager.service.exception.EndpointNotFoundException) e;
                        result.setEnfeIsSet(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, getStormReceiver_args args, org.apache.thrift.async.AsyncMethodCallback<String> resultHandler) throws TException {
        iface.getStormReceiver(args.tenantId, args.executionPlanName, args.cepReceiverHostName,resultHandler);
      }
    }

    public static class getCEPPublisher<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getCEPPublisher_args, String> {
      public getCEPPublisher() {
        super("getCEPPublisher");
      }

      public getCEPPublisher_args getEmptyArgsInstance() {
        return new getCEPPublisher_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) {
            getCEPPublisher_result result = new getCEPPublisher_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;
            getCEPPublisher_result result = new getCEPPublisher_result();
            if (e instanceof org.wso2.carbon.event.processor.common.storm.manager.service.exception.NotStormCoordinatorException) {
                        result.nsme = (org.wso2.carbon.event.processor.common.storm.manager.service.exception.NotStormCoordinatorException) e;
                        result.setNsmeIsSet(true);
                        msg = result;
            }
            else             if (e instanceof org.wso2.carbon.event.processor.common.storm.manager.service.exception.EndpointNotFoundException) {
                        result.enfe = (org.wso2.carbon.event.processor.common.storm.manager.service.exception.EndpointNotFoundException) e;
                        result.setEnfeIsSet(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, getCEPPublisher_args args, org.apache.thrift.async.AsyncMethodCallback<String> resultHandler) throws TException {
        iface.getCEPPublisher(args.tenantId, args.executionPlanName, args.stormPublisherHostName,resultHandler);
      }
    }

  }

  public static class registerStormReceiver_args implements org.apache.thrift.TBase<registerStormReceiver_args, registerStormReceiver_args._Fields>, java.io.Serializable, Cloneable, Comparable<registerStormReceiver_args>   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("registerStormReceiver_args");

    private static final org.apache.thrift.protocol.TField TENANT_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("tenantId", org.apache.thrift.protocol.TType.I32, (short)1);
    private static final org.apache.thrift.protocol.TField EXECUTION_PLAN_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("executionPlanName", org.apache.thrift.protocol.TType.STRING, (short)2);
    private static final org.apache.thrift.protocol.TField HOST_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("hostName", org.apache.thrift.protocol.TType.STRING, (short)3);
    private static final org.apache.thrift.protocol.TField PORT_FIELD_DESC = new org.apache.thrift.protocol.TField("port", org.apache.thrift.protocol.TType.I32, (short)4);

    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
    static {
      schemes.put(StandardScheme.class, new registerStormReceiver_argsStandardSchemeFactory());
      schemes.put(TupleScheme.class, new registerStormReceiver_argsTupleSchemeFactory());
    }

    public int tenantId; // required
    public String executionPlanName; // required
    public String hostName; // required
    public int port; // 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 {
      TENANT_ID((short)1, "tenantId"),
      EXECUTION_PLAN_NAME((short)2, "executionPlanName"),
      HOST_NAME((short)3, "hostName"),
      PORT((short)4, "port");

      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: // TENANT_ID
            return TENANT_ID;
          case 2: // EXECUTION_PLAN_NAME
            return EXECUTION_PLAN_NAME;
          case 3: // HOST_NAME
            return HOST_NAME;
          case 4: // PORT
            return PORT;
          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 __TENANTID_ISSET_ID = 0;
    private static final int __PORT_ISSET_ID = 1;
    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.TENANT_ID, new org.apache.thrift.meta_data.FieldMetaData("tenantId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
      tmpMap.put(_Fields.EXECUTION_PLAN_NAME, new org.apache.thrift.meta_data.FieldMetaData("executionPlanName", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
      tmpMap.put(_Fields.HOST_NAME, new org.apache.thrift.meta_data.FieldMetaData("hostName", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
      tmpMap.put(_Fields.PORT, new org.apache.thrift.meta_data.FieldMetaData("port", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(registerStormReceiver_args.class, metaDataMap);
    }

    public registerStormReceiver_args() {
    }

    public registerStormReceiver_args(
      int tenantId,
      String executionPlanName,
      String hostName,
      int port)
    {
      this();
      this.tenantId = tenantId;
      setTenantIdIsSet(true);
      this.executionPlanName = executionPlanName;
      this.hostName = hostName;
      this.port = port;
      setPortIsSet(true);
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public registerStormReceiver_args(registerStormReceiver_args other) {
      __isset_bitfield = other.__isset_bitfield;
      this.tenantId = other.tenantId;
      if (other.isSetExecutionPlanName()) {
        this.executionPlanName = other.executionPlanName;
      }
      if (other.isSetHostName()) {
        this.hostName = other.hostName;
      }
      this.port = other.port;
    }

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

    @Override
    public void clear() {
      setTenantIdIsSet(false);
      this.tenantId = 0;
      this.executionPlanName = null;
      this.hostName = null;
      setPortIsSet(false);
      this.port = 0;
    }

    public int getTenantId() {
      return this.tenantId;
    }

    public registerStormReceiver_args setTenantId(int tenantId) {
      this.tenantId = tenantId;
      setTenantIdIsSet(true);
      return this;
    }

    public void unsetTenantId() {
      __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __TENANTID_ISSET_ID);
    }

    /** Returns true if field tenantId is set (has been assigned a value) and false otherwise */
    public boolean isSetTenantId() {
      return EncodingUtils.testBit(__isset_bitfield, __TENANTID_ISSET_ID);
    }

    public void setTenantIdIsSet(boolean value) {
      __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __TENANTID_ISSET_ID, value);
    }

    public String getExecutionPlanName() {
      return this.executionPlanName;
    }

    public registerStormReceiver_args setExecutionPlanName(String executionPlanName) {
      this.executionPlanName = executionPlanName;
      return this;
    }

    public void unsetExecutionPlanName() {
      this.executionPlanName = null;
    }

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

    public void setExecutionPlanNameIsSet(boolean value) {
      if (!value) {
        this.executionPlanName = null;
      }
    }

    public String getHostName() {
      return this.hostName;
    }

    public registerStormReceiver_args setHostName(String hostName) {
      this.hostName = hostName;
      return this;
    }

    public void unsetHostName() {
      this.hostName = null;
    }

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

    public void setHostNameIsSet(boolean value) {
      if (!value) {
        this.hostName = null;
      }
    }

    public int getPort() {
      return this.port;
    }

    public registerStormReceiver_args setPort(int port) {
      this.port = port;
      setPortIsSet(true);
      return this;
    }

    public void unsetPort() {
      __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __PORT_ISSET_ID);
    }

    /** Returns true if field port is set (has been assigned a value) and false otherwise */
    public boolean isSetPort() {
      return EncodingUtils.testBit(__isset_bitfield, __PORT_ISSET_ID);
    }

    public void setPortIsSet(boolean value) {
      __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __PORT_ISSET_ID, value);
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case TENANT_ID:
        if (value == null) {
          unsetTenantId();
        } else {
          setTenantId((Integer)value);
        }
        break;

      case EXECUTION_PLAN_NAME:
        if (value == null) {
          unsetExecutionPlanName();
        } else {
          setExecutionPlanName((String)value);
        }
        break;

      case HOST_NAME:
        if (value == null) {
          unsetHostName();
        } else {
          setHostName((String)value);
        }
        break;

      case PORT:
        if (value == null) {
          unsetPort();
        } else {
          setPort((Integer)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case TENANT_ID:
        return Integer.valueOf(getTenantId());

      case EXECUTION_PLAN_NAME:
        return getExecutionPlanName();

      case HOST_NAME:
        return getHostName();

      case PORT:
        return Integer.valueOf(getPort());

      }
      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 TENANT_ID:
        return isSetTenantId();
      case EXECUTION_PLAN_NAME:
        return isSetExecutionPlanName();
      case HOST_NAME:
        return isSetHostName();
      case PORT:
        return isSetPort();
      }
      throw new IllegalStateException();
    }

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

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

      boolean this_present_tenantId = true;
      boolean that_present_tenantId = true;
      if (this_present_tenantId || that_present_tenantId) {
        if (!(this_present_tenantId && that_present_tenantId))
          return false;
        if (this.tenantId != that.tenantId)
          return false;
      }

      boolean this_present_executionPlanName = true && this.isSetExecutionPlanName();
      boolean that_present_executionPlanName = true && that.isSetExecutionPlanName();
      if (this_present_executionPlanName || that_present_executionPlanName) {
        if (!(this_present_executionPlanName && that_present_executionPlanName))
          return false;
        if (!this.executionPlanName.equals(that.executionPlanName))
          return false;
      }

      boolean this_present_hostName = true && this.isSetHostName();
      boolean that_present_hostName = true && that.isSetHostName();
      if (this_present_hostName || that_present_hostName) {
        if (!(this_present_hostName && that_present_hostName))
          return false;
        if (!this.hostName.equals(that.hostName))
          return false;
      }

      boolean this_present_port = true;
      boolean that_present_port = true;
      if (this_present_port || that_present_port) {
        if (!(this_present_port && that_present_port))
          return false;
        if (this.port != that.port)
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

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

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetTenantId()).compareTo(other.isSetTenantId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetTenantId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tenantId, other.tenantId);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetExecutionPlanName()).compareTo(other.isSetExecutionPlanName());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetExecutionPlanName()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.executionPlanName, other.executionPlanName);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetHostName()).compareTo(other.isSetHostName());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetHostName()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.hostName, other.hostName);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetPort()).compareTo(other.isSetPort());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetPort()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.port, other.port);
        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 org.apache.thrift.TException {
      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
    }

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

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

      sb.append("tenantId:");
      sb.append(this.tenantId);
      first = false;
      if (!first) sb.append(", ");
      sb.append("executionPlanName:");
      if (this.executionPlanName == null) {
        sb.append("null");
      } else {
        sb.append(this.executionPlanName);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("hostName:");
      if (this.hostName == null) {
        sb.append("null");
      } else {
        sb.append(this.hostName);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("port:");
      sb.append(this.port);
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.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 (org.apache.thrift.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 (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private static class registerStormReceiver_argsStandardSchemeFactory implements SchemeFactory {
      public registerStormReceiver_argsStandardScheme getScheme() {
        return new registerStormReceiver_argsStandardScheme();
      }
    }

    private static class registerStormReceiver_argsStandardScheme extends StandardScheme<registerStormReceiver_args> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, registerStormReceiver_args struct) throws org.apache.thrift.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: // TENANT_ID
              if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
                struct.tenantId = iprot.readI32();
                struct.setTenantIdIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // EXECUTION_PLAN_NAME
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.executionPlanName = iprot.readString();
                struct.setExecutionPlanNameIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 3: // HOST_NAME
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.hostName = iprot.readString();
                struct.setHostNameIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 4: // PORT
              if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
                struct.port = iprot.readI32();
                struct.setPortIsSet(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, registerStormReceiver_args struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        oprot.writeFieldBegin(TENANT_ID_FIELD_DESC);
        oprot.writeI32(struct.tenantId);
        oprot.writeFieldEnd();
        if (struct.executionPlanName != null) {
          oprot.writeFieldBegin(EXECUTION_PLAN_NAME_FIELD_DESC);
          oprot.writeString(struct.executionPlanName);
          oprot.writeFieldEnd();
        }
        if (struct.hostName != null) {
          oprot.writeFieldBegin(HOST_NAME_FIELD_DESC);
          oprot.writeString(struct.hostName);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldBegin(PORT_FIELD_DESC);
        oprot.writeI32(struct.port);
        oprot.writeFieldEnd();
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class registerStormReceiver_argsTupleSchemeFactory implements SchemeFactory {
      public registerStormReceiver_argsTupleScheme getScheme() {
        return new registerStormReceiver_argsTupleScheme();
      }
    }

    private static class registerStormReceiver_argsTupleScheme extends TupleScheme<registerStormReceiver_args> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, registerStormReceiver_args struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetTenantId()) {
          optionals.set(0);
        }
        if (struct.isSetExecutionPlanName()) {
          optionals.set(1);
        }
        if (struct.isSetHostName()) {
          optionals.set(2);
        }
        if (struct.isSetPort()) {
          optionals.set(3);
        }
        oprot.writeBitSet(optionals, 4);
        if (struct.isSetTenantId()) {
          oprot.writeI32(struct.tenantId);
        }
        if (struct.isSetExecutionPlanName()) {
          oprot.writeString(struct.executionPlanName);
        }
        if (struct.isSetHostName()) {
          oprot.writeString(struct.hostName);
        }
        if (struct.isSetPort()) {
          oprot.writeI32(struct.port);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, registerStormReceiver_args struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(4);
        if (incoming.get(0)) {
          struct.tenantId = iprot.readI32();
          struct.setTenantIdIsSet(true);
        }
        if (incoming.get(1)) {
          struct.executionPlanName = iprot.readString();
          struct.setExecutionPlanNameIsSet(true);
        }
        if (incoming.get(2)) {
          struct.hostName = iprot.readString();
          struct.setHostNameIsSet(true);
        }
        if (incoming.get(3)) {
          struct.port = iprot.readI32();
          struct.setPortIsSet(true);
        }
      }
    }

  }

  public static class registerStormReceiver_result implements org.apache.thrift.TBase<registerStormReceiver_result, registerStormReceiver_result._Fields>, java.io.Serializable, Cloneable, Comparable<registerStormReceiver_result>   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("registerStormReceiver_result");

    private static final org.apache.thrift.protocol.TField NSME_FIELD_DESC = new org.apache.thrift.protocol.TField("nsme", 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 registerStormReceiver_resultStandardSchemeFactory());
      schemes.put(TupleScheme.class, new registerStormReceiver_resultTupleSchemeFactory());
    }

    public org.wso2.carbon.event.processor.common.storm.manager.service.exception.NotStormCoordinatorException nsme; // 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 {
      NSME((short)1, "nsme");

      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: // NSME
            return NSME;
          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.NSME, new org.apache.thrift.meta_data.FieldMetaData("nsme", 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(registerStormReceiver_result.class, metaDataMap);
    }

    public registerStormReceiver_result() {
    }

    public registerStormReceiver_result(
      org.wso2.carbon.event.processor.common.storm.manager.service.exception.NotStormCoordinatorException nsme)
    {
      this();
      this.nsme = nsme;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public registerStormReceiver_result(registerStormReceiver_result other) {
      if (other.isSetNsme()) {
        this.nsme = new org.wso2.carbon.event.processor.common.storm.manager.service.exception.NotStormCoordinatorException(other.nsme);
      }
    }

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

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

    public org.wso2.carbon.event.processor.common.storm.manager.service.exception.NotStormCoordinatorException getNsme() {
      return this.nsme;
    }

    public registerStormReceiver_result setNsme(org.wso2.carbon.event.processor.common.storm.manager.service.exception.NotStormCoordinatorException nsme) {
      this.nsme = nsme;
      return this;
    }

    public void unsetNsme() {
      this.nsme = null;
    }

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

    public void setNsmeIsSet(boolean value) {
      if (!value) {
        this.nsme = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case NSME:
        if (value == null) {
          unsetNsme();
        } else {
          setNsme((org.wso2.carbon.event.processor.common.storm.manager.service.exception.NotStormCoordinatorException)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case NSME:
        return getNsme();

      }
      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 NSME:
        return isSetNsme();
      }
      throw new IllegalStateException();
    }

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

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

      boolean this_present_nsme = true && this.isSetNsme();
      boolean that_present_nsme = true && that.isSetNsme();
      if (this_present_nsme || that_present_nsme) {
        if (!(this_present_nsme && that_present_nsme))
          return false;
        if (!this.nsme.equals(that.nsme))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

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

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetNsme()).compareTo(other.isSetNsme());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetNsme()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.nsme, other.nsme);
        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 org.apache.thrift.TException {
      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
    }

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

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

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

    public void validate() throws org.apache.thrift.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 (org.apache.thrift.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 (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private static class registerStormReceiver_resultStandardSchemeFactory implements SchemeFactory {
      public registerStormReceiver_resultStandardScheme getScheme() {
        return new registerStormReceiver_resultStandardScheme();
      }
    }

    private static class registerStormReceiver_resultStandardScheme extends StandardScheme<registerStormReceiver_result> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, registerStormReceiver_result struct) throws org.apache.thrift.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: // NSME
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.nsme = new org.wso2.carbon.event.processor.common.storm.manager.service.exception.NotStormCoordinatorException();
                struct.nsme.read(iprot);
                struct.setNsmeIsSet(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, registerStormReceiver_result struct) throws org.apache.thrift.TException {
        struct.validate();

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

    }

    private static class registerStormReceiver_resultTupleSchemeFactory implements SchemeFactory {
      public registerStormReceiver_resultTupleScheme getScheme() {
        return new registerStormReceiver_resultTupleScheme();
      }
    }

    private static class registerStormReceiver_resultTupleScheme extends TupleScheme<registerStormReceiver_result> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, registerStormReceiver_result struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetNsme()) {
          optionals.set(0);
        }
        oprot.writeBitSet(optionals, 1);
        if (struct.isSetNsme()) {
          struct.nsme.write(oprot);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, registerStormReceiver_result struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(1);
        if (incoming.get(0)) {
          struct.nsme = new org.wso2.carbon.event.processor.common.storm.manager.service.exception.NotStormCoordinatorException();
          struct.nsme.read(iprot);
          struct.setNsmeIsSet(true);
        }
      }
    }

  }

  public static class registerCEPPublisher_args implements org.apache.thrift.TBase<registerCEPPublisher_args, registerCEPPublisher_args._Fields>, java.io.Serializable, Cloneable, Comparable<registerCEPPublisher_args>   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("registerCEPPublisher_args");

    private static final org.apache.thrift.protocol.TField TENANT_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("tenantId", org.apache.thrift.protocol.TType.I32, (short)1);
    private static final org.apache.thrift.protocol.TField EXECUTION_PLAN_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("executionPlanName", org.apache.thrift.protocol.TType.STRING, (short)2);
    private static final org.apache.thrift.protocol.TField HOST_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("hostName", org.apache.thrift.protocol.TType.STRING, (short)3);
    private static final org.apache.thrift.protocol.TField PORT_FIELD_DESC = new org.apache.thrift.protocol.TField("port", org.apache.thrift.protocol.TType.I32, (short)4);

    private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
    static {
      schemes.put(StandardScheme.class, new registerCEPPublisher_argsStandardSchemeFactory());
      schemes.put(TupleScheme.class, new registerCEPPublisher_argsTupleSchemeFactory());
    }

    public int tenantId; // required
    public String executionPlanName; // required
    public String hostName; // required
    public int port; // 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 {
      TENANT_ID((short)1, "tenantId"),
      EXECUTION_PLAN_NAME((short)2, "executionPlanName"),
      HOST_NAME((short)3, "hostName"),
      PORT((short)4, "port");

      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: // TENANT_ID
            return TENANT_ID;
          case 2: // EXECUTION_PLAN_NAME
            return EXECUTION_PLAN_NAME;
          case 3: // HOST_NAME
            return HOST_NAME;
          case 4: // PORT
            return PORT;
          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 __TENANTID_ISSET_ID = 0;
    private static final int __PORT_ISSET_ID = 1;
    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.TENANT_ID, new org.apache.thrift.meta_data.FieldMetaData("tenantId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
      tmpMap.put(_Fields.EXECUTION_PLAN_NAME, new org.apache.thrift.meta_data.FieldMetaData("executionPlanName", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
      tmpMap.put(_Fields.HOST_NAME, new org.apache.thrift.meta_data.FieldMetaData("hostName", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
      tmpMap.put(_Fields.PORT, new org.apache.thrift.meta_data.FieldMetaData("port", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(registerCEPPublisher_args.class, metaDataMap);
    }

    public registerCEPPublisher_args() {
    }

    public registerCEPPublisher_args(
      int tenantId,
      String executionPlanName,
      String hostName,
      int port)
    {
      this();
      this.tenantId = tenantId;
      setTenantIdIsSet(true);
      this.executionPlanName = executionPlanName;
      this.hostName = hostName;
      this.port = port;
      setPortIsSet(true);
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public registerCEPPublisher_args(registerCEPPublisher_args other) {
      __isset_bitfield = other.__isset_bitfield;
      this.tenantId = other.tenantId;
      if (other.isSetExecutionPlanName()) {
        this.executionPlanName = other.executionPlanName;
      }
      if (other.isSetHostName()) {
        this.hostName = other.hostName;
      }
      this.port = other.port;
    }

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

    @Override
    public void clear() {
      setTenantIdIsSet(false);
      this.tenantId = 0;
      this.executionPlanName = null;
      this.hostName = null;
      setPortIsSet(false);
      this.port = 0;
    }

    public int getTenantId() {
      return this.tenantId;
    }

    public registerCEPPublisher_args setTenantId(int tenantId) {
      this.tenantId = tenantId;
      setTenantIdIsSet(true);
      return this;
    }

    public void unsetTenantId() {
      __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __TENANTID_ISSET_ID);
    }

    /** Returns true if field tenantId is set (has been assigned a value) and false otherwise */
    public boolean isSetTenantId() {
      return EncodingUtils.testBit(__isset_bitfield, __TENANTID_ISSET_ID);
    }

    public void setTenantIdIsSet(boolean value) {
      __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __TENANTID_ISSET_ID, value);
    }

    public String getExecutionPlanName() {
      return this.executionPlanName;
    }

    public registerCEPPublisher_args setExecutionPlanName(String executionPlanName) {
      this.executionPlanName = executionPlanName;
      return this;
    }

    public void unsetExecutionPlanName() {
      this.executionPlanName = null;
    }

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

    public void setExecutionPlanNameIsSet(boolean value) {
      if (!value) {
        this.executionPlanName = null;
      }
    }

    public String getHostName() {
      return this.hostName;
    }

    public registerCEPPublisher_args setHostName(String hostName) {
      this.hostName = hostName;
      return this;
    }

    public void unsetHostName() {
      this.hostName = null;
    }

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

    public void setHostNameIsSet(boolean value) {
      if (!value) {
        this.hostName = null;
      }
    }

    public int getPort() {
      return this.port;
    }

    public registerCEPPublisher_args setPort(int port) {
      this.port = port;
      setPortIsSet(true);
      return this;
    }

    public void unsetPort() {
      __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __PORT_ISSET_ID);
    }

    /** Returns true if field port is set (has been assigned a value) and false otherwise */
    public boolean isSetPort() {
      return EncodingUtils.testBit(__isset_bitfield, __PORT_ISSET_ID);
    }

    public void setPortIsSet(boolean value) {
      __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __PORT_ISSET_ID, value);
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case TENANT_ID:
        if (value == null) {
          unsetTenantId();
        } else {
          setTenantId((Integer)value);
        }
        break;

      case EXECUTION_PLAN_NAME:
        if (value == null) {
          unsetExecutionPlanName();
        } else {
          setExecutionPlanName((String)value);
        }
        break;

      case HOST_NAME:
        if (value == null) {
          unsetHostName();
        } else {
          setHostName((String)value);
        }
        break;

      case PORT:
        if (value == null) {
          unsetPort();
        } else {
          setPort((Integer)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case TENANT_ID:
        return Integer.valueOf(getTenantId());

      case EXECUTION_PLAN_NAME:
        return getExecutionPlanName();

      case HOST_NAME:
        return getHostName();

      case PORT:
        return Integer.valueOf(getPort());

      }
      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 TENANT_ID:
        return isSetTenantId();
      case EXECUTION_PLAN_NAME:
        return isSetExecutionPlanName();
      case HOST_NAME:
        return isSetHostName();
      case PORT:
        return isSetPort();
      }
      throw new IllegalStateException();
    }

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

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

      boolean this_present_tenantId = true;
      boolean that_present_tenantId = true;
      if (this_present_tenantId || that_present_tenantId) {
        if (!(this_present_tenantId && that_present_tenantId))
          return false;
        if (this.tenantId != that.tenantId)
          return false;
      }

      boolean this_present_executionPlanName = true && this.isSetExecutionPlanName();
      boolean that_present_executionPlanName = true && that.isSetExecutionPlanName();
      if (this_present_executionPlanName || that_present_executionPlanName) {
        if (!(this_present_executionPlanName && that_present_executionPlanName))
          return false;
        if (!this.executionPlanName.equals(that.executionPlanName))
          return false;
      }

      boolean this_present_hostName = true && this.isSetHostName();
      boolean that_present_hostName = true && that.isSetHostName();
      if (this_present_hostName || that_present_hostName) {
        if (!(this_present_hostName && that_present_hostName))
          return false;
        if (!this.hostName.equals(that.hostName))
          return false;
      }

      boolean this_present_port = true;
      boolean that_present_port = true;
      if (this_present_port || that_present_port) {
        if (!(this_present_port && that_present_port))
          return false;
        if (this.port != that.port)
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

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

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetTenantId()).compareTo(other.isSetTenantId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetTenantId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tenantId, other.tenantId);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetExecutionPlanName()).compareTo(other.isSetExecutionPlanName());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetExecutionPlanName()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.executionPlanName, other.executionPlanName);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetHostName()).compareTo(other.isSetHostName());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetHostName()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.hostName, other.hostName);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetPort()).compareTo(other.isSetPort());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetPort()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.port, other.port);
        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 org.apache.thrift.TException {
      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
    }

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

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

      sb.append("tenantId:");
      sb.append(this.tenantId);
      first = false;
      if (!first) sb.append(", ");
      sb.append("executionPlanName:");
      if (this.executionPlanName == null) {
        sb.append("null");
      } else {
        sb.append(this.executionPlanName);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("hostName:");
      if (this.hostName == null) {
        sb.append("null");
      } else {
        sb.append(this.hostName);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("port:");
      sb.append(this.port);
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.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 (org.apache.thrift.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 (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private static class registerCEPPublisher_argsStandardSchemeFactory implements SchemeFactory {
      public registerCEPPublisher_argsStandardScheme getScheme() {
        return new registerCEPPublisher_argsStandardScheme();
      }
    }

    private static class registerCEPPublisher_argsStandardScheme extends StandardScheme<registerCEPPublisher_args> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, registerCEPPublisher_args struct) throws org.apache.thrift.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: // TENANT_ID
              if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
                struct.tenantId = iprot.readI32();
                struct.setTenantIdIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // EXECUTION_PLAN_NAME
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.executionPlanName = iprot.readString();
                struct.setExecutionPlanNameIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 3: // HOST_NAME
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.hostName = iprot.readString();
                struct.setHostNameIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 4: // PORT
              if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
                struct.port = iprot.readI32();
                struct.setPortIsSet(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, registerCEPPublisher_args struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        oprot.writeFieldBegin(TENANT_ID_FIELD_DESC);
        oprot.writeI32(struct.tenantId);
        oprot.writeFieldEnd();
        if (struct.executionPlanName != null) {
          oprot.writeFieldBegin(EXECUTION_PLAN_NAME_FIELD_DESC);
          oprot.writeString(struct.executionPlanName);
          oprot.writeFieldEnd();
        }
        if (struct.hostName != null) {
          oprot.writeFieldBegin(HOST_NAME_FIELD_DESC);
          oprot.writeString(struct.hostName);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldBegin(PORT_FIELD_DESC);
        oprot.writeI32(struct.port);
        oprot.writeFieldEnd();
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class registerCEPPublisher_argsTupleSchemeFactory implements SchemeFactory {
      public registerCEPPublisher_argsTupleScheme getScheme() {
        return new registerCEPPublisher_argsTupleScheme();
      }
    }

    private static class registerCEPPublisher_argsTupleScheme extends TupleScheme<registerCEPPublisher_args> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, registerCEPPublisher_args struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetTenantId()) {
          optionals.set(0);
        }
        if (struct.isSetExecutionPlanName()) {
          optionals.set(1);
        }
        if (struct.isSetHostName()) {
          optionals.set(2);
        }
        if (struct.isSetPort()) {
          optionals.set(3);
        }
        oprot.writeBitSet(optionals, 4);
        if (struct.isSetTenantId()) {
          oprot.writeI32(struct.tenantId);
        }
        if (struct.isSetExecutionPlanName()) {
          oprot.writeString(struct.executionPlanName);
        }
        if (struct.isSetHostName()) {
          oprot.writeString(struct.hostName);
        }
        if (struct.isSetPort()) {
          oprot.writeI32(struct.port);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, registerCEPPublisher_args struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(4);
        if (incoming.get(0)) {
          struct.tenantId = iprot.readI32();
          struct.setTenantIdIsSet(true);
        }
        if (incoming.get(1)) {
          struct.executionPlanName = iprot.readString();
          struct.setExecutionPlanNameIsSet(true);
        }
        if (incoming.get(2)) {
          struct.hostName = iprot.readString();
          struct.setHostNameIsSet(true);
        }
        if (incoming.get(3)) {
          struct.port = iprot.readI32();
          struct.setPortIsSet(true);
        }
      }
    }

  }

  public static class registerCEPPublisher_result implements org.apache.thrift.TBase<registerCEPPublisher_result, registerCEPPublisher_result._Fields>, java.io.Serializable, Cloneable, Comparable<registerCEPPublisher_result>   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("registerCEPPublisher_result");

    private static final org.apache.thrift.protocol.TField NSME_FIELD_DESC = new org.apache.thrift.protocol.TField("nsme", 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 registerCEPPublisher_resultStandardSchemeFactory());
      schemes.put(TupleScheme.class, new registerCEPPublisher_resultTupleSchemeFactory());
    }

    public org.wso2.carbon.event.processor.common.storm.manager.service.exception.NotStormCoordinatorException nsme; // 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 {
      NSME((short)1, "nsme");

      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: // NSME
            return NSME;
          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.NSME, new org.apache.thrift.meta_data.FieldMetaData("nsme", 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(registerCEPPublisher_result.class, metaDataMap);
    }

    public registerCEPPublisher_result() {
    }

    public registerCEPPublisher_result(
      org.wso2.carbon.event.processor.common.storm.manager.service.exception.NotStormCoordinatorException nsme)
    {
      this();
      this.nsme = nsme;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public registerCEPPublisher_result(registerCEPPublisher_result other) {
      if (other.isSetNsme()) {
        this.nsme = new org.wso2.carbon.event.processor.common.storm.manager.service.exception.NotStormCoordinatorException(other.nsme);
      }
    }

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

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

    public org.wso2.carbon.event.processor.common.storm.manager.service.exception.NotStormCoordinatorException getNsme() {
      return this.nsme;
    }

    public registerCEPPublisher_result setNsme(org.wso2.carbon.event.processor.common.storm.manager.service.exception.NotStormCoordinatorException nsme) {
      this.nsme = nsme;
      return this;
    }

    public void unsetNsme() {
      this.nsme = null;
    }

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

    public void setNsmeIsSet(boolean value) {
      if (!value) {
        this.nsme = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case NSME:
        if (value == null) {
          unsetNsme();
        } else {
          setNsme((org.wso2.carbon.event.processor.common.storm.manager.service.exception.NotStormCoordinatorException)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case NSME:
        return getNsme();

      }
      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 NSME:
        return isSetNsme();
      }
      throw new IllegalStateException();
    }

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

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

      boolean this_present_nsme = true && this.isSetNsme();
      boolean that_present_nsme = true && that.isSetNsme();
      if (this_present_nsme || that_present_nsme) {
        if (!(this_present_nsme && that_present_nsme))
          return false;
        if (!this.nsme.equals(that.nsme))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

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

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetNsme()).compareTo(other.isSetNsme());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetNsme()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.nsme, other.nsme);
        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 org.apache.thrift.TException {
      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
    }

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

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

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

    public void validate() throws org.apache.thrift.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 (org.apache.thrift.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 (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private static class registerCEPPublisher_resultStandardSchemeFactory implements SchemeFactory {
      public registerCEPPublisher_resultStandardScheme getScheme() {
        return new registerCEPPublisher_resultStandardScheme();
      }
    }

    private static class registerCEPPublisher_resultStandardScheme extends StandardScheme<registerCEPPublisher_result> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, registerCEPPublisher_result struct) throws org.apache.thrift.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: // NSME
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.nsme = new org.wso2.carbon.event.processor.common.storm.manager.service.exception.NotStormCoordinatorException();
                struct.nsme.read(iprot);
                struct.setNsmeIsSet(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, registerCEPPublisher_result struct) throws org.apache.thrift.TException {
        struct.validate();

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

    }

    private static class registerCEPPublisher_resultTupleSchemeFactory implements SchemeFactory {
      public registerCEPPublisher_resultTupleScheme getScheme() {
        return new registerCEPPublisher_resultTupleScheme();
      }
    }

    private static class registerCEPPublisher_resultTupleScheme extends TupleScheme<registerCEPPublisher_result> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, registerCEPPublisher_result struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetNsme()) {
          optionals.set(0);
        }
        oprot.writeBitSet(optionals, 1);
        if (struct.isSetNsme()) {
          struct.nsme.write(oprot);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, registerCEPPublisher_result struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(1);
        if (incoming.get(0)) {
          struct.nsme = new org.wso2.carbon.event.processor.common.storm.manager.service.exception.NotStormCoordinatorException();
          struct.nsme.read(iprot);
          struct.setNsmeIsSet(true);
        }
      }
    }

  }

  public static class getStormReceiver_args implements org.apache.thrift.TBase<getStormReceiver_args, getStormReceiver_args._Fields>, java.io.Serializable, Cloneable, Comparable<getStormReceiver_args>   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getStormReceiver_args");

    private static final org.apache.thrift.protocol.TField TENANT_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("tenantId", org.apache.thrift.protocol.TType.I32, (short)1);
    private static final org.apache.thrift.protocol.TField EXECUTION_PLAN_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("executionPlanName", org.apache.thrift.protocol.TType.STRING, (short)2);
    private static final org.apache.thrift.protocol.TField CEP_RECEIVER_HOST_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("cepReceiverHostName", 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 getStormReceiver_argsStandardSchemeFactory());
      schemes.put(TupleScheme.class, new getStormReceiver_argsTupleSchemeFactory());
    }

    public int tenantId; // required
    public String executionPlanName; // required
    public String cepReceiverHostName; // 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 {
      TENANT_ID((short)1, "tenantId"),
      EXECUTION_PLAN_NAME((short)2, "executionPlanName"),
      CEP_RECEIVER_HOST_NAME((short)3, "cepReceiverHostName");

      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: // TENANT_ID
            return TENANT_ID;
          case 2: // EXECUTION_PLAN_NAME
            return EXECUTION_PLAN_NAME;
          case 3: // CEP_RECEIVER_HOST_NAME
            return CEP_RECEIVER_HOST_NAME;
          default:
            return null;
        }
      }

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

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

      private final short _thriftId;
      private final String _fieldName;

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

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    private static final int __TENANTID_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.TENANT_ID, new org.apache.thrift.meta_data.FieldMetaData("tenantId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
      tmpMap.put(_Fields.EXECUTION_PLAN_NAME, new org.apache.thrift.meta_data.FieldMetaData("executionPlanName", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
      tmpMap.put(_Fields.CEP_RECEIVER_HOST_NAME, new org.apache.thrift.meta_data.FieldMetaData("cepReceiverHostName", 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(getStormReceiver_args.class, metaDataMap);
    }

    public getStormReceiver_args() {
    }

    public getStormReceiver_args(
      int tenantId,
      String executionPlanName,
      String cepReceiverHostName)
    {
      this();
      this.tenantId = tenantId;
      setTenantIdIsSet(true);
      this.executionPlanName = executionPlanName;
      this.cepReceiverHostName = cepReceiverHostName;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getStormReceiver_args(getStormReceiver_args other) {
      __isset_bitfield = other.__isset_bitfield;
      this.tenantId = other.tenantId;
      if (other.isSetExecutionPlanName()) {
        this.executionPlanName = other.executionPlanName;
      }
      if (other.isSetCepReceiverHostName()) {
        this.cepReceiverHostName = other.cepReceiverHostName;
      }
    }

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

    @Override
    public void clear() {
      setTenantIdIsSet(false);
      this.tenantId = 0;
      this.executionPlanName = null;
      this.cepReceiverHostName = null;
    }

    public int getTenantId() {
      return this.tenantId;
    }

    public getStormReceiver_args setTenantId(int tenantId) {
      this.tenantId = tenantId;
      setTenantIdIsSet(true);
      return this;
    }

    public void unsetTenantId() {
      __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __TENANTID_ISSET_ID);
    }

    /** Returns true if field tenantId is set (has been assigned a value) and false otherwise */
    public boolean isSetTenantId() {
      return EncodingUtils.testBit(__isset_bitfield, __TENANTID_ISSET_ID);
    }

    public void setTenantIdIsSet(boolean value) {
      __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __TENANTID_ISSET_ID, value);
    }

    public String getExecutionPlanName() {
      return this.executionPlanName;
    }

    public getStormReceiver_args setExecutionPlanName(String executionPlanName) {
      this.executionPlanName = executionPlanName;
      return this;
    }

    public void unsetExecutionPlanName() {
      this.executionPlanName = null;
    }

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

    public void setExecutionPlanNameIsSet(boolean value) {
      if (!value) {
        this.executionPlanName = null;
      }
    }

    public String getCepReceiverHostName() {
      return this.cepReceiverHostName;
    }

    public getStormReceiver_args setCepReceiverHostName(String cepReceiverHostName) {
      this.cepReceiverHostName = cepReceiverHostName;
      return this;
    }

    public void unsetCepReceiverHostName() {
      this.cepReceiverHostName = null;
    }

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

    public void setCepReceiverHostNameIsSet(boolean value) {
      if (!value) {
        this.cepReceiverHostName = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case TENANT_ID:
        if (value == null) {
          unsetTenantId();
        } else {
          setTenantId((Integer)value);
        }
        break;

      case EXECUTION_PLAN_NAME:
        if (value == null) {
          unsetExecutionPlanName();
        } else {
          setExecutionPlanName((String)value);
        }
        break;

      case CEP_RECEIVER_HOST_NAME:
        if (value == null) {
          unsetCepReceiverHostName();
        } else {
          setCepReceiverHostName((String)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case TENANT_ID:
        return Integer.valueOf(getTenantId());

      case EXECUTION_PLAN_NAME:
        return getExecutionPlanName();

      case CEP_RECEIVER_HOST_NAME:
        return getCepReceiverHostName();

      }
      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 TENANT_ID:
        return isSetTenantId();
      case EXECUTION_PLAN_NAME:
        return isSetExecutionPlanName();
      case CEP_RECEIVER_HOST_NAME:
        return isSetCepReceiverHostName();
      }
      throw new IllegalStateException();
    }

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

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

      boolean this_present_tenantId = true;
      boolean that_present_tenantId = true;
      if (this_present_tenantId || that_present_tenantId) {
        if (!(this_present_tenantId && that_present_tenantId))
          return false;
        if (this.tenantId != that.tenantId)
          return false;
      }

      boolean this_present_executionPlanName = true && this.isSetExecutionPlanName();
      boolean that_present_executionPlanName = true && that.isSetExecutionPlanName();
      if (this_present_executionPlanName || that_present_executionPlanName) {
        if (!(this_present_executionPlanName && that_present_executionPlanName))
          return false;
        if (!this.executionPlanName.equals(that.executionPlanName))
          return false;
      }

      boolean this_present_cepReceiverHostName = true && this.isSetCepReceiverHostName();
      boolean that_present_cepReceiverHostName = true && that.isSetCepReceiverHostName();
      if (this_present_cepReceiverHostName || that_present_cepReceiverHostName) {
        if (!(this_present_cepReceiverHostName && that_present_cepReceiverHostName))
          return false;
        if (!this.cepReceiverHostName.equals(that.cepReceiverHostName))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

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

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetTenantId()).compareTo(other.isSetTenantId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetTenantId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tenantId, other.tenantId);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetExecutionPlanName()).compareTo(other.isSetExecutionPlanName());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetExecutionPlanName()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.executionPlanName, other.executionPlanName);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetCepReceiverHostName()).compareTo(other.isSetCepReceiverHostName());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetCepReceiverHostName()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.cepReceiverHostName, other.cepReceiverHostName);
        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 org.apache.thrift.TException {
      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
    }

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

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

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

    public void validate() throws org.apache.thrift.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 (org.apache.thrift.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 (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private static class getStormReceiver_argsStandardSchemeFactory implements SchemeFactory {
      public getStormReceiver_argsStandardScheme getScheme() {
        return new getStormReceiver_argsStandardScheme();
      }
    }

    private static class getStormReceiver_argsStandardScheme extends StandardScheme<getStormReceiver_args> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, getStormReceiver_args struct) throws org.apache.thrift.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: // TENANT_ID
              if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
                struct.tenantId = iprot.readI32();
                struct.setTenantIdIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // EXECUTION_PLAN_NAME
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.executionPlanName = iprot.readString();
                struct.setExecutionPlanNameIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 3: // CEP_RECEIVER_HOST_NAME
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.cepReceiverHostName = iprot.readString();
                struct.setCepReceiverHostNameIsSet(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, getStormReceiver_args struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        oprot.writeFieldBegin(TENANT_ID_FIELD_DESC);
        oprot.writeI32(struct.tenantId);
        oprot.writeFieldEnd();
        if (struct.executionPlanName != null) {
          oprot.writeFieldBegin(EXECUTION_PLAN_NAME_FIELD_DESC);
          oprot.writeString(struct.executionPlanName);
          oprot.writeFieldEnd();
        }
        if (struct.cepReceiverHostName != null) {
          oprot.writeFieldBegin(CEP_RECEIVER_HOST_NAME_FIELD_DESC);
          oprot.writeString(struct.cepReceiverHostName);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class getStormReceiver_argsTupleSchemeFactory implements SchemeFactory {
      public getStormReceiver_argsTupleScheme getScheme() {
        return new getStormReceiver_argsTupleScheme();
      }
    }

    private static class getStormReceiver_argsTupleScheme extends TupleScheme<getStormReceiver_args> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, getStormReceiver_args struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetTenantId()) {
          optionals.set(0);
        }
        if (struct.isSetExecutionPlanName()) {
          optionals.set(1);
        }
        if (struct.isSetCepReceiverHostName()) {
          optionals.set(2);
        }
        oprot.writeBitSet(optionals, 3);
        if (struct.isSetTenantId()) {
          oprot.writeI32(struct.tenantId);
        }
        if (struct.isSetExecutionPlanName()) {
          oprot.writeString(struct.executionPlanName);
        }
        if (struct.isSetCepReceiverHostName()) {
          oprot.writeString(struct.cepReceiverHostName);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, getStormReceiver_args struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(3);
        if (incoming.get(0)) {
          struct.tenantId = iprot.readI32();
          struct.setTenantIdIsSet(true);
        }
        if (incoming.get(1)) {
          struct.executionPlanName = iprot.readString();
          struct.setExecutionPlanNameIsSet(true);
        }
        if (incoming.get(2)) {
          struct.cepReceiverHostName = iprot.readString();
          struct.setCepReceiverHostNameIsSet(true);
        }
      }
    }

  }

  public static class getStormReceiver_result implements org.apache.thrift.TBase<getStormReceiver_result, getStormReceiver_result._Fields>, java.io.Serializable, Cloneable, Comparable<getStormReceiver_result>   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getStormReceiver_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 NSME_FIELD_DESC = new org.apache.thrift.protocol.TField("nsme", org.apache.thrift.protocol.TType.STRUCT, (short)1);
    private static final org.apache.thrift.protocol.TField ENFE_FIELD_DESC = new org.apache.thrift.protocol.TField("enfe", 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 getStormReceiver_resultStandardSchemeFactory());
      schemes.put(TupleScheme.class, new getStormReceiver_resultTupleSchemeFactory());
    }

    public String success; // required
    public org.wso2.carbon.event.processor.common.storm.manager.service.exception.NotStormCoordinatorException nsme; // required
    public org.wso2.carbon.event.processor.common.storm.manager.service.exception.EndpointNotFoundException enfe; // 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"),
      NSME((short)1, "nsme"),
      ENFE((short)2, "enfe");

      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: // NSME
            return NSME;
          case 2: // ENFE
            return ENFE;
          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.NSME, new org.apache.thrift.meta_data.FieldMetaData("nsme", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      tmpMap.put(_Fields.ENFE, new org.apache.thrift.meta_data.FieldMetaData("enfe", 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(getStormReceiver_result.class, metaDataMap);
    }

    public getStormReceiver_result() {
    }

    public getStormReceiver_result(
      String success,
      org.wso2.carbon.event.processor.common.storm.manager.service.exception.NotStormCoordinatorException nsme,
      org.wso2.carbon.event.processor.common.storm.manager.service.exception.EndpointNotFoundException enfe)
    {
      this();
      this.success = success;
      this.nsme = nsme;
      this.enfe = enfe;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getStormReceiver_result(getStormReceiver_result other) {
      if (other.isSetSuccess()) {
        this.success = other.success;
      }
      if (other.isSetNsme()) {
        this.nsme = new org.wso2.carbon.event.processor.common.storm.manager.service.exception.NotStormCoordinatorException(other.nsme);
      }
      if (other.isSetEnfe()) {
        this.enfe = new org.wso2.carbon.event.processor.common.storm.manager.service.exception.EndpointNotFoundException(other.enfe);
      }
    }

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

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

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

    public getStormReceiver_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.event.processor.common.storm.manager.service.exception.NotStormCoordinatorException getNsme() {
      return this.nsme;
    }

    public getStormReceiver_result setNsme(org.wso2.carbon.event.processor.common.storm.manager.service.exception.NotStormCoordinatorException nsme) {
      this.nsme = nsme;
      return this;
    }

    public void unsetNsme() {
      this.nsme = null;
    }

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

    public void setNsmeIsSet(boolean value) {
      if (!value) {
        this.nsme = null;
      }
    }

    public org.wso2.carbon.event.processor.common.storm.manager.service.exception.EndpointNotFoundException getEnfe() {
      return this.enfe;
    }

    public getStormReceiver_result setEnfe(org.wso2.carbon.event.processor.common.storm.manager.service.exception.EndpointNotFoundException enfe) {
      this.enfe = enfe;
      return this;
    }

    public void unsetEnfe() {
      this.enfe = null;
    }

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

    public void setEnfeIsSet(boolean value) {
      if (!value) {
        this.enfe = null;
      }
    }

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

      case NSME:
        if (value == null) {
          unsetNsme();
        } else {
          setNsme((org.wso2.carbon.event.processor.common.storm.manager.service.exception.NotStormCoordinatorException)value);
        }
        break;

      case ENFE:
        if (value == null) {
          unsetEnfe();
        } else {
          setEnfe((org.wso2.carbon.event.processor.common.storm.manager.service.exception.EndpointNotFoundException)value);
        }
        break;

      }
    }

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

      case NSME:
        return getNsme();

      case ENFE:
        return getEnfe();

      }
      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 NSME:
        return isSetNsme();
      case ENFE:
        return isSetEnfe();
      }
      throw new IllegalStateException();
    }

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

    public boolean equals(getStormReceiver_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_nsme = true && this.isSetNsme();
      boolean that_present_nsme = true && that.isSetNsme();
      if (this_present_nsme || that_present_nsme) {
        if (!(this_present_nsme && that_present_nsme))
          return false;
        if (!this.nsme.equals(that.nsme))
          return false;
      }

      boolean this_present_enfe = true && this.isSetEnfe();
      boolean that_present_enfe = true && that.isSetEnfe();
      if (this_present_enfe || that_present_enfe) {
        if (!(this_present_enfe && that_present_enfe))
          return false;
        if (!this.enfe.equals(that.enfe))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    @Override
    public int compareTo(getStormReceiver_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(isSetNsme()).compareTo(other.isSetNsme());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetNsme()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.nsme, other.nsme);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetEnfe()).compareTo(other.isSetEnfe());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetEnfe()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.enfe, other.enfe);
        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 org.apache.thrift.TException {
      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
    }

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

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getStormReceiver_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("nsme:");
      if (this.nsme == null) {
        sb.append("null");
      } else {
        sb.append(this.nsme);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("enfe:");
      if (this.enfe == null) {
        sb.append("null");
      } else {
        sb.append(this.enfe);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.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 (org.apache.thrift.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 (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private static class getStormReceiver_resultStandardSchemeFactory implements SchemeFactory {
      public getStormReceiver_resultStandardScheme getScheme() {
        return new getStormReceiver_resultStandardScheme();
      }
    }

    private static class getStormReceiver_resultStandardScheme extends StandardScheme<getStormReceiver_result> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, getStormReceiver_result struct) throws org.apache.thrift.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: // NSME
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.nsme = new org.wso2.carbon.event.processor.common.storm.manager.service.exception.NotStormCoordinatorException();
                struct.nsme.read(iprot);
                struct.setNsmeIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // ENFE
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.enfe = new org.wso2.carbon.event.processor.common.storm.manager.service.exception.EndpointNotFoundException();
                struct.enfe.read(iprot);
                struct.setEnfeIsSet(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, getStormReceiver_result struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.success != null) {
          oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
          oprot.writeString(struct.success);
          oprot.writeFieldEnd();
        }
        if (struct.nsme != null) {
          oprot.writeFieldBegin(NSME_FIELD_DESC);
          struct.nsme.write(oprot);
          oprot.writeFieldEnd();
        }
        if (struct.enfe != null) {
          oprot.writeFieldBegin(ENFE_FIELD_DESC);
          struct.enfe.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class getStormReceiver_resultTupleSchemeFactory implements SchemeFactory {
      public getStormReceiver_resultTupleScheme getScheme() {
        return new getStormReceiver_resultTupleScheme();
      }
    }

    private static class getStormReceiver_resultTupleScheme extends TupleScheme<getStormReceiver_result> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, getStormReceiver_result struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetSuccess()) {
          optionals.set(0);
        }
        if (struct.isSetNsme()) {
          optionals.set(1);
        }
        if (struct.isSetEnfe()) {
          optionals.set(2);
        }
        oprot.writeBitSet(optionals, 3);
        if (struct.isSetSuccess()) {
          oprot.writeString(struct.success);
        }
        if (struct.isSetNsme()) {
          struct.nsme.write(oprot);
        }
        if (struct.isSetEnfe()) {
          struct.enfe.write(oprot);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, getStormReceiver_result struct) throws org.apache.thrift.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.nsme = new org.wso2.carbon.event.processor.common.storm.manager.service.exception.NotStormCoordinatorException();
          struct.nsme.read(iprot);
          struct.setNsmeIsSet(true);
        }
        if (incoming.get(2)) {
          struct.enfe = new org.wso2.carbon.event.processor.common.storm.manager.service.exception.EndpointNotFoundException();
          struct.enfe.read(iprot);
          struct.setEnfeIsSet(true);
        }
      }
    }

  }

  public static class getCEPPublisher_args implements org.apache.thrift.TBase<getCEPPublisher_args, getCEPPublisher_args._Fields>, java.io.Serializable, Cloneable, Comparable<getCEPPublisher_args>   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getCEPPublisher_args");

    private static final org.apache.thrift.protocol.TField TENANT_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("tenantId", org.apache.thrift.protocol.TType.I32, (short)1);
    private static final org.apache.thrift.protocol.TField EXECUTION_PLAN_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("executionPlanName", org.apache.thrift.protocol.TType.STRING, (short)2);
    private static final org.apache.thrift.protocol.TField STORM_PUBLISHER_HOST_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("stormPublisherHostName", 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 getCEPPublisher_argsStandardSchemeFactory());
      schemes.put(TupleScheme.class, new getCEPPublisher_argsTupleSchemeFactory());
    }

    public int tenantId; // required
    public String executionPlanName; // required
    public String stormPublisherHostName; // 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 {
      TENANT_ID((short)1, "tenantId"),
      EXECUTION_PLAN_NAME((short)2, "executionPlanName"),
      STORM_PUBLISHER_HOST_NAME((short)3, "stormPublisherHostName");

      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: // TENANT_ID
            return TENANT_ID;
          case 2: // EXECUTION_PLAN_NAME
            return EXECUTION_PLAN_NAME;
          case 3: // STORM_PUBLISHER_HOST_NAME
            return STORM_PUBLISHER_HOST_NAME;
          default:
            return null;
        }
      }

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

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

      private final short _thriftId;
      private final String _fieldName;

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

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    private static final int __TENANTID_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.TENANT_ID, new org.apache.thrift.meta_data.FieldMetaData("tenantId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
      tmpMap.put(_Fields.EXECUTION_PLAN_NAME, new org.apache.thrift.meta_data.FieldMetaData("executionPlanName", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
      tmpMap.put(_Fields.STORM_PUBLISHER_HOST_NAME, new org.apache.thrift.meta_data.FieldMetaData("stormPublisherHostName", 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(getCEPPublisher_args.class, metaDataMap);
    }

    public getCEPPublisher_args() {
    }

    public getCEPPublisher_args(
      int tenantId,
      String executionPlanName,
      String stormPublisherHostName)
    {
      this();
      this.tenantId = tenantId;
      setTenantIdIsSet(true);
      this.executionPlanName = executionPlanName;
      this.stormPublisherHostName = stormPublisherHostName;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getCEPPublisher_args(getCEPPublisher_args other) {
      __isset_bitfield = other.__isset_bitfield;
      this.tenantId = other.tenantId;
      if (other.isSetExecutionPlanName()) {
        this.executionPlanName = other.executionPlanName;
      }
      if (other.isSetStormPublisherHostName()) {
        this.stormPublisherHostName = other.stormPublisherHostName;
      }
    }

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

    @Override
    public void clear() {
      setTenantIdIsSet(false);
      this.tenantId = 0;
      this.executionPlanName = null;
      this.stormPublisherHostName = null;
    }

    public int getTenantId() {
      return this.tenantId;
    }

    public getCEPPublisher_args setTenantId(int tenantId) {
      this.tenantId = tenantId;
      setTenantIdIsSet(true);
      return this;
    }

    public void unsetTenantId() {
      __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __TENANTID_ISSET_ID);
    }

    /** Returns true if field tenantId is set (has been assigned a value) and false otherwise */
    public boolean isSetTenantId() {
      return EncodingUtils.testBit(__isset_bitfield, __TENANTID_ISSET_ID);
    }

    public void setTenantIdIsSet(boolean value) {
      __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __TENANTID_ISSET_ID, value);
    }

    public String getExecutionPlanName() {
      return this.executionPlanName;
    }

    public getCEPPublisher_args setExecutionPlanName(String executionPlanName) {
      this.executionPlanName = executionPlanName;
      return this;
    }

    public void unsetExecutionPlanName() {
      this.executionPlanName = null;
    }

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

    public void setExecutionPlanNameIsSet(boolean value) {
      if (!value) {
        this.executionPlanName = null;
      }
    }

    public String getStormPublisherHostName() {
      return this.stormPublisherHostName;
    }

    public getCEPPublisher_args setStormPublisherHostName(String stormPublisherHostName) {
      this.stormPublisherHostName = stormPublisherHostName;
      return this;
    }

    public void unsetStormPublisherHostName() {
      this.stormPublisherHostName = null;
    }

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

    public void setStormPublisherHostNameIsSet(boolean value) {
      if (!value) {
        this.stormPublisherHostName = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case TENANT_ID:
        if (value == null) {
          unsetTenantId();
        } else {
          setTenantId((Integer)value);
        }
        break;

      case EXECUTION_PLAN_NAME:
        if (value == null) {
          unsetExecutionPlanName();
        } else {
          setExecutionPlanName((String)value);
        }
        break;

      case STORM_PUBLISHER_HOST_NAME:
        if (value == null) {
          unsetStormPublisherHostName();
        } else {
          setStormPublisherHostName((String)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case TENANT_ID:
        return Integer.valueOf(getTenantId());

      case EXECUTION_PLAN_NAME:
        return getExecutionPlanName();

      case STORM_PUBLISHER_HOST_NAME:
        return getStormPublisherHostName();

      }
      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 TENANT_ID:
        return isSetTenantId();
      case EXECUTION_PLAN_NAME:
        return isSetExecutionPlanName();
      case STORM_PUBLISHER_HOST_NAME:
        return isSetStormPublisherHostName();
      }
      throw new IllegalStateException();
    }

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

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

      boolean this_present_tenantId = true;
      boolean that_present_tenantId = true;
      if (this_present_tenantId || that_present_tenantId) {
        if (!(this_present_tenantId && that_present_tenantId))
          return false;
        if (this.tenantId != that.tenantId)
          return false;
      }

      boolean this_present_executionPlanName = true && this.isSetExecutionPlanName();
      boolean that_present_executionPlanName = true && that.isSetExecutionPlanName();
      if (this_present_executionPlanName || that_present_executionPlanName) {
        if (!(this_present_executionPlanName && that_present_executionPlanName))
          return false;
        if (!this.executionPlanName.equals(that.executionPlanName))
          return false;
      }

      boolean this_present_stormPublisherHostName = true && this.isSetStormPublisherHostName();
      boolean that_present_stormPublisherHostName = true && that.isSetStormPublisherHostName();
      if (this_present_stormPublisherHostName || that_present_stormPublisherHostName) {
        if (!(this_present_stormPublisherHostName && that_present_stormPublisherHostName))
          return false;
        if (!this.stormPublisherHostName.equals(that.stormPublisherHostName))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

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

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetTenantId()).compareTo(other.isSetTenantId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetTenantId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tenantId, other.tenantId);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetExecutionPlanName()).compareTo(other.isSetExecutionPlanName());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetExecutionPlanName()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.executionPlanName, other.executionPlanName);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetStormPublisherHostName()).compareTo(other.isSetStormPublisherHostName());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetStormPublisherHostName()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.stormPublisherHostName, other.stormPublisherHostName);
        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 org.apache.thrift.TException {
      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
    }

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

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

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

    public void validate() throws org.apache.thrift.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 (org.apache.thrift.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 (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private static class getCEPPublisher_argsStandardSchemeFactory implements SchemeFactory {
      public getCEPPublisher_argsStandardScheme getScheme() {
        return new getCEPPublisher_argsStandardScheme();
      }
    }

    private static class getCEPPublisher_argsStandardScheme extends StandardScheme<getCEPPublisher_args> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, getCEPPublisher_args struct) throws org.apache.thrift.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: // TENANT_ID
              if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
                struct.tenantId = iprot.readI32();
                struct.setTenantIdIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // EXECUTION_PLAN_NAME
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.executionPlanName = iprot.readString();
                struct.setExecutionPlanNameIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 3: // STORM_PUBLISHER_HOST_NAME
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.stormPublisherHostName = iprot.readString();
                struct.setStormPublisherHostNameIsSet(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, getCEPPublisher_args struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        oprot.writeFieldBegin(TENANT_ID_FIELD_DESC);
        oprot.writeI32(struct.tenantId);
        oprot.writeFieldEnd();
        if (struct.executionPlanName != null) {
          oprot.writeFieldBegin(EXECUTION_PLAN_NAME_FIELD_DESC);
          oprot.writeString(struct.executionPlanName);
          oprot.writeFieldEnd();
        }
        if (struct.stormPublisherHostName != null) {
          oprot.writeFieldBegin(STORM_PUBLISHER_HOST_NAME_FIELD_DESC);
          oprot.writeString(struct.stormPublisherHostName);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class getCEPPublisher_argsTupleSchemeFactory implements SchemeFactory {
      public getCEPPublisher_argsTupleScheme getScheme() {
        return new getCEPPublisher_argsTupleScheme();
      }
    }

    private static class getCEPPublisher_argsTupleScheme extends TupleScheme<getCEPPublisher_args> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, getCEPPublisher_args struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetTenantId()) {
          optionals.set(0);
        }
        if (struct.isSetExecutionPlanName()) {
          optionals.set(1);
        }
        if (struct.isSetStormPublisherHostName()) {
          optionals.set(2);
        }
        oprot.writeBitSet(optionals, 3);
        if (struct.isSetTenantId()) {
          oprot.writeI32(struct.tenantId);
        }
        if (struct.isSetExecutionPlanName()) {
          oprot.writeString(struct.executionPlanName);
        }
        if (struct.isSetStormPublisherHostName()) {
          oprot.writeString(struct.stormPublisherHostName);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, getCEPPublisher_args struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(3);
        if (incoming.get(0)) {
          struct.tenantId = iprot.readI32();
          struct.setTenantIdIsSet(true);
        }
        if (incoming.get(1)) {
          struct.executionPlanName = iprot.readString();
          struct.setExecutionPlanNameIsSet(true);
        }
        if (incoming.get(2)) {
          struct.stormPublisherHostName = iprot.readString();
          struct.setStormPublisherHostNameIsSet(true);
        }
      }
    }

  }

  public static class getCEPPublisher_result implements org.apache.thrift.TBase<getCEPPublisher_result, getCEPPublisher_result._Fields>, java.io.Serializable, Cloneable, Comparable<getCEPPublisher_result>   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getCEPPublisher_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 NSME_FIELD_DESC = new org.apache.thrift.protocol.TField("nsme", org.apache.thrift.protocol.TType.STRUCT, (short)1);
    private static final org.apache.thrift.protocol.TField ENFE_FIELD_DESC = new org.apache.thrift.protocol.TField("enfe", 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 getCEPPublisher_resultStandardSchemeFactory());
      schemes.put(TupleScheme.class, new getCEPPublisher_resultTupleSchemeFactory());
    }

    public String success; // required
    public org.wso2.carbon.event.processor.common.storm.manager.service.exception.NotStormCoordinatorException nsme; // required
    public org.wso2.carbon.event.processor.common.storm.manager.service.exception.EndpointNotFoundException enfe; // 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"),
      NSME((short)1, "nsme"),
      ENFE((short)2, "enfe");

      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: // NSME
            return NSME;
          case 2: // ENFE
            return ENFE;
          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.NSME, new org.apache.thrift.meta_data.FieldMetaData("nsme", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      tmpMap.put(_Fields.ENFE, new org.apache.thrift.meta_data.FieldMetaData("enfe", 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(getCEPPublisher_result.class, metaDataMap);
    }

    public getCEPPublisher_result() {
    }

    public getCEPPublisher_result(
      String success,
      org.wso2.carbon.event.processor.common.storm.manager.service.exception.NotStormCoordinatorException nsme,
      org.wso2.carbon.event.processor.common.storm.manager.service.exception.EndpointNotFoundException enfe)
    {
      this();
      this.success = success;
      this.nsme = nsme;
      this.enfe = enfe;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getCEPPublisher_result(getCEPPublisher_result other) {
      if (other.isSetSuccess()) {
        this.success = other.success;
      }
      if (other.isSetNsme()) {
        this.nsme = new org.wso2.carbon.event.processor.common.storm.manager.service.exception.NotStormCoordinatorException(other.nsme);
      }
      if (other.isSetEnfe()) {
        this.enfe = new org.wso2.carbon.event.processor.common.storm.manager.service.exception.EndpointNotFoundException(other.enfe);
      }
    }

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

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

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

    public getCEPPublisher_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.event.processor.common.storm.manager.service.exception.NotStormCoordinatorException getNsme() {
      return this.nsme;
    }

    public getCEPPublisher_result setNsme(org.wso2.carbon.event.processor.common.storm.manager.service.exception.NotStormCoordinatorException nsme) {
      this.nsme = nsme;
      return this;
    }

    public void unsetNsme() {
      this.nsme = null;
    }

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

    public void setNsmeIsSet(boolean value) {
      if (!value) {
        this.nsme = null;
      }
    }

    public org.wso2.carbon.event.processor.common.storm.manager.service.exception.EndpointNotFoundException getEnfe() {
      return this.enfe;
    }

    public getCEPPublisher_result setEnfe(org.wso2.carbon.event.processor.common.storm.manager.service.exception.EndpointNotFoundException enfe) {
      this.enfe = enfe;
      return this;
    }

    public void unsetEnfe() {
      this.enfe = null;
    }

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

    public void setEnfeIsSet(boolean value) {
      if (!value) {
        this.enfe = null;
      }
    }

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

      case NSME:
        if (value == null) {
          unsetNsme();
        } else {
          setNsme((org.wso2.carbon.event.processor.common.storm.manager.service.exception.NotStormCoordinatorException)value);
        }
        break;

      case ENFE:
        if (value == null) {
          unsetEnfe();
        } else {
          setEnfe((org.wso2.carbon.event.processor.common.storm.manager.service.exception.EndpointNotFoundException)value);
        }
        break;

      }
    }

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

      case NSME:
        return getNsme();

      case ENFE:
        return getEnfe();

      }
      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 NSME:
        return isSetNsme();
      case ENFE:
        return isSetEnfe();
      }
      throw new IllegalStateException();
    }

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

    public boolean equals(getCEPPublisher_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_nsme = true && this.isSetNsme();
      boolean that_present_nsme = true && that.isSetNsme();
      if (this_present_nsme || that_present_nsme) {
        if (!(this_present_nsme && that_present_nsme))
          return false;
        if (!this.nsme.equals(that.nsme))
          return false;
      }

      boolean this_present_enfe = true && this.isSetEnfe();
      boolean that_present_enfe = true && that.isSetEnfe();
      if (this_present_enfe || that_present_enfe) {
        if (!(this_present_enfe && that_present_enfe))
          return false;
        if (!this.enfe.equals(that.enfe))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    @Override
    public int compareTo(getCEPPublisher_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(isSetNsme()).compareTo(other.isSetNsme());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetNsme()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.nsme, other.nsme);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetEnfe()).compareTo(other.isSetEnfe());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetEnfe()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.enfe, other.enfe);
        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 org.apache.thrift.TException {
      schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
    }

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

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getCEPPublisher_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("nsme:");
      if (this.nsme == null) {
        sb.append("null");
      } else {
        sb.append(this.nsme);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("enfe:");
      if (this.enfe == null) {
        sb.append("null");
      } else {
        sb.append(this.enfe);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.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 (org.apache.thrift.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 (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private static class getCEPPublisher_resultStandardSchemeFactory implements SchemeFactory {
      public getCEPPublisher_resultStandardScheme getScheme() {
        return new getCEPPublisher_resultStandardScheme();
      }
    }

    private static class getCEPPublisher_resultStandardScheme extends StandardScheme<getCEPPublisher_result> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, getCEPPublisher_result struct) throws org.apache.thrift.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: // NSME
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.nsme = new org.wso2.carbon.event.processor.common.storm.manager.service.exception.NotStormCoordinatorException();
                struct.nsme.read(iprot);
                struct.setNsmeIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // ENFE
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.enfe = new org.wso2.carbon.event.processor.common.storm.manager.service.exception.EndpointNotFoundException();
                struct.enfe.read(iprot);
                struct.setEnfeIsSet(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, getCEPPublisher_result struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.success != null) {
          oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
          oprot.writeString(struct.success);
          oprot.writeFieldEnd();
        }
        if (struct.nsme != null) {
          oprot.writeFieldBegin(NSME_FIELD_DESC);
          struct.nsme.write(oprot);
          oprot.writeFieldEnd();
        }
        if (struct.enfe != null) {
          oprot.writeFieldBegin(ENFE_FIELD_DESC);
          struct.enfe.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class getCEPPublisher_resultTupleSchemeFactory implements SchemeFactory {
      public getCEPPublisher_resultTupleScheme getScheme() {
        return new getCEPPublisher_resultTupleScheme();
      }
    }

    private static class getCEPPublisher_resultTupleScheme extends TupleScheme<getCEPPublisher_result> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, getCEPPublisher_result struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetSuccess()) {
          optionals.set(0);
        }
        if (struct.isSetNsme()) {
          optionals.set(1);
        }
        if (struct.isSetEnfe()) {
          optionals.set(2);
        }
        oprot.writeBitSet(optionals, 3);
        if (struct.isSetSuccess()) {
          oprot.writeString(struct.success);
        }
        if (struct.isSetNsme()) {
          struct.nsme.write(oprot);
        }
        if (struct.isSetEnfe()) {
          struct.enfe.write(oprot);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, getCEPPublisher_result struct) throws org.apache.thrift.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.nsme = new org.wso2.carbon.event.processor.common.storm.manager.service.exception.NotStormCoordinatorException();
          struct.nsme.read(iprot);
          struct.setNsmeIsSet(true);
        }
        if (incoming.get(2)) {
          struct.enfe = new org.wso2.carbon.event.processor.common.storm.manager.service.exception.EndpointNotFoundException();
          struct.enfe.read(iprot);
          struct.setEnfeIsSet(true);
        }
      }
    }

  }

}
