/**
 * Licensed to the Apache Software Foundation (ASF) under one
 * or more contributor license agreements.  See the NOTICE file
 * distributed with this work for additional information
 * regarding copyright ownership.  The ASF licenses this file
 * to you under the Apache License, Version 2.0 (the
 * "License"); you may not use this file except in compliance
 * with the License.  You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
/**
 * Autogenerated by Thrift Compiler (0.9.2)
 *
 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
 *  @generated
 */
package org.apache.zeppelin.interpreter.thrift;

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 javax.annotation.Generated;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2016-11-29")
public class RemoteInterpreterService {

  public interface Iface {

    public void createInterpreter(String intpGroupId, String sessionKey, String className, Map<String,String> properties, String userName) throws org.apache.thrift.TException;

    public void open(String sessionKey, String className) throws org.apache.thrift.TException;

    public void close(String sessionKey, String className) throws org.apache.thrift.TException;

    public RemoteInterpreterResult interpret(String sessionKey, String className, String st, RemoteInterpreterContext interpreterContext) throws org.apache.thrift.TException;

    public void cancel(String sessionKey, String className, RemoteInterpreterContext interpreterContext) throws org.apache.thrift.TException;

    public int getProgress(String sessionKey, String className, RemoteInterpreterContext interpreterContext) throws org.apache.thrift.TException;

    public String getFormType(String sessionKey, String className) throws org.apache.thrift.TException;

    public List<InterpreterCompletion> completion(String sessionKey, String className, String buf, int cursor) throws org.apache.thrift.TException;

    public void shutdown() throws org.apache.thrift.TException;

    public String getStatus(String sessionKey, String jobId) throws org.apache.thrift.TException;

    public RemoteInterpreterEvent getEvent() throws org.apache.thrift.TException;

    public void resourcePoolResponseGetAll(List<String> resources) throws org.apache.thrift.TException;

    public void resourceResponseGet(String resourceId, ByteBuffer object) throws org.apache.thrift.TException;

    public List<String> resourcePoolGetAll() throws org.apache.thrift.TException;

    public ByteBuffer resourceGet(String sessionKey, String paragraphId, String resourceName) throws org.apache.thrift.TException;

    public boolean resourceRemove(String sessionKey, String paragraphId, String resourceName) throws org.apache.thrift.TException;

    public void angularObjectUpdate(String name, String sessionKey, String paragraphId, String object) throws org.apache.thrift.TException;

    public void angularObjectAdd(String name, String sessionKey, String paragraphId, String object) throws org.apache.thrift.TException;

    public void angularObjectRemove(String name, String sessionKey, String paragraphId) throws org.apache.thrift.TException;

    public void angularRegistryPush(String registry) throws org.apache.thrift.TException;

    public RemoteApplicationResult loadApplication(String applicationInstanceId, String packageInfo, String sessionKey, String paragraphId) throws org.apache.thrift.TException;

    public RemoteApplicationResult unloadApplication(String applicationInstanceId) throws org.apache.thrift.TException;

    public RemoteApplicationResult runApplication(String applicationInstanceId) throws org.apache.thrift.TException;

    public void onReceivedZeppelinResource(String object) throws org.apache.thrift.TException;

  }

  public interface AsyncIface {

    public void createInterpreter(String intpGroupId, String sessionKey, String className, Map<String,String> properties, String userName, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void open(String sessionKey, String className, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void close(String sessionKey, String className, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void interpret(String sessionKey, String className, String st, RemoteInterpreterContext interpreterContext, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void cancel(String sessionKey, String className, RemoteInterpreterContext interpreterContext, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void getProgress(String sessionKey, String className, RemoteInterpreterContext interpreterContext, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void getFormType(String sessionKey, String className, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void completion(String sessionKey, String className, String buf, int cursor, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void shutdown(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void getStatus(String sessionKey, String jobId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void getEvent(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void resourcePoolResponseGetAll(List<String> resources, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void resourceResponseGet(String resourceId, ByteBuffer object, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void resourcePoolGetAll(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void resourceGet(String sessionKey, String paragraphId, String resourceName, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void resourceRemove(String sessionKey, String paragraphId, String resourceName, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void angularObjectUpdate(String name, String sessionKey, String paragraphId, String object, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void angularObjectAdd(String name, String sessionKey, String paragraphId, String object, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void angularObjectRemove(String name, String sessionKey, String paragraphId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void angularRegistryPush(String registry, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void loadApplication(String applicationInstanceId, String packageInfo, String sessionKey, String paragraphId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void unloadApplication(String applicationInstanceId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void runApplication(String applicationInstanceId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void onReceivedZeppelinResource(String object, 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 createInterpreter(String intpGroupId, String sessionKey, String className, Map<String,String> properties, String userName) throws org.apache.thrift.TException
    {
      send_createInterpreter(intpGroupId, sessionKey, className, properties, userName);
      recv_createInterpreter();
    }

    public void send_createInterpreter(String intpGroupId, String sessionKey, String className, Map<String,String> properties, String userName) throws org.apache.thrift.TException
    {
      createInterpreter_args args = new createInterpreter_args();
      args.setIntpGroupId(intpGroupId);
      args.setSessionKey(sessionKey);
      args.setClassName(className);
      args.setProperties(properties);
      args.setUserName(userName);
      sendBase("createInterpreter", args);
    }

    public void recv_createInterpreter() throws org.apache.thrift.TException
    {
      createInterpreter_result result = new createInterpreter_result();
      receiveBase(result, "createInterpreter");
      return;
    }

    public void open(String sessionKey, String className) throws org.apache.thrift.TException
    {
      send_open(sessionKey, className);
      recv_open();
    }

    public void send_open(String sessionKey, String className) throws org.apache.thrift.TException
    {
      open_args args = new open_args();
      args.setSessionKey(sessionKey);
      args.setClassName(className);
      sendBase("open", args);
    }

    public void recv_open() throws org.apache.thrift.TException
    {
      open_result result = new open_result();
      receiveBase(result, "open");
      return;
    }

    public void close(String sessionKey, String className) throws org.apache.thrift.TException
    {
      send_close(sessionKey, className);
      recv_close();
    }

    public void send_close(String sessionKey, String className) throws org.apache.thrift.TException
    {
      close_args args = new close_args();
      args.setSessionKey(sessionKey);
      args.setClassName(className);
      sendBase("close", args);
    }

    public void recv_close() throws org.apache.thrift.TException
    {
      close_result result = new close_result();
      receiveBase(result, "close");
      return;
    }

    public RemoteInterpreterResult interpret(String sessionKey, String className, String st, RemoteInterpreterContext interpreterContext) throws org.apache.thrift.TException
    {
      send_interpret(sessionKey, className, st, interpreterContext);
      return recv_interpret();
    }

    public void send_interpret(String sessionKey, String className, String st, RemoteInterpreterContext interpreterContext) throws org.apache.thrift.TException
    {
      interpret_args args = new interpret_args();
      args.setSessionKey(sessionKey);
      args.setClassName(className);
      args.setSt(st);
      args.setInterpreterContext(interpreterContext);
      sendBase("interpret", args);
    }

    public RemoteInterpreterResult recv_interpret() throws org.apache.thrift.TException
    {
      interpret_result result = new interpret_result();
      receiveBase(result, "interpret");
      if (result.isSetSuccess()) {
        return result.success;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "interpret failed: unknown result");
    }

    public void cancel(String sessionKey, String className, RemoteInterpreterContext interpreterContext) throws org.apache.thrift.TException
    {
      send_cancel(sessionKey, className, interpreterContext);
      recv_cancel();
    }

    public void send_cancel(String sessionKey, String className, RemoteInterpreterContext interpreterContext) throws org.apache.thrift.TException
    {
      cancel_args args = new cancel_args();
      args.setSessionKey(sessionKey);
      args.setClassName(className);
      args.setInterpreterContext(interpreterContext);
      sendBase("cancel", args);
    }

    public void recv_cancel() throws org.apache.thrift.TException
    {
      cancel_result result = new cancel_result();
      receiveBase(result, "cancel");
      return;
    }

    public int getProgress(String sessionKey, String className, RemoteInterpreterContext interpreterContext) throws org.apache.thrift.TException
    {
      send_getProgress(sessionKey, className, interpreterContext);
      return recv_getProgress();
    }

    public void send_getProgress(String sessionKey, String className, RemoteInterpreterContext interpreterContext) throws org.apache.thrift.TException
    {
      getProgress_args args = new getProgress_args();
      args.setSessionKey(sessionKey);
      args.setClassName(className);
      args.setInterpreterContext(interpreterContext);
      sendBase("getProgress", args);
    }

    public int recv_getProgress() throws org.apache.thrift.TException
    {
      getProgress_result result = new getProgress_result();
      receiveBase(result, "getProgress");
      if (result.isSetSuccess()) {
        return result.success;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getProgress failed: unknown result");
    }

    public String getFormType(String sessionKey, String className) throws org.apache.thrift.TException
    {
      send_getFormType(sessionKey, className);
      return recv_getFormType();
    }

    public void send_getFormType(String sessionKey, String className) throws org.apache.thrift.TException
    {
      getFormType_args args = new getFormType_args();
      args.setSessionKey(sessionKey);
      args.setClassName(className);
      sendBase("getFormType", args);
    }

    public String recv_getFormType() throws org.apache.thrift.TException
    {
      getFormType_result result = new getFormType_result();
      receiveBase(result, "getFormType");
      if (result.isSetSuccess()) {
        return result.success;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getFormType failed: unknown result");
    }

    public List<InterpreterCompletion> completion(String sessionKey, String className, String buf, int cursor) throws org.apache.thrift.TException
    {
      send_completion(sessionKey, className, buf, cursor);
      return recv_completion();
    }

    public void send_completion(String sessionKey, String className, String buf, int cursor) throws org.apache.thrift.TException
    {
      completion_args args = new completion_args();
      args.setSessionKey(sessionKey);
      args.setClassName(className);
      args.setBuf(buf);
      args.setCursor(cursor);
      sendBase("completion", args);
    }

    public List<InterpreterCompletion> recv_completion() throws org.apache.thrift.TException
    {
      completion_result result = new completion_result();
      receiveBase(result, "completion");
      if (result.isSetSuccess()) {
        return result.success;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "completion failed: unknown result");
    }

    public void shutdown() throws org.apache.thrift.TException
    {
      send_shutdown();
      recv_shutdown();
    }

    public void send_shutdown() throws org.apache.thrift.TException
    {
      shutdown_args args = new shutdown_args();
      sendBase("shutdown", args);
    }

    public void recv_shutdown() throws org.apache.thrift.TException
    {
      shutdown_result result = new shutdown_result();
      receiveBase(result, "shutdown");
      return;
    }

    public String getStatus(String sessionKey, String jobId) throws org.apache.thrift.TException
    {
      send_getStatus(sessionKey, jobId);
      return recv_getStatus();
    }

    public void send_getStatus(String sessionKey, String jobId) throws org.apache.thrift.TException
    {
      getStatus_args args = new getStatus_args();
      args.setSessionKey(sessionKey);
      args.setJobId(jobId);
      sendBase("getStatus", args);
    }

    public String recv_getStatus() throws org.apache.thrift.TException
    {
      getStatus_result result = new getStatus_result();
      receiveBase(result, "getStatus");
      if (result.isSetSuccess()) {
        return result.success;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getStatus failed: unknown result");
    }

    public RemoteInterpreterEvent getEvent() throws org.apache.thrift.TException
    {
      send_getEvent();
      return recv_getEvent();
    }

    public void send_getEvent() throws org.apache.thrift.TException
    {
      getEvent_args args = new getEvent_args();
      sendBase("getEvent", args);
    }

    public RemoteInterpreterEvent recv_getEvent() throws org.apache.thrift.TException
    {
      getEvent_result result = new getEvent_result();
      receiveBase(result, "getEvent");
      if (result.isSetSuccess()) {
        return result.success;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getEvent failed: unknown result");
    }

    public void resourcePoolResponseGetAll(List<String> resources) throws org.apache.thrift.TException
    {
      send_resourcePoolResponseGetAll(resources);
      recv_resourcePoolResponseGetAll();
    }

    public void send_resourcePoolResponseGetAll(List<String> resources) throws org.apache.thrift.TException
    {
      resourcePoolResponseGetAll_args args = new resourcePoolResponseGetAll_args();
      args.setResources(resources);
      sendBase("resourcePoolResponseGetAll", args);
    }

    public void recv_resourcePoolResponseGetAll() throws org.apache.thrift.TException
    {
      resourcePoolResponseGetAll_result result = new resourcePoolResponseGetAll_result();
      receiveBase(result, "resourcePoolResponseGetAll");
      return;
    }

    public void resourceResponseGet(String resourceId, ByteBuffer object) throws org.apache.thrift.TException
    {
      send_resourceResponseGet(resourceId, object);
      recv_resourceResponseGet();
    }

    public void send_resourceResponseGet(String resourceId, ByteBuffer object) throws org.apache.thrift.TException
    {
      resourceResponseGet_args args = new resourceResponseGet_args();
      args.setResourceId(resourceId);
      args.setObject(object);
      sendBase("resourceResponseGet", args);
    }

    public void recv_resourceResponseGet() throws org.apache.thrift.TException
    {
      resourceResponseGet_result result = new resourceResponseGet_result();
      receiveBase(result, "resourceResponseGet");
      return;
    }

    public List<String> resourcePoolGetAll() throws org.apache.thrift.TException
    {
      send_resourcePoolGetAll();
      return recv_resourcePoolGetAll();
    }

    public void send_resourcePoolGetAll() throws org.apache.thrift.TException
    {
      resourcePoolGetAll_args args = new resourcePoolGetAll_args();
      sendBase("resourcePoolGetAll", args);
    }

    public List<String> recv_resourcePoolGetAll() throws org.apache.thrift.TException
    {
      resourcePoolGetAll_result result = new resourcePoolGetAll_result();
      receiveBase(result, "resourcePoolGetAll");
      if (result.isSetSuccess()) {
        return result.success;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "resourcePoolGetAll failed: unknown result");
    }

    public ByteBuffer resourceGet(String sessionKey, String paragraphId, String resourceName) throws org.apache.thrift.TException
    {
      send_resourceGet(sessionKey, paragraphId, resourceName);
      return recv_resourceGet();
    }

    public void send_resourceGet(String sessionKey, String paragraphId, String resourceName) throws org.apache.thrift.TException
    {
      resourceGet_args args = new resourceGet_args();
      args.setSessionKey(sessionKey);
      args.setParagraphId(paragraphId);
      args.setResourceName(resourceName);
      sendBase("resourceGet", args);
    }

    public ByteBuffer recv_resourceGet() throws org.apache.thrift.TException
    {
      resourceGet_result result = new resourceGet_result();
      receiveBase(result, "resourceGet");
      if (result.isSetSuccess()) {
        return result.success;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "resourceGet failed: unknown result");
    }

    public boolean resourceRemove(String sessionKey, String paragraphId, String resourceName) throws org.apache.thrift.TException
    {
      send_resourceRemove(sessionKey, paragraphId, resourceName);
      return recv_resourceRemove();
    }

    public void send_resourceRemove(String sessionKey, String paragraphId, String resourceName) throws org.apache.thrift.TException
    {
      resourceRemove_args args = new resourceRemove_args();
      args.setSessionKey(sessionKey);
      args.setParagraphId(paragraphId);
      args.setResourceName(resourceName);
      sendBase("resourceRemove", args);
    }

    public boolean recv_resourceRemove() throws org.apache.thrift.TException
    {
      resourceRemove_result result = new resourceRemove_result();
      receiveBase(result, "resourceRemove");
      if (result.isSetSuccess()) {
        return result.success;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "resourceRemove failed: unknown result");
    }

    public void angularObjectUpdate(String name, String sessionKey, String paragraphId, String object) throws org.apache.thrift.TException
    {
      send_angularObjectUpdate(name, sessionKey, paragraphId, object);
      recv_angularObjectUpdate();
    }

    public void send_angularObjectUpdate(String name, String sessionKey, String paragraphId, String object) throws org.apache.thrift.TException
    {
      angularObjectUpdate_args args = new angularObjectUpdate_args();
      args.setName(name);
      args.setSessionKey(sessionKey);
      args.setParagraphId(paragraphId);
      args.setObject(object);
      sendBase("angularObjectUpdate", args);
    }

    public void recv_angularObjectUpdate() throws org.apache.thrift.TException
    {
      angularObjectUpdate_result result = new angularObjectUpdate_result();
      receiveBase(result, "angularObjectUpdate");
      return;
    }

    public void angularObjectAdd(String name, String sessionKey, String paragraphId, String object) throws org.apache.thrift.TException
    {
      send_angularObjectAdd(name, sessionKey, paragraphId, object);
      recv_angularObjectAdd();
    }

    public void send_angularObjectAdd(String name, String sessionKey, String paragraphId, String object) throws org.apache.thrift.TException
    {
      angularObjectAdd_args args = new angularObjectAdd_args();
      args.setName(name);
      args.setSessionKey(sessionKey);
      args.setParagraphId(paragraphId);
      args.setObject(object);
      sendBase("angularObjectAdd", args);
    }

    public void recv_angularObjectAdd() throws org.apache.thrift.TException
    {
      angularObjectAdd_result result = new angularObjectAdd_result();
      receiveBase(result, "angularObjectAdd");
      return;
    }

    public void angularObjectRemove(String name, String sessionKey, String paragraphId) throws org.apache.thrift.TException
    {
      send_angularObjectRemove(name, sessionKey, paragraphId);
      recv_angularObjectRemove();
    }

    public void send_angularObjectRemove(String name, String sessionKey, String paragraphId) throws org.apache.thrift.TException
    {
      angularObjectRemove_args args = new angularObjectRemove_args();
      args.setName(name);
      args.setSessionKey(sessionKey);
      args.setParagraphId(paragraphId);
      sendBase("angularObjectRemove", args);
    }

    public void recv_angularObjectRemove() throws org.apache.thrift.TException
    {
      angularObjectRemove_result result = new angularObjectRemove_result();
      receiveBase(result, "angularObjectRemove");
      return;
    }

    public void angularRegistryPush(String registry) throws org.apache.thrift.TException
    {
      send_angularRegistryPush(registry);
      recv_angularRegistryPush();
    }

    public void send_angularRegistryPush(String registry) throws org.apache.thrift.TException
    {
      angularRegistryPush_args args = new angularRegistryPush_args();
      args.setRegistry(registry);
      sendBase("angularRegistryPush", args);
    }

    public void recv_angularRegistryPush() throws org.apache.thrift.TException
    {
      angularRegistryPush_result result = new angularRegistryPush_result();
      receiveBase(result, "angularRegistryPush");
      return;
    }

    public RemoteApplicationResult loadApplication(String applicationInstanceId, String packageInfo, String sessionKey, String paragraphId) throws org.apache.thrift.TException
    {
      send_loadApplication(applicationInstanceId, packageInfo, sessionKey, paragraphId);
      return recv_loadApplication();
    }

    public void send_loadApplication(String applicationInstanceId, String packageInfo, String sessionKey, String paragraphId) throws org.apache.thrift.TException
    {
      loadApplication_args args = new loadApplication_args();
      args.setApplicationInstanceId(applicationInstanceId);
      args.setPackageInfo(packageInfo);
      args.setSessionKey(sessionKey);
      args.setParagraphId(paragraphId);
      sendBase("loadApplication", args);
    }

    public RemoteApplicationResult recv_loadApplication() throws org.apache.thrift.TException
    {
      loadApplication_result result = new loadApplication_result();
      receiveBase(result, "loadApplication");
      if (result.isSetSuccess()) {
        return result.success;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "loadApplication failed: unknown result");
    }

    public RemoteApplicationResult unloadApplication(String applicationInstanceId) throws org.apache.thrift.TException
    {
      send_unloadApplication(applicationInstanceId);
      return recv_unloadApplication();
    }

    public void send_unloadApplication(String applicationInstanceId) throws org.apache.thrift.TException
    {
      unloadApplication_args args = new unloadApplication_args();
      args.setApplicationInstanceId(applicationInstanceId);
      sendBase("unloadApplication", args);
    }

    public RemoteApplicationResult recv_unloadApplication() throws org.apache.thrift.TException
    {
      unloadApplication_result result = new unloadApplication_result();
      receiveBase(result, "unloadApplication");
      if (result.isSetSuccess()) {
        return result.success;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "unloadApplication failed: unknown result");
    }

    public RemoteApplicationResult runApplication(String applicationInstanceId) throws org.apache.thrift.TException
    {
      send_runApplication(applicationInstanceId);
      return recv_runApplication();
    }

    public void send_runApplication(String applicationInstanceId) throws org.apache.thrift.TException
    {
      runApplication_args args = new runApplication_args();
      args.setApplicationInstanceId(applicationInstanceId);
      sendBase("runApplication", args);
    }

    public RemoteApplicationResult recv_runApplication() throws org.apache.thrift.TException
    {
      runApplication_result result = new runApplication_result();
      receiveBase(result, "runApplication");
      if (result.isSetSuccess()) {
        return result.success;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "runApplication failed: unknown result");
    }

    public void onReceivedZeppelinResource(String object) throws org.apache.thrift.TException
    {
      send_onReceivedZeppelinResource(object);
      recv_onReceivedZeppelinResource();
    }

    public void send_onReceivedZeppelinResource(String object) throws org.apache.thrift.TException
    {
      onReceivedZeppelinResource_args args = new onReceivedZeppelinResource_args();
      args.setObject(object);
      sendBase("onReceivedZeppelinResource", args);
    }

    public void recv_onReceivedZeppelinResource() throws org.apache.thrift.TException
    {
      onReceivedZeppelinResource_result result = new onReceivedZeppelinResource_result();
      receiveBase(result, "onReceivedZeppelinResource");
      return;
    }

  }
  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 createInterpreter(String intpGroupId, String sessionKey, String className, Map<String,String> properties, String userName, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
      checkReady();
      createInterpreter_call method_call = new createInterpreter_call(intpGroupId, sessionKey, className, properties, userName, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class createInterpreter_call extends org.apache.thrift.async.TAsyncMethodCall {
      private String intpGroupId;
      private String sessionKey;
      private String className;
      private Map<String,String> properties;
      private String userName;
