/**
 * Autogenerated by Thrift Compiler (0.20.0)
 *
 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
 *  @generated
 */
package com.jetbrains.python.console.protocol;

@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.20.0)", date = "2025-06-03")
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
public class PythonConsoleFrontendService {

  public interface Iface {

    public void notifyFinished(boolean needsMoreInput, boolean exceptionOccurred) throws org.apache.thrift.TException;

    public java.lang.String requestInput(java.lang.String path) throws KeyboardInterruptException, org.apache.thrift.TException;

    public void notifyAboutMagic(java.util.List<java.lang.String> commands, boolean isAutoMagic) throws org.apache.thrift.TException;

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

    /**
     * Returns the result for `PythonConsoleBackendService.loadFullValue`.
     * 
     * @param requestSeq
     * @param response
     */
    public void returnFullValue(int requestSeq, java.util.List<DebugValue> response) throws org.apache.thrift.TException;

    public boolean IPythonEditor(java.lang.String path, java.lang.String line) throws org.apache.thrift.TException;

    public void sendRichOutput(java.util.Map<java.lang.String,java.lang.String> data) throws org.apache.thrift.TException;

  }

  public interface AsyncIface {

    public void notifyFinished(boolean needsMoreInput, boolean exceptionOccurred, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;

    public void requestInput(java.lang.String path, org.apache.thrift.async.AsyncMethodCallback<java.lang.String> resultHandler) throws org.apache.thrift.TException;

    public void notifyAboutMagic(java.util.List<java.lang.String> commands, boolean isAutoMagic, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;

    public void showConsole(org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;

    public void returnFullValue(int requestSeq, java.util.List<DebugValue> response, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;

    public void IPythonEditor(java.lang.String path, java.lang.String line, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException;

    public void sendRichOutput(java.util.Map<java.lang.String,java.lang.String> data, org.apache.thrift.async.AsyncMethodCallback<Void> 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() {}
      @Override
      public Client getClient(org.apache.thrift.protocol.TProtocol prot) {
        return new Client(prot);
      }
      @Override
      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);
    }

    @Override
    public void notifyFinished(boolean needsMoreInput, boolean exceptionOccurred) throws org.apache.thrift.TException
    {
      send_notifyFinished(needsMoreInput, exceptionOccurred);
      recv_notifyFinished();
    }

    public void send_notifyFinished(boolean needsMoreInput, boolean exceptionOccurred) throws org.apache.thrift.TException
    {
      notifyFinished_args args = new notifyFinished_args();
      args.setNeedsMoreInput(needsMoreInput);
      args.setExceptionOccurred(exceptionOccurred);
      sendBase("notifyFinished", args);
    }

    public void recv_notifyFinished() throws org.apache.thrift.TException
    {
      notifyFinished_result result = new notifyFinished_result();
      receiveBase(result, "notifyFinished");
      return;
    }

    @Override
    public java.lang.String requestInput(java.lang.String path) throws KeyboardInterruptException, org.apache.thrift.TException
    {
      send_requestInput(path);
      return recv_requestInput();
    }

    public void send_requestInput(java.lang.String path) throws org.apache.thrift.TException
    {
      requestInput_args args = new requestInput_args();
      args.setPath(path);
      sendBase("requestInput", args);
    }

    public java.lang.String recv_requestInput() throws KeyboardInterruptException, org.apache.thrift.TException
    {
      requestInput_result result = new requestInput_result();
      receiveBase(result, "requestInput");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.interrupted != null) {
        throw result.interrupted;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "requestInput failed: unknown result");
    }

    @Override
    public void notifyAboutMagic(java.util.List<java.lang.String> commands, boolean isAutoMagic) throws org.apache.thrift.TException
    {
      send_notifyAboutMagic(commands, isAutoMagic);
      recv_notifyAboutMagic();
    }

    public void send_notifyAboutMagic(java.util.List<java.lang.String> commands, boolean isAutoMagic) throws org.apache.thrift.TException
    {
      notifyAboutMagic_args args = new notifyAboutMagic_args();
      args.setCommands(commands);
      args.setIsAutoMagic(isAutoMagic);
      sendBase("notifyAboutMagic", args);
    }

    public void recv_notifyAboutMagic() throws org.apache.thrift.TException
    {
      notifyAboutMagic_result result = new notifyAboutMagic_result();
      receiveBase(result, "notifyAboutMagic");
      return;
    }

    @Override
    public void showConsole() throws org.apache.thrift.TException
    {
      send_showConsole();
      recv_showConsole();
    }

    public void send_showConsole() throws org.apache.thrift.TException
    {
      showConsole_args args = new showConsole_args();
      sendBase("showConsole", args);
    }

    public void recv_showConsole() throws org.apache.thrift.TException
    {
      showConsole_result result = new showConsole_result();
      receiveBase(result, "showConsole");
      return;
    }

    @Override
    public void returnFullValue(int requestSeq, java.util.List<DebugValue> response) throws org.apache.thrift.TException
    {
      send_returnFullValue(requestSeq, response);
      recv_returnFullValue();
    }

    public void send_returnFullValue(int requestSeq, java.util.List<DebugValue> response) throws org.apache.thrift.TException
    {
      returnFullValue_args args = new returnFullValue_args();
      args.setRequestSeq(requestSeq);
      args.setResponse(response);
      sendBase("returnFullValue", args);
    }

    public void recv_returnFullValue() throws org.apache.thrift.TException
    {
      returnFullValue_result result = new returnFullValue_result();
      receiveBase(result, "returnFullValue");
      return;
    }

    @Override
    public boolean IPythonEditor(java.lang.String path, java.lang.String line) throws org.apache.thrift.TException
    {
      send_IPythonEditor(path, line);
      return recv_IPythonEditor();
    }

    public void send_IPythonEditor(java.lang.String path, java.lang.String line) throws org.apache.thrift.TException
    {
      IPythonEditor_args args = new IPythonEditor_args();
      args.setPath(path);
      args.setLine(line);
      sendBase("IPythonEditor", args);
    }

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

    @Override
    public void sendRichOutput(java.util.Map<java.lang.String,java.lang.String> data) throws org.apache.thrift.TException
    {
      send_sendRichOutput(data);
      recv_sendRichOutput();
    }

    public void send_sendRichOutput(java.util.Map<java.lang.String,java.lang.String> data) throws org.apache.thrift.TException
    {
      sendRichOutput_args args = new sendRichOutput_args();
      args.setData(data);
      sendBase("sendRichOutput", args);
    }

    public void recv_sendRichOutput() throws org.apache.thrift.TException
    {
      sendRichOutput_result result = new sendRichOutput_result();
      receiveBase(result, "sendRichOutput");
      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;
      }
    @Override
      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);
    }

    @Override
    public void notifyFinished(boolean needsMoreInput, boolean exceptionOccurred, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      notifyFinished_call method_call = new notifyFinished_call(needsMoreInput, exceptionOccurred, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class notifyFinished_call extends org.apache.thrift.async.TAsyncMethodCall<Void> {
      private boolean needsMoreInput;
      private boolean exceptionOccurred;
      public notifyFinished_call(boolean needsMoreInput, boolean exceptionOccurred, org.apache.thrift.async.AsyncMethodCallback<Void> 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.needsMoreInput = needsMoreInput;
        this.exceptionOccurred = exceptionOccurred;
      }

      @Override
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("notifyFinished", org.apache.thrift.protocol.TMessageType.CALL, 0));
        notifyFinished_args args = new notifyFinished_args();
        args.setNeedsMoreInput(needsMoreInput);
        args.setExceptionOccurred(exceptionOccurred);
        args.write(prot);
        prot.writeMessageEnd();
      }

      @Override
      public Void getResult() throws org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new java.lang.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_notifyFinished();
        return null;
      }
    }

    @Override
    public void requestInput(java.lang.String path, org.apache.thrift.async.AsyncMethodCallback<java.lang.String> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      requestInput_call method_call = new requestInput_call(path, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class requestInput_call extends org.apache.thrift.async.TAsyncMethodCall<java.lang.String> {
      private java.lang.String path;
      public requestInput_call(java.lang.String path, org.apache.thrift.async.AsyncMethodCallback<java.lang.String> 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.path = path;
      }

      @Override
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("requestInput", org.apache.thrift.protocol.TMessageType.CALL, 0));
        requestInput_args args = new requestInput_args();
        args.setPath(path);
        args.write(prot);
        prot.writeMessageEnd();
      }

      @Override
      public java.lang.String getResult() throws KeyboardInterruptException, org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new java.lang.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_requestInput();
      }
    }

    @Override
    public void notifyAboutMagic(java.util.List<java.lang.String> commands, boolean isAutoMagic, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      notifyAboutMagic_call method_call = new notifyAboutMagic_call(commands, isAutoMagic, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class notifyAboutMagic_call extends org.apache.thrift.async.TAsyncMethodCall<Void> {
      private java.util.List<java.lang.String> commands;
      private boolean isAutoMagic;
      public notifyAboutMagic_call(java.util.List<java.lang.String> commands, boolean isAutoMagic, org.apache.thrift.async.AsyncMethodCallback<Void> 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.commands = commands;
        this.isAutoMagic = isAutoMagic;
      }

      @Override
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("notifyAboutMagic", org.apache.thrift.protocol.TMessageType.CALL, 0));
        notifyAboutMagic_args args = new notifyAboutMagic_args();
        args.setCommands(commands);
        args.setIsAutoMagic(isAutoMagic);
        args.write(prot);
        prot.writeMessageEnd();
      }

      @Override
      public Void getResult() throws org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new java.lang.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_notifyAboutMagic();
        return null;
      }
    }

    @Override
    public void showConsole(org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      showConsole_call method_call = new showConsole_call(resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class showConsole_call extends org.apache.thrift.async.TAsyncMethodCall<Void> {
      public showConsole_call(org.apache.thrift.async.AsyncMethodCallback<Void> 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);
      }

      @Override
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("showConsole", org.apache.thrift.protocol.TMessageType.CALL, 0));
        showConsole_args args = new showConsole_args();
        args.write(prot);
        prot.writeMessageEnd();
      }

      @Override
      public Void getResult() throws org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new java.lang.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_showConsole();
        return null;
      }
    }

    @Override
    public void returnFullValue(int requestSeq, java.util.List<DebugValue> response, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      returnFullValue_call method_call = new returnFullValue_call(requestSeq, response, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class returnFullValue_call extends org.apache.thrift.async.TAsyncMethodCall<Void> {
      private int requestSeq;
      private java.util.List<DebugValue> response;
      public returnFullValue_call(int requestSeq, java.util.List<DebugValue> response, org.apache.thrift.async.AsyncMethodCallback<Void> 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.requestSeq = requestSeq;
        this.response = response;
      }

      @Override
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("returnFullValue", org.apache.thrift.protocol.TMessageType.CALL, 0));
        returnFullValue_args args = new returnFullValue_args();
        args.setRequestSeq(requestSeq);
        args.setResponse(response);
        args.write(prot);
        prot.writeMessageEnd();
      }

      @Override
      public Void getResult() throws org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new java.lang.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_returnFullValue();
        return null;
      }
    }

    @Override
    public void IPythonEditor(java.lang.String path, java.lang.String line, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      IPythonEditor_call method_call = new IPythonEditor_call(path, line, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class IPythonEditor_call extends org.apache.thrift.async.TAsyncMethodCall<java.lang.Boolean> {
      private java.lang.String path;
      private java.lang.String line;
      public IPythonEditor_call(java.lang.String path, java.lang.String line, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> 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.path = path;
        this.line = line;
      }

      @Override
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("IPythonEditor", org.apache.thrift.protocol.TMessageType.CALL, 0));
        IPythonEditor_args args = new IPythonEditor_args();
        args.setPath(path);
        args.setLine(line);
        args.write(prot);
        prot.writeMessageEnd();
      }

      @Override
      public java.lang.Boolean getResult() throws org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new java.lang.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_IPythonEditor();
      }
    }

    @Override
    public void sendRichOutput(java.util.Map<java.lang.String,java.lang.String> data, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      sendRichOutput_call method_call = new sendRichOutput_call(data, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class sendRichOutput_call extends org.apache.thrift.async.TAsyncMethodCall<Void> {
      private java.util.Map<java.lang.String,java.lang.String> data;
      public sendRichOutput_call(java.util.Map<java.lang.String,java.lang.String> data, org.apache.thrift.async.AsyncMethodCallback<Void> 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.data = data;
      }

      @Override
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("sendRichOutput", org.apache.thrift.protocol.TMessageType.CALL, 0));
        sendRichOutput_args args = new sendRichOutput_args();
        args.setData(data);
        args.write(prot);
        prot.writeMessageEnd();
      }

      @Override
      public Void getResult() throws org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new java.lang.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_sendRichOutput();
        return null;
      }
    }

  }

  public static class Processor<I extends Iface> extends org.apache.thrift.TBaseProcessor<I> implements org.apache.thrift.TProcessor {
    private static final org.slf4j.Logger _LOGGER = org.slf4j.LoggerFactory.getLogger(Processor.class.getName());
    public Processor(I iface) {
      super(iface, getProcessMap(new java.util.HashMap<java.lang.String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>>()));
    }

    protected Processor(I iface, java.util.Map<java.lang.String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> processMap) {
      super(iface, getProcessMap(processMap));
    }

    private static <I extends Iface> java.util.Map<java.lang.String,  org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> getProcessMap(java.util.Map<java.lang.String, org.apache.thrift.ProcessFunction<I, ? extends  org.apache.thrift.TBase>> processMap) {
      processMap.put("notifyFinished", new notifyFinished());
      processMap.put("requestInput", new requestInput());
      processMap.put("notifyAboutMagic", new notifyAboutMagic());
      processMap.put("showConsole", new showConsole());
      processMap.put("returnFullValue", new returnFullValue());
      processMap.put("IPythonEditor", new IPythonEditor());
      processMap.put("sendRichOutput", new sendRichOutput());
      return processMap;
    }

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

      @Override
      public notifyFinished_args getEmptyArgsInstance() {
        return new notifyFinished_args();
      }

      @Override
      protected boolean isOneway() {
        return false;
      }

      @Override
      protected boolean rethrowUnhandledExceptions() {
        return false;
      }

      @Override
      public notifyFinished_result getResult(I iface, notifyFinished_args args) throws org.apache.thrift.TException {
        notifyFinished_result result = new notifyFinished_result();
        iface.notifyFinished(args.needsMoreInput, args.exceptionOccurred);
        return result;
      }
    }

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

      @Override
      public requestInput_args getEmptyArgsInstance() {
        return new requestInput_args();
      }

      @Override
      protected boolean isOneway() {
        return false;
      }

      @Override
      protected boolean rethrowUnhandledExceptions() {
        return false;
      }

      @Override
      public requestInput_result getResult(I iface, requestInput_args args) throws org.apache.thrift.TException {
        requestInput_result result = new requestInput_result();
        try {
          result.success = iface.requestInput(args.path);
        } catch (KeyboardInterruptException interrupted) {
          result.interrupted = interrupted;
        }
        return result;
      }
    }

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

      @Override
      public notifyAboutMagic_args getEmptyArgsInstance() {
        return new notifyAboutMagic_args();
      }

      @Override
      protected boolean isOneway() {
        return false;
      }

      @Override
      protected boolean rethrowUnhandledExceptions() {
        return false;
      }

      @Override
      public notifyAboutMagic_result getResult(I iface, notifyAboutMagic_args args) throws org.apache.thrift.TException {
        notifyAboutMagic_result result = new notifyAboutMagic_result();
        iface.notifyAboutMagic(args.commands, args.isAutoMagic);
        return result;
      }
    }

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

      @Override
      public showConsole_args getEmptyArgsInstance() {
        return new showConsole_args();
      }

      @Override
      protected boolean isOneway() {
        return false;
      }

      @Override
      protected boolean rethrowUnhandledExceptions() {
        return false;
      }

      @Override
      public showConsole_result getResult(I iface, showConsole_args args) throws org.apache.thrift.TException {
        showConsole_result result = new showConsole_result();
        iface.showConsole();
        return result;
      }
    }

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

      @Override
      public returnFullValue_args getEmptyArgsInstance() {
        return new returnFullValue_args();
      }

      @Override
      protected boolean isOneway() {
        return false;
      }

      @Override
      protected boolean rethrowUnhandledExceptions() {
        return false;
      }

      @Override
      public returnFullValue_result getResult(I iface, returnFullValue_args args) throws org.apache.thrift.TException {
        returnFullValue_result result = new returnFullValue_result();
        iface.returnFullValue(args.requestSeq, args.response);
        return result;
      }
    }

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

      @Override
      public IPythonEditor_args getEmptyArgsInstance() {
        return new IPythonEditor_args();
      }

      @Override
      protected boolean isOneway() {
        return false;
      }

      @Override
      protected boolean rethrowUnhandledExceptions() {
        return false;
      }

      @Override
      public IPythonEditor_result getResult(I iface, IPythonEditor_args args) throws org.apache.thrift.TException {
        IPythonEditor_result result = new IPythonEditor_result();
        result.success = iface.IPythonEditor(args.path, args.line);
        result.setSuccessIsSet(true);
        return result;
      }
    }

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

      @Override
      public sendRichOutput_args getEmptyArgsInstance() {
        return new sendRichOutput_args();
      }

      @Override
      protected boolean isOneway() {
        return false;
      }

      @Override
      protected boolean rethrowUnhandledExceptions() {
        return false;
      }

      @Override
      public sendRichOutput_result getResult(I iface, sendRichOutput_args args) throws org.apache.thrift.TException {
        sendRichOutput_result result = new sendRichOutput_result();
        iface.sendRichOutput(args.data);
        return result;
      }
    }

  }

  public static class AsyncProcessor<I extends AsyncIface> extends org.apache.thrift.TBaseAsyncProcessor<I> {
    private static final org.slf4j.Logger _LOGGER = org.slf4j.LoggerFactory.getLogger(AsyncProcessor.class.getName());
    public AsyncProcessor(I iface) {
      super(iface, getProcessMap(new java.util.HashMap<java.lang.String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase, ?>>()));
    }

