/**
 * Autogenerated by Thrift Compiler (0.20.0)
 *
 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
 *  @generated
 */
package org.apache.amoro.api;

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

  public interface Iface {

    public void ping() throws org.apache.amoro.shade.thrift.org.apache.thrift.TException;

    public void touch(java.lang.String authToken) throws org.apache.amoro.api.AmoroException, org.apache.amoro.shade.thrift.org.apache.thrift.TException;

    public OptimizingTask pollTask(java.lang.String authToken, int threadId) throws org.apache.amoro.api.AmoroException, org.apache.amoro.shade.thrift.org.apache.thrift.TException;

    public void ackTask(java.lang.String authToken, int threadId, OptimizingTaskId taskId) throws org.apache.amoro.api.AmoroException, org.apache.amoro.shade.thrift.org.apache.thrift.TException;

    public void completeTask(java.lang.String authToken, OptimizingTaskResult taskResult) throws org.apache.amoro.api.AmoroException, org.apache.amoro.shade.thrift.org.apache.thrift.TException;

    public java.lang.String authenticate(OptimizerRegisterInfo registerInfo) throws org.apache.amoro.api.AmoroException, org.apache.amoro.shade.thrift.org.apache.thrift.TException;

    public boolean cancelProcess(long processId) throws org.apache.amoro.shade.thrift.org.apache.thrift.TException;

  }

  public interface AsyncIface {

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

    public void touch(java.lang.String authToken, org.apache.amoro.shade.thrift.org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.amoro.shade.thrift.org.apache.thrift.TException;

    public void pollTask(java.lang.String authToken, int threadId, org.apache.amoro.shade.thrift.org.apache.thrift.async.AsyncMethodCallback<OptimizingTask> resultHandler) throws org.apache.amoro.shade.thrift.org.apache.thrift.TException;

    public void ackTask(java.lang.String authToken, int threadId, OptimizingTaskId taskId, org.apache.amoro.shade.thrift.org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.amoro.shade.thrift.org.apache.thrift.TException;

    public void completeTask(java.lang.String authToken, OptimizingTaskResult taskResult, org.apache.amoro.shade.thrift.org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.amoro.shade.thrift.org.apache.thrift.TException;

    public void authenticate(OptimizerRegisterInfo registerInfo, org.apache.amoro.shade.thrift.org.apache.thrift.async.AsyncMethodCallback<java.lang.String> resultHandler) throws org.apache.amoro.shade.thrift.org.apache.thrift.TException;

    public void cancelProcess(long processId, org.apache.amoro.shade.thrift.org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.amoro.shade.thrift.org.apache.thrift.TException;

  }

  public static class Client extends org.apache.amoro.shade.thrift.org.apache.thrift.TServiceClient implements Iface {
    public static class Factory implements org.apache.amoro.shade.thrift.org.apache.thrift.TServiceClientFactory<Client> {
      public Factory() {}
      @Override
      public Client getClient(org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TProtocol prot) {
        return new Client(prot);
      }
      @Override
      public Client getClient(org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TProtocol iprot, org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TProtocol oprot) {
        return new Client(iprot, oprot);
      }
    }

    public Client(org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TProtocol prot)
    {
      super(prot, prot);
    }

    public Client(org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TProtocol iprot, org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TProtocol oprot) {
      super(iprot, oprot);
    }

    @Override
    public void ping() throws org.apache.amoro.shade.thrift.org.apache.thrift.TException
    {
      send_ping();
      recv_ping();
    }

    public void send_ping() throws org.apache.amoro.shade.thrift.org.apache.thrift.TException
    {
      ping_args args = new ping_args();
      sendBase("ping", args);
    }

    public void recv_ping() throws org.apache.amoro.shade.thrift.org.apache.thrift.TException
    {
      ping_result result = new ping_result();
      receiveBase(result, "ping");
      return;
    }

    @Override
    public void touch(java.lang.String authToken) throws org.apache.amoro.api.AmoroException, org.apache.amoro.shade.thrift.org.apache.thrift.TException
    {
      send_touch(authToken);
      recv_touch();
    }

    public void send_touch(java.lang.String authToken) throws org.apache.amoro.shade.thrift.org.apache.thrift.TException
    {
      touch_args args = new touch_args();
      args.setAuthToken(authToken);
      sendBase("touch", args);
    }

    public void recv_touch() throws org.apache.amoro.api.AmoroException, org.apache.amoro.shade.thrift.org.apache.thrift.TException
    {
      touch_result result = new touch_result();
      receiveBase(result, "touch");
      if (result.e1 != null) {
        throw result.e1;
      }
      return;
    }

    @Override
    public OptimizingTask pollTask(java.lang.String authToken, int threadId) throws org.apache.amoro.api.AmoroException, org.apache.amoro.shade.thrift.org.apache.thrift.TException
    {
      send_pollTask(authToken, threadId);
      return recv_pollTask();
    }

    public void send_pollTask(java.lang.String authToken, int threadId) throws org.apache.amoro.shade.thrift.org.apache.thrift.TException
    {
      pollTask_args args = new pollTask_args();
      args.setAuthToken(authToken);
      args.setThreadId(threadId);
      sendBase("pollTask", args);
    }

    public OptimizingTask recv_pollTask() throws org.apache.amoro.api.AmoroException, org.apache.amoro.shade.thrift.org.apache.thrift.TException
    {
      pollTask_result result = new pollTask_result();
      receiveBase(result, "pollTask");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.e1 != null) {
        throw result.e1;
      }
      throw new org.apache.amoro.shade.thrift.org.apache.thrift.TApplicationException(org.apache.amoro.shade.thrift.org.apache.thrift.TApplicationException.MISSING_RESULT, "pollTask failed: unknown result");
    }

    @Override
    public void ackTask(java.lang.String authToken, int threadId, OptimizingTaskId taskId) throws org.apache.amoro.api.AmoroException, org.apache.amoro.shade.thrift.org.apache.thrift.TException
    {
      send_ackTask(authToken, threadId, taskId);
      recv_ackTask();
    }

    public void send_ackTask(java.lang.String authToken, int threadId, OptimizingTaskId taskId) throws org.apache.amoro.shade.thrift.org.apache.thrift.TException
    {
      ackTask_args args = new ackTask_args();
      args.setAuthToken(authToken);
      args.setThreadId(threadId);
      args.setTaskId(taskId);
      sendBase("ackTask", args);
    }

    public void recv_ackTask() throws org.apache.amoro.api.AmoroException, org.apache.amoro.shade.thrift.org.apache.thrift.TException
    {
      ackTask_result result = new ackTask_result();
      receiveBase(result, "ackTask");
      if (result.e1 != null) {
        throw result.e1;
      }
      return;
    }

    @Override
    public void completeTask(java.lang.String authToken, OptimizingTaskResult taskResult) throws org.apache.amoro.api.AmoroException, org.apache.amoro.shade.thrift.org.apache.thrift.TException
    {
      send_completeTask(authToken, taskResult);
      recv_completeTask();
    }

    public void send_completeTask(java.lang.String authToken, OptimizingTaskResult taskResult) throws org.apache.amoro.shade.thrift.org.apache.thrift.TException
    {
      completeTask_args args = new completeTask_args();
      args.setAuthToken(authToken);
      args.setTaskResult(taskResult);
      sendBase("completeTask", args);
    }

    public void recv_completeTask() throws org.apache.amoro.api.AmoroException, org.apache.amoro.shade.thrift.org.apache.thrift.TException
    {
      completeTask_result result = new completeTask_result();
      receiveBase(result, "completeTask");
      if (result.e1 != null) {
        throw result.e1;
      }
      return;
    }

    @Override
    public java.lang.String authenticate(OptimizerRegisterInfo registerInfo) throws org.apache.amoro.api.AmoroException, org.apache.amoro.shade.thrift.org.apache.thrift.TException
    {
      send_authenticate(registerInfo);
      return recv_authenticate();
    }

    public void send_authenticate(OptimizerRegisterInfo registerInfo) throws org.apache.amoro.shade.thrift.org.apache.thrift.TException
    {
      authenticate_args args = new authenticate_args();
      args.setRegisterInfo(registerInfo);
      sendBase("authenticate", args);
    }

    public java.lang.String recv_authenticate() throws org.apache.amoro.api.AmoroException, org.apache.amoro.shade.thrift.org.apache.thrift.TException
    {
      authenticate_result result = new authenticate_result();
      receiveBase(result, "authenticate");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.e1 != null) {
        throw result.e1;
      }
      throw new org.apache.amoro.shade.thrift.org.apache.thrift.TApplicationException(org.apache.amoro.shade.thrift.org.apache.thrift.TApplicationException.MISSING_RESULT, "authenticate failed: unknown result");
    }

    @Override
    public boolean cancelProcess(long processId) throws org.apache.amoro.shade.thrift.org.apache.thrift.TException
    {
      send_cancelProcess(processId);
      return recv_cancelProcess();
    }

    public void send_cancelProcess(long processId) throws org.apache.amoro.shade.thrift.org.apache.thrift.TException
    {
      cancelProcess_args args = new cancelProcess_args();
      args.setProcessId(processId);
      sendBase("cancelProcess", args);
    }

    public boolean recv_cancelProcess() throws org.apache.amoro.shade.thrift.org.apache.thrift.TException
    {
      cancelProcess_result result = new cancelProcess_result();
      receiveBase(result, "cancelProcess");
      if (result.isSetSuccess()) {
        return result.success;
      }
      throw new org.apache.amoro.shade.thrift.org.apache.thrift.TApplicationException(org.apache.amoro.shade.thrift.org.apache.thrift.TApplicationException.MISSING_RESULT, "cancelProcess failed: unknown result");
    }

  }
  public static class AsyncClient extends org.apache.amoro.shade.thrift.org.apache.thrift.async.TAsyncClient implements AsyncIface {
    public static class Factory implements org.apache.amoro.shade.thrift.org.apache.thrift.async.TAsyncClientFactory<AsyncClient> {
      private org.apache.amoro.shade.thrift.org.apache.thrift.async.TAsyncClientManager clientManager;
      private org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TProtocolFactory protocolFactory;
      public Factory(org.apache.amoro.shade.thrift.org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TProtocolFactory protocolFactory) {
        this.clientManager = clientManager;
        this.protocolFactory = protocolFactory;
      }
    @Override
      public AsyncClient getAsyncClient(org.apache.amoro.shade.thrift.org.apache.thrift.transport.TNonblockingTransport transport) {
        return new AsyncClient(protocolFactory, clientManager, transport);
      }
    }

    public AsyncClient(org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.amoro.shade.thrift.org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.amoro.shade.thrift.org.apache.thrift.transport.TNonblockingTransport transport) {
      super(protocolFactory, clientManager, transport);
    }

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

    public static class ping_call extends org.apache.amoro.shade.thrift.org.apache.thrift.async.TAsyncMethodCall<Void> {
      public ping_call(org.apache.amoro.shade.thrift.org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler, org.apache.amoro.shade.thrift.org.apache.thrift.async.TAsyncClient client, org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.amoro.shade.thrift.org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.amoro.shade.thrift.org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
      }

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

      @Override
      public Void getResult() throws org.apache.amoro.shade.thrift.org.apache.thrift.TException {
        if (getState() != org.apache.amoro.shade.thrift.org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new java.lang.IllegalStateException("Method call not finished!");
        }
        org.apache.amoro.shade.thrift.org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.amoro.shade.thrift.org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        (new Client(prot)).recv_ping();
        return null;
      }
    }

    @Override
    public void touch(java.lang.String authToken, org.apache.amoro.shade.thrift.org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.amoro.shade.thrift.org.apache.thrift.TException {
      checkReady();
      touch_call method_call = new touch_call(authToken, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class touch_call extends org.apache.amoro.shade.thrift.org.apache.thrift.async.TAsyncMethodCall<Void> {
      private java.lang.String authToken;
      public touch_call(java.lang.String authToken, org.apache.amoro.shade.thrift.org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler, org.apache.amoro.shade.thrift.org.apache.thrift.async.TAsyncClient client, org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.amoro.shade.thrift.org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.amoro.shade.thrift.org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.authToken = authToken;
      }

      @Override
      public void write_args(org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TProtocol prot) throws org.apache.amoro.shade.thrift.org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TMessage("touch", org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TMessageType.CALL, 0));
        touch_args args = new touch_args();
        args.setAuthToken(authToken);
        args.write(prot);
        prot.writeMessageEnd();
      }

      @Override
      public Void getResult() throws org.apache.amoro.api.AmoroException, org.apache.amoro.shade.thrift.org.apache.thrift.TException {
        if (getState() != org.apache.amoro.shade.thrift.org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new java.lang.IllegalStateException("Method call not finished!");
        }
        org.apache.amoro.shade.thrift.org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.amoro.shade.thrift.org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        (new Client(prot)).recv_touch();
        return null;
      }
    }

    @Override
    public void pollTask(java.lang.String authToken, int threadId, org.apache.amoro.shade.thrift.org.apache.thrift.async.AsyncMethodCallback<OptimizingTask> resultHandler) throws org.apache.amoro.shade.thrift.org.apache.thrift.TException {
      checkReady();
      pollTask_call method_call = new pollTask_call(authToken, threadId, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class pollTask_call extends org.apache.amoro.shade.thrift.org.apache.thrift.async.TAsyncMethodCall<OptimizingTask> {
      private java.lang.String authToken;
      private int threadId;
      public pollTask_call(java.lang.String authToken, int threadId, org.apache.amoro.shade.thrift.org.apache.thrift.async.AsyncMethodCallback<OptimizingTask> resultHandler, org.apache.amoro.shade.thrift.org.apache.thrift.async.TAsyncClient client, org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.amoro.shade.thrift.org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.amoro.shade.thrift.org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.authToken = authToken;
        this.threadId = threadId;
      }

      @Override
      public void write_args(org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TProtocol prot) throws org.apache.amoro.shade.thrift.org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TMessage("pollTask", org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TMessageType.CALL, 0));
        pollTask_args args = new pollTask_args();
        args.setAuthToken(authToken);
        args.setThreadId(threadId);
        args.write(prot);
        prot.writeMessageEnd();
      }

      @Override
      public OptimizingTask getResult() throws org.apache.amoro.api.AmoroException, org.apache.amoro.shade.thrift.org.apache.thrift.TException {
        if (getState() != org.apache.amoro.shade.thrift.org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new java.lang.IllegalStateException("Method call not finished!");
        }
        org.apache.amoro.shade.thrift.org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.amoro.shade.thrift.org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        return (new Client(prot)).recv_pollTask();
      }
    }

    @Override
    public void ackTask(java.lang.String authToken, int threadId, OptimizingTaskId taskId, org.apache.amoro.shade.thrift.org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.amoro.shade.thrift.org.apache.thrift.TException {
      checkReady();
      ackTask_call method_call = new ackTask_call(authToken, threadId, taskId, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class ackTask_call extends org.apache.amoro.shade.thrift.org.apache.thrift.async.TAsyncMethodCall<Void> {
      private java.lang.String authToken;
      private int threadId;
      private OptimizingTaskId taskId;
      public ackTask_call(java.lang.String authToken, int threadId, OptimizingTaskId taskId, org.apache.amoro.shade.thrift.org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler, org.apache.amoro.shade.thrift.org.apache.thrift.async.TAsyncClient client, org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.amoro.shade.thrift.org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.amoro.shade.thrift.org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.authToken = authToken;
        this.threadId = threadId;
        this.taskId = taskId;
      }

      @Override
      public void write_args(org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TProtocol prot) throws org.apache.amoro.shade.thrift.org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TMessage("ackTask", org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TMessageType.CALL, 0));
        ackTask_args args = new ackTask_args();
        args.setAuthToken(authToken);
        args.setThreadId(threadId);
        args.setTaskId(taskId);
        args.write(prot);
        prot.writeMessageEnd();
      }

      @Override
      public Void getResult() throws org.apache.amoro.api.AmoroException, org.apache.amoro.shade.thrift.org.apache.thrift.TException {
        if (getState() != org.apache.amoro.shade.thrift.org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new java.lang.IllegalStateException("Method call not finished!");
        }
        org.apache.amoro.shade.thrift.org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.amoro.shade.thrift.org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        (new Client(prot)).recv_ackTask();
        return null;
      }
    }

    @Override
    public void completeTask(java.lang.String authToken, OptimizingTaskResult taskResult, org.apache.amoro.shade.thrift.org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.amoro.shade.thrift.org.apache.thrift.TException {
      checkReady();
      completeTask_call method_call = new completeTask_call(authToken, taskResult, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class completeTask_call extends org.apache.amoro.shade.thrift.org.apache.thrift.async.TAsyncMethodCall<Void> {
      private java.lang.String authToken;
      private OptimizingTaskResult taskResult;
      public completeTask_call(java.lang.String authToken, OptimizingTaskResult taskResult, org.apache.amoro.shade.thrift.org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler, org.apache.amoro.shade.thrift.org.apache.thrift.async.TAsyncClient client, org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.amoro.shade.thrift.org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.amoro.shade.thrift.org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.authToken = authToken;
        this.taskResult = taskResult;
      }

      @Override
      public void write_args(org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TProtocol prot) throws org.apache.amoro.shade.thrift.org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TMessage("completeTask", org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TMessageType.CALL, 0));
        completeTask_args args = new completeTask_args();
        args.setAuthToken(authToken);
        args.setTaskResult(taskResult);
        args.write(prot);
        prot.writeMessageEnd();
      }

      @Override
      public Void getResult() throws org.apache.amoro.api.AmoroException, org.apache.amoro.shade.thrift.org.apache.thrift.TException {
        if (getState() != org.apache.amoro.shade.thrift.org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new java.lang.IllegalStateException("Method call not finished!");
        }
        org.apache.amoro.shade.thrift.org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.amoro.shade.thrift.org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        (new Client(prot)).recv_completeTask();
        return null;
      }
    }

    @Override
    public void authenticate(OptimizerRegisterInfo registerInfo, org.apache.amoro.shade.thrift.org.apache.thrift.async.AsyncMethodCallback<java.lang.String> resultHandler) throws org.apache.amoro.shade.thrift.org.apache.thrift.TException {
      checkReady();
      authenticate_call method_call = new authenticate_call(registerInfo, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class authenticate_call extends org.apache.amoro.shade.thrift.org.apache.thrift.async.TAsyncMethodCall<java.lang.String> {
      private OptimizerRegisterInfo registerInfo;
      public authenticate_call(OptimizerRegisterInfo registerInfo, org.apache.amoro.shade.thrift.org.apache.thrift.async.AsyncMethodCallback<java.lang.String> resultHandler, org.apache.amoro.shade.thrift.org.apache.thrift.async.TAsyncClient client, org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.amoro.shade.thrift.org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.amoro.shade.thrift.org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.registerInfo = registerInfo;
      }

      @Override
      public void write_args(org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TProtocol prot) throws org.apache.amoro.shade.thrift.org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TMessage("authenticate", org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TMessageType.CALL, 0));
        authenticate_args args = new authenticate_args();
        args.setRegisterInfo(registerInfo);
        args.write(prot);
        prot.writeMessageEnd();
      }

      @Override
      public java.lang.String getResult() throws org.apache.amoro.api.AmoroException, org.apache.amoro.shade.thrift.org.apache.thrift.TException {
        if (getState() != org.apache.amoro.shade.thrift.org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new java.lang.IllegalStateException("Method call not finished!");
        }
        org.apache.amoro.shade.thrift.org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.amoro.shade.thrift.org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        return (new Client(prot)).recv_authenticate();
      }
    }

    @Override
    public void cancelProcess(long processId, org.apache.amoro.shade.thrift.org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.amoro.shade.thrift.org.apache.thrift.TException {
      checkReady();
      cancelProcess_call method_call = new cancelProcess_call(processId, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class cancelProcess_call extends org.apache.amoro.shade.thrift.org.apache.thrift.async.TAsyncMethodCall<java.lang.Boolean> {
      private long processId;
      public cancelProcess_call(long processId, org.apache.amoro.shade.thrift.org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler, org.apache.amoro.shade.thrift.org.apache.thrift.async.TAsyncClient client, org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.amoro.shade.thrift.org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.amoro.shade.thrift.org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.processId = processId;
      }

      @Override
      public void write_args(org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TProtocol prot) throws org.apache.amoro.shade.thrift.org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TMessage("cancelProcess", org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TMessageType.CALL, 0));
        cancelProcess_args args = new cancelProcess_args();
        args.setProcessId(processId);
        args.write(prot);
        prot.writeMessageEnd();
      }

      @Override
      public java.lang.Boolean getResult() throws org.apache.amoro.shade.thrift.org.apache.thrift.TException {
        if (getState() != org.apache.amoro.shade.thrift.org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new java.lang.IllegalStateException("Method call not finished!");
        }
        org.apache.amoro.shade.thrift.org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.amoro.shade.thrift.org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        return (new Client(prot)).recv_cancelProcess();
      }
    }

  }

  public static class Processor<I extends Iface> extends org.apache.amoro.shade.thrift.org.apache.thrift.TBaseProcessor<I> implements org.apache.amoro.shade.thrift.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.amoro.shade.thrift.org.apache.thrift.ProcessFunction<I, ? extends org.apache.amoro.shade.thrift.org.apache.thrift.TBase>>()));
    }

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

    private static <I extends Iface> java.util.Map<java.lang.String,  org.apache.amoro.shade.thrift.org.apache.thrift.ProcessFunction<I, ? extends org.apache.amoro.shade.thrift.org.apache.thrift.TBase>> getProcessMap(java.util.Map<java.lang.String, org.apache.amoro.shade.thrift.org.apache.thrift.ProcessFunction<I, ? extends  org.apache.amoro.shade.thrift.org.apache.thrift.TBase>> processMap) {
      processMap.put("ping", new ping());
      processMap.put("touch", new touch());
      processMap.put("pollTask", new pollTask());
      processMap.put("ackTask", new ackTask());
      processMap.put("completeTask", new completeTask());
      processMap.put("authenticate", new authenticate());
      processMap.put("cancelProcess", new cancelProcess());
      return processMap;
    }

    public static class ping<I extends Iface> extends org.apache.amoro.shade.thrift.org.apache.thrift.ProcessFunction<I, ping_args> {
      public ping() {
        super("ping");
      }

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

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

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

      @Override
      public ping_result getResult(I iface, ping_args args) throws org.apache.amoro.shade.thrift.org.apache.thrift.TException {
        ping_result result = new ping_result();
        iface.ping();
        return result;
      }
    }

    public static class touch<I extends Iface> extends org.apache.amoro.shade.thrift.org.apache.thrift.ProcessFunction<I, touch_args> {
      public touch() {
        super("touch");
      }

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

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

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

      @Override
      public touch_result getResult(I iface, touch_args args) throws org.apache.amoro.shade.thrift.org.apache.thrift.TException {
        touch_result result = new touch_result();
        try {
          iface.touch(args.authToken);
        } catch (org.apache.amoro.api.AmoroException e1) {
          result.e1 = e1;
        }
        return result;
      }
    }

    public static class pollTask<I extends Iface> extends org.apache.amoro.shade.thrift.org.apache.thrift.ProcessFunction<I, pollTask_args> {
      public pollTask() {
        super("pollTask");
      }

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

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

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

      @Override
      public pollTask_result getResult(I iface, pollTask_args args) throws org.apache.amoro.shade.thrift.org.apache.thrift.TException {
        pollTask_result result = new pollTask_result();
        try {
          result.success = iface.pollTask(args.authToken, args.threadId);
        } catch (org.apache.amoro.api.AmoroException e1) {
          result.e1 = e1;
        }
        return result;
      }
    }

    public static class ackTask<I extends Iface> extends org.apache.amoro.shade.thrift.org.apache.thrift.ProcessFunction<I, ackTask_args> {
      public ackTask() {
        super("ackTask");
      }

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

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

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

      @Override
      public ackTask_result getResult(I iface, ackTask_args args) throws org.apache.amoro.shade.thrift.org.apache.thrift.TException {
        ackTask_result result = new ackTask_result();
        try {
          iface.ackTask(args.authToken, args.threadId, args.taskId);
        } catch (org.apache.amoro.api.AmoroException e1) {
          result.e1 = e1;
        }
        return result;
      }
    }

    public static class completeTask<I extends Iface> extends org.apache.amoro.shade.thrift.org.apache.thrift.ProcessFunction<I, completeTask_args> {
      public completeTask() {
        super("completeTask");
      }

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

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

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

      @Override
      public completeTask_result getResult(I iface, completeTask_args args) throws org.apache.amoro.shade.thrift.org.apache.thrift.TException {
        completeTask_result result = new completeTask_result();
        try {
          iface.completeTask(args.authToken, args.taskResult);
        } catch (org.apache.amoro.api.AmoroException e1) {
          result.e1 = e1;
        }
        return result;
      }
    }

    public static class authenticate<I extends Iface> extends org.apache.amoro.shade.thrift.org.apache.thrift.ProcessFunction<I, authenticate_args> {
      public authenticate() {
        super("authenticate");
      }

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

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

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

      @Override
      public authenticate_result getResult(I iface, authenticate_args args) throws org.apache.amoro.shade.thrift.org.apache.thrift.TException {
        authenticate_result result = new authenticate_result();
        try {
          result.success = iface.authenticate(args.registerInfo);
        } catch (org.apache.amoro.api.AmoroException e1) {
          result.e1 = e1;
        }
        return result;
      }
    }

    public static class cancelProcess<I extends Iface> extends org.apache.amoro.shade.thrift.org.apache.thrift.ProcessFunction<I, cancelProcess_args> {
      public cancelProcess() {
        super("cancelProcess");
      }

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

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

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

      @Override
      public cancelProcess_result getResult(I iface, cancelProcess_args args) throws org.apache.amoro.shade.thrift.org.apache.thrift.TException {
        cancelProcess_result result = new cancelProcess_result();
        result.success = iface.cancelProcess(args.processId);
        result.setSuccessIsSet(true);
        return result;
      }
    }

  }

  public static class AsyncProcessor<I extends AsyncIface> extends org.apache.amoro.shade.thrift.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.amoro.shade.thrift.org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.amoro.shade.thrift.org.apache.thrift.TBase, ?>>()));
    }

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

    private static <I extends AsyncIface> java.util.Map<java.lang.String,  org.apache.amoro.shade.thrift.org.apache.thrift.AsyncProcessFunction<I, ? extends  org.apache.amoro.shade.thrift.org.apache.thrift.TBase,?>> getProcessMap(java.util.Map<java.lang.String,  org.apache.amoro.shade.thrift.org.apache.thrift.AsyncProcessFunction<I, ? extends  org.apache.amoro.shade.thrift.org.apache.thrift.TBase, ?>> processMap) {
      processMap.put("ping", new ping());
      processMap.put("touch", new touch());
      processMap.put("pollTask", new pollTask());
      processMap.put("ackTask", new ackTask());
      processMap.put("completeTask", new completeTask());
      processMap.put("authenticate", new authenticate());
      processMap.put("cancelProcess", new cancelProcess());
      return processMap;
    }

    public static class ping<I extends AsyncIface> extends org.apache.amoro.shade.thrift.org.apache.thrift.AsyncProcessFunction<I, ping_args, Void> {
      public ping() {
        super("ping");
      }

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

      @Override
      public org.apache.amoro.shade.thrift.org.apache.thrift.async.AsyncMethodCallback<Void> getResultHandler(final org.apache.amoro.shade.thrift.org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
        final org.apache.amoro.shade.thrift.org.apache.thrift.AsyncProcessFunction fcall = this;
        return new org.apache.amoro.shade.thrift.org.apache.thrift.async.AsyncMethodCallback<Void>() { 
          @Override
          public void onComplete(Void o) {
            ping_result result = new ping_result();
            try {
              fcall.sendResponse(fb, result, org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TMessageType.REPLY,seqid);
            } catch (org.apache.amoro.shade.thrift.org.apache.thrift.transport.TTransportException e) {
              _LOGGER.error("TTransportException writing to internal frame buffer", e);
              fb.close();
            } catch (java.lang.Exception e) {
              _LOGGER.error("Exception writing to internal frame buffer", e);
              onError(e);
            }
          }
          @Override
          public void onError(java.lang.Exception e) {
            byte msgType = org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TMessageType.REPLY;
            org.apache.amoro.shade.thrift.org.apache.thrift.TSerializable msg;
            ping_result result = new ping_result();
            if (e instanceof org.apache.amoro.shade.thrift.org.apache.thrift.transport.TTransportException) {
              _LOGGER.error("TTransportException inside handler", e);
              fb.close();
              return;
            } else if (e instanceof org.apache.amoro.shade.thrift.org.apache.thrift.TApplicationException) {
              _LOGGER.error("TApplicationException inside handler", e);
              msgType = org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = (org.apache.amoro.shade.thrift.org.apache.thrift.TApplicationException)e;
            } else {
              _LOGGER.error("Exception inside handler", e);
              msgType = org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = new org.apache.amoro.shade.thrift.org.apache.thrift.TApplicationException(org.apache.amoro.shade.thrift.org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
            }
            try {
              fcall.sendResponse(fb,msg,msgType,seqid);
            } catch (java.lang.Exception ex) {
              _LOGGER.error("Exception writing to internal frame buffer", ex);
              fb.close();
            }
          }
        };
      }

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

      @Override
      public void start(I iface, ping_args args, org.apache.amoro.shade.thrift.org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.amoro.shade.thrift.org.apache.thrift.TException {
        iface.ping(resultHandler);
      }
    }

    public static class touch<I extends AsyncIface> extends org.apache.amoro.shade.thrift.org.apache.thrift.AsyncProcessFunction<I, touch_args, Void> {
      public touch() {
        super("touch");
      }

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

      @Override
      public org.apache.amoro.shade.thrift.org.apache.thrift.async.AsyncMethodCallback<Void> getResultHandler(final org.apache.amoro.shade.thrift.org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
        final org.apache.amoro.shade.thrift.org.apache.thrift.AsyncProcessFunction fcall = this;
        return new org.apache.amoro.shade.thrift.org.apache.thrift.async.AsyncMethodCallback<Void>() { 
          @Override
          public void onComplete(Void o) {
            touch_result result = new touch_result();
            try {
              fcall.sendResponse(fb, result, org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TMessageType.REPLY,seqid);
            } catch (org.apache.amoro.shade.thrift.org.apache.thrift.transport.TTransportException e) {
              _LOGGER.error("TTransportException writing to internal frame buffer", e);
              fb.close();
            } catch (java.lang.Exception e) {
              _LOGGER.error("Exception writing to internal frame buffer", e);
              onError(e);
            }
          }
          @Override
          public void onError(java.lang.Exception e) {
            byte msgType = org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TMessageType.REPLY;
            org.apache.amoro.shade.thrift.org.apache.thrift.TSerializable msg;
            touch_result result = new touch_result();
            if (e instanceof org.apache.amoro.api.AmoroException) {
              result.e1 = (org.apache.amoro.api.AmoroException) e;
              result.setE1IsSet(true);
              msg = result;
            } else if (e instanceof org.apache.amoro.shade.thrift.org.apache.thrift.transport.TTransportException) {
              _LOGGER.error("TTransportException inside handler", e);
              fb.close();
              return;
            } else if (e instanceof org.apache.amoro.shade.thrift.org.apache.thrift.TApplicationException) {
              _LOGGER.error("TApplicationException inside handler", e);
              msgType = org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = (org.apache.amoro.shade.thrift.org.apache.thrift.TApplicationException)e;
            } else {
              _LOGGER.error("Exception inside handler", e);
              msgType = org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = new org.apache.amoro.shade.thrift.org.apache.thrift.TApplicationException(org.apache.amoro.shade.thrift.org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
            }
            try {
              fcall.sendResponse(fb,msg,msgType,seqid);
            } catch (java.lang.Exception ex) {
              _LOGGER.error("Exception writing to internal frame buffer", ex);
              fb.close();
            }
          }
        };
      }

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

      @Override
      public void start(I iface, touch_args args, org.apache.amoro.shade.thrift.org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.amoro.shade.thrift.org.apache.thrift.TException {
        iface.touch(args.authToken,resultHandler);
      }
    }

    public static class pollTask<I extends AsyncIface> extends org.apache.amoro.shade.thrift.org.apache.thrift.AsyncProcessFunction<I, pollTask_args, OptimizingTask> {
      public pollTask() {
        super("pollTask");
      }

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

      @Override
      public org.apache.amoro.shade.thrift.org.apache.thrift.async.AsyncMethodCallback<OptimizingTask> getResultHandler(final org.apache.amoro.shade.thrift.org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
        final org.apache.amoro.shade.thrift.org.apache.thrift.AsyncProcessFunction fcall = this;
        return new org.apache.amoro.shade.thrift.org.apache.thrift.async.AsyncMethodCallback<OptimizingTask>() { 
          @Override
          public void onComplete(OptimizingTask o) {
            pollTask_result result = new pollTask_result();
            result.success = o;
            try {
              fcall.sendResponse(fb, result, org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TMessageType.REPLY,seqid);
            } catch (org.apache.amoro.shade.thrift.org.apache.thrift.transport.TTransportException e) {
              _LOGGER.error("TTransportException writing to internal frame buffer", e);
              fb.close();
            } catch (java.lang.Exception e) {
              _LOGGER.error("Exception writing to internal frame buffer", e);
              onError(e);
            }
          }
          @Override
          public void onError(java.lang.Exception e) {
            byte msgType = org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TMessageType.REPLY;
            org.apache.amoro.shade.thrift.org.apache.thrift.TSerializable msg;
            pollTask_result result = new pollTask_result();
            if (e instanceof org.apache.amoro.api.AmoroException) {
              result.e1 = (org.apache.amoro.api.AmoroException) e;
              result.setE1IsSet(true);
              msg = result;
            } else if (e instanceof org.apache.amoro.shade.thrift.org.apache.thrift.transport.TTransportException) {
              _LOGGER.error("TTransportException inside handler", e);
              fb.close();
              return;
            } else if (e instanceof org.apache.amoro.shade.thrift.org.apache.thrift.TApplicationException) {
              _LOGGER.error("TApplicationException inside handler", e);
              msgType = org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = (org.apache.amoro.shade.thrift.org.apache.thrift.TApplicationException)e;
            } else {
              _LOGGER.error("Exception inside handler", e);
              msgType = org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = new org.apache.amoro.shade.thrift.org.apache.thrift.TApplicationException(org.apache.amoro.shade.thrift.org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
            }
            try {
              fcall.sendResponse(fb,msg,msgType,seqid);
            } catch (java.lang.Exception ex) {
              _LOGGER.error("Exception writing to internal frame buffer", ex);
              fb.close();
            }
          }
        };
      }

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

      @Override
      public void start(I iface, pollTask_args args, org.apache.amoro.shade.thrift.org.apache.thrift.async.AsyncMethodCallback<OptimizingTask> resultHandler) throws org.apache.amoro.shade.thrift.org.apache.thrift.TException {
        iface.pollTask(args.authToken, args.threadId,resultHandler);
      }
    }

    public static class ackTask<I extends AsyncIface> extends org.apache.amoro.shade.thrift.org.apache.thrift.AsyncProcessFunction<I, ackTask_args, Void> {
      public ackTask() {
        super("ackTask");
      }

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

      @Override
      public org.apache.amoro.shade.thrift.org.apache.thrift.async.AsyncMethodCallback<Void> getResultHandler(final org.apache.amoro.shade.thrift.org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
        final org.apache.amoro.shade.thrift.org.apache.thrift.AsyncProcessFunction fcall = this;
        return new org.apache.amoro.shade.thrift.org.apache.thrift.async.AsyncMethodCallback<Void>() { 
          @Override
          public void onComplete(Void o) {
            ackTask_result result = new ackTask_result();
            try {
              fcall.sendResponse(fb, result, org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TMessageType.REPLY,seqid);
            } catch (org.apache.amoro.shade.thrift.org.apache.thrift.transport.TTransportException e) {
              _LOGGER.error("TTransportException writing to internal frame buffer", e);
              fb.close();
            } catch (java.lang.Exception e) {
              _LOGGER.error("Exception writing to internal frame buffer", e);
              onError(e);
            }
          }
          @Override
          public void onError(java.lang.Exception e) {
            byte msgType = org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TMessageType.REPLY;
            org.apache.amoro.shade.thrift.org.apache.thrift.TSerializable msg;
            ackTask_result result = new ackTask_result();
            if (e instanceof org.apache.amoro.api.AmoroException) {
              result.e1 = (org.apache.amoro.api.AmoroException) e;
              result.setE1IsSet(true);
              msg = result;
            } else if (e instanceof org.apache.amoro.shade.thrift.org.apache.thrift.transport.TTransportException) {
              _LOGGER.error("TTransportException inside handler", e);
              fb.close();
              return;
            } else if (e instanceof org.apache.amoro.shade.thrift.org.apache.thrift.TApplicationException) {
              _LOGGER.error("TApplicationException inside handler", e);
              msgType = org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = (org.apache.amoro.shade.thrift.org.apache.thrift.TApplicationException)e;
            } else {
              _LOGGER.error("Exception inside handler", e);
              msgType = org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = new org.apache.amoro.shade.thrift.org.apache.thrift.TApplicationException(org.apache.amoro.shade.thrift.org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
            }
            try {
              fcall.sendResponse(fb,msg,msgType,seqid);
            } catch (java.lang.Exception ex) {
              _LOGGER.error("Exception writing to internal frame buffer", ex);
              fb.close();
            }
          }
        };
      }

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

      @Override
      public void start(I iface, ackTask_args args, org.apache.amoro.shade.thrift.org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.amoro.shade.thrift.org.apache.thrift.TException {
        iface.ackTask(args.authToken, args.threadId, args.taskId,resultHandler);
      }
    }

    public static class completeTask<I extends AsyncIface> extends org.apache.amoro.shade.thrift.org.apache.thrift.AsyncProcessFunction<I, completeTask_args, Void> {
      public completeTask() {
        super("completeTask");
      }

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

      @Override
      public org.apache.amoro.shade.thrift.org.apache.thrift.async.AsyncMethodCallback<Void> getResultHandler(final org.apache.amoro.shade.thrift.org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
        final org.apache.amoro.shade.thrift.org.apache.thrift.AsyncProcessFunction fcall = this;
        return new org.apache.amoro.shade.thrift.org.apache.thrift.async.AsyncMethodCallback<Void>() { 
          @Override
          public void onComplete(Void o) {
            completeTask_result result = new completeTask_result();
            try {
              fcall.sendResponse(fb, result, org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TMessageType.REPLY,seqid);
            } catch (org.apache.amoro.shade.thrift.org.apache.thrift.transport.TTransportException e) {
              _LOGGER.error("TTransportException writing to internal frame buffer", e);
              fb.close();
            } catch (java.lang.Exception e) {
              _LOGGER.error("Exception writing to internal frame buffer", e);
              onError(e);
            }
          }
          @Override
          public void onError(java.lang.Exception e) {
            byte msgType = org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TMessageType.REPLY;
            org.apache.amoro.shade.thrift.org.apache.thrift.TSerializable msg;
            completeTask_result result = new completeTask_result();
            if (e instanceof org.apache.amoro.api.AmoroException) {
              result.e1 = (org.apache.amoro.api.AmoroException) e;
              result.setE1IsSet(true);
              msg = result;
            } else if (e instanceof org.apache.amoro.shade.thrift.org.apache.thrift.transport.TTransportException) {
              _LOGGER.error("TTransportException inside handler", e);
              fb.close();
              return;
            } else if (e instanceof org.apache.amoro.shade.thrift.org.apache.thrift.TApplicationException) {
              _LOGGER.error("TApplicationException inside handler", e);
              msgType = org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = (org.apache.amoro.shade.thrift.org.apache.thrift.TApplicationException)e;
            } else {
              _LOGGER.error("Exception inside handler", e);
              msgType = org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = new org.apache.amoro.shade.thrift.org.apache.thrift.TApplicationException(org.apache.amoro.shade.thrift.org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
            }
            try {
              fcall.sendResponse(fb,msg,msgType,seqid);
            } catch (java.lang.Exception ex) {
              _LOGGER.error("Exception writing to internal frame buffer", ex);
              fb.close();
            }
          }
        };
      }

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

      @Override
      public void start(I iface, completeTask_args args, org.apache.amoro.shade.thrift.org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.amoro.shade.thrift.org.apache.thrift.TException {
        iface.completeTask(args.authToken, args.taskResult,resultHandler);
      }
    }

    public static class authenticate<I extends AsyncIface> extends org.apache.amoro.shade.thrift.org.apache.thrift.AsyncProcessFunction<I, authenticate_args, java.lang.String> {
      public authenticate() {
        super("authenticate");
      }

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

      @Override
      public org.apache.amoro.shade.thrift.org.apache.thrift.async.AsyncMethodCallback<java.lang.String> getResultHandler(final org.apache.amoro.shade.thrift.org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
        final org.apache.amoro.shade.thrift.org.apache.thrift.AsyncProcessFunction fcall = this;
        return new org.apache.amoro.shade.thrift.org.apache.thrift.async.AsyncMethodCallback<java.lang.String>() { 
          @Override
          public void onComplete(java.lang.String o) {
            authenticate_result result = new authenticate_result();
            result.success = o;
            try {
              fcall.sendResponse(fb, result, org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TMessageType.REPLY,seqid);
            } catch (org.apache.amoro.shade.thrift.org.apache.thrift.transport.TTransportException e) {
              _LOGGER.error("TTransportException writing to internal frame buffer", e);
              fb.close();
            } catch (java.lang.Exception e) {
              _LOGGER.error("Exception writing to internal frame buffer", e);
              onError(e);
            }
          }
          @Override
          public void onError(java.lang.Exception e) {
            byte msgType = org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TMessageType.REPLY;
            org.apache.amoro.shade.thrift.org.apache.thrift.TSerializable msg;
            authenticate_result result = new authenticate_result();
            if (e instanceof org.apache.amoro.api.AmoroException) {
              result.e1 = (org.apache.amoro.api.AmoroException) e;
              result.setE1IsSet(true);
              msg = result;
            } else if (e instanceof org.apache.amoro.shade.thrift.org.apache.thrift.transport.TTransportException) {
              _LOGGER.error("TTransportException inside handler", e);
              fb.close();
              return;
            } else if (e instanceof org.apache.amoro.shade.thrift.org.apache.thrift.TApplicationException) {
              _LOGGER.error("TApplicationException inside handler", e);
              msgType = org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = (org.apache.amoro.shade.thrift.org.apache.thrift.TApplicationException)e;
            } else {
              _LOGGER.error("Exception inside handler", e);
              msgType = org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = new org.apache.amoro.shade.thrift.org.apache.thrift.TApplicationException(org.apache.amoro.shade.thrift.org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
            }
            try {
              fcall.sendResponse(fb,msg,msgType,seqid);
            } catch (java.lang.Exception ex) {
              _LOGGER.error("Exception writing to internal frame buffer", ex);
              fb.close();
            }
          }
        };
      }

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

      @Override
      public void start(I iface, authenticate_args args, org.apache.amoro.shade.thrift.org.apache.thrift.async.AsyncMethodCallback<java.lang.String> resultHandler) throws org.apache.amoro.shade.thrift.org.apache.thrift.TException {
        iface.authenticate(args.registerInfo,resultHandler);
      }
    }

    public static class cancelProcess<I extends AsyncIface> extends org.apache.amoro.shade.thrift.org.apache.thrift.AsyncProcessFunction<I, cancelProcess_args, java.lang.Boolean> {
      public cancelProcess() {
        super("cancelProcess");
      }

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

      @Override
      public org.apache.amoro.shade.thrift.org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> getResultHandler(final org.apache.amoro.shade.thrift.org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
        final org.apache.amoro.shade.thrift.org.apache.thrift.AsyncProcessFunction fcall = this;
        return new org.apache.amoro.shade.thrift.org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean>() { 
          @Override
          public void onComplete(java.lang.Boolean o) {
            cancelProcess_result result = new cancelProcess_result();
            result.success = o;
            result.setSuccessIsSet(true);
            try {
              fcall.sendResponse(fb, result, org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TMessageType.REPLY,seqid);
            } catch (org.apache.amoro.shade.thrift.org.apache.thrift.transport.TTransportException e) {
              _LOGGER.error("TTransportException writing to internal frame buffer", e);
              fb.close();
            } catch (java.lang.Exception e) {
              _LOGGER.error("Exception writing to internal frame buffer", e);
              onError(e);
            }
          }
          @Override
          public void onError(java.lang.Exception e) {
            byte msgType = org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TMessageType.REPLY;
            org.apache.amoro.shade.thrift.org.apache.thrift.TSerializable msg;
            cancelProcess_result result = new cancelProcess_result();
            if (e instanceof org.apache.amoro.shade.thrift.org.apache.thrift.transport.TTransportException) {
              _LOGGER.error("TTransportException inside handler", e);
              fb.close();
              return;
            } else if (e instanceof org.apache.amoro.shade.thrift.org.apache.thrift.TApplicationException) {
              _LOGGER.error("TApplicationException inside handler", e);
              msgType = org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = (org.apache.amoro.shade.thrift.org.apache.thrift.TApplicationException)e;
            } else {
              _LOGGER.error("Exception inside handler", e);
              msgType = org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = new org.apache.amoro.shade.thrift.org.apache.thrift.TApplicationException(org.apache.amoro.shade.thrift.org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
            }
            try {
              fcall.sendResponse(fb,msg,msgType,seqid);
            } catch (java.lang.Exception ex) {
              _LOGGER.error("Exception writing to internal frame buffer", ex);
              fb.close();
            }
          }
        };
      }

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

      @Override
      public void start(I iface, cancelProcess_args args, org.apache.amoro.shade.thrift.org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.amoro.shade.thrift.org.apache.thrift.TException {
        iface.cancelProcess(args.processId,resultHandler);
      }
    }

  }

  @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
  public static class ping_args implements org.apache.amoro.shade.thrift.org.apache.thrift.TBase<ping_args, ping_args._Fields>, java.io.Serializable, Cloneable, Comparable<ping_args>   {
    private static final org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TStruct("ping_args");


    private static final org.apache.amoro.shade.thrift.org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new ping_argsStandardSchemeFactory();
    private static final org.apache.amoro.shade.thrift.org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new ping_argsTupleSchemeFactory();


    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.amoro.shade.thrift.org.apache.thrift.TFieldIdEnum {
;

      private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();

      static {
        for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      @org.apache.amoro.shade.thrift.org.apache.thrift.annotation.Nullable
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          default:
            return null;
        }
      }

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

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      @org.apache.amoro.shade.thrift.org.apache.thrift.annotation.Nullable
      public static _Fields findByName(java.lang.String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final java.lang.String _fieldName;

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

      @Override
      public short getThriftFieldId() {
        return _thriftId;
      }

      @Override
      public java.lang.String getFieldName() {
        return _fieldName;
      }
    }
    public static final java.util.Map<_Fields, org.apache.amoro.shade.thrift.org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      java.util.Map<_Fields, org.apache.amoro.shade.thrift.org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.amoro.shade.thrift.org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
      org.apache.amoro.shade.thrift.org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ping_args.class, metaDataMap);
    }

    public ping_args() {
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public ping_args(ping_args other) {
    }

    @Override
    public ping_args deepCopy() {
      return new ping_args(this);
    }

    @Override
    public void clear() {
    }

    @Override
    public void setFieldValue(_Fields field, @org.apache.amoro.shade.thrift.org.apache.thrift.annotation.Nullable java.lang.Object value) {
      switch (field) {
      }
    }

    @org.apache.amoro.shade.thrift.org.apache.thrift.annotation.Nullable
    @Override
    public java.lang.Object getFieldValue(_Fields field) {
      switch (field) {
      }
      throw new java.lang.IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    @Override
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new java.lang.IllegalArgumentException();
      }

      switch (field) {
      }
      throw new java.lang.IllegalStateException();
    }

    @Override
    public boolean equals(java.lang.Object that) {
      if (that instanceof ping_args)
        return this.equals((ping_args)that);
      return false;
    }

    public boolean equals(ping_args that) {
      if (that == null)
        return false;
      if (this == that)
        return true;

      return true;
    }

    @Override
    public int hashCode() {
      int hashCode = 1;

      return hashCode;
    }

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

      int lastComparison = 0;

      return 0;
    }

    @org.apache.amoro.shade.thrift.org.apache.thrift.annotation.Nullable
    @Override
    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    @Override
    public void read(org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TProtocol iprot) throws org.apache.amoro.shade.thrift.org.apache.thrift.TException {
      scheme(iprot).read(iprot, this);
    }

    @Override
    public void write(org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TProtocol oprot) throws org.apache.amoro.shade.thrift.org.apache.thrift.TException {
      scheme(oprot).write(oprot, this);
    }

    @Override
    public java.lang.String toString() {
      java.lang.StringBuilder sb = new java.lang.StringBuilder("ping_args(");
      boolean first = true;

      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.amoro.shade.thrift.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.amoro.shade.thrift.org.apache.thrift.protocol.TCompactProtocol(new org.apache.amoro.shade.thrift.org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.amoro.shade.thrift.org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
      try {
        read(new org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TCompactProtocol(new org.apache.amoro.shade.thrift.org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.amoro.shade.thrift.org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private static class ping_argsStandardSchemeFactory implements org.apache.amoro.shade.thrift.org.apache.thrift.scheme.SchemeFactory {
      @Override
      public ping_argsStandardScheme getScheme() {
        return new ping_argsStandardScheme();
      }
    }

    private static class ping_argsStandardScheme extends org.apache.amoro.shade.thrift.org.apache.thrift.scheme.StandardScheme<ping_args> {

      @Override
      public void read(org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TProtocol iprot, ping_args struct) throws org.apache.amoro.shade.thrift.org.apache.thrift.TException {
        org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TField schemeField;
        iprot.readStructBegin();
        while (true)
        {
          schemeField = iprot.readFieldBegin();
          if (schemeField.type == org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TType.STOP) { 
            break;
          }
          switch (schemeField.id) {
            default:
              org.apache.amoro.shade.thrift.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();
      }

      @Override
      public void write(org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TProtocol oprot, ping_args struct) throws org.apache.amoro.shade.thrift.org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class ping_argsTupleSchemeFactory implements org.apache.amoro.shade.thrift.org.apache.thrift.scheme.SchemeFactory {
      @Override
      public ping_argsTupleScheme getScheme() {
        return new ping_argsTupleScheme();
      }
    }

    private static class ping_argsTupleScheme extends org.apache.amoro.shade.thrift.org.apache.thrift.scheme.TupleScheme<ping_args> {

      @Override
      public void write(org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TProtocol prot, ping_args struct) throws org.apache.amoro.shade.thrift.org.apache.thrift.TException {
        org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TTupleProtocol) prot;
      }

      @Override
      public void read(org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TProtocol prot, ping_args struct) throws org.apache.amoro.shade.thrift.org.apache.thrift.TException {
        org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TTupleProtocol) prot;
      }
    }

    private static <S extends org.apache.amoro.shade.thrift.org.apache.thrift.scheme.IScheme> S scheme(org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TProtocol proto) {
      return (org.apache.amoro.shade.thrift.org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
    }
  }

  @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
  public static class ping_result implements org.apache.amoro.shade.thrift.org.apache.thrift.TBase<ping_result, ping_result._Fields>, java.io.Serializable, Cloneable, Comparable<ping_result>   {
    private static final org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TStruct("ping_result");


    private static final org.apache.amoro.shade.thrift.org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new ping_resultStandardSchemeFactory();
    private static final org.apache.amoro.shade.thrift.org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new ping_resultTupleSchemeFactory();


    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.amoro.shade.thrift.org.apache.thrift.TFieldIdEnum {
;

      private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();

      static {
        for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      @org.apache.amoro.shade.thrift.org.apache.thrift.annotation.Nullable
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          default:
            return null;
        }
      }

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

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      @org.apache.amoro.shade.thrift.org.apache.thrift.annotation.Nullable
      public static _Fields findByName(java.lang.String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final java.lang.String _fieldName;

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

      @Override
      public short getThriftFieldId() {
        return _thriftId;
      }

      @Override
      public java.lang.String getFieldName() {
        return _fieldName;
      }
    }
    public static final java.util.Map<_Fields, org.apache.amoro.shade.thrift.org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      java.util.Map<_Fields, org.apache.amoro.shade.thrift.org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.amoro.shade.thrift.org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
      org.apache.amoro.shade.thrift.org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ping_result.class, metaDataMap);
    }

    public ping_result() {
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public ping_result(ping_result other) {
    }

    @Override
    public ping_result deepCopy() {
      return new ping_result(this);
    }

    @Override
    public void clear() {
    }

    @Override
    public void setFieldValue(_Fields field, @org.apache.amoro.shade.thrift.org.apache.thrift.annotation.Nullable java.lang.Object value) {
      switch (field) {
      }
    }

    @org.apache.amoro.shade.thrift.org.apache.thrift.annotation.Nullable
    @Override
    public java.lang.Object getFieldValue(_Fields field) {
      switch (field) {
      }
      throw new java.lang.IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    @Override
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new java.lang.IllegalArgumentException();
      }

      switch (field) {
      }
      throw new java.lang.IllegalStateException();
    }

    @Override
    public boolean equals(java.lang.Object that) {
      if (that instanceof ping_result)
        return this.equals((ping_result)that);
      return false;
    }

    public boolean equals(ping_result that) {
      if (that == null)
        return false;
      if (this == that)
        return true;

      return true;
    }

    @Override
    public int hashCode() {
      int hashCode = 1;

      return hashCode;
    }

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

      int lastComparison = 0;

      return 0;
    }

    @org.apache.amoro.shade.thrift.org.apache.thrift.annotation.Nullable
    @Override
    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    @Override
    public void read(org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TProtocol iprot) throws org.apache.amoro.shade.thrift.org.apache.thrift.TException {
      scheme(iprot).read(iprot, this);
    }

    public void write(org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TProtocol oprot) throws org.apache.amoro.shade.thrift.org.apache.thrift.TException {
      scheme(oprot).write(oprot, this);
      }

    @Override
    public java.lang.String toString() {
      java.lang.StringBuilder sb = new java.lang.StringBuilder("ping_result(");
      boolean first = true;

      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.amoro.shade.thrift.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.amoro.shade.thrift.org.apache.thrift.protocol.TCompactProtocol(new org.apache.amoro.shade.thrift.org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.amoro.shade.thrift.org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
      try {
        read(new org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TCompactProtocol(new org.apache.amoro.shade.thrift.org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.amoro.shade.thrift.org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private static class ping_resultStandardSchemeFactory implements org.apache.amoro.shade.thrift.org.apache.thrift.scheme.SchemeFactory {
      @Override
      public ping_resultStandardScheme getScheme() {
        return new ping_resultStandardScheme();
      }
    }

    private static class ping_resultStandardScheme extends org.apache.amoro.shade.thrift.org.apache.thrift.scheme.StandardScheme<ping_result> {

      @Override
      public void read(org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TProtocol iprot, ping_result struct) throws org.apache.amoro.shade.thrift.org.apache.thrift.TException {
        org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TField schemeField;
        iprot.readStructBegin();
        while (true)
        {
          schemeField = iprot.readFieldBegin();
          if (schemeField.type == org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TType.STOP) { 
            break;
          }
          switch (schemeField.id) {
            default:
              org.apache.amoro.shade.thrift.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();
      }

      @Override
      public void write(org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TProtocol oprot, ping_result struct) throws org.apache.amoro.shade.thrift.org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class ping_resultTupleSchemeFactory implements org.apache.amoro.shade.thrift.org.apache.thrift.scheme.SchemeFactory {
      @Override
      public ping_resultTupleScheme getScheme() {
        return new ping_resultTupleScheme();
      }
    }

    private static class ping_resultTupleScheme extends org.apache.amoro.shade.thrift.org.apache.thrift.scheme.TupleScheme<ping_result> {

      @Override
      public void write(org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TProtocol prot, ping_result struct) throws org.apache.amoro.shade.thrift.org.apache.thrift.TException {
        org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TTupleProtocol) prot;
      }

      @Override
      public void read(org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TProtocol prot, ping_result struct) throws org.apache.amoro.shade.thrift.org.apache.thrift.TException {
        org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TTupleProtocol) prot;
      }
    }

    private static <S extends org.apache.amoro.shade.thrift.org.apache.thrift.scheme.IScheme> S scheme(org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TProtocol proto) {
      return (org.apache.amoro.shade.thrift.org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
    }
  }

  @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
  public static class touch_args implements org.apache.amoro.shade.thrift.org.apache.thrift.TBase<touch_args, touch_args._Fields>, java.io.Serializable, Cloneable, Comparable<touch_args>   {
    private static final org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TStruct("touch_args");

    private static final org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TField AUTH_TOKEN_FIELD_DESC = new org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TField("authToken", org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TType.STRING, (short)1);

    private static final org.apache.amoro.shade.thrift.org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new touch_argsStandardSchemeFactory();
    private static final org.apache.amoro.shade.thrift.org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new touch_argsTupleSchemeFactory();

    public @org.apache.amoro.shade.thrift.org.apache.thrift.annotation.Nullable java.lang.String authToken; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.amoro.shade.thrift.org.apache.thrift.TFieldIdEnum {
      AUTH_TOKEN((short)1, "authToken");

      private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();

      static {
        for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      @org.apache.amoro.shade.thrift.org.apache.thrift.annotation.Nullable
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // AUTH_TOKEN
            return AUTH_TOKEN;
          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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      @org.apache.amoro.shade.thrift.org.apache.thrift.annotation.Nullable
      public static _Fields findByName(java.lang.String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final java.lang.String _fieldName;

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

      @Override
      public short getThriftFieldId() {
        return _thriftId;
      }

      @Override
      public java.lang.String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final java.util.Map<_Fields, org.apache.amoro.shade.thrift.org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      java.util.Map<_Fields, org.apache.amoro.shade.thrift.org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.amoro.shade.thrift.org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.AUTH_TOKEN, new org.apache.amoro.shade.thrift.org.apache.thrift.meta_data.FieldMetaData("authToken", org.apache.amoro.shade.thrift.org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.amoro.shade.thrift.org.apache.thrift.meta_data.FieldValueMetaData(org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TType.STRING)));
      metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
      org.apache.amoro.shade.thrift.org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(touch_args.class, metaDataMap);
    }

    public touch_args() {
    }

    public touch_args(
      java.lang.String authToken)
    {
      this();
      this.authToken = authToken;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public touch_args(touch_args other) {
      if (other.isSetAuthToken()) {
        this.authToken = other.authToken;
      }
    }

    @Override
    public touch_args deepCopy() {
      return new touch_args(this);
    }

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

    @org.apache.amoro.shade.thrift.org.apache.thrift.annotation.Nullable
    public java.lang.String getAuthToken() {
      return this.authToken;
    }

    public touch_args setAuthToken(@org.apache.amoro.shade.thrift.org.apache.thrift.annotation.Nullable java.lang.String authToken) {
      this.authToken = authToken;
      return this;
    }

    public void unsetAuthToken() {
      this.authToken = null;
    }

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

    public void setAuthTokenIsSet(boolean value) {
      if (!value) {
        this.authToken = null;
      }
    }

    @Override
    public void setFieldValue(_Fields field, @org.apache.amoro.shade.thrift.org.apache.thrift.annotation.Nullable java.lang.Object value) {
      switch (field) {
      case AUTH_TOKEN:
        if (value == null) {
          unsetAuthToken();
        } else {
          setAuthToken((java.lang.String)value);
        }
        break;

      }
    }

    @org.apache.amoro.shade.thrift.org.apache.thrift.annotation.Nullable
    @Override
    public java.lang.Object getFieldValue(_Fields field) {
      switch (field) {
      case AUTH_TOKEN:
        return getAuthToken();

      }
      throw new java.lang.IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    @Override
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new java.lang.IllegalArgumentException();
      }

      switch (field) {
      case AUTH_TOKEN:
        return isSetAuthToken();
      }
      throw new java.lang.IllegalStateException();
    }

    @Override
    public boolean equals(java.lang.Object that) {
      if (that instanceof touch_args)
        return this.equals((touch_args)that);
      return false;
    }

    public boolean equals(touch_args that) {
      if (that == null)
        return false;
      if (this == that)
        return true;

      boolean this_present_authToken = true && this.isSetAuthToken();
      boolean that_present_authToken = true && that.isSetAuthToken();
      if (this_present_authToken || that_present_authToken) {
        if (!(this_present_authToken && that_present_authToken))
          return false;
        if (!this.authToken.equals(that.authToken))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      int hashCode = 1;

      hashCode = hashCode * 8191 + ((isSetAuthToken()) ? 131071 : 524287);
      if (isSetAuthToken())
        hashCode = hashCode * 8191 + authToken.hashCode();

      return hashCode;
    }

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

      int lastComparison = 0;

      lastComparison = java.lang.Boolean.compare(isSetAuthToken(), other.isSetAuthToken());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetAuthToken()) {
        lastComparison = org.apache.amoro.shade.thrift.org.apache.thrift.TBaseHelper.compareTo(this.authToken, other.authToken);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    @org.apache.amoro.shade.thrift.org.apache.thrift.annotation.Nullable
    @Override
    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    @Override
    public void read(org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TProtocol iprot) throws org.apache.amoro.shade.thrift.org.apache.thrift.TException {
      scheme(iprot).read(iprot, this);
    }

    @Override
    public void write(org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TProtocol oprot) throws org.apache.amoro.shade.thrift.org.apache.thrift.TException {
      scheme(oprot).write(oprot, this);
    }

    @Override
    public java.lang.String toString() {
      java.lang.StringBuilder sb = new java.lang.StringBuilder("touch_args(");
      boolean first = true;

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

    public void validate() throws org.apache.amoro.shade.thrift.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.amoro.shade.thrift.org.apache.thrift.protocol.TCompactProtocol(new org.apache.amoro.shade.thrift.org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.amoro.shade.thrift.org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
      try {
        read(new org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TCompactProtocol(new org.apache.amoro.shade.thrift.org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.amoro.shade.thrift.org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private static class touch_argsStandardSchemeFactory implements org.apache.amoro.shade.thrift.org.apache.thrift.scheme.SchemeFactory {
      @Override
      public touch_argsStandardScheme getScheme() {
        return new touch_argsStandardScheme();
      }
    }

    private static class touch_argsStandardScheme extends org.apache.amoro.shade.thrift.org.apache.thrift.scheme.StandardScheme<touch_args> {

      @Override
      public void read(org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TProtocol iprot, touch_args struct) throws org.apache.amoro.shade.thrift.org.apache.thrift.TException {
        org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TField schemeField;
        iprot.readStructBegin();
        while (true)
        {
          schemeField = iprot.readFieldBegin();
          if (schemeField.type == org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TType.STOP) { 
            break;
          }
          switch (schemeField.id) {
            case 1: // AUTH_TOKEN
              if (schemeField.type == org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TType.STRING) {
                struct.authToken = iprot.readString();
                struct.setAuthTokenIsSet(true);
              } else { 
                org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            default:
              org.apache.amoro.shade.thrift.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();
      }

      @Override
      public void write(org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TProtocol oprot, touch_args struct) throws org.apache.amoro.shade.thrift.org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.authToken != null) {
          oprot.writeFieldBegin(AUTH_TOKEN_FIELD_DESC);
          oprot.writeString(struct.authToken);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class touch_argsTupleSchemeFactory implements org.apache.amoro.shade.thrift.org.apache.thrift.scheme.SchemeFactory {
      @Override
      public touch_argsTupleScheme getScheme() {
        return new touch_argsTupleScheme();
      }
    }

    private static class touch_argsTupleScheme extends org.apache.amoro.shade.thrift.org.apache.thrift.scheme.TupleScheme<touch_args> {

      @Override
      public void write(org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TProtocol prot, touch_args struct) throws org.apache.amoro.shade.thrift.org.apache.thrift.TException {
        org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet optionals = new java.util.BitSet();
        if (struct.isSetAuthToken()) {
          optionals.set(0);
        }
        oprot.writeBitSet(optionals, 1);
        if (struct.isSetAuthToken()) {
          oprot.writeString(struct.authToken);
        }
      }

      @Override
      public void read(org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TProtocol prot, touch_args struct) throws org.apache.amoro.shade.thrift.org.apache.thrift.TException {
        org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet incoming = iprot.readBitSet(1);
        if (incoming.get(0)) {
          struct.authToken = iprot.readString();
          struct.setAuthTokenIsSet(true);
        }
      }
    }

    private static <S extends org.apache.amoro.shade.thrift.org.apache.thrift.scheme.IScheme> S scheme(org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TProtocol proto) {
      return (org.apache.amoro.shade.thrift.org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
    }
  }

  @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
  public static class touch_result implements org.apache.amoro.shade.thrift.org.apache.thrift.TBase<touch_result, touch_result._Fields>, java.io.Serializable, Cloneable, Comparable<touch_result>   {
    private static final org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TStruct("touch_result");

    private static final org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TField E1_FIELD_DESC = new org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TField("e1", org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TType.STRUCT, (short)1);

    private static final org.apache.amoro.shade.thrift.org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new touch_resultStandardSchemeFactory();
    private static final org.apache.amoro.shade.thrift.org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new touch_resultTupleSchemeFactory();

    public @org.apache.amoro.shade.thrift.org.apache.thrift.annotation.Nullable org.apache.amoro.api.AmoroException e1; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.amoro.shade.thrift.org.apache.thrift.TFieldIdEnum {
      E1((short)1, "e1");

      private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();

      static {
        for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      @org.apache.amoro.shade.thrift.org.apache.thrift.annotation.Nullable
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // E1
            return E1;
          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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      @org.apache.amoro.shade.thrift.org.apache.thrift.annotation.Nullable
      public static _Fields findByName(java.lang.String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final java.lang.String _fieldName;

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

      @Override
      public short getThriftFieldId() {
        return _thriftId;
      }

      @Override
      public java.lang.String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final java.util.Map<_Fields, org.apache.amoro.shade.thrift.org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      java.util.Map<_Fields, org.apache.amoro.shade.thrift.org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.amoro.shade.thrift.org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.E1, new org.apache.amoro.shade.thrift.org.apache.thrift.meta_data.FieldMetaData("e1", org.apache.amoro.shade.thrift.org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.amoro.shade.thrift.org.apache.thrift.meta_data.StructMetaData(org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TType.STRUCT, org.apache.amoro.api.AmoroException.class)));
      metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
      org.apache.amoro.shade.thrift.org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(touch_result.class, metaDataMap);
    }

    public touch_result() {
    }

    public touch_result(
      org.apache.amoro.api.AmoroException e1)
    {
      this();
      this.e1 = e1;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public touch_result(touch_result other) {
      if (other.isSetE1()) {
        this.e1 = new org.apache.amoro.api.AmoroException(other.e1);
      }
    }

    @Override
    public touch_result deepCopy() {
      return new touch_result(this);
    }

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

    @org.apache.amoro.shade.thrift.org.apache.thrift.annotation.Nullable
    public org.apache.amoro.api.AmoroException getE1() {
      return this.e1;
    }

    public touch_result setE1(@org.apache.amoro.shade.thrift.org.apache.thrift.annotation.Nullable org.apache.amoro.api.AmoroException e1) {
      this.e1 = e1;
      return this;
    }

    public void unsetE1() {
      this.e1 = null;
    }

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

    public void setE1IsSet(boolean value) {
      if (!value) {
        this.e1 = null;
      }
    }

    @Override
    public void setFieldValue(_Fields field, @org.apache.amoro.shade.thrift.org.apache.thrift.annotation.Nullable java.lang.Object value) {
      switch (field) {
      case E1:
        if (value == null) {
          unsetE1();
        } else {
          setE1((org.apache.amoro.api.AmoroException)value);
        }
        break;

      }
    }

    @org.apache.amoro.shade.thrift.org.apache.thrift.annotation.Nullable
    @Override
    public java.lang.Object getFieldValue(_Fields field) {
      switch (field) {
      case E1:
        return getE1();

      }
      throw new java.lang.IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    @Override
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new java.lang.IllegalArgumentException();
      }

      switch (field) {
      case E1:
        return isSetE1();
      }
      throw new java.lang.IllegalStateException();
    }

    @Override
    public boolean equals(java.lang.Object that) {
      if (that instanceof touch_result)
        return this.equals((touch_result)that);
      return false;
    }

    public boolean equals(touch_result that) {
      if (that == null)
        return false;
      if (this == that)
        return true;

      boolean this_present_e1 = true && this.isSetE1();
      boolean that_present_e1 = true && that.isSetE1();
      if (this_present_e1 || that_present_e1) {
        if (!(this_present_e1 && that_present_e1))
          return false;
        if (!this.e1.equals(that.e1))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      int hashCode = 1;

      hashCode = hashCode * 8191 + ((isSetE1()) ? 131071 : 524287);
      if (isSetE1())
        hashCode = hashCode * 8191 + e1.hashCode();

      return hashCode;
    }

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

      int lastComparison = 0;

      lastComparison = java.lang.Boolean.compare(isSetE1(), other.isSetE1());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetE1()) {
        lastComparison = org.apache.amoro.shade.thrift.org.apache.thrift.TBaseHelper.compareTo(this.e1, other.e1);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    @org.apache.amoro.shade.thrift.org.apache.thrift.annotation.Nullable
    @Override
    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    @Override
    public void read(org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TProtocol iprot) throws org.apache.amoro.shade.thrift.org.apache.thrift.TException {
      scheme(iprot).read(iprot, this);
    }

    public void write(org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TProtocol oprot) throws org.apache.amoro.shade.thrift.org.apache.thrift.TException {
      scheme(oprot).write(oprot, this);
      }

    @Override
    public java.lang.String toString() {
      java.lang.StringBuilder sb = new java.lang.StringBuilder("touch_result(");
      boolean first = true;

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

    public void validate() throws org.apache.amoro.shade.thrift.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.amoro.shade.thrift.org.apache.thrift.protocol.TCompactProtocol(new org.apache.amoro.shade.thrift.org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.amoro.shade.thrift.org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
      try {
        read(new org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TCompactProtocol(new org.apache.amoro.shade.thrift.org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.amoro.shade.thrift.org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private static class touch_resultStandardSchemeFactory implements org.apache.amoro.shade.thrift.org.apache.thrift.scheme.SchemeFactory {
      @Override
      public touch_resultStandardScheme getScheme() {
        return new touch_resultStandardScheme();
      }
    }

    private static class touch_resultStandardScheme extends org.apache.amoro.shade.thrift.org.apache.thrift.scheme.StandardScheme<touch_result> {

      @Override
      public void read(org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TProtocol iprot, touch_result struct) throws org.apache.amoro.shade.thrift.org.apache.thrift.TException {
        org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TField schemeField;
        iprot.readStructBegin();
        while (true)
        {
          schemeField = iprot.readFieldBegin();
          if (schemeField.type == org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TType.STOP) { 
            break;
          }
          switch (schemeField.id) {
            case 1: // E1
              if (schemeField.type == org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TType.STRUCT) {
                struct.e1 = new org.apache.amoro.api.AmoroException();
                struct.e1.read(iprot);
                struct.setE1IsSet(true);
              } else { 
                org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            default:
              org.apache.amoro.shade.thrift.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();
      }

      @Override
      public void write(org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TProtocol oprot, touch_result struct) throws org.apache.amoro.shade.thrift.org.apache.thrift.TException {
        struct.validate();

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

    }

    private static class touch_resultTupleSchemeFactory implements org.apache.amoro.shade.thrift.org.apache.thrift.scheme.SchemeFactory {
      @Override
      public touch_resultTupleScheme getScheme() {
        return new touch_resultTupleScheme();
      }
    }

    private static class touch_resultTupleScheme extends org.apache.amoro.shade.thrift.org.apache.thrift.scheme.TupleScheme<touch_result> {

      @Override
      public void write(org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TProtocol prot, touch_result struct) throws org.apache.amoro.shade.thrift.org.apache.thrift.TException {
        org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet optionals = new java.util.BitSet();
        if (struct.isSetE1()) {
          optionals.set(0);
        }
        oprot.writeBitSet(optionals, 1);
        if (struct.isSetE1()) {
          struct.e1.write(oprot);
        }
      }

      @Override
      public void read(org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TProtocol prot, touch_result struct) throws org.apache.amoro.shade.thrift.org.apache.thrift.TException {
        org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet incoming = iprot.readBitSet(1);
        if (incoming.get(0)) {
          struct.e1 = new org.apache.amoro.api.AmoroException();
          struct.e1.read(iprot);
          struct.setE1IsSet(true);
        }
      }
    }

    private static <S extends org.apache.amoro.shade.thrift.org.apache.thrift.scheme.IScheme> S scheme(org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TProtocol proto) {
      return (org.apache.amoro.shade.thrift.org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
    }
  }

  @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
  public static class pollTask_args implements org.apache.amoro.shade.thrift.org.apache.thrift.TBase<pollTask_args, pollTask_args._Fields>, java.io.Serializable, Cloneable, Comparable<pollTask_args>   {
    private static final org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TStruct("pollTask_args");

    private static final org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TField AUTH_TOKEN_FIELD_DESC = new org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TField("authToken", org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TType.STRING, (short)1);
    private static final org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TField THREAD_ID_FIELD_DESC = new org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TField("threadId", org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TType.I32, (short)2);

    private static final org.apache.amoro.shade.thrift.org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new pollTask_argsStandardSchemeFactory();
    private static final org.apache.amoro.shade.thrift.org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new pollTask_argsTupleSchemeFactory();

    public @org.apache.amoro.shade.thrift.org.apache.thrift.annotation.Nullable java.lang.String authToken; // required
    public int threadId; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.amoro.shade.thrift.org.apache.thrift.TFieldIdEnum {
      AUTH_TOKEN((short)1, "authToken"),
      THREAD_ID((short)2, "threadId");

      private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();

      static {
        for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      @org.apache.amoro.shade.thrift.org.apache.thrift.annotation.Nullable
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // AUTH_TOKEN
            return AUTH_TOKEN;
          case 2: // THREAD_ID
            return THREAD_ID;
          default:
            return null;
        }
      }

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

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      @org.apache.amoro.shade.thrift.org.apache.thrift.annotation.Nullable
      public static _Fields findByName(java.lang.String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final java.lang.String _fieldName;

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

      @Override
      public short getThriftFieldId() {
        return _thriftId;
      }

      @Override
      public java.lang.String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    private static final int __THREADID_ISSET_ID = 0;
    private byte __isset_bitfield = 0;
    public static final java.util.Map<_Fields, org.apache.amoro.shade.thrift.org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      java.util.Map<_Fields, org.apache.amoro.shade.thrift.org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.amoro.shade.thrift.org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.AUTH_TOKEN, new org.apache.amoro.shade.thrift.org.apache.thrift.meta_data.FieldMetaData("authToken", org.apache.amoro.shade.thrift.org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.amoro.shade.thrift.org.apache.thrift.meta_data.FieldValueMetaData(org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TType.STRING)));
      tmpMap.put(_Fields.THREAD_ID, new org.apache.amoro.shade.thrift.org.apache.thrift.meta_data.FieldMetaData("threadId", org.apache.amoro.shade.thrift.org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.amoro.shade.thrift.org.apache.thrift.meta_data.FieldValueMetaData(org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TType.I32)));
      metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
      org.apache.amoro.shade.thrift.org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(pollTask_args.class, metaDataMap);
    }

    public pollTask_args() {
    }

    public pollTask_args(
      java.lang.String authToken,
      int threadId)
    {
      this();
      this.authToken = authToken;
      this.threadId = threadId;
      setThreadIdIsSet(true);
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public pollTask_args(pollTask_args other) {
      __isset_bitfield = other.__isset_bitfield;
      if (other.isSetAuthToken()) {
        this.authToken = other.authToken;
      }
      this.threadId = other.threadId;
    }

    @Override
    public pollTask_args deepCopy() {
      return new pollTask_args(this);
    }

    @Override
    public void clear() {
      this.authToken = null;
      setThreadIdIsSet(false);
      this.threadId = 0;
    }

    @org.apache.amoro.shade.thrift.org.apache.thrift.annotation.Nullable
    public java.lang.String getAuthToken() {
      return this.authToken;
    }

    public pollTask_args setAuthToken(@org.apache.amoro.shade.thrift.org.apache.thrift.annotation.Nullable java.lang.String authToken) {
      this.authToken = authToken;
      return this;
    }

    public void unsetAuthToken() {
      this.authToken = null;
    }

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

    public void setAuthTokenIsSet(boolean value) {
      if (!value) {
        this.authToken = null;
      }
    }

    public int getThreadId() {
      return this.threadId;
    }

    public pollTask_args setThreadId(int threadId) {
      this.threadId = threadId;
      setThreadIdIsSet(true);
      return this;
    }

    public void unsetThreadId() {
      __isset_bitfield = org.apache.amoro.shade.thrift.org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __THREADID_ISSET_ID);
    }

    /** Returns true if field threadId is set (has been assigned a value) and false otherwise */
    public boolean isSetThreadId() {
      return org.apache.amoro.shade.thrift.org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __THREADID_ISSET_ID);
    }

    public void setThreadIdIsSet(boolean value) {
      __isset_bitfield = org.apache.amoro.shade.thrift.org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __THREADID_ISSET_ID, value);
    }

    @Override
    public void setFieldValue(_Fields field, @org.apache.amoro.shade.thrift.org.apache.thrift.annotation.Nullable java.lang.Object value) {
      switch (field) {
      case AUTH_TOKEN:
        if (value == null) {
          unsetAuthToken();
        } else {
          setAuthToken((java.lang.String)value);
        }
        break;

      case THREAD_ID:
        if (value == null) {
          unsetThreadId();
        } else {
          setThreadId((java.lang.Integer)value);
        }
        break;

      }
    }

    @org.apache.amoro.shade.thrift.org.apache.thrift.annotation.Nullable
    @Override
    public java.lang.Object getFieldValue(_Fields field) {
      switch (field) {
      case AUTH_TOKEN:
        return getAuthToken();

      case THREAD_ID:
        return getThreadId();

      }
      throw new java.lang.IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    @Override
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new java.lang.IllegalArgumentException();
      }

      switch (field) {
      case AUTH_TOKEN:
        return isSetAuthToken();
      case THREAD_ID:
        return isSetThreadId();
      }
      throw new java.lang.IllegalStateException();
    }

    @Override
    public boolean equals(java.lang.Object that) {
      if (that instanceof pollTask_args)
        return this.equals((pollTask_args)that);
      return false;
    }

    public boolean equals(pollTask_args that) {
      if (that == null)
        return false;
      if (this == that)
        return true;

      boolean this_present_authToken = true && this.isSetAuthToken();
      boolean that_present_authToken = true && that.isSetAuthToken();
      if (this_present_authToken || that_present_authToken) {
        if (!(this_present_authToken && that_present_authToken))
          return false;
        if (!this.authToken.equals(that.authToken))
          return false;
      }

      boolean this_present_threadId = true;
      boolean that_present_threadId = true;
      if (this_present_threadId || that_present_threadId) {
        if (!(this_present_threadId && that_present_threadId))
          return false;
        if (this.threadId != that.threadId)
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      int hashCode = 1;

      hashCode = hashCode * 8191 + ((isSetAuthToken()) ? 131071 : 524287);
      if (isSetAuthToken())
        hashCode = hashCode * 8191 + authToken.hashCode();

      hashCode = hashCode * 8191 + threadId;

      return hashCode;
    }

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

      int lastComparison = 0;

      lastComparison = java.lang.Boolean.compare(isSetAuthToken(), other.isSetAuthToken());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetAuthToken()) {
        lastComparison = org.apache.amoro.shade.thrift.org.apache.thrift.TBaseHelper.compareTo(this.authToken, other.authToken);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = java.lang.Boolean.compare(isSetThreadId(), other.isSetThreadId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetThreadId()) {
        lastComparison = org.apache.amoro.shade.thrift.org.apache.thrift.TBaseHelper.compareTo(this.threadId, other.threadId);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    @org.apache.amoro.shade.thrift.org.apache.thrift.annotation.Nullable
    @Override
    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    @Override
    public void read(org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TProtocol iprot) throws org.apache.amoro.shade.thrift.org.apache.thrift.TException {
      scheme(iprot).read(iprot, this);
    }

    @Override
    public void write(org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TProtocol oprot) throws org.apache.amoro.shade.thrift.org.apache.thrift.TException {
      scheme(oprot).write(oprot, this);
    }

    @Override
    public java.lang.String toString() {
      java.lang.StringBuilder sb = new java.lang.StringBuilder("pollTask_args(");
      boolean first = true;

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

    public void validate() throws org.apache.amoro.shade.thrift.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.amoro.shade.thrift.org.apache.thrift.protocol.TCompactProtocol(new org.apache.amoro.shade.thrift.org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.amoro.shade.thrift.org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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.amoro.shade.thrift.org.apache.thrift.protocol.TCompactProtocol(new org.apache.amoro.shade.thrift.org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.amoro.shade.thrift.org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private static class pollTask_argsStandardSchemeFactory implements org.apache.amoro.shade.thrift.org.apache.thrift.scheme.SchemeFactory {
      @Override
      public pollTask_argsStandardScheme getScheme() {
        return new pollTask_argsStandardScheme();
      }
    }

    private static class pollTask_argsStandardScheme extends org.apache.amoro.shade.thrift.org.apache.thrift.scheme.StandardScheme<pollTask_args> {

      @Override
      public void read(org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TProtocol iprot, pollTask_args struct) throws org.apache.amoro.shade.thrift.org.apache.thrift.TException {
        org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TField schemeField;
        iprot.readStructBegin();
        while (true)
        {
          schemeField = iprot.readFieldBegin();
          if (schemeField.type == org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TType.STOP) { 
            break;
          }
          switch (schemeField.id) {
            case 1: // AUTH_TOKEN
              if (schemeField.type == org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TType.STRING) {
                struct.authToken = iprot.readString();
                struct.setAuthTokenIsSet(true);
              } else { 
                org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // THREAD_ID
              if (schemeField.type == org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TType.I32) {
                struct.threadId = iprot.readI32();
                struct.setThreadIdIsSet(true);
              } else { 
                org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            default:
              org.apache.amoro.shade.thrift.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();
      }

      @Override
      public void write(org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TProtocol oprot, pollTask_args struct) throws org.apache.amoro.shade.thrift.org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.authToken != null) {
          oprot.writeFieldBegin(AUTH_TOKEN_FIELD_DESC);
          oprot.writeString(struct.authToken);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldBegin(THREAD_ID_FIELD_DESC);
        oprot.writeI32(struct.threadId);
        oprot.writeFieldEnd();
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class pollTask_argsTupleSchemeFactory implements org.apache.amoro.shade.thrift.org.apache.thrift.scheme.SchemeFactory {
      @Override
      public pollTask_argsTupleScheme getScheme() {
        return new pollTask_argsTupleScheme();
      }
    }

    private static class pollTask_argsTupleScheme extends org.apache.amoro.shade.thrift.org.apache.thrift.scheme.TupleScheme<pollTask_args> {

      @Override
      public void write(org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TProtocol prot, pollTask_args struct) throws org.apache.amoro.shade.thrift.org.apache.thrift.TException {
        org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet optionals = new java.util.BitSet();
        if (struct.isSetAuthToken()) {
          optionals.set(0);
        }
        if (struct.isSetThreadId()) {
          optionals.set(1);
        }
        oprot.writeBitSet(optionals, 2);
        if (struct.isSetAuthToken()) {
          oprot.writeString(struct.authToken);
        }
        if (struct.isSetThreadId()) {
          oprot.writeI32(struct.threadId);
        }
      }

      @Override
      public void read(org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TProtocol prot, pollTask_args struct) throws org.apache.amoro.shade.thrift.org.apache.thrift.TException {
        org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet incoming = iprot.readBitSet(2);
        if (incoming.get(0)) {
          struct.authToken = iprot.readString();
          struct.setAuthTokenIsSet(true);
        }
        if (incoming.get(1)) {
          struct.threadId = iprot.readI32();
          struct.setThreadIdIsSet(true);
        }
      }
    }

    private static <S extends org.apache.amoro.shade.thrift.org.apache.thrift.scheme.IScheme> S scheme(org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TProtocol proto) {
      return (org.apache.amoro.shade.thrift.org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
    }
  }

  @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
  public static class pollTask_result implements org.apache.amoro.shade.thrift.org.apache.thrift.TBase<pollTask_result, pollTask_result._Fields>, java.io.Serializable, Cloneable, Comparable<pollTask_result>   {
    private static final org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TStruct("pollTask_result");

    private static final org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TField("success", org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TType.STRUCT, (short)0);
    private static final org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TField E1_FIELD_DESC = new org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TField("e1", org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TType.STRUCT, (short)1);

    private static final org.apache.amoro.shade.thrift.org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new pollTask_resultStandardSchemeFactory();
    private static final org.apache.amoro.shade.thrift.org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new pollTask_resultTupleSchemeFactory();

    public @org.apache.amoro.shade.thrift.org.apache.thrift.annotation.Nullable OptimizingTask success; // required
    public @org.apache.amoro.shade.thrift.org.apache.thrift.annotation.Nullable org.apache.amoro.api.AmoroException e1; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.amoro.shade.thrift.org.apache.thrift.TFieldIdEnum {
      SUCCESS((short)0, "success"),
      E1((short)1, "e1");

      private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();

      static {
        for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      @org.apache.amoro.shade.thrift.org.apache.thrift.annotation.Nullable
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          case 1: // E1
            return E1;
          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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      @org.apache.amoro.shade.thrift.org.apache.thrift.annotation.Nullable
      public static _Fields findByName(java.lang.String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final java.lang.String _fieldName;

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

      @Override
      public short getThriftFieldId() {
        return _thriftId;
      }

      @Override
      public java.lang.String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final java.util.Map<_Fields, org.apache.amoro.shade.thrift.org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      java.util.Map<_Fields, org.apache.amoro.shade.thrift.org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.amoro.shade.thrift.org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SUCCESS, new org.apache.amoro.shade.thrift.org.apache.thrift.meta_data.FieldMetaData("success", org.apache.amoro.shade.thrift.org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.amoro.shade.thrift.org.apache.thrift.meta_data.StructMetaData(org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TType.STRUCT, OptimizingTask.class)));
      tmpMap.put(_Fields.E1, new org.apache.amoro.shade.thrift.org.apache.thrift.meta_data.FieldMetaData("e1", org.apache.amoro.shade.thrift.org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.amoro.shade.thrift.org.apache.thrift.meta_data.StructMetaData(org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TType.STRUCT, org.apache.amoro.api.AmoroException.class)));
      metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
      org.apache.amoro.shade.thrift.org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(pollTask_result.class, metaDataMap);
    }

    public pollTask_result() {
    }

    public pollTask_result(
      OptimizingTask success,
      org.apache.amoro.api.AmoroException e1)
    {
      this();
      this.success = success;
      this.e1 = e1;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public pollTask_result(pollTask_result other) {
      if (other.isSetSuccess()) {
        this.success = new OptimizingTask(other.success);
      }
      if (other.isSetE1()) {
        this.e1 = new org.apache.amoro.api.AmoroException(other.e1);
      }
    }

    @Override
    public pollTask_result deepCopy() {
      return new pollTask_result(this);
    }

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

    @org.apache.amoro.shade.thrift.org.apache.thrift.annotation.Nullable
    public OptimizingTask getSuccess() {
      return this.success;
    }

    public pollTask_result setSuccess(@org.apache.amoro.shade.thrift.org.apache.thrift.annotation.Nullable OptimizingTask 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;
      }
    }

    @org.apache.amoro.shade.thrift.org.apache.thrift.annotation.Nullable
    public org.apache.amoro.api.AmoroException getE1() {
      return this.e1;
    }

    public pollTask_result setE1(@org.apache.amoro.shade.thrift.org.apache.thrift.annotation.Nullable org.apache.amoro.api.AmoroException e1) {
      this.e1 = e1;
      return this;
    }

    public void unsetE1() {
      this.e1 = null;
    }

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

    public void setE1IsSet(boolean value) {
      if (!value) {
        this.e1 = null;
      }
    }

    @Override
    public void setFieldValue(_Fields field, @org.apache.amoro.shade.thrift.org.apache.thrift.annotation.Nullable java.lang.Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((OptimizingTask)value);
        }
        break;

      case E1:
        if (value == null) {
          unsetE1();
        } else {
          setE1((org.apache.amoro.api.AmoroException)value);
        }
        break;

      }
    }

    @org.apache.amoro.shade.thrift.org.apache.thrift.annotation.Nullable
    @Override
    public java.lang.Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      case E1:
        return getE1();

      }
      throw new java.lang.IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    @Override
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new java.lang.IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      case E1:
        return isSetE1();
      }
      throw new java.lang.IllegalStateException();
    }

    @Override
    public boolean equals(java.lang.Object that) {
      if (that instanceof pollTask_result)
        return this.equals((pollTask_result)that);
      return false;
    }

    public boolean equals(pollTask_result that) {
      if (that == null)
        return false;
      if (this == that)
        return true;

      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_e1 = true && this.isSetE1();
      boolean that_present_e1 = true && that.isSetE1();
      if (this_present_e1 || that_present_e1) {
        if (!(this_present_e1 && that_present_e1))
          return false;
        if (!this.e1.equals(that.e1))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      int hashCode = 1;

      hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287);
      if (isSetSuccess())
        hashCode = hashCode * 8191 + success.hashCode();

      hashCode = hashCode * 8191 + ((isSetE1()) ? 131071 : 524287);
      if (isSetE1())
        hashCode = hashCode * 8191 + e1.hashCode();

      return hashCode;
    }

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

      int lastComparison = 0;

      lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.amoro.shade.thrift.org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = java.lang.Boolean.compare(isSetE1(), other.isSetE1());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetE1()) {
        lastComparison = org.apache.amoro.shade.thrift.org.apache.thrift.TBaseHelper.compareTo(this.e1, other.e1);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    @org.apache.amoro.shade.thrift.org.apache.thrift.annotation.Nullable
    @Override
    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    @Override
    public void read(org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TProtocol iprot) throws org.apache.amoro.shade.thrift.org.apache.thrift.TException {
      scheme(iprot).read(iprot, this);
    }

    public void write(org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TProtocol oprot) throws org.apache.amoro.shade.thrift.org.apache.thrift.TException {
      scheme(oprot).write(oprot, this);
      }

    @Override
    public java.lang.String toString() {
      java.lang.StringBuilder sb = new java.lang.StringBuilder("pollTask_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("e1:");
      if (this.e1 == null) {
        sb.append("null");
      } else {
        sb.append(this.e1);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.amoro.shade.thrift.org.apache.thrift.TException {
      // check for required fields
      // check for sub-struct validity
      if (success != null) {
        success.validate();
      }
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TCompactProtocol(new org.apache.amoro.shade.thrift.org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.amoro.shade.thrift.org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
      try {
        read(new org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TCompactProtocol(new org.apache.amoro.shade.thrift.org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.amoro.shade.thrift.org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private static class pollTask_resultStandardSchemeFactory implements org.apache.amoro.shade.thrift.org.apache.thrift.scheme.SchemeFactory {
      @Override
      public pollTask_resultStandardScheme getScheme() {
        return new pollTask_resultStandardScheme();
      }
    }

    private static class pollTask_resultStandardScheme extends org.apache.amoro.shade.thrift.org.apache.thrift.scheme.StandardScheme<pollTask_result> {

      @Override
      public void read(org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TProtocol iprot, pollTask_result struct) throws org.apache.amoro.shade.thrift.org.apache.thrift.TException {
        org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TField schemeField;
        iprot.readStructBegin();
        while (true)
        {
          schemeField = iprot.readFieldBegin();
          if (schemeField.type == org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TType.STOP) { 
            break;
          }
          switch (schemeField.id) {
            case 0: // SUCCESS
              if (schemeField.type == org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TType.STRUCT) {
                struct.success = new OptimizingTask();
                struct.success.read(iprot);
                struct.setSuccessIsSet(true);
              } else { 
                org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 1: // E1
              if (schemeField.type == org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TType.STRUCT) {
                struct.e1 = new org.apache.amoro.api.AmoroException();
                struct.e1.read(iprot);
                struct.setE1IsSet(true);
              } else { 
                org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            default:
              org.apache.amoro.shade.thrift.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();
      }

      @Override
      public void write(org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TProtocol oprot, pollTask_result struct) throws org.apache.amoro.shade.thrift.org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.success != null) {
          oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
          struct.success.write(oprot);
          oprot.writeFieldEnd();
        }
        if (struct.e1 != null) {
          oprot.writeFieldBegin(E1_FIELD_DESC);
          struct.e1.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class pollTask_resultTupleSchemeFactory implements org.apache.amoro.shade.thrift.org.apache.thrift.scheme.SchemeFactory {
      @Override
      public pollTask_resultTupleScheme getScheme() {
        return new pollTask_resultTupleScheme();
      }
    }

    private static class pollTask_resultTupleScheme extends org.apache.amoro.shade.thrift.org.apache.thrift.scheme.TupleScheme<pollTask_result> {

      @Override
      public void write(org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TProtocol prot, pollTask_result struct) throws org.apache.amoro.shade.thrift.org.apache.thrift.TException {
        org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet optionals = new java.util.BitSet();
        if (struct.isSetSuccess()) {
          optionals.set(0);
        }
        if (struct.isSetE1()) {
          optionals.set(1);
        }
        oprot.writeBitSet(optionals, 2);
        if (struct.isSetSuccess()) {
          struct.success.write(oprot);
        }
        if (struct.isSetE1()) {
          struct.e1.write(oprot);
        }
      }

      @Override
      public void read(org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TProtocol prot, pollTask_result struct) throws org.apache.amoro.shade.thrift.org.apache.thrift.TException {
        org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet incoming = iprot.readBitSet(2);
        if (incoming.get(0)) {
          struct.success = new OptimizingTask();
          struct.success.read(iprot);
          struct.setSuccessIsSet(true);
        }
        if (incoming.get(1)) {
          struct.e1 = new org.apache.amoro.api.AmoroException();
          struct.e1.read(iprot);
          struct.setE1IsSet(true);
        }
      }
    }

    private static <S extends org.apache.amoro.shade.thrift.org.apache.thrift.scheme.IScheme> S scheme(org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TProtocol proto) {
      return (org.apache.amoro.shade.thrift.org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
    }
  }

  @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
  public static class ackTask_args implements org.apache.amoro.shade.thrift.org.apache.thrift.TBase<ackTask_args, ackTask_args._Fields>, java.io.Serializable, Cloneable, Comparable<ackTask_args>   {
    private static final org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TStruct("ackTask_args");

    private static final org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TField AUTH_TOKEN_FIELD_DESC = new org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TField("authToken", org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TType.STRING, (short)1);
    private static final org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TField THREAD_ID_FIELD_DESC = new org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TField("threadId", org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TType.I32, (short)2);
    private static final org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TField TASK_ID_FIELD_DESC = new org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TField("taskId", org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TType.STRUCT, (short)3);

    private static final org.apache.amoro.shade.thrift.org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new ackTask_argsStandardSchemeFactory();
    private static final org.apache.amoro.shade.thrift.org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new ackTask_argsTupleSchemeFactory();

    public @org.apache.amoro.shade.thrift.org.apache.thrift.annotation.Nullable java.lang.String authToken; // required
    public int threadId; // required
    public @org.apache.amoro.shade.thrift.org.apache.thrift.annotation.Nullable OptimizingTaskId taskId; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.amoro.shade.thrift.org.apache.thrift.TFieldIdEnum {
      AUTH_TOKEN((short)1, "authToken"),
      THREAD_ID((short)2, "threadId"),
      TASK_ID((short)3, "taskId");

      private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();

      static {
        for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      @org.apache.amoro.shade.thrift.org.apache.thrift.annotation.Nullable
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // AUTH_TOKEN
            return AUTH_TOKEN;
          case 2: // THREAD_ID
            return THREAD_ID;
          case 3: // TASK_ID
            return TASK_ID;
          default:
            return null;
        }
      }

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

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      @org.apache.amoro.shade.thrift.org.apache.thrift.annotation.Nullable
      public static _Fields findByName(java.lang.String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final java.lang.String _fieldName;

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

      @Override
      public short getThriftFieldId() {
        return _thriftId;
      }

      @Override
      public java.lang.String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    private static final int __THREADID_ISSET_ID = 0;
    private byte __isset_bitfield = 0;
    public static final java.util.Map<_Fields, org.apache.amoro.shade.thrift.org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      java.util.Map<_Fields, org.apache.amoro.shade.thrift.org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.amoro.shade.thrift.org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.AUTH_TOKEN, new org.apache.amoro.shade.thrift.org.apache.thrift.meta_data.FieldMetaData("authToken", org.apache.amoro.shade.thrift.org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.amoro.shade.thrift.org.apache.thrift.meta_data.FieldValueMetaData(org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TType.STRING)));
      tmpMap.put(_Fields.THREAD_ID, new org.apache.amoro.shade.thrift.org.apache.thrift.meta_data.FieldMetaData("threadId", org.apache.amoro.shade.thrift.org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.amoro.shade.thrift.org.apache.thrift.meta_data.FieldValueMetaData(org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TType.I32)));
      tmpMap.put(_Fields.TASK_ID, new org.apache.amoro.shade.thrift.org.apache.thrift.meta_data.FieldMetaData("taskId", org.apache.amoro.shade.thrift.org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.amoro.shade.thrift.org.apache.thrift.meta_data.StructMetaData(org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TType.STRUCT, OptimizingTaskId.class)));
      metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
      org.apache.amoro.shade.thrift.org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ackTask_args.class, metaDataMap);
    }

    public ackTask_args() {
    }

    public ackTask_args(
      java.lang.String authToken,
      int threadId,
      OptimizingTaskId taskId)
    {
      this();
      this.authToken = authToken;
      this.threadId = threadId;
      setThreadIdIsSet(true);
      this.taskId = taskId;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public ackTask_args(ackTask_args other) {
      __isset_bitfield = other.__isset_bitfield;
      if (other.isSetAuthToken()) {
        this.authToken = other.authToken;
      }
      this.threadId = other.threadId;
      if (other.isSetTaskId()) {
        this.taskId = new OptimizingTaskId(other.taskId);
      }
    }

    @Override
    public ackTask_args deepCopy() {
      return new ackTask_args(this);
    }

    @Override
    public void clear() {
      this.authToken = null;
      setThreadIdIsSet(false);
      this.threadId = 0;
      this.taskId = null;
    }

    @org.apache.amoro.shade.thrift.org.apache.thrift.annotation.Nullable
    public java.lang.String getAuthToken() {
      return this.authToken;
    }

    public ackTask_args setAuthToken(@org.apache.amoro.shade.thrift.org.apache.thrift.annotation.Nullable java.lang.String authToken) {
      this.authToken = authToken;
      return this;
    }

    public void unsetAuthToken() {
      this.authToken = null;
    }

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

    public void setAuthTokenIsSet(boolean value) {
      if (!value) {
        this.authToken = null;
      }
    }

    public int getThreadId() {
      return this.threadId;
    }

    public ackTask_args setThreadId(int threadId) {
      this.threadId = threadId;
      setThreadIdIsSet(true);
      return this;
    }

    public void unsetThreadId() {
      __isset_bitfield = org.apache.amoro.shade.thrift.org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __THREADID_ISSET_ID);
    }

    /** Returns true if field threadId is set (has been assigned a value) and false otherwise */
    public boolean isSetThreadId() {
      return org.apache.amoro.shade.thrift.org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __THREADID_ISSET_ID);
    }

    public void setThreadIdIsSet(boolean value) {
      __isset_bitfield = org.apache.amoro.shade.thrift.org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __THREADID_ISSET_ID, value);
    }

    @org.apache.amoro.shade.thrift.org.apache.thrift.annotation.Nullable
    public OptimizingTaskId getTaskId() {
      return this.taskId;
    }

    public ackTask_args setTaskId(@org.apache.amoro.shade.thrift.org.apache.thrift.annotation.Nullable OptimizingTaskId taskId) {
      this.taskId = taskId;
      return this;
    }

    public void unsetTaskId() {
      this.taskId = null;
    }

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

    public void setTaskIdIsSet(boolean value) {
      if (!value) {
        this.taskId = null;
      }
    }

    @Override
    public void setFieldValue(_Fields field, @org.apache.amoro.shade.thrift.org.apache.thrift.annotation.Nullable java.lang.Object value) {
      switch (field) {
      case AUTH_TOKEN:
        if (value == null) {
          unsetAuthToken();
        } else {
          setAuthToken((java.lang.String)value);
        }
        break;

      case THREAD_ID:
        if (value == null) {
          unsetThreadId();
        } else {
          setThreadId((java.lang.Integer)value);
        }
        break;

      case TASK_ID:
        if (value == null) {
          unsetTaskId();
        } else {
          setTaskId((OptimizingTaskId)value);
        }
        break;

      }
    }

    @org.apache.amoro.shade.thrift.org.apache.thrift.annotation.Nullable
    @Override
    public java.lang.Object getFieldValue(_Fields field) {
      switch (field) {
      case AUTH_TOKEN:
        return getAuthToken();

      case THREAD_ID:
        return getThreadId();

      case TASK_ID:
        return getTaskId();

      }
      throw new java.lang.IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    @Override
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new java.lang.IllegalArgumentException();
      }

      switch (field) {
      case AUTH_TOKEN:
        return isSetAuthToken();
      case THREAD_ID:
        return isSetThreadId();
      case TASK_ID:
        return isSetTaskId();
      }
      throw new java.lang.IllegalStateException();
    }

    @Override
    public boolean equals(java.lang.Object that) {
      if (that instanceof ackTask_args)
        return this.equals((ackTask_args)that);
      return false;
    }

    public boolean equals(ackTask_args that) {
      if (that == null)
        return false;
      if (this == that)
        return true;

      boolean this_present_authToken = true && this.isSetAuthToken();
      boolean that_present_authToken = true && that.isSetAuthToken();
      if (this_present_authToken || that_present_authToken) {
        if (!(this_present_authToken && that_present_authToken))
          return false;
        if (!this.authToken.equals(that.authToken))
          return false;
      }

      boolean this_present_threadId = true;
      boolean that_present_threadId = true;
      if (this_present_threadId || that_present_threadId) {
        if (!(this_present_threadId && that_present_threadId))
          return false;
        if (this.threadId != that.threadId)
          return false;
      }

      boolean this_present_taskId = true && this.isSetTaskId();
      boolean that_present_taskId = true && that.isSetTaskId();
      if (this_present_taskId || that_present_taskId) {
        if (!(this_present_taskId && that_present_taskId))
          return false;
        if (!this.taskId.equals(that.taskId))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      int hashCode = 1;

      hashCode = hashCode * 8191 + ((isSetAuthToken()) ? 131071 : 524287);
      if (isSetAuthToken())
        hashCode = hashCode * 8191 + authToken.hashCode();

      hashCode = hashCode * 8191 + threadId;

      hashCode = hashCode * 8191 + ((isSetTaskId()) ? 131071 : 524287);
      if (isSetTaskId())
        hashCode = hashCode * 8191 + taskId.hashCode();

      return hashCode;
    }

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

      int lastComparison = 0;

      lastComparison = java.lang.Boolean.compare(isSetAuthToken(), other.isSetAuthToken());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetAuthToken()) {
        lastComparison = org.apache.amoro.shade.thrift.org.apache.thrift.TBaseHelper.compareTo(this.authToken, other.authToken);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = java.lang.Boolean.compare(isSetThreadId(), other.isSetThreadId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetThreadId()) {
        lastComparison = org.apache.amoro.shade.thrift.org.apache.thrift.TBaseHelper.compareTo(this.threadId, other.threadId);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = java.lang.Boolean.compare(isSetTaskId(), other.isSetTaskId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetTaskId()) {
        lastComparison = org.apache.amoro.shade.thrift.org.apache.thrift.TBaseHelper.compareTo(this.taskId, other.taskId);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    @org.apache.amoro.shade.thrift.org.apache.thrift.annotation.Nullable
    @Override
    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    @Override
    public void read(org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TProtocol iprot) throws org.apache.amoro.shade.thrift.org.apache.thrift.TException {
      scheme(iprot).read(iprot, this);
    }

    @Override
    public void write(org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TProtocol oprot) throws org.apache.amoro.shade.thrift.org.apache.thrift.TException {
      scheme(oprot).write(oprot, this);
    }

    @Override
    public java.lang.String toString() {
      java.lang.StringBuilder sb = new java.lang.StringBuilder("ackTask_args(");
      boolean first = true;

      sb.append("authToken:");
      if (this.authToken == null) {
        sb.append("null");
      } else {
        sb.append(this.authToken);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("threadId:");
      sb.append(this.threadId);
      first = false;
      if (!first) sb.append(", ");
      sb.append("taskId:");
      if (this.taskId == null) {
        sb.append("null");
      } else {
        sb.append(this.taskId);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.amoro.shade.thrift.org.apache.thrift.TException {
      // check for required fields
      // check for sub-struct validity
      if (taskId != null) {
        taskId.validate();
      }
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TCompactProtocol(new org.apache.amoro.shade.thrift.org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.amoro.shade.thrift.org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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.amoro.shade.thrift.org.apache.thrift.protocol.TCompactProtocol(new org.apache.amoro.shade.thrift.org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.amoro.shade.thrift.org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private static class ackTask_argsStandardSchemeFactory implements org.apache.amoro.shade.thrift.org.apache.thrift.scheme.SchemeFactory {
      @Override
      public ackTask_argsStandardScheme getScheme() {
        return new ackTask_argsStandardScheme();
      }
    }

    private static class ackTask_argsStandardScheme extends org.apache.amoro.shade.thrift.org.apache.thrift.scheme.StandardScheme<ackTask_args> {

      @Override
      public void read(org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TProtocol iprot, ackTask_args struct) throws org.apache.amoro.shade.thrift.org.apache.thrift.TException {
        org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TField schemeField;
        iprot.readStructBegin();
        while (true)
        {
          schemeField = iprot.readFieldBegin();
          if (schemeField.type == org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TType.STOP) { 
            break;
          }
          switch (schemeField.id) {
            case 1: // AUTH_TOKEN
              if (schemeField.type == org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TType.STRING) {
                struct.authToken = iprot.readString();
                struct.setAuthTokenIsSet(true);
              } else { 
                org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // THREAD_ID
              if (schemeField.type == org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TType.I32) {
                struct.threadId = iprot.readI32();
                struct.setThreadIdIsSet(true);
              } else { 
                org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 3: // TASK_ID
              if (schemeField.type == org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TType.STRUCT) {
                struct.taskId = new OptimizingTaskId();
                struct.taskId.read(iprot);
                struct.setTaskIdIsSet(true);
              } else { 
                org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            default:
              org.apache.amoro.shade.thrift.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();
      }

      @Override
      public void write(org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TProtocol oprot, ackTask_args struct) throws org.apache.amoro.shade.thrift.org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.authToken != null) {
          oprot.writeFieldBegin(AUTH_TOKEN_FIELD_DESC);
          oprot.writeString(struct.authToken);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldBegin(THREAD_ID_FIELD_DESC);
        oprot.writeI32(struct.threadId);
        oprot.writeFieldEnd();
        if (struct.taskId != null) {
          oprot.writeFieldBegin(TASK_ID_FIELD_DESC);
          struct.taskId.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class ackTask_argsTupleSchemeFactory implements org.apache.amoro.shade.thrift.org.apache.thrift.scheme.SchemeFactory {
      @Override
      public ackTask_argsTupleScheme getScheme() {
        return new ackTask_argsTupleScheme();
      }
    }

    private static class ackTask_argsTupleScheme extends org.apache.amoro.shade.thrift.org.apache.thrift.scheme.TupleScheme<ackTask_args> {

      @Override
      public void write(org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TProtocol prot, ackTask_args struct) throws org.apache.amoro.shade.thrift.org.apache.thrift.TException {
        org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet optionals = new java.util.BitSet();
        if (struct.isSetAuthToken()) {
          optionals.set(0);
        }
        if (struct.isSetThreadId()) {
          optionals.set(1);
        }
        if (struct.isSetTaskId()) {
          optionals.set(2);
        }
        oprot.writeBitSet(optionals, 3);
        if (struct.isSetAuthToken()) {
          oprot.writeString(struct.authToken);
        }
        if (struct.isSetThreadId()) {
          oprot.writeI32(struct.threadId);
        }
        if (struct.isSetTaskId()) {
          struct.taskId.write(oprot);
        }
      }

      @Override
      public void read(org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TProtocol prot, ackTask_args struct) throws org.apache.amoro.shade.thrift.org.apache.thrift.TException {
        org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet incoming = iprot.readBitSet(3);
        if (incoming.get(0)) {
          struct.authToken = iprot.readString();
          struct.setAuthTokenIsSet(true);
        }
        if (incoming.get(1)) {
          struct.threadId = iprot.readI32();
          struct.setThreadIdIsSet(true);
        }
        if (incoming.get(2)) {
          struct.taskId = new OptimizingTaskId();
          struct.taskId.read(iprot);
          struct.setTaskIdIsSet(true);
        }
      }
    }

    private static <S extends org.apache.amoro.shade.thrift.org.apache.thrift.scheme.IScheme> S scheme(org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TProtocol proto) {
      return (org.apache.amoro.shade.thrift.org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
    }
  }

  @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
  public static class ackTask_result implements org.apache.amoro.shade.thrift.org.apache.thrift.TBase<ackTask_result, ackTask_result._Fields>, java.io.Serializable, Cloneable, Comparable<ackTask_result>   {
    private static final org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TStruct("ackTask_result");

    private static final org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TField E1_FIELD_DESC = new org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TField("e1", org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TType.STRUCT, (short)1);

    private static final org.apache.amoro.shade.thrift.org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new ackTask_resultStandardSchemeFactory();
    private static final org.apache.amoro.shade.thrift.org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new ackTask_resultTupleSchemeFactory();

    public @org.apache.amoro.shade.thrift.org.apache.thrift.annotation.Nullable org.apache.amoro.api.AmoroException e1; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.amoro.shade.thrift.org.apache.thrift.TFieldIdEnum {
      E1((short)1, "e1");

      private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();

      static {
        for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      @org.apache.amoro.shade.thrift.org.apache.thrift.annotation.Nullable
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // E1
            return E1;
          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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      @org.apache.amoro.shade.thrift.org.apache.thrift.annotation.Nullable
      public static _Fields findByName(java.lang.String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final java.lang.String _fieldName;

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

      @Override
      public short getThriftFieldId() {
        return _thriftId;
      }

      @Override
      public java.lang.String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final java.util.Map<_Fields, org.apache.amoro.shade.thrift.org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      java.util.Map<_Fields, org.apache.amoro.shade.thrift.org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.amoro.shade.thrift.org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.E1, new org.apache.amoro.shade.thrift.org.apache.thrift.meta_data.FieldMetaData("e1", org.apache.amoro.shade.thrift.org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.amoro.shade.thrift.org.apache.thrift.meta_data.StructMetaData(org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TType.STRUCT, org.apache.amoro.api.AmoroException.class)));
      metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
      org.apache.amoro.shade.thrift.org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ackTask_result.class, metaDataMap);
    }

    public ackTask_result() {
    }

    public ackTask_result(
      org.apache.amoro.api.AmoroException e1)
    {
      this();
      this.e1 = e1;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public ackTask_result(ackTask_result other) {
      if (other.isSetE1()) {
        this.e1 = new org.apache.amoro.api.AmoroException(other.e1);
      }
    }

    @Override
    public ackTask_result deepCopy() {
      return new ackTask_result(this);
    }

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

    @org.apache.amoro.shade.thrift.org.apache.thrift.annotation.Nullable
    public org.apache.amoro.api.AmoroException getE1() {
      return this.e1;
    }

    public ackTask_result setE1(@org.apache.amoro.shade.thrift.org.apache.thrift.annotation.Nullable org.apache.amoro.api.AmoroException e1) {
      this.e1 = e1;
      return this;
    }

    public void unsetE1() {
      this.e1 = null;
    }

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

    public void setE1IsSet(boolean value) {
      if (!value) {
        this.e1 = null;
      }
    }

    @Override
    public void setFieldValue(_Fields field, @org.apache.amoro.shade.thrift.org.apache.thrift.annotation.Nullable java.lang.Object value) {
      switch (field) {
      case E1:
        if (value == null) {
          unsetE1();
        } else {
          setE1((org.apache.amoro.api.AmoroException)value);
        }
        break;

      }
    }

    @org.apache.amoro.shade.thrift.org.apache.thrift.annotation.Nullable
    @Override
    public java.lang.Object getFieldValue(_Fields field) {
      switch (field) {
      case E1:
        return getE1();

      }
      throw new java.lang.IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    @Override
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new java.lang.IllegalArgumentException();
      }

      switch (field) {
      case E1:
        return isSetE1();
      }
      throw new java.lang.IllegalStateException();
    }

    @Override
    public boolean equals(java.lang.Object that) {
      if (that instanceof ackTask_result)
        return this.equals((ackTask_result)that);
      return false;
    }

    public boolean equals(ackTask_result that) {
      if (that == null)
        return false;
      if (this == that)
        return true;

      boolean this_present_e1 = true && this.isSetE1();
      boolean that_present_e1 = true && that.isSetE1();
      if (this_present_e1 || that_present_e1) {
        if (!(this_present_e1 && that_present_e1))
          return false;
        if (!this.e1.equals(that.e1))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      int hashCode = 1;

      hashCode = hashCode * 8191 + ((isSetE1()) ? 131071 : 524287);
      if (isSetE1())
        hashCode = hashCode * 8191 + e1.hashCode();

      return hashCode;
    }

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

      int lastComparison = 0;

      lastComparison = java.lang.Boolean.compare(isSetE1(), other.isSetE1());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetE1()) {
        lastComparison = org.apache.amoro.shade.thrift.org.apache.thrift.TBaseHelper.compareTo(this.e1, other.e1);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    @org.apache.amoro.shade.thrift.org.apache.thrift.annotation.Nullable
    @Override
    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    @Override
    public void read(org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TProtocol iprot) throws org.apache.amoro.shade.thrift.org.apache.thrift.TException {
      scheme(iprot).read(iprot, this);
    }

    public void write(org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TProtocol oprot) throws org.apache.amoro.shade.thrift.org.apache.thrift.TException {
      scheme(oprot).write(oprot, this);
      }

    @Override
    public java.lang.String toString() {
      java.lang.StringBuilder sb = new java.lang.StringBuilder("ackTask_result(");
      boolean first = true;

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

    public void validate() throws org.apache.amoro.shade.thrift.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.amoro.shade.thrift.org.apache.thrift.protocol.TCompactProtocol(new org.apache.amoro.shade.thrift.org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.amoro.shade.thrift.org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
      try {
        read(new org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TCompactProtocol(new org.apache.amoro.shade.thrift.org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.amoro.shade.thrift.org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private static class ackTask_resultStandardSchemeFactory implements org.apache.amoro.shade.thrift.org.apache.thrift.scheme.SchemeFactory {
      @Override
      public ackTask_resultStandardScheme getScheme() {
        return new ackTask_resultStandardScheme();
      }
    }

    private static class ackTask_resultStandardScheme extends org.apache.amoro.shade.thrift.org.apache.thrift.scheme.StandardScheme<ackTask_result> {

      @Override
      public void read(org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TProtocol iprot, ackTask_result struct) throws org.apache.amoro.shade.thrift.org.apache.thrift.TException {
        org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TField schemeField;
        iprot.readStructBegin();
        while (true)
        {
          schemeField = iprot.readFieldBegin();
          if (schemeField.type == org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TType.STOP) { 
            break;
          }
          switch (schemeField.id) {
            case 1: // E1
              if (schemeField.type == org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TType.STRUCT) {
                struct.e1 = new org.apache.amoro.api.AmoroException();
                struct.e1.read(iprot);
                struct.setE1IsSet(true);
              } else { 
                org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            default:
              org.apache.amoro.shade.thrift.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();
      }

      @Override
      public void write(org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TProtocol oprot, ackTask_result struct) throws org.apache.amoro.shade.thrift.org.apache.thrift.TException {
        struct.validate();

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

    }

    private static class ackTask_resultTupleSchemeFactory implements org.apache.amoro.shade.thrift.org.apache.thrift.scheme.SchemeFactory {
      @Override
      public ackTask_resultTupleScheme getScheme() {
        return new ackTask_resultTupleScheme();
      }
    }

    private static class ackTask_resultTupleScheme extends org.apache.amoro.shade.thrift.org.apache.thrift.scheme.TupleScheme<ackTask_result> {

      @Override
      public void write(org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TProtocol prot, ackTask_result struct) throws org.apache.amoro.shade.thrift.org.apache.thrift.TException {
        org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet optionals = new java.util.BitSet();
        if (struct.isSetE1()) {
          optionals.set(0);
        }
        oprot.writeBitSet(optionals, 1);
        if (struct.isSetE1()) {
          struct.e1.write(oprot);
        }
      }

      @Override
      public void read(org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TProtocol prot, ackTask_result struct) throws org.apache.amoro.shade.thrift.org.apache.thrift.TException {
        org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet incoming = iprot.readBitSet(1);
        if (incoming.get(0)) {
          struct.e1 = new org.apache.amoro.api.AmoroException();
          struct.e1.read(iprot);
          struct.setE1IsSet(true);
        }
      }
    }

    private static <S extends org.apache.amoro.shade.thrift.org.apache.thrift.scheme.IScheme> S scheme(org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TProtocol proto) {
      return (org.apache.amoro.shade.thrift.org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
    }
  }

  @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
  public static class completeTask_args implements org.apache.amoro.shade.thrift.org.apache.thrift.TBase<completeTask_args, completeTask_args._Fields>, java.io.Serializable, Cloneable, Comparable<completeTask_args>   {
    private static final org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TStruct("completeTask_args");

    private static final org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TField AUTH_TOKEN_FIELD_DESC = new org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TField("authToken", org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TType.STRING, (short)1);
    private static final org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TField TASK_RESULT_FIELD_DESC = new org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TField("taskResult", org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TType.STRUCT, (short)2);

    private static final org.apache.amoro.shade.thrift.org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new completeTask_argsStandardSchemeFactory();
    private static final org.apache.amoro.shade.thrift.org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new completeTask_argsTupleSchemeFactory();

    public @org.apache.amoro.shade.thrift.org.apache.thrift.annotation.Nullable java.lang.String authToken; // required
    public @org.apache.amoro.shade.thrift.org.apache.thrift.annotation.Nullable OptimizingTaskResult taskResult; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.amoro.shade.thrift.org.apache.thrift.TFieldIdEnum {
      AUTH_TOKEN((short)1, "authToken"),
      TASK_RESULT((short)2, "taskResult");

      private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();

      static {
        for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      @org.apache.amoro.shade.thrift.org.apache.thrift.annotation.Nullable
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // AUTH_TOKEN
            return AUTH_TOKEN;
          case 2: // TASK_RESULT
            return TASK_RESULT;
          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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      @org.apache.amoro.shade.thrift.org.apache.thrift.annotation.Nullable
      public static _Fields findByName(java.lang.String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final java.lang.String _fieldName;

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

      @Override
      public short getThriftFieldId() {
        return _thriftId;
      }

      @Override
      public java.lang.String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final java.util.Map<_Fields, org.apache.amoro.shade.thrift.org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      java.util.Map<_Fields, org.apache.amoro.shade.thrift.org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.amoro.shade.thrift.org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.AUTH_TOKEN, new org.apache.amoro.shade.thrift.org.apache.thrift.meta_data.FieldMetaData("authToken", org.apache.amoro.shade.thrift.org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.amoro.shade.thrift.org.apache.thrift.meta_data.FieldValueMetaData(org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TType.STRING)));
      tmpMap.put(_Fields.TASK_RESULT, new org.apache.amoro.shade.thrift.org.apache.thrift.meta_data.FieldMetaData("taskResult", org.apache.amoro.shade.thrift.org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.amoro.shade.thrift.org.apache.thrift.meta_data.StructMetaData(org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TType.STRUCT, OptimizingTaskResult.class)));
      metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
      org.apache.amoro.shade.thrift.org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(completeTask_args.class, metaDataMap);
    }

    public completeTask_args() {
    }

    public completeTask_args(
      java.lang.String authToken,
      OptimizingTaskResult taskResult)
    {
      this();
      this.authToken = authToken;
      this.taskResult = taskResult;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public completeTask_args(completeTask_args other) {
      if (other.isSetAuthToken()) {
        this.authToken = other.authToken;
      }
      if (other.isSetTaskResult()) {
        this.taskResult = new OptimizingTaskResult(other.taskResult);
      }
    }

    @Override
    public completeTask_args deepCopy() {
      return new completeTask_args(this);
    }

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

    @org.apache.amoro.shade.thrift.org.apache.thrift.annotation.Nullable
    public java.lang.String getAuthToken() {
      return this.authToken;
    }

    public completeTask_args setAuthToken(@org.apache.amoro.shade.thrift.org.apache.thrift.annotation.Nullable java.lang.String authToken) {
      this.authToken = authToken;
      return this;
    }

    public void unsetAuthToken() {
      this.authToken = null;
    }

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

    public void setAuthTokenIsSet(boolean value) {
      if (!value) {
        this.authToken = null;
      }
    }

    @org.apache.amoro.shade.thrift.org.apache.thrift.annotation.Nullable
    public OptimizingTaskResult getTaskResult() {
      return this.taskResult;
    }

    public completeTask_args setTaskResult(@org.apache.amoro.shade.thrift.org.apache.thrift.annotation.Nullable OptimizingTaskResult taskResult) {
      this.taskResult = taskResult;
      return this;
    }

    public void unsetTaskResult() {
      this.taskResult = null;
    }

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

    public void setTaskResultIsSet(boolean value) {
      if (!value) {
        this.taskResult = null;
      }
    }

    @Override
    public void setFieldValue(_Fields field, @org.apache.amoro.shade.thrift.org.apache.thrift.annotation.Nullable java.lang.Object value) {
      switch (field) {
      case AUTH_TOKEN:
        if (value == null) {
          unsetAuthToken();
        } else {
          setAuthToken((java.lang.String)value);
        }
        break;

      case TASK_RESULT:
        if (value == null) {
          unsetTaskResult();
        } else {
          setTaskResult((OptimizingTaskResult)value);
        }
        break;

      }
    }

    @org.apache.amoro.shade.thrift.org.apache.thrift.annotation.Nullable
    @Override
    public java.lang.Object getFieldValue(_Fields field) {
      switch (field) {
      case AUTH_TOKEN:
        return getAuthToken();

      case TASK_RESULT:
        return getTaskResult();

      }
      throw new java.lang.IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    @Override
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new java.lang.IllegalArgumentException();
      }

      switch (field) {
      case AUTH_TOKEN:
        return isSetAuthToken();
      case TASK_RESULT:
        return isSetTaskResult();
      }
      throw new java.lang.IllegalStateException();
    }

    @Override
    public boolean equals(java.lang.Object that) {
      if (that instanceof completeTask_args)
        return this.equals((completeTask_args)that);
      return false;
    }

    public boolean equals(completeTask_args that) {
      if (that == null)
        return false;
      if (this == that)
        return true;

      boolean this_present_authToken = true && this.isSetAuthToken();
      boolean that_present_authToken = true && that.isSetAuthToken();
      if (this_present_authToken || that_present_authToken) {
        if (!(this_present_authToken && that_present_authToken))
          return false;
        if (!this.authToken.equals(that.authToken))
          return false;
      }

      boolean this_present_taskResult = true && this.isSetTaskResult();
      boolean that_present_taskResult = true && that.isSetTaskResult();
      if (this_present_taskResult || that_present_taskResult) {
        if (!(this_present_taskResult && that_present_taskResult))
          return false;
        if (!this.taskResult.equals(that.taskResult))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      int hashCode = 1;

      hashCode = hashCode * 8191 + ((isSetAuthToken()) ? 131071 : 524287);
      if (isSetAuthToken())
        hashCode = hashCode * 8191 + authToken.hashCode();

      hashCode = hashCode * 8191 + ((isSetTaskResult()) ? 131071 : 524287);
      if (isSetTaskResult())
        hashCode = hashCode * 8191 + taskResult.hashCode();

      return hashCode;
    }

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

      int lastComparison = 0;

      lastComparison = java.lang.Boolean.compare(isSetAuthToken(), other.isSetAuthToken());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetAuthToken()) {
        lastComparison = org.apache.amoro.shade.thrift.org.apache.thrift.TBaseHelper.compareTo(this.authToken, other.authToken);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = java.lang.Boolean.compare(isSetTaskResult(), other.isSetTaskResult());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetTaskResult()) {
        lastComparison = org.apache.amoro.shade.thrift.org.apache.thrift.TBaseHelper.compareTo(this.taskResult, other.taskResult);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    @org.apache.amoro.shade.thrift.org.apache.thrift.annotation.Nullable
    @Override
    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    @Override
    public void read(org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TProtocol iprot) throws org.apache.amoro.shade.thrift.org.apache.thrift.TException {
      scheme(iprot).read(iprot, this);
    }

    @Override
    public void write(org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TProtocol oprot) throws org.apache.amoro.shade.thrift.org.apache.thrift.TException {
      scheme(oprot).write(oprot, this);
    }

    @Override
    public java.lang.String toString() {
      java.lang.StringBuilder sb = new java.lang.StringBuilder("completeTask_args(");
      boolean first = true;

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

    public void validate() throws org.apache.amoro.shade.thrift.org.apache.thrift.TException {
      // check for required fields
      // check for sub-struct validity
      if (taskResult != null) {
        taskResult.validate();
      }
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TCompactProtocol(new org.apache.amoro.shade.thrift.org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.amoro.shade.thrift.org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
      try {
        read(new org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TCompactProtocol(new org.apache.amoro.shade.thrift.org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.amoro.shade.thrift.org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private static class completeTask_argsStandardSchemeFactory implements org.apache.amoro.shade.thrift.org.apache.thrift.scheme.SchemeFactory {
      @Override
      public completeTask_argsStandardScheme getScheme() {
        return new completeTask_argsStandardScheme();
      }
    }

    private static class completeTask_argsStandardScheme extends org.apache.amoro.shade.thrift.org.apache.thrift.scheme.StandardScheme<completeTask_args> {

      @Override
      public void read(org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TProtocol iprot, completeTask_args struct) throws org.apache.amoro.shade.thrift.org.apache.thrift.TException {
        org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TField schemeField;
        iprot.readStructBegin();
        while (true)
        {
          schemeField = iprot.readFieldBegin();
          if (schemeField.type == org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TType.STOP) { 
            break;
          }
          switch (schemeField.id) {
            case 1: // AUTH_TOKEN
              if (schemeField.type == org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TType.STRING) {
                struct.authToken = iprot.readString();
                struct.setAuthTokenIsSet(true);
              } else { 
                org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // TASK_RESULT
              if (schemeField.type == org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TType.STRUCT) {
                struct.taskResult = new OptimizingTaskResult();
                struct.taskResult.read(iprot);
                struct.setTaskResultIsSet(true);
              } else { 
                org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            default:
              org.apache.amoro.shade.thrift.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();
      }

      @Override
      public void write(org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TProtocol oprot, completeTask_args struct) throws org.apache.amoro.shade.thrift.org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.authToken != null) {
          oprot.writeFieldBegin(AUTH_TOKEN_FIELD_DESC);
          oprot.writeString(struct.authToken);
          oprot.writeFieldEnd();
        }
        if (struct.taskResult != null) {
          oprot.writeFieldBegin(TASK_RESULT_FIELD_DESC);
          struct.taskResult.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class completeTask_argsTupleSchemeFactory implements org.apache.amoro.shade.thrift.org.apache.thrift.scheme.SchemeFactory {
      @Override
      public completeTask_argsTupleScheme getScheme() {
        return new completeTask_argsTupleScheme();
      }
    }

    private static class completeTask_argsTupleScheme extends org.apache.amoro.shade.thrift.org.apache.thrift.scheme.TupleScheme<completeTask_args> {

      @Override
      public void write(org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TProtocol prot, completeTask_args struct) throws org.apache.amoro.shade.thrift.org.apache.thrift.TException {
        org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet optionals = new java.util.BitSet();
        if (struct.isSetAuthToken()) {
          optionals.set(0);
        }
        if (struct.isSetTaskResult()) {
          optionals.set(1);
        }
        oprot.writeBitSet(optionals, 2);
        if (struct.isSetAuthToken()) {
          oprot.writeString(struct.authToken);
        }
        if (struct.isSetTaskResult()) {
          struct.taskResult.write(oprot);
        }
      }

      @Override
      public void read(org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TProtocol prot, completeTask_args struct) throws org.apache.amoro.shade.thrift.org.apache.thrift.TException {
        org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet incoming = iprot.readBitSet(2);
        if (incoming.get(0)) {
          struct.authToken = iprot.readString();
          struct.setAuthTokenIsSet(true);
        }
        if (incoming.get(1)) {
          struct.taskResult = new OptimizingTaskResult();
          struct.taskResult.read(iprot);
          struct.setTaskResultIsSet(true);
        }
      }
    }

    private static <S extends org.apache.amoro.shade.thrift.org.apache.thrift.scheme.IScheme> S scheme(org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TProtocol proto) {
      return (org.apache.amoro.shade.thrift.org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
    }
  }

  @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
  public static class completeTask_result implements org.apache.amoro.shade.thrift.org.apache.thrift.TBase<completeTask_result, completeTask_result._Fields>, java.io.Serializable, Cloneable, Comparable<completeTask_result>   {
    private static final org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TStruct("completeTask_result");

    private static final org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TField E1_FIELD_DESC = new org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TField("e1", org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TType.STRUCT, (short)1);

    private static final org.apache.amoro.shade.thrift.org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new completeTask_resultStandardSchemeFactory();
    private static final org.apache.amoro.shade.thrift.org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new completeTask_resultTupleSchemeFactory();

    public @org.apache.amoro.shade.thrift.org.apache.thrift.annotation.Nullable org.apache.amoro.api.AmoroException e1; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.amoro.shade.thrift.org.apache.thrift.TFieldIdEnum {
      E1((short)1, "e1");

      private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();

      static {
        for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      @org.apache.amoro.shade.thrift.org.apache.thrift.annotation.Nullable
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // E1
            return E1;
          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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      @org.apache.amoro.shade.thrift.org.apache.thrift.annotation.Nullable
      public static _Fields findByName(java.lang.String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final java.lang.String _fieldName;

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

      @Override
      public short getThriftFieldId() {
        return _thriftId;
      }

      @Override
      public java.lang.String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final java.util.Map<_Fields, org.apache.amoro.shade.thrift.org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      java.util.Map<_Fields, org.apache.amoro.shade.thrift.org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.amoro.shade.thrift.org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.E1, new org.apache.amoro.shade.thrift.org.apache.thrift.meta_data.FieldMetaData("e1", org.apache.amoro.shade.thrift.org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.amoro.shade.thrift.org.apache.thrift.meta_data.StructMetaData(org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TType.STRUCT, org.apache.amoro.api.AmoroException.class)));
      metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
      org.apache.amoro.shade.thrift.org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(completeTask_result.class, metaDataMap);
    }

    public completeTask_result() {
    }

    public completeTask_result(
      org.apache.amoro.api.AmoroException e1)
    {
      this();
      this.e1 = e1;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public completeTask_result(completeTask_result other) {
      if (other.isSetE1()) {
        this.e1 = new org.apache.amoro.api.AmoroException(other.e1);
      }
    }

    @Override
    public completeTask_result deepCopy() {
      return new completeTask_result(this);
    }

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

    @org.apache.amoro.shade.thrift.org.apache.thrift.annotation.Nullable
    public org.apache.amoro.api.AmoroException getE1() {
      return this.e1;
    }

    public completeTask_result setE1(@org.apache.amoro.shade.thrift.org.apache.thrift.annotation.Nullable org.apache.amoro.api.AmoroException e1) {
      this.e1 = e1;
      return this;
    }

    public void unsetE1() {
      this.e1 = null;
    }

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

    public void setE1IsSet(boolean value) {
      if (!value) {
        this.e1 = null;
      }
    }

    @Override
    public void setFieldValue(_Fields field, @org.apache.amoro.shade.thrift.org.apache.thrift.annotation.Nullable java.lang.Object value) {
      switch (field) {
      case E1:
        if (value == null) {
          unsetE1();
        } else {
          setE1((org.apache.amoro.api.AmoroException)value);
        }
        break;

      }
    }

    @org.apache.amoro.shade.thrift.org.apache.thrift.annotation.Nullable
    @Override
    public java.lang.Object getFieldValue(_Fields field) {
      switch (field) {
      case E1:
        return getE1();

      }
      throw new java.lang.IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    @Override
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new java.lang.IllegalArgumentException();
      }

      switch (field) {
      case E1:
        return isSetE1();
      }
      throw new java.lang.IllegalStateException();
    }

    @Override
    public boolean equals(java.lang.Object that) {
      if (that instanceof completeTask_result)
        return this.equals((completeTask_result)that);
      return false;
    }

    public boolean equals(completeTask_result that) {
      if (that == null)
        return false;
      if (this == that)
        return true;

      boolean this_present_e1 = true && this.isSetE1();
      boolean that_present_e1 = true && that.isSetE1();
      if (this_present_e1 || that_present_e1) {
        if (!(this_present_e1 && that_present_e1))
          return false;
        if (!this.e1.equals(that.e1))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      int hashCode = 1;

      hashCode = hashCode * 8191 + ((isSetE1()) ? 131071 : 524287);
      if (isSetE1())
        hashCode = hashCode * 8191 + e1.hashCode();

      return hashCode;
    }

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

      int lastComparison = 0;

      lastComparison = java.lang.Boolean.compare(isSetE1(), other.isSetE1());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetE1()) {
        lastComparison = org.apache.amoro.shade.thrift.org.apache.thrift.TBaseHelper.compareTo(this.e1, other.e1);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    @org.apache.amoro.shade.thrift.org.apache.thrift.annotation.Nullable
    @Override
    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    @Override
    public void read(org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TProtocol iprot) throws org.apache.amoro.shade.thrift.org.apache.thrift.TException {
      scheme(iprot).read(iprot, this);
    }

    public void write(org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TProtocol oprot) throws org.apache.amoro.shade.thrift.org.apache.thrift.TException {
      scheme(oprot).write(oprot, this);
      }

    @Override
    public java.lang.String toString() {
      java.lang.StringBuilder sb = new java.lang.StringBuilder("completeTask_result(");
      boolean first = true;

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

    public void validate() throws org.apache.amoro.shade.thrift.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.amoro.shade.thrift.org.apache.thrift.protocol.TCompactProtocol(new org.apache.amoro.shade.thrift.org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.amoro.shade.thrift.org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
      try {
        read(new org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TCompactProtocol(new org.apache.amoro.shade.thrift.org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.amoro.shade.thrift.org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private static class completeTask_resultStandardSchemeFactory implements org.apache.amoro.shade.thrift.org.apache.thrift.scheme.SchemeFactory {
      @Override
      public completeTask_resultStandardScheme getScheme() {
        return new completeTask_resultStandardScheme();
      }
    }

    private static class completeTask_resultStandardScheme extends org.apache.amoro.shade.thrift.org.apache.thrift.scheme.StandardScheme<completeTask_result> {

      @Override
      public void read(org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TProtocol iprot, completeTask_result struct) throws org.apache.amoro.shade.thrift.org.apache.thrift.TException {
        org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TField schemeField;
        iprot.readStructBegin();
        while (true)
        {
          schemeField = iprot.readFieldBegin();
          if (schemeField.type == org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TType.STOP) { 
            break;
          }
          switch (schemeField.id) {
            case 1: // E1
              if (schemeField.type == org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TType.STRUCT) {
                struct.e1 = new org.apache.amoro.api.AmoroException();
                struct.e1.read(iprot);
                struct.setE1IsSet(true);
              } else { 
                org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            default:
              org.apache.amoro.shade.thrift.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();
      }

      @Override
      public void write(org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TProtocol oprot, completeTask_result struct) throws org.apache.amoro.shade.thrift.org.apache.thrift.TException {
        struct.validate();

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

    }

    private static class completeTask_resultTupleSchemeFactory implements org.apache.amoro.shade.thrift.org.apache.thrift.scheme.SchemeFactory {
      @Override
      public completeTask_resultTupleScheme getScheme() {
        return new completeTask_resultTupleScheme();
      }
    }

    private static class completeTask_resultTupleScheme extends org.apache.amoro.shade.thrift.org.apache.thrift.scheme.TupleScheme<completeTask_result> {

      @Override
      public void write(org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TProtocol prot, completeTask_result struct) throws org.apache.amoro.shade.thrift.org.apache.thrift.TException {
        org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet optionals = new java.util.BitSet();
        if (struct.isSetE1()) {
          optionals.set(0);
        }
        oprot.writeBitSet(optionals, 1);
        if (struct.isSetE1()) {
          struct.e1.write(oprot);
        }
      }

      @Override
      public void read(org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TProtocol prot, completeTask_result struct) throws org.apache.amoro.shade.thrift.org.apache.thrift.TException {
        org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet incoming = iprot.readBitSet(1);
        if (incoming.get(0)) {
          struct.e1 = new org.apache.amoro.api.AmoroException();
          struct.e1.read(iprot);
          struct.setE1IsSet(true);
        }
      }
    }

    private static <S extends org.apache.amoro.shade.thrift.org.apache.thrift.scheme.IScheme> S scheme(org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TProtocol proto) {
      return (org.apache.amoro.shade.thrift.org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
    }
  }

  @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
  public static class authenticate_args implements org.apache.amoro.shade.thrift.org.apache.thrift.TBase<authenticate_args, authenticate_args._Fields>, java.io.Serializable, Cloneable, Comparable<authenticate_args>   {
    private static final org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TStruct("authenticate_args");

    private static final org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TField REGISTER_INFO_FIELD_DESC = new org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TField("registerInfo", org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TType.STRUCT, (short)1);

    private static final org.apache.amoro.shade.thrift.org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new authenticate_argsStandardSchemeFactory();
    private static final org.apache.amoro.shade.thrift.org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new authenticate_argsTupleSchemeFactory();

    public @org.apache.amoro.shade.thrift.org.apache.thrift.annotation.Nullable OptimizerRegisterInfo registerInfo; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.amoro.shade.thrift.org.apache.thrift.TFieldIdEnum {
      REGISTER_INFO((short)1, "registerInfo");

      private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();

      static {
        for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      @org.apache.amoro.shade.thrift.org.apache.thrift.annotation.Nullable
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // REGISTER_INFO
            return REGISTER_INFO;
          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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      @org.apache.amoro.shade.thrift.org.apache.thrift.annotation.Nullable
      public static _Fields findByName(java.lang.String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final java.lang.String _fieldName;

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

      @Override
      public short getThriftFieldId() {
        return _thriftId;
      }

      @Override
      public java.lang.String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final java.util.Map<_Fields, org.apache.amoro.shade.thrift.org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      java.util.Map<_Fields, org.apache.amoro.shade.thrift.org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.amoro.shade.thrift.org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.REGISTER_INFO, new org.apache.amoro.shade.thrift.org.apache.thrift.meta_data.FieldMetaData("registerInfo", org.apache.amoro.shade.thrift.org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.amoro.shade.thrift.org.apache.thrift.meta_data.StructMetaData(org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TType.STRUCT, OptimizerRegisterInfo.class)));
      metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
      org.apache.amoro.shade.thrift.org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(authenticate_args.class, metaDataMap);
    }

    public authenticate_args() {
    }

    public authenticate_args(
      OptimizerRegisterInfo registerInfo)
    {
      this();
      this.registerInfo = registerInfo;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public authenticate_args(authenticate_args other) {
      if (other.isSetRegisterInfo()) {
        this.registerInfo = new OptimizerRegisterInfo(other.registerInfo);
      }
    }

    @Override
    public authenticate_args deepCopy() {
      return new authenticate_args(this);
    }

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

    @org.apache.amoro.shade.thrift.org.apache.thrift.annotation.Nullable
    public OptimizerRegisterInfo getRegisterInfo() {
      return this.registerInfo;
    }

    public authenticate_args setRegisterInfo(@org.apache.amoro.shade.thrift.org.apache.thrift.annotation.Nullable OptimizerRegisterInfo registerInfo) {
      this.registerInfo = registerInfo;
      return this;
    }

    public void unsetRegisterInfo() {
      this.registerInfo = null;
    }

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

    public void setRegisterInfoIsSet(boolean value) {
      if (!value) {
        this.registerInfo = null;
      }
    }

    @Override
    public void setFieldValue(_Fields field, @org.apache.amoro.shade.thrift.org.apache.thrift.annotation.Nullable java.lang.Object value) {
      switch (field) {
      case REGISTER_INFO:
        if (value == null) {
          unsetRegisterInfo();
        } else {
          setRegisterInfo((OptimizerRegisterInfo)value);
        }
        break;

      }
    }

    @org.apache.amoro.shade.thrift.org.apache.thrift.annotation.Nullable
    @Override
    public java.lang.Object getFieldValue(_Fields field) {
      switch (field) {
      case REGISTER_INFO:
        return getRegisterInfo();

      }
      throw new java.lang.IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    @Override
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new java.lang.IllegalArgumentException();
      }

      switch (field) {
      case REGISTER_INFO:
        return isSetRegisterInfo();
      }
      throw new java.lang.IllegalStateException();
    }

    @Override
    public boolean equals(java.lang.Object that) {
      if (that instanceof authenticate_args)
        return this.equals((authenticate_args)that);
      return false;
    }

    public boolean equals(authenticate_args that) {
      if (that == null)
        return false;
      if (this == that)
        return true;

      boolean this_present_registerInfo = true && this.isSetRegisterInfo();
      boolean that_present_registerInfo = true && that.isSetRegisterInfo();
      if (this_present_registerInfo || that_present_registerInfo) {
        if (!(this_present_registerInfo && that_present_registerInfo))
          return false;
        if (!this.registerInfo.equals(that.registerInfo))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      int hashCode = 1;

      hashCode = hashCode * 8191 + ((isSetRegisterInfo()) ? 131071 : 524287);
      if (isSetRegisterInfo())
        hashCode = hashCode * 8191 + registerInfo.hashCode();

      return hashCode;
    }

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

      int lastComparison = 0;

      lastComparison = java.lang.Boolean.compare(isSetRegisterInfo(), other.isSetRegisterInfo());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetRegisterInfo()) {
        lastComparison = org.apache.amoro.shade.thrift.org.apache.thrift.TBaseHelper.compareTo(this.registerInfo, other.registerInfo);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    @org.apache.amoro.shade.thrift.org.apache.thrift.annotation.Nullable
    @Override
    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    @Override
    public void read(org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TProtocol iprot) throws org.apache.amoro.shade.thrift.org.apache.thrift.TException {
      scheme(iprot).read(iprot, this);
    }

    @Override
    public void write(org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TProtocol oprot) throws org.apache.amoro.shade.thrift.org.apache.thrift.TException {
      scheme(oprot).write(oprot, this);
    }

    @Override
    public java.lang.String toString() {
      java.lang.StringBuilder sb = new java.lang.StringBuilder("authenticate_args(");
      boolean first = true;

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

    public void validate() throws org.apache.amoro.shade.thrift.org.apache.thrift.TException {
      // check for required fields
      // check for sub-struct validity
      if (registerInfo != null) {
        registerInfo.validate();
      }
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TCompactProtocol(new org.apache.amoro.shade.thrift.org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.amoro.shade.thrift.org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
      try {
        read(new org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TCompactProtocol(new org.apache.amoro.shade.thrift.org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.amoro.shade.thrift.org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private static class authenticate_argsStandardSchemeFactory implements org.apache.amoro.shade.thrift.org.apache.thrift.scheme.SchemeFactory {
      @Override
      public authenticate_argsStandardScheme getScheme() {
        return new authenticate_argsStandardScheme();
      }
    }

    private static class authenticate_argsStandardScheme extends org.apache.amoro.shade.thrift.org.apache.thrift.scheme.StandardScheme<authenticate_args> {

      @Override
      public void read(org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TProtocol iprot, authenticate_args struct) throws org.apache.amoro.shade.thrift.org.apache.thrift.TException {
        org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TField schemeField;
        iprot.readStructBegin();
        while (true)
        {
          schemeField = iprot.readFieldBegin();
          if (schemeField.type == org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TType.STOP) { 
            break;
          }
          switch (schemeField.id) {
            case 1: // REGISTER_INFO
              if (schemeField.type == org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TType.STRUCT) {
                struct.registerInfo = new OptimizerRegisterInfo();
                struct.registerInfo.read(iprot);
                struct.setRegisterInfoIsSet(true);
              } else { 
                org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            default:
              org.apache.amoro.shade.thrift.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();
      }

      @Override
      public void write(org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TProtocol oprot, authenticate_args struct) throws org.apache.amoro.shade.thrift.org.apache.thrift.TException {
        struct.validate();

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

    }

    private static class authenticate_argsTupleSchemeFactory implements org.apache.amoro.shade.thrift.org.apache.thrift.scheme.SchemeFactory {
      @Override
      public authenticate_argsTupleScheme getScheme() {
        return new authenticate_argsTupleScheme();
      }
    }

    private static class authenticate_argsTupleScheme extends org.apache.amoro.shade.thrift.org.apache.thrift.scheme.TupleScheme<authenticate_args> {

      @Override
      public void write(org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TProtocol prot, authenticate_args struct) throws org.apache.amoro.shade.thrift.org.apache.thrift.TException {
        org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet optionals = new java.util.BitSet();
        if (struct.isSetRegisterInfo()) {
          optionals.set(0);
        }
        oprot.writeBitSet(optionals, 1);
        if (struct.isSetRegisterInfo()) {
          struct.registerInfo.write(oprot);
        }
      }

      @Override
      public void read(org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TProtocol prot, authenticate_args struct) throws org.apache.amoro.shade.thrift.org.apache.thrift.TException {
        org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet incoming = iprot.readBitSet(1);
        if (incoming.get(0)) {
          struct.registerInfo = new OptimizerRegisterInfo();
          struct.registerInfo.read(iprot);
          struct.setRegisterInfoIsSet(true);
        }
      }
    }

    private static <S extends org.apache.amoro.shade.thrift.org.apache.thrift.scheme.IScheme> S scheme(org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TProtocol proto) {
      return (org.apache.amoro.shade.thrift.org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
    }
  }

  @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
  public static class authenticate_result implements org.apache.amoro.shade.thrift.org.apache.thrift.TBase<authenticate_result, authenticate_result._Fields>, java.io.Serializable, Cloneable, Comparable<authenticate_result>   {
    private static final org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TStruct("authenticate_result");

    private static final org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TField("success", org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TType.STRING, (short)0);
    private static final org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TField E1_FIELD_DESC = new org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TField("e1", org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TType.STRUCT, (short)1);

    private static final org.apache.amoro.shade.thrift.org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new authenticate_resultStandardSchemeFactory();
    private static final org.apache.amoro.shade.thrift.org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new authenticate_resultTupleSchemeFactory();

    public @org.apache.amoro.shade.thrift.org.apache.thrift.annotation.Nullable java.lang.String success; // required
    public @org.apache.amoro.shade.thrift.org.apache.thrift.annotation.Nullable org.apache.amoro.api.AmoroException e1; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.amoro.shade.thrift.org.apache.thrift.TFieldIdEnum {
      SUCCESS((short)0, "success"),
      E1((short)1, "e1");

      private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();

      static {
        for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      @org.apache.amoro.shade.thrift.org.apache.thrift.annotation.Nullable
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          case 1: // E1
            return E1;
          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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      @org.apache.amoro.shade.thrift.org.apache.thrift.annotation.Nullable
      public static _Fields findByName(java.lang.String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final java.lang.String _fieldName;

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

      @Override
      public short getThriftFieldId() {
        return _thriftId;
      }

      @Override
      public java.lang.String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final java.util.Map<_Fields, org.apache.amoro.shade.thrift.org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      java.util.Map<_Fields, org.apache.amoro.shade.thrift.org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.amoro.shade.thrift.org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SUCCESS, new org.apache.amoro.shade.thrift.org.apache.thrift.meta_data.FieldMetaData("success", org.apache.amoro.shade.thrift.org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.amoro.shade.thrift.org.apache.thrift.meta_data.FieldValueMetaData(org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TType.STRING)));
      tmpMap.put(_Fields.E1, new org.apache.amoro.shade.thrift.org.apache.thrift.meta_data.FieldMetaData("e1", org.apache.amoro.shade.thrift.org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.amoro.shade.thrift.org.apache.thrift.meta_data.StructMetaData(org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TType.STRUCT, org.apache.amoro.api.AmoroException.class)));
      metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
      org.apache.amoro.shade.thrift.org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(authenticate_result.class, metaDataMap);
    }

    public authenticate_result() {
    }

    public authenticate_result(
      java.lang.String success,
      org.apache.amoro.api.AmoroException e1)
    {
      this();
      this.success = success;
      this.e1 = e1;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public authenticate_result(authenticate_result other) {
      if (other.isSetSuccess()) {
        this.success = other.success;
      }
      if (other.isSetE1()) {
        this.e1 = new org.apache.amoro.api.AmoroException(other.e1);
      }
    }

    @Override
    public authenticate_result deepCopy() {
      return new authenticate_result(this);
    }

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

    @org.apache.amoro.shade.thrift.org.apache.thrift.annotation.Nullable
    public java.lang.String getSuccess() {
      return this.success;
    }

    public authenticate_result setSuccess(@org.apache.amoro.shade.thrift.org.apache.thrift.annotation.Nullable java.lang.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;
      }
    }

    @org.apache.amoro.shade.thrift.org.apache.thrift.annotation.Nullable
    public org.apache.amoro.api.AmoroException getE1() {
      return this.e1;
    }

    public authenticate_result setE1(@org.apache.amoro.shade.thrift.org.apache.thrift.annotation.Nullable org.apache.amoro.api.AmoroException e1) {
      this.e1 = e1;
      return this;
    }

    public void unsetE1() {
      this.e1 = null;
    }

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

    public void setE1IsSet(boolean value) {
      if (!value) {
        this.e1 = null;
      }
    }

    @Override
    public void setFieldValue(_Fields field, @org.apache.amoro.shade.thrift.org.apache.thrift.annotation.Nullable java.lang.Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((java.lang.String)value);
        }
        break;

      case E1:
        if (value == null) {
          unsetE1();
        } else {
          setE1((org.apache.amoro.api.AmoroException)value);
        }
        break;

      }
    }

    @org.apache.amoro.shade.thrift.org.apache.thrift.annotation.Nullable
    @Override
    public java.lang.Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      case E1:
        return getE1();

      }
      throw new java.lang.IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    @Override
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new java.lang.IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      case E1:
        return isSetE1();
      }
      throw new java.lang.IllegalStateException();
    }

    @Override
    public boolean equals(java.lang.Object that) {
      if (that instanceof authenticate_result)
        return this.equals((authenticate_result)that);
      return false;
    }

    public boolean equals(authenticate_result that) {
      if (that == null)
        return false;
      if (this == that)
        return true;

      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_e1 = true && this.isSetE1();
      boolean that_present_e1 = true && that.isSetE1();
      if (this_present_e1 || that_present_e1) {
        if (!(this_present_e1 && that_present_e1))
          return false;
        if (!this.e1.equals(that.e1))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      int hashCode = 1;

      hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287);
      if (isSetSuccess())
        hashCode = hashCode * 8191 + success.hashCode();

      hashCode = hashCode * 8191 + ((isSetE1()) ? 131071 : 524287);
      if (isSetE1())
        hashCode = hashCode * 8191 + e1.hashCode();

      return hashCode;
    }

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

      int lastComparison = 0;

      lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.amoro.shade.thrift.org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = java.lang.Boolean.compare(isSetE1(), other.isSetE1());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetE1()) {
        lastComparison = org.apache.amoro.shade.thrift.org.apache.thrift.TBaseHelper.compareTo(this.e1, other.e1);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    @org.apache.amoro.shade.thrift.org.apache.thrift.annotation.Nullable
    @Override
    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    @Override
    public void read(org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TProtocol iprot) throws org.apache.amoro.shade.thrift.org.apache.thrift.TException {
      scheme(iprot).read(iprot, this);
    }

    public void write(org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TProtocol oprot) throws org.apache.amoro.shade.thrift.org.apache.thrift.TException {
      scheme(oprot).write(oprot, this);
      }

    @Override
    public java.lang.String toString() {
      java.lang.StringBuilder sb = new java.lang.StringBuilder("authenticate_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("e1:");
      if (this.e1 == null) {
        sb.append("null");
      } else {
        sb.append(this.e1);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.amoro.shade.thrift.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.amoro.shade.thrift.org.apache.thrift.protocol.TCompactProtocol(new org.apache.amoro.shade.thrift.org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.amoro.shade.thrift.org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
      try {
        read(new org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TCompactProtocol(new org.apache.amoro.shade.thrift.org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.amoro.shade.thrift.org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private static class authenticate_resultStandardSchemeFactory implements org.apache.amoro.shade.thrift.org.apache.thrift.scheme.SchemeFactory {
      @Override
      public authenticate_resultStandardScheme getScheme() {
        return new authenticate_resultStandardScheme();
      }
    }

    private static class authenticate_resultStandardScheme extends org.apache.amoro.shade.thrift.org.apache.thrift.scheme.StandardScheme<authenticate_result> {

      @Override
      public void read(org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TProtocol iprot, authenticate_result struct) throws org.apache.amoro.shade.thrift.org.apache.thrift.TException {
        org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TField schemeField;
        iprot.readStructBegin();
        while (true)
        {
          schemeField = iprot.readFieldBegin();
          if (schemeField.type == org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TType.STOP) { 
            break;
          }
          switch (schemeField.id) {
            case 0: // SUCCESS
              if (schemeField.type == org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TType.STRING) {
                struct.success = iprot.readString();
                struct.setSuccessIsSet(true);
              } else { 
                org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 1: // E1
              if (schemeField.type == org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TType.STRUCT) {
                struct.e1 = new org.apache.amoro.api.AmoroException();
                struct.e1.read(iprot);
                struct.setE1IsSet(true);
              } else { 
                org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            default:
              org.apache.amoro.shade.thrift.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();
      }

      @Override
      public void write(org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TProtocol oprot, authenticate_result struct) throws org.apache.amoro.shade.thrift.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.e1 != null) {
          oprot.writeFieldBegin(E1_FIELD_DESC);
          struct.e1.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class authenticate_resultTupleSchemeFactory implements org.apache.amoro.shade.thrift.org.apache.thrift.scheme.SchemeFactory {
      @Override
      public authenticate_resultTupleScheme getScheme() {
        return new authenticate_resultTupleScheme();
      }
    }

    private static class authenticate_resultTupleScheme extends org.apache.amoro.shade.thrift.org.apache.thrift.scheme.TupleScheme<authenticate_result> {

      @Override
      public void write(org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TProtocol prot, authenticate_result struct) throws org.apache.amoro.shade.thrift.org.apache.thrift.TException {
        org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet optionals = new java.util.BitSet();
        if (struct.isSetSuccess()) {
          optionals.set(0);
        }
        if (struct.isSetE1()) {
          optionals.set(1);
        }
        oprot.writeBitSet(optionals, 2);
        if (struct.isSetSuccess()) {
          oprot.writeString(struct.success);
        }
        if (struct.isSetE1()) {
          struct.e1.write(oprot);
        }
      }

      @Override
      public void read(org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TProtocol prot, authenticate_result struct) throws org.apache.amoro.shade.thrift.org.apache.thrift.TException {
        org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet incoming = iprot.readBitSet(2);
        if (incoming.get(0)) {
          struct.success = iprot.readString();
          struct.setSuccessIsSet(true);
        }
        if (incoming.get(1)) {
          struct.e1 = new org.apache.amoro.api.AmoroException();
          struct.e1.read(iprot);
          struct.setE1IsSet(true);
        }
      }
    }

    private static <S extends org.apache.amoro.shade.thrift.org.apache.thrift.scheme.IScheme> S scheme(org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TProtocol proto) {
      return (org.apache.amoro.shade.thrift.org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
    }
  }

  @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
  public static class cancelProcess_args implements org.apache.amoro.shade.thrift.org.apache.thrift.TBase<cancelProcess_args, cancelProcess_args._Fields>, java.io.Serializable, Cloneable, Comparable<cancelProcess_args>   {
    private static final org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TStruct("cancelProcess_args");

    private static final org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TField PROCESS_ID_FIELD_DESC = new org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TField("processId", org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TType.I64, (short)1);

    private static final org.apache.amoro.shade.thrift.org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new cancelProcess_argsStandardSchemeFactory();
    private static final org.apache.amoro.shade.thrift.org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new cancelProcess_argsTupleSchemeFactory();

    public long processId; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.amoro.shade.thrift.org.apache.thrift.TFieldIdEnum {
      PROCESS_ID((short)1, "processId");

      private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();

      static {
        for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      @org.apache.amoro.shade.thrift.org.apache.thrift.annotation.Nullable
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // PROCESS_ID
            return PROCESS_ID;
          default:
            return null;
        }
      }

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

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      @org.apache.amoro.shade.thrift.org.apache.thrift.annotation.Nullable
      public static _Fields findByName(java.lang.String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final java.lang.String _fieldName;

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

      @Override
      public short getThriftFieldId() {
        return _thriftId;
      }

      @Override
      public java.lang.String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    private static final int __PROCESSID_ISSET_ID = 0;
    private byte __isset_bitfield = 0;
    public static final java.util.Map<_Fields, org.apache.amoro.shade.thrift.org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      java.util.Map<_Fields, org.apache.amoro.shade.thrift.org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.amoro.shade.thrift.org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.PROCESS_ID, new org.apache.amoro.shade.thrift.org.apache.thrift.meta_data.FieldMetaData("processId", org.apache.amoro.shade.thrift.org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.amoro.shade.thrift.org.apache.thrift.meta_data.FieldValueMetaData(org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TType.I64)));
      metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
      org.apache.amoro.shade.thrift.org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(cancelProcess_args.class, metaDataMap);
    }

    public cancelProcess_args() {
    }

    public cancelProcess_args(
      long processId)
    {
      this();
      this.processId = processId;
      setProcessIdIsSet(true);
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public cancelProcess_args(cancelProcess_args other) {
      __isset_bitfield = other.__isset_bitfield;
      this.processId = other.processId;
    }

    @Override
    public cancelProcess_args deepCopy() {
      return new cancelProcess_args(this);
    }

    @Override
    public void clear() {
      setProcessIdIsSet(false);
      this.processId = 0;
    }

    public long getProcessId() {
      return this.processId;
    }

    public cancelProcess_args setProcessId(long processId) {
      this.processId = processId;
      setProcessIdIsSet(true);
      return this;
    }

    public void unsetProcessId() {
      __isset_bitfield = org.apache.amoro.shade.thrift.org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __PROCESSID_ISSET_ID);
    }

    /** Returns true if field processId is set (has been assigned a value) and false otherwise */
    public boolean isSetProcessId() {
      return org.apache.amoro.shade.thrift.org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __PROCESSID_ISSET_ID);
    }

    public void setProcessIdIsSet(boolean value) {
      __isset_bitfield = org.apache.amoro.shade.thrift.org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __PROCESSID_ISSET_ID, value);
    }

    @Override
    public void setFieldValue(_Fields field, @org.apache.amoro.shade.thrift.org.apache.thrift.annotation.Nullable java.lang.Object value) {
      switch (field) {
      case PROCESS_ID:
        if (value == null) {
          unsetProcessId();
        } else {
          setProcessId((java.lang.Long)value);
        }
        break;

      }
    }

    @org.apache.amoro.shade.thrift.org.apache.thrift.annotation.Nullable
    @Override
    public java.lang.Object getFieldValue(_Fields field) {
      switch (field) {
      case PROCESS_ID:
        return getProcessId();

      }
      throw new java.lang.IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    @Override
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new java.lang.IllegalArgumentException();
      }

      switch (field) {
      case PROCESS_ID:
        return isSetProcessId();
      }
      throw new java.lang.IllegalStateException();
    }

    @Override
    public boolean equals(java.lang.Object that) {
      if (that instanceof cancelProcess_args)
        return this.equals((cancelProcess_args)that);
      return false;
    }

    public boolean equals(cancelProcess_args that) {
      if (that == null)
        return false;
      if (this == that)
        return true;

      boolean this_present_processId = true;
      boolean that_present_processId = true;
      if (this_present_processId || that_present_processId) {
        if (!(this_present_processId && that_present_processId))
          return false;
        if (this.processId != that.processId)
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      int hashCode = 1;

      hashCode = hashCode * 8191 + org.apache.amoro.shade.thrift.org.apache.thrift.TBaseHelper.hashCode(processId);

      return hashCode;
    }

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

      int lastComparison = 0;

      lastComparison = java.lang.Boolean.compare(isSetProcessId(), other.isSetProcessId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetProcessId()) {
        lastComparison = org.apache.amoro.shade.thrift.org.apache.thrift.TBaseHelper.compareTo(this.processId, other.processId);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    @org.apache.amoro.shade.thrift.org.apache.thrift.annotation.Nullable
    @Override
    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    @Override
    public void read(org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TProtocol iprot) throws org.apache.amoro.shade.thrift.org.apache.thrift.TException {
      scheme(iprot).read(iprot, this);
    }

    @Override
    public void write(org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TProtocol oprot) throws org.apache.amoro.shade.thrift.org.apache.thrift.TException {
      scheme(oprot).write(oprot, this);
    }

    @Override
    public java.lang.String toString() {
      java.lang.StringBuilder sb = new java.lang.StringBuilder("cancelProcess_args(");
      boolean first = true;

      sb.append("processId:");
      sb.append(this.processId);
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.amoro.shade.thrift.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.amoro.shade.thrift.org.apache.thrift.protocol.TCompactProtocol(new org.apache.amoro.shade.thrift.org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.amoro.shade.thrift.org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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.amoro.shade.thrift.org.apache.thrift.protocol.TCompactProtocol(new org.apache.amoro.shade.thrift.org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.amoro.shade.thrift.org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private static class cancelProcess_argsStandardSchemeFactory implements org.apache.amoro.shade.thrift.org.apache.thrift.scheme.SchemeFactory {
      @Override
      public cancelProcess_argsStandardScheme getScheme() {
        return new cancelProcess_argsStandardScheme();
      }
    }

    private static class cancelProcess_argsStandardScheme extends org.apache.amoro.shade.thrift.org.apache.thrift.scheme.StandardScheme<cancelProcess_args> {

      @Override
      public void read(org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TProtocol iprot, cancelProcess_args struct) throws org.apache.amoro.shade.thrift.org.apache.thrift.TException {
        org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TField schemeField;
        iprot.readStructBegin();
        while (true)
        {
          schemeField = iprot.readFieldBegin();
          if (schemeField.type == org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TType.STOP) { 
            break;
          }
          switch (schemeField.id) {
            case 1: // PROCESS_ID
              if (schemeField.type == org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TType.I64) {
                struct.processId = iprot.readI64();
                struct.setProcessIdIsSet(true);
              } else { 
                org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            default:
              org.apache.amoro.shade.thrift.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();
      }

      @Override
      public void write(org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TProtocol oprot, cancelProcess_args struct) throws org.apache.amoro.shade.thrift.org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        oprot.writeFieldBegin(PROCESS_ID_FIELD_DESC);
        oprot.writeI64(struct.processId);
        oprot.writeFieldEnd();
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class cancelProcess_argsTupleSchemeFactory implements org.apache.amoro.shade.thrift.org.apache.thrift.scheme.SchemeFactory {
      @Override
      public cancelProcess_argsTupleScheme getScheme() {
        return new cancelProcess_argsTupleScheme();
      }
    }

    private static class cancelProcess_argsTupleScheme extends org.apache.amoro.shade.thrift.org.apache.thrift.scheme.TupleScheme<cancelProcess_args> {

      @Override
      public void write(org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TProtocol prot, cancelProcess_args struct) throws org.apache.amoro.shade.thrift.org.apache.thrift.TException {
        org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet optionals = new java.util.BitSet();
        if (struct.isSetProcessId()) {
          optionals.set(0);
        }
        oprot.writeBitSet(optionals, 1);
        if (struct.isSetProcessId()) {
          oprot.writeI64(struct.processId);
        }
      }

      @Override
      public void read(org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TProtocol prot, cancelProcess_args struct) throws org.apache.amoro.shade.thrift.org.apache.thrift.TException {
        org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet incoming = iprot.readBitSet(1);
        if (incoming.get(0)) {
          struct.processId = iprot.readI64();
          struct.setProcessIdIsSet(true);
        }
      }
    }

    private static <S extends org.apache.amoro.shade.thrift.org.apache.thrift.scheme.IScheme> S scheme(org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TProtocol proto) {
      return (org.apache.amoro.shade.thrift.org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
    }
  }

  @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
  public static class cancelProcess_result implements org.apache.amoro.shade.thrift.org.apache.thrift.TBase<cancelProcess_result, cancelProcess_result._Fields>, java.io.Serializable, Cloneable, Comparable<cancelProcess_result>   {
    private static final org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TStruct("cancelProcess_result");

    private static final org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TField("success", org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TType.BOOL, (short)0);

    private static final org.apache.amoro.shade.thrift.org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new cancelProcess_resultStandardSchemeFactory();
    private static final org.apache.amoro.shade.thrift.org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new cancelProcess_resultTupleSchemeFactory();

    public boolean success; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.amoro.shade.thrift.org.apache.thrift.TFieldIdEnum {
      SUCCESS((short)0, "success");

      private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();

      static {
        for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      @org.apache.amoro.shade.thrift.org.apache.thrift.annotation.Nullable
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      @org.apache.amoro.shade.thrift.org.apache.thrift.annotation.Nullable
      public static _Fields findByName(java.lang.String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final java.lang.String _fieldName;

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

      @Override
      public short getThriftFieldId() {
        return _thriftId;
      }

      @Override
      public java.lang.String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    private static final int __SUCCESS_ISSET_ID = 0;
    private byte __isset_bitfield = 0;
    public static final java.util.Map<_Fields, org.apache.amoro.shade.thrift.org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      java.util.Map<_Fields, org.apache.amoro.shade.thrift.org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.amoro.shade.thrift.org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SUCCESS, new org.apache.amoro.shade.thrift.org.apache.thrift.meta_data.FieldMetaData("success", org.apache.amoro.shade.thrift.org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.amoro.shade.thrift.org.apache.thrift.meta_data.FieldValueMetaData(org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TType.BOOL)));
      metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
      org.apache.amoro.shade.thrift.org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(cancelProcess_result.class, metaDataMap);
    }

    public cancelProcess_result() {
    }

    public cancelProcess_result(
      boolean success)
    {
      this();
      this.success = success;
      setSuccessIsSet(true);
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public cancelProcess_result(cancelProcess_result other) {
      __isset_bitfield = other.__isset_bitfield;
      this.success = other.success;
    }

    @Override
    public cancelProcess_result deepCopy() {
      return new cancelProcess_result(this);
    }

    @Override
    public void clear() {
      setSuccessIsSet(false);
      this.success = false;
    }

    public boolean isSuccess() {
      return this.success;
    }

    public cancelProcess_result setSuccess(boolean success) {
      this.success = success;
      setSuccessIsSet(true);
      return this;
    }

    public void unsetSuccess() {
      __isset_bitfield = org.apache.amoro.shade.thrift.org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID);
    }

    /** Returns true if field success is set (has been assigned a value) and false otherwise */
    public boolean isSetSuccess() {
      return org.apache.amoro.shade.thrift.org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID);
    }

    public void setSuccessIsSet(boolean value) {
      __isset_bitfield = org.apache.amoro.shade.thrift.org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value);
    }

    @Override
    public void setFieldValue(_Fields field, @org.apache.amoro.shade.thrift.org.apache.thrift.annotation.Nullable java.lang.Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((java.lang.Boolean)value);
        }
        break;

      }
    }

    @org.apache.amoro.shade.thrift.org.apache.thrift.annotation.Nullable
    @Override
    public java.lang.Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return isSuccess();

      }
      throw new java.lang.IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    @Override
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new java.lang.IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      }
      throw new java.lang.IllegalStateException();
    }

    @Override
    public boolean equals(java.lang.Object that) {
      if (that instanceof cancelProcess_result)
        return this.equals((cancelProcess_result)that);
      return false;
    }

    public boolean equals(cancelProcess_result that) {
      if (that == null)
        return false;
      if (this == that)
        return true;

      boolean this_present_success = true;
      boolean that_present_success = true;
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (this.success != that.success)
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      int hashCode = 1;

      hashCode = hashCode * 8191 + ((success) ? 131071 : 524287);

      return hashCode;
    }

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

      int lastComparison = 0;

      lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.amoro.shade.thrift.org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    @org.apache.amoro.shade.thrift.org.apache.thrift.annotation.Nullable
    @Override
    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    @Override
    public void read(org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TProtocol iprot) throws org.apache.amoro.shade.thrift.org.apache.thrift.TException {
      scheme(iprot).read(iprot, this);
    }

    public void write(org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TProtocol oprot) throws org.apache.amoro.shade.thrift.org.apache.thrift.TException {
      scheme(oprot).write(oprot, this);
      }

    @Override
    public java.lang.String toString() {
      java.lang.StringBuilder sb = new java.lang.StringBuilder("cancelProcess_result(");
      boolean first = true;

      sb.append("success:");
      sb.append(this.success);
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.amoro.shade.thrift.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.amoro.shade.thrift.org.apache.thrift.protocol.TCompactProtocol(new org.apache.amoro.shade.thrift.org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.amoro.shade.thrift.org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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.amoro.shade.thrift.org.apache.thrift.protocol.TCompactProtocol(new org.apache.amoro.shade.thrift.org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.amoro.shade.thrift.org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private static class cancelProcess_resultStandardSchemeFactory implements org.apache.amoro.shade.thrift.org.apache.thrift.scheme.SchemeFactory {
      @Override
      public cancelProcess_resultStandardScheme getScheme() {
        return new cancelProcess_resultStandardScheme();
      }
    }

    private static class cancelProcess_resultStandardScheme extends org.apache.amoro.shade.thrift.org.apache.thrift.scheme.StandardScheme<cancelProcess_result> {

      @Override
      public void read(org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TProtocol iprot, cancelProcess_result struct) throws org.apache.amoro.shade.thrift.org.apache.thrift.TException {
        org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TField schemeField;
        iprot.readStructBegin();
        while (true)
        {
          schemeField = iprot.readFieldBegin();
          if (schemeField.type == org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TType.STOP) { 
            break;
          }
          switch (schemeField.id) {
            case 0: // SUCCESS
              if (schemeField.type == org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TType.BOOL) {
                struct.success = iprot.readBool();
                struct.setSuccessIsSet(true);
              } else { 
                org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            default:
              org.apache.amoro.shade.thrift.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();
      }

      @Override
      public void write(org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TProtocol oprot, cancelProcess_result struct) throws org.apache.amoro.shade.thrift.org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.isSetSuccess()) {
          oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
          oprot.writeBool(struct.success);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class cancelProcess_resultTupleSchemeFactory implements org.apache.amoro.shade.thrift.org.apache.thrift.scheme.SchemeFactory {
      @Override
      public cancelProcess_resultTupleScheme getScheme() {
        return new cancelProcess_resultTupleScheme();
      }
    }

    private static class cancelProcess_resultTupleScheme extends org.apache.amoro.shade.thrift.org.apache.thrift.scheme.TupleScheme<cancelProcess_result> {

      @Override
      public void write(org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TProtocol prot, cancelProcess_result struct) throws org.apache.amoro.shade.thrift.org.apache.thrift.TException {
        org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet optionals = new java.util.BitSet();
        if (struct.isSetSuccess()) {
          optionals.set(0);
        }
        oprot.writeBitSet(optionals, 1);
        if (struct.isSetSuccess()) {
          oprot.writeBool(struct.success);
        }
      }

      @Override
      public void read(org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TProtocol prot, cancelProcess_result struct) throws org.apache.amoro.shade.thrift.org.apache.thrift.TException {
        org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet incoming = iprot.readBitSet(1);
        if (incoming.get(0)) {
          struct.success = iprot.readBool();
          struct.setSuccessIsSet(true);
        }
      }
    }

    private static <S extends org.apache.amoro.shade.thrift.org.apache.thrift.scheme.IScheme> S scheme(org.apache.amoro.shade.thrift.org.apache.thrift.protocol.TProtocol proto) {
      return (org.apache.amoro.shade.thrift.org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
    }
  }

}
