All Downloads are FREE. Search and download functionalities are using the official Maven repository.

tech.aroma.thrift.authentication.service.AuthenticationService Maven / Gradle / Ivy

Go to download

Part of the Aroma Project. This project contains the Service and Model Definitions. From this the Server and Client interfaces are generated for the Aroma Service.

There is a newer version: 2.2
Show newest version
/**
 * Autogenerated by Thrift Compiler (0.9.3)
 *
 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
 *  @generated
 */
package tech.aroma.thrift.authentication.service;

import org.apache.thrift.scheme.IScheme;
import org.apache.thrift.scheme.SchemeFactory;
import org.apache.thrift.scheme.StandardScheme;

import org.apache.thrift.scheme.TupleScheme;
import org.apache.thrift.protocol.TTupleProtocol;
import org.apache.thrift.protocol.TProtocolException;
import org.apache.thrift.EncodingUtils;
import org.apache.thrift.TException;
import org.apache.thrift.async.AsyncMethodCallback;
import org.apache.thrift.server.AbstractNonblockingServer.*;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.util.HashMap;
import java.util.EnumMap;
import java.util.Set;
import java.util.HashSet;
import java.util.EnumSet;
import java.util.Collections;
import java.util.BitSet;
import java.nio.ByteBuffer;
import java.util.Arrays;
import javax.annotation.Generated;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-05-10")
public class AuthenticationService {

  /**
   * The Authentication Service is responsible for creating and verifying the validity of Tokens.
   * This Includes Application Tokens as well as User Tokens.
   * 
   * NOTE: This Service is for internal use only. It is designed to be called only by
   * Aroma and it's supporting services.
   */
  public interface Iface {

    public double getApiVersion() throws org.apache.thrift.TException;

    /**
     * Create a Token, used to represent a User or an Application.
     * 
     * @param request
     */
    public CreateTokenResponse createToken(CreateTokenRequest request) throws tech.aroma.thrift.exceptions.OperationFailedException, tech.aroma.thrift.exceptions.InvalidArgumentException, org.apache.thrift.TException;

    /**
     * Get information about a Token.
     * 
     * @param request
     */
    public GetTokenInfoResponse getTokenInfo(GetTokenInfoRequest request) throws tech.aroma.thrift.exceptions.OperationFailedException, tech.aroma.thrift.exceptions.InvalidTokenException, tech.aroma.thrift.exceptions.InvalidArgumentException, org.apache.thrift.TException;

    /**
     * Invalidates a Token and removes it from knowledge. Any subsequent references to the Token will produce
     * an InvalidTokenException.
     * 
     * @param request
     */
    public InvalidateTokenResponse invalidateToken(InvalidateTokenRequest request) throws tech.aroma.thrift.exceptions.OperationFailedException, tech.aroma.thrift.exceptions.InvalidTokenException, tech.aroma.thrift.exceptions.InvalidArgumentException, org.apache.thrift.TException;

    /**
     * Verify that a Token is valid, and optionally, that it belongs to the specified pwner.
     * 
     * @param request
     */
    public VerifyTokenResponse verifyToken(VerifyTokenRequest request) throws tech.aroma.thrift.exceptions.OperationFailedException, tech.aroma.thrift.exceptions.InvalidTokenException, tech.aroma.thrift.exceptions.InvalidArgumentException, org.apache.thrift.TException;

  }

  public interface AsyncIface {

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

    public void createToken(CreateTokenRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void getTokenInfo(GetTokenInfoRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void invalidateToken(InvalidateTokenRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

    public void verifyToken(VerifyTokenRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;

  }

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

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

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

    public double getApiVersion() throws org.apache.thrift.TException
    {
      send_getApiVersion();
      return recv_getApiVersion();
    }

    public void send_getApiVersion() throws org.apache.thrift.TException
    {
      getApiVersion_args args = new getApiVersion_args();
      sendBase("getApiVersion", args);
    }

    public double recv_getApiVersion() throws org.apache.thrift.TException
    {
      getApiVersion_result result = new getApiVersion_result();
      receiveBase(result, "getApiVersion");
      if (result.isSetSuccess()) {
        return result.success;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getApiVersion failed: unknown result");
    }

    public CreateTokenResponse createToken(CreateTokenRequest request) throws tech.aroma.thrift.exceptions.OperationFailedException, tech.aroma.thrift.exceptions.InvalidArgumentException, org.apache.thrift.TException
    {
      send_createToken(request);
      return recv_createToken();
    }

    public void send_createToken(CreateTokenRequest request) throws org.apache.thrift.TException
    {
      createToken_args args = new createToken_args();
      args.setRequest(request);
      sendBase("createToken", args);
    }

    public CreateTokenResponse recv_createToken() throws tech.aroma.thrift.exceptions.OperationFailedException, tech.aroma.thrift.exceptions.InvalidArgumentException, org.apache.thrift.TException
    {
      createToken_result result = new createToken_result();
      receiveBase(result, "createToken");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.ex1 != null) {
        throw result.ex1;
      }
      if (result.ex2 != null) {
        throw result.ex2;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "createToken failed: unknown result");
    }

    public GetTokenInfoResponse getTokenInfo(GetTokenInfoRequest request) throws tech.aroma.thrift.exceptions.OperationFailedException, tech.aroma.thrift.exceptions.InvalidTokenException, tech.aroma.thrift.exceptions.InvalidArgumentException, org.apache.thrift.TException
    {
      send_getTokenInfo(request);
      return recv_getTokenInfo();
    }

    public void send_getTokenInfo(GetTokenInfoRequest request) throws org.apache.thrift.TException
    {
      getTokenInfo_args args = new getTokenInfo_args();
      args.setRequest(request);
      sendBase("getTokenInfo", args);
    }

    public GetTokenInfoResponse recv_getTokenInfo() throws tech.aroma.thrift.exceptions.OperationFailedException, tech.aroma.thrift.exceptions.InvalidTokenException, tech.aroma.thrift.exceptions.InvalidArgumentException, org.apache.thrift.TException
    {
      getTokenInfo_result result = new getTokenInfo_result();
      receiveBase(result, "getTokenInfo");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.ex1 != null) {
        throw result.ex1;
      }
      if (result.ex2 != null) {
        throw result.ex2;
      }
      if (result.ex3 != null) {
        throw result.ex3;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getTokenInfo failed: unknown result");
    }

    public InvalidateTokenResponse invalidateToken(InvalidateTokenRequest request) throws tech.aroma.thrift.exceptions.OperationFailedException, tech.aroma.thrift.exceptions.InvalidTokenException, tech.aroma.thrift.exceptions.InvalidArgumentException, org.apache.thrift.TException
    {
      send_invalidateToken(request);
      return recv_invalidateToken();
    }

    public void send_invalidateToken(InvalidateTokenRequest request) throws org.apache.thrift.TException
    {
      invalidateToken_args args = new invalidateToken_args();
      args.setRequest(request);
      sendBase("invalidateToken", args);
    }

    public InvalidateTokenResponse recv_invalidateToken() throws tech.aroma.thrift.exceptions.OperationFailedException, tech.aroma.thrift.exceptions.InvalidTokenException, tech.aroma.thrift.exceptions.InvalidArgumentException, org.apache.thrift.TException
    {
      invalidateToken_result result = new invalidateToken_result();
      receiveBase(result, "invalidateToken");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.ex1 != null) {
        throw result.ex1;
      }
      if (result.ex2 != null) {
        throw result.ex2;
      }
      if (result.ex3 != null) {
        throw result.ex3;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "invalidateToken failed: unknown result");
    }

    public VerifyTokenResponse verifyToken(VerifyTokenRequest request) throws tech.aroma.thrift.exceptions.OperationFailedException, tech.aroma.thrift.exceptions.InvalidTokenException, tech.aroma.thrift.exceptions.InvalidArgumentException, org.apache.thrift.TException
    {
      send_verifyToken(request);
      return recv_verifyToken();
    }

    public void send_verifyToken(VerifyTokenRequest request) throws org.apache.thrift.TException
    {
      verifyToken_args args = new verifyToken_args();
      args.setRequest(request);
      sendBase("verifyToken", args);
    }

    public VerifyTokenResponse recv_verifyToken() throws tech.aroma.thrift.exceptions.OperationFailedException, tech.aroma.thrift.exceptions.InvalidTokenException, tech.aroma.thrift.exceptions.InvalidArgumentException, org.apache.thrift.TException
    {
      verifyToken_result result = new verifyToken_result();
      receiveBase(result, "verifyToken");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.ex1 != null) {
        throw result.ex1;
      }
      if (result.ex2 != null) {
        throw result.ex2;
      }
      if (result.ex3 != null) {
        throw result.ex3;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "verifyToken failed: unknown result");
    }

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

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

    public void getApiVersion(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
      checkReady();
      getApiVersion_call method_call = new getApiVersion_call(resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

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

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

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

    public void createToken(CreateTokenRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
      checkReady();
      createToken_call method_call = new createToken_call(request, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class createToken_call extends org.apache.thrift.async.TAsyncMethodCall {
      private CreateTokenRequest request;
      public createToken_call(CreateTokenRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.request = request;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("createToken", org.apache.thrift.protocol.TMessageType.CALL, 0));
        createToken_args args = new createToken_args();
        args.setRequest(request);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public CreateTokenResponse getResult() throws tech.aroma.thrift.exceptions.OperationFailedException, tech.aroma.thrift.exceptions.InvalidArgumentException, org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        return (new Client(prot)).recv_createToken();
      }
    }

    public void getTokenInfo(GetTokenInfoRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
      checkReady();
      getTokenInfo_call method_call = new getTokenInfo_call(request, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class getTokenInfo_call extends org.apache.thrift.async.TAsyncMethodCall {
      private GetTokenInfoRequest request;
      public getTokenInfo_call(GetTokenInfoRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.request = request;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getTokenInfo", org.apache.thrift.protocol.TMessageType.CALL, 0));
        getTokenInfo_args args = new getTokenInfo_args();
        args.setRequest(request);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public GetTokenInfoResponse getResult() throws tech.aroma.thrift.exceptions.OperationFailedException, tech.aroma.thrift.exceptions.InvalidTokenException, tech.aroma.thrift.exceptions.InvalidArgumentException, org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        return (new Client(prot)).recv_getTokenInfo();
      }
    }

    public void invalidateToken(InvalidateTokenRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
      checkReady();
      invalidateToken_call method_call = new invalidateToken_call(request, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class invalidateToken_call extends org.apache.thrift.async.TAsyncMethodCall {
      private InvalidateTokenRequest request;
      public invalidateToken_call(InvalidateTokenRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.request = request;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("invalidateToken", org.apache.thrift.protocol.TMessageType.CALL, 0));
        invalidateToken_args args = new invalidateToken_args();
        args.setRequest(request);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public InvalidateTokenResponse getResult() throws tech.aroma.thrift.exceptions.OperationFailedException, tech.aroma.thrift.exceptions.InvalidTokenException, tech.aroma.thrift.exceptions.InvalidArgumentException, org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        return (new Client(prot)).recv_invalidateToken();
      }
    }

    public void verifyToken(VerifyTokenRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
      checkReady();
      verifyToken_call method_call = new verifyToken_call(request, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class verifyToken_call extends org.apache.thrift.async.TAsyncMethodCall {
      private VerifyTokenRequest request;
      public verifyToken_call(VerifyTokenRequest request, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.request = request;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("verifyToken", org.apache.thrift.protocol.TMessageType.CALL, 0));
        verifyToken_args args = new verifyToken_args();
        args.setRequest(request);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public VerifyTokenResponse getResult() throws tech.aroma.thrift.exceptions.OperationFailedException, tech.aroma.thrift.exceptions.InvalidTokenException, tech.aroma.thrift.exceptions.InvalidArgumentException, org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        return (new Client(prot)).recv_verifyToken();
      }
    }

  }

  public static class Processor extends org.apache.thrift.TBaseProcessor implements org.apache.thrift.TProcessor {
    private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
    public Processor(I iface) {
      super(iface, getProcessMap(new HashMap>()));
    }

    protected Processor(I iface, Map> processMap) {
      super(iface, getProcessMap(processMap));
    }

    private static  Map> getProcessMap(Map> processMap) {
      processMap.put("getApiVersion", new getApiVersion());
      processMap.put("createToken", new createToken());
      processMap.put("getTokenInfo", new getTokenInfo());
      processMap.put("invalidateToken", new invalidateToken());
      processMap.put("verifyToken", new verifyToken());
      return processMap;
    }

    public static class getApiVersion extends org.apache.thrift.ProcessFunction {
      public getApiVersion() {
        super("getApiVersion");
      }

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

      protected boolean isOneway() {
        return false;
      }

      public getApiVersion_result getResult(I iface, getApiVersion_args args) throws org.apache.thrift.TException {
        getApiVersion_result result = new getApiVersion_result();
        result.success = iface.getApiVersion();
        result.setSuccessIsSet(true);
        return result;
      }
    }

    public static class createToken extends org.apache.thrift.ProcessFunction {
      public createToken() {
        super("createToken");
      }

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

      protected boolean isOneway() {
        return false;
      }

      public createToken_result getResult(I iface, createToken_args args) throws org.apache.thrift.TException {
        createToken_result result = new createToken_result();
        try {
          result.success = iface.createToken(args.request);
        } catch (tech.aroma.thrift.exceptions.OperationFailedException ex1) {
          result.ex1 = ex1;
        } catch (tech.aroma.thrift.exceptions.InvalidArgumentException ex2) {
          result.ex2 = ex2;
        }
        return result;
      }
    }

    public static class getTokenInfo extends org.apache.thrift.ProcessFunction {
      public getTokenInfo() {
        super("getTokenInfo");
      }

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

      protected boolean isOneway() {
        return false;
      }

      public getTokenInfo_result getResult(I iface, getTokenInfo_args args) throws org.apache.thrift.TException {
        getTokenInfo_result result = new getTokenInfo_result();
        try {
          result.success = iface.getTokenInfo(args.request);
        } catch (tech.aroma.thrift.exceptions.OperationFailedException ex1) {
          result.ex1 = ex1;
        } catch (tech.aroma.thrift.exceptions.InvalidTokenException ex2) {
          result.ex2 = ex2;
        } catch (tech.aroma.thrift.exceptions.InvalidArgumentException ex3) {
          result.ex3 = ex3;
        }
        return result;
      }
    }

    public static class invalidateToken extends org.apache.thrift.ProcessFunction {
      public invalidateToken() {
        super("invalidateToken");
      }

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

      protected boolean isOneway() {
        return false;
      }

      public invalidateToken_result getResult(I iface, invalidateToken_args args) throws org.apache.thrift.TException {
        invalidateToken_result result = new invalidateToken_result();
        try {
          result.success = iface.invalidateToken(args.request);
        } catch (tech.aroma.thrift.exceptions.OperationFailedException ex1) {
          result.ex1 = ex1;
        } catch (tech.aroma.thrift.exceptions.InvalidTokenException ex2) {
          result.ex2 = ex2;
        } catch (tech.aroma.thrift.exceptions.InvalidArgumentException ex3) {
          result.ex3 = ex3;
        }
        return result;
      }
    }

    public static class verifyToken extends org.apache.thrift.ProcessFunction {
      public verifyToken() {
        super("verifyToken");
      }

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

      protected boolean isOneway() {
        return false;
      }

      public verifyToken_result getResult(I iface, verifyToken_args args) throws org.apache.thrift.TException {
        verifyToken_result result = new verifyToken_result();
        try {
          result.success = iface.verifyToken(args.request);
        } catch (tech.aroma.thrift.exceptions.OperationFailedException ex1) {
          result.ex1 = ex1;
        } catch (tech.aroma.thrift.exceptions.InvalidTokenException ex2) {
          result.ex2 = ex2;
        } catch (tech.aroma.thrift.exceptions.InvalidArgumentException ex3) {
          result.ex3 = ex3;
        }
        return result;
      }
    }

  }

  public static class AsyncProcessor extends org.apache.thrift.TBaseAsyncProcessor {
    private static final Logger LOGGER = LoggerFactory.getLogger(AsyncProcessor.class.getName());
    public AsyncProcessor(I iface) {
      super(iface, getProcessMap(new HashMap>()));
    }

    protected AsyncProcessor(I iface, Map> processMap) {
      super(iface, getProcessMap(processMap));
    }

    private static  Map> getProcessMap(Map> processMap) {
      processMap.put("getApiVersion", new getApiVersion());
      processMap.put("createToken", new createToken());
      processMap.put("getTokenInfo", new getTokenInfo());
      processMap.put("invalidateToken", new invalidateToken());
      processMap.put("verifyToken", new verifyToken());
      return processMap;
    }

    public static class getApiVersion extends org.apache.thrift.AsyncProcessFunction {
      public getApiVersion() {
        super("getApiVersion");
      }

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

      public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
        final org.apache.thrift.AsyncProcessFunction fcall = this;
        return new AsyncMethodCallback() { 
          public void onComplete(Double o) {
            getApiVersion_result result = new getApiVersion_result();
            result.success = o;
            result.setSuccessIsSet(true);
            try {
              fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
              return;
            } catch (Exception e) {
              LOGGER.error("Exception writing to internal frame buffer", e);
            }
            fb.close();
          }
          public void onError(Exception e) {
            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
            org.apache.thrift.TBase msg;
            getApiVersion_result result = new getApiVersion_result();
            {
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
            }
            try {
              fcall.sendResponse(fb,msg,msgType,seqid);
              return;
            } catch (Exception ex) {
              LOGGER.error("Exception writing to internal frame buffer", ex);
            }
            fb.close();
          }
        };
      }

      protected boolean isOneway() {
        return false;
      }

      public void start(I iface, getApiVersion_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException {
        iface.getApiVersion(resultHandler);
      }
    }

    public static class createToken extends org.apache.thrift.AsyncProcessFunction {
      public createToken() {
        super("createToken");
      }

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

      public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
        final org.apache.thrift.AsyncProcessFunction fcall = this;
        return new AsyncMethodCallback() { 
          public void onComplete(CreateTokenResponse o) {
            createToken_result result = new createToken_result();
            result.success = o;
            try {
              fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
              return;
            } catch (Exception e) {
              LOGGER.error("Exception writing to internal frame buffer", e);
            }
            fb.close();
          }
          public void onError(Exception e) {
            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
            org.apache.thrift.TBase msg;
            createToken_result result = new createToken_result();
            if (e instanceof tech.aroma.thrift.exceptions.OperationFailedException) {
                        result.ex1 = (tech.aroma.thrift.exceptions.OperationFailedException) e;
                        result.setEx1IsSet(true);
                        msg = result;
            }
            else             if (e instanceof tech.aroma.thrift.exceptions.InvalidArgumentException) {
                        result.ex2 = (tech.aroma.thrift.exceptions.InvalidArgumentException) e;
                        result.setEx2IsSet(true);
                        msg = result;
            }
             else 
            {
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
            }
            try {
              fcall.sendResponse(fb,msg,msgType,seqid);
              return;
            } catch (Exception ex) {
              LOGGER.error("Exception writing to internal frame buffer", ex);
            }
            fb.close();
          }
        };
      }

      protected boolean isOneway() {
        return false;
      }

      public void start(I iface, createToken_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException {
        iface.createToken(args.request,resultHandler);
      }
    }

    public static class getTokenInfo extends org.apache.thrift.AsyncProcessFunction {
      public getTokenInfo() {
        super("getTokenInfo");
      }

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

      public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
        final org.apache.thrift.AsyncProcessFunction fcall = this;
        return new AsyncMethodCallback() { 
          public void onComplete(GetTokenInfoResponse o) {
            getTokenInfo_result result = new getTokenInfo_result();
            result.success = o;
            try {
              fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
              return;
            } catch (Exception e) {
              LOGGER.error("Exception writing to internal frame buffer", e);
            }
            fb.close();
          }
          public void onError(Exception e) {
            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
            org.apache.thrift.TBase msg;
            getTokenInfo_result result = new getTokenInfo_result();
            if (e instanceof tech.aroma.thrift.exceptions.OperationFailedException) {
                        result.ex1 = (tech.aroma.thrift.exceptions.OperationFailedException) e;
                        result.setEx1IsSet(true);
                        msg = result;
            }
            else             if (e instanceof tech.aroma.thrift.exceptions.InvalidTokenException) {
                        result.ex2 = (tech.aroma.thrift.exceptions.InvalidTokenException) e;
                        result.setEx2IsSet(true);
                        msg = result;
            }
            else             if (e instanceof tech.aroma.thrift.exceptions.InvalidArgumentException) {
                        result.ex3 = (tech.aroma.thrift.exceptions.InvalidArgumentException) e;
                        result.setEx3IsSet(true);
                        msg = result;
            }
             else 
            {
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
            }
            try {
              fcall.sendResponse(fb,msg,msgType,seqid);
              return;
            } catch (Exception ex) {
              LOGGER.error("Exception writing to internal frame buffer", ex);
            }
            fb.close();
          }
        };
      }

      protected boolean isOneway() {
        return false;
      }

      public void start(I iface, getTokenInfo_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException {
        iface.getTokenInfo(args.request,resultHandler);
      }
    }

    public static class invalidateToken extends org.apache.thrift.AsyncProcessFunction {
      public invalidateToken() {
        super("invalidateToken");
      }

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

      public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
        final org.apache.thrift.AsyncProcessFunction fcall = this;
        return new AsyncMethodCallback() { 
          public void onComplete(InvalidateTokenResponse o) {
            invalidateToken_result result = new invalidateToken_result();
            result.success = o;
            try {
              fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
              return;
            } catch (Exception e) {
              LOGGER.error("Exception writing to internal frame buffer", e);
            }
            fb.close();
          }
          public void onError(Exception e) {
            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
            org.apache.thrift.TBase msg;
            invalidateToken_result result = new invalidateToken_result();
            if (e instanceof tech.aroma.thrift.exceptions.OperationFailedException) {
                        result.ex1 = (tech.aroma.thrift.exceptions.OperationFailedException) e;
                        result.setEx1IsSet(true);
                        msg = result;
            }
            else             if (e instanceof tech.aroma.thrift.exceptions.InvalidTokenException) {
                        result.ex2 = (tech.aroma.thrift.exceptions.InvalidTokenException) e;
                        result.setEx2IsSet(true);
                        msg = result;
            }
            else             if (e instanceof tech.aroma.thrift.exceptions.InvalidArgumentException) {
                        result.ex3 = (tech.aroma.thrift.exceptions.InvalidArgumentException) e;
                        result.setEx3IsSet(true);
                        msg = result;
            }
             else 
            {
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
            }
            try {
              fcall.sendResponse(fb,msg,msgType,seqid);
              return;
            } catch (Exception ex) {
              LOGGER.error("Exception writing to internal frame buffer", ex);
            }
            fb.close();
          }
        };
      }

      protected boolean isOneway() {
        return false;
      }

      public void start(I iface, invalidateToken_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException {
        iface.invalidateToken(args.request,resultHandler);
      }
    }

    public static class verifyToken extends org.apache.thrift.AsyncProcessFunction {
      public verifyToken() {
        super("verifyToken");
      }

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

      public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
        final org.apache.thrift.AsyncProcessFunction fcall = this;
        return new AsyncMethodCallback() { 
          public void onComplete(VerifyTokenResponse o) {
            verifyToken_result result = new verifyToken_result();
            result.success = o;
            try {
              fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
              return;
            } catch (Exception e) {
              LOGGER.error("Exception writing to internal frame buffer", e);
            }
            fb.close();
          }
          public void onError(Exception e) {
            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
            org.apache.thrift.TBase msg;
            verifyToken_result result = new verifyToken_result();
            if (e instanceof tech.aroma.thrift.exceptions.OperationFailedException) {
                        result.ex1 = (tech.aroma.thrift.exceptions.OperationFailedException) e;
                        result.setEx1IsSet(true);
                        msg = result;
            }
            else             if (e instanceof tech.aroma.thrift.exceptions.InvalidTokenException) {
                        result.ex2 = (tech.aroma.thrift.exceptions.InvalidTokenException) e;
                        result.setEx2IsSet(true);
                        msg = result;
            }
            else             if (e instanceof tech.aroma.thrift.exceptions.InvalidArgumentException) {
                        result.ex3 = (tech.aroma.thrift.exceptions.InvalidArgumentException) e;
                        result.setEx3IsSet(true);
                        msg = result;
            }
             else 
            {
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
            }
            try {
              fcall.sendResponse(fb,msg,msgType,seqid);
              return;
            } catch (Exception ex) {
              LOGGER.error("Exception writing to internal frame buffer", ex);
            }
            fb.close();
          }
        };
      }

      protected boolean isOneway() {
        return false;
      }

      public void start(I iface, verifyToken_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException {
        iface.verifyToken(args.request,resultHandler);
      }
    }

  }

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


    private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>();
    static {
      schemes.put(StandardScheme.class, new getApiVersion_argsStandardSchemeFactory());
      schemes.put(TupleScheme.class, new getApiVersion_argsTupleSchemeFactory());
    }


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

      private static final Map byName = new HashMap();

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

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          default:
            return null;
        }
      }

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

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

      private final short _thriftId;
      private final String _fieldName;

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

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getApiVersion_args.class, metaDataMap);
    }

    public getApiVersion_args() {
    }

    /**
     * Performs a deep copy on other.
     */
    public getApiVersion_args(getApiVersion_args other) {
    }

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

    @Override
    public void clear() {
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      }
      throw new IllegalStateException();
    }

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

      switch (field) {
      }
      throw new IllegalStateException();
    }

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

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

      return true;
    }

    @Override
    public int hashCode() {
      List list = new ArrayList();

      return list.hashCode();
    }

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

      int lastComparison = 0;

      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

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

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

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

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

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
      // check for sub-struct validity
    }

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

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

    private static class getApiVersion_argsStandardSchemeFactory implements SchemeFactory {
      public getApiVersion_argsStandardScheme getScheme() {
        return new getApiVersion_argsStandardScheme();
      }
    }

    private static class getApiVersion_argsStandardScheme extends StandardScheme {

      public void read(org.apache.thrift.protocol.TProtocol iprot, getApiVersion_args struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TField schemeField;
        iprot.readStructBegin();
        while (true)
        {
          schemeField = iprot.readFieldBegin();
          if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { 
            break;
          }
          switch (schemeField.id) {
            default:
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
          }
          iprot.readFieldEnd();
        }
        iprot.readStructEnd();

        // check for required fields of primitive type, which can't be checked in the validate method
        struct.validate();
      }

      public void write(org.apache.thrift.protocol.TProtocol oprot, getApiVersion_args struct) throws org.apache.thrift.TException {
        struct.validate();

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

    }

    private static class getApiVersion_argsTupleSchemeFactory implements SchemeFactory {
      public getApiVersion_argsTupleScheme getScheme() {
        return new getApiVersion_argsTupleScheme();
      }
    }

    private static class getApiVersion_argsTupleScheme extends TupleScheme {

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

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

  }

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

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.DOUBLE, (short)0);

    private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>();
    static {
      schemes.put(StandardScheme.class, new getApiVersion_resultStandardSchemeFactory());
      schemes.put(TupleScheme.class, new getApiVersion_resultTupleSchemeFactory());
    }

    public double success; // required

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

      private static final Map byName = new HashMap();

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

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          default:
            return null;
        }
      }

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

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

      private final short _thriftId;
      private final String _fieldName;

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

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    private static final int __SUCCESS_ISSET_ID = 0;
    private byte __isset_bitfield = 0;
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getApiVersion_result.class, metaDataMap);
    }

    public getApiVersion_result() {
    }

    public getApiVersion_result(
      double success)
    {
      this();
      this.success = success;
      setSuccessIsSet(true);
    }

    /**
     * Performs a deep copy on other.
     */
    public getApiVersion_result(getApiVersion_result other) {
      __isset_bitfield = other.__isset_bitfield;
      this.success = other.success;
    }

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

    @Override
    public void clear() {
      setSuccessIsSet(false);
      this.success = 0.0;
    }

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

    public getApiVersion_result setSuccess(double success) {
      this.success = success;
      setSuccessIsSet(true);
      return this;
    }

    public void unsetSuccess() {
      __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID);
    }

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

    public void setSuccessIsSet(boolean value) {
      __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value);
    }

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

      }
    }

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

      }
      throw new IllegalStateException();
    }

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

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      }
      throw new IllegalStateException();
    }

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

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

      boolean this_present_success = true;
      boolean that_present_success = true;
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (this.success != that.success)
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      List list = new ArrayList();

      boolean present_success = true;
      list.add(present_success);
      if (present_success)
        list.add(success);

      return list.hashCode();
    }

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

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

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

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

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

      sb.append("success:");
      sb.append(this.success);
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
      // check for sub-struct validity
    }

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

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
        __isset_bitfield = 0;
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private static class getApiVersion_resultStandardSchemeFactory implements SchemeFactory {
      public getApiVersion_resultStandardScheme getScheme() {
        return new getApiVersion_resultStandardScheme();
      }
    }

    private static class getApiVersion_resultStandardScheme extends StandardScheme {

      public void read(org.apache.thrift.protocol.TProtocol iprot, getApiVersion_result struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TField schemeField;
        iprot.readStructBegin();
        while (true)
        {
          schemeField = iprot.readFieldBegin();
          if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { 
            break;
          }
          switch (schemeField.id) {
            case 0: // SUCCESS
              if (schemeField.type == org.apache.thrift.protocol.TType.DOUBLE) {
                struct.success = iprot.readDouble();
                struct.setSuccessIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            default:
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
          }
          iprot.readFieldEnd();
        }
        iprot.readStructEnd();

        // check for required fields of primitive type, which can't be checked in the validate method
        struct.validate();
      }

      public void write(org.apache.thrift.protocol.TProtocol oprot, getApiVersion_result struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.isSetSuccess()) {
          oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
          oprot.writeDouble(struct.success);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class getApiVersion_resultTupleSchemeFactory implements SchemeFactory {
      public getApiVersion_resultTupleScheme getScheme() {
        return new getApiVersion_resultTupleScheme();
      }
    }

    private static class getApiVersion_resultTupleScheme extends TupleScheme {

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

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, getApiVersion_result struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(1);
        if (incoming.get(0)) {
          struct.success = iprot.readDouble();
          struct.setSuccessIsSet(true);
        }
      }
    }

  }

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

    private static final org.apache.thrift.protocol.TField REQUEST_FIELD_DESC = new org.apache.thrift.protocol.TField("request", org.apache.thrift.protocol.TType.STRUCT, (short)1);

    private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>();
    static {
      schemes.put(StandardScheme.class, new createToken_argsStandardSchemeFactory());
      schemes.put(TupleScheme.class, new createToken_argsTupleSchemeFactory());
    }

    public CreateTokenRequest request; // required

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

      private static final Map byName = new HashMap();

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

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // REQUEST
            return REQUEST;
          default:
            return null;
        }
      }

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

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

      private final short _thriftId;
      private final String _fieldName;

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

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.REQUEST, new org.apache.thrift.meta_data.FieldMetaData("request", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, CreateTokenRequest.class)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createToken_args.class, metaDataMap);
    }

    public createToken_args() {
    }

    public createToken_args(
      CreateTokenRequest request)
    {
      this();
      this.request = request;
    }

    /**
     * Performs a deep copy on other.
     */
    public createToken_args(createToken_args other) {
      if (other.isSetRequest()) {
        this.request = new CreateTokenRequest(other.request);
      }
    }

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

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

    public CreateTokenRequest getRequest() {
      return this.request;
    }

    public createToken_args setRequest(CreateTokenRequest request) {
      this.request = request;
      return this;
    }

    public void unsetRequest() {
      this.request = null;
    }

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

    public void setRequestIsSet(boolean value) {
      if (!value) {
        this.request = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case REQUEST:
        if (value == null) {
          unsetRequest();
        } else {
          setRequest((CreateTokenRequest)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case REQUEST:
        return getRequest();

      }
      throw new IllegalStateException();
    }

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

      switch (field) {
      case REQUEST:
        return isSetRequest();
      }
      throw new IllegalStateException();
    }

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

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

      boolean this_present_request = true && this.isSetRequest();
      boolean that_present_request = true && that.isSetRequest();
      if (this_present_request || that_present_request) {
        if (!(this_present_request && that_present_request))
          return false;
        if (!this.request.equals(that.request))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      List list = new ArrayList();

      boolean present_request = true && (isSetRequest());
      list.add(present_request);
      if (present_request)
        list.add(request);

      return list.hashCode();
    }

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

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetRequest()).compareTo(other.isSetRequest());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetRequest()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.request, other.request);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

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

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

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

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

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

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

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

    private static class createToken_argsStandardSchemeFactory implements SchemeFactory {
      public createToken_argsStandardScheme getScheme() {
        return new createToken_argsStandardScheme();
      }
    }

    private static class createToken_argsStandardScheme extends StandardScheme {

      public void read(org.apache.thrift.protocol.TProtocol iprot, createToken_args struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TField schemeField;
        iprot.readStructBegin();
        while (true)
        {
          schemeField = iprot.readFieldBegin();
          if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { 
            break;
          }
          switch (schemeField.id) {
            case 1: // REQUEST
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.request = new CreateTokenRequest();
                struct.request.read(iprot);
                struct.setRequestIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            default:
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
          }
          iprot.readFieldEnd();
        }
        iprot.readStructEnd();

        // check for required fields of primitive type, which can't be checked in the validate method
        struct.validate();
      }

      public void write(org.apache.thrift.protocol.TProtocol oprot, createToken_args struct) throws org.apache.thrift.TException {
        struct.validate();

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

    }

    private static class createToken_argsTupleSchemeFactory implements SchemeFactory {
      public createToken_argsTupleScheme getScheme() {
        return new createToken_argsTupleScheme();
      }
    }

    private static class createToken_argsTupleScheme extends TupleScheme {

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

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, createToken_args struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(1);
        if (incoming.get(0)) {
          struct.request = new CreateTokenRequest();
          struct.request.read(iprot);
          struct.setRequestIsSet(true);
        }
      }
    }

  }

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

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0);
    private static final org.apache.thrift.protocol.TField EX1_FIELD_DESC = new org.apache.thrift.protocol.TField("ex1", org.apache.thrift.protocol.TType.STRUCT, (short)1);
    private static final org.apache.thrift.protocol.TField EX2_FIELD_DESC = new org.apache.thrift.protocol.TField("ex2", org.apache.thrift.protocol.TType.STRUCT, (short)2);

    private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>();
    static {
      schemes.put(StandardScheme.class, new createToken_resultStandardSchemeFactory());
      schemes.put(TupleScheme.class, new createToken_resultTupleSchemeFactory());
    }

    public CreateTokenResponse success; // required
    public tech.aroma.thrift.exceptions.OperationFailedException ex1; // required
    public tech.aroma.thrift.exceptions.InvalidArgumentException ex2; // required

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

      private static final Map byName = new HashMap();

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

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          case 1: // EX1
            return EX1;
          case 2: // EX2
            return EX2;
          default:
            return null;
        }
      }

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

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

      private final short _thriftId;
      private final String _fieldName;

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

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, CreateTokenResponse.class)));
      tmpMap.put(_Fields.EX1, new org.apache.thrift.meta_data.FieldMetaData("ex1", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT          , "OperationFailedException")));
      tmpMap.put(_Fields.EX2, new org.apache.thrift.meta_data.FieldMetaData("ex2", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT          , "InvalidArgumentException")));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createToken_result.class, metaDataMap);
    }

    public createToken_result() {
    }

    public createToken_result(
      CreateTokenResponse success,
      tech.aroma.thrift.exceptions.OperationFailedException ex1,
      tech.aroma.thrift.exceptions.InvalidArgumentException ex2)
    {
      this();
      this.success = success;
      this.ex1 = ex1;
      this.ex2 = ex2;
    }

    /**
     * Performs a deep copy on other.
     */
    public createToken_result(createToken_result other) {
      if (other.isSetSuccess()) {
        this.success = new CreateTokenResponse(other.success);
      }
      if (other.isSetEx1()) {
        this.ex1 = other.ex1;
      }
      if (other.isSetEx2()) {
        this.ex2 = other.ex2;
      }
    }

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

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

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

    public createToken_result setSuccess(CreateTokenResponse success) {
      this.success = success;
      return this;
    }

    public void unsetSuccess() {
      this.success = null;
    }

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

    public void setSuccessIsSet(boolean value) {
      if (!value) {
        this.success = null;
      }
    }

    public tech.aroma.thrift.exceptions.OperationFailedException getEx1() {
      return this.ex1;
    }

    public createToken_result setEx1(tech.aroma.thrift.exceptions.OperationFailedException ex1) {
      this.ex1 = ex1;
      return this;
    }

    public void unsetEx1() {
      this.ex1 = null;
    }

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

    public void setEx1IsSet(boolean value) {
      if (!value) {
        this.ex1 = null;
      }
    }

    public tech.aroma.thrift.exceptions.InvalidArgumentException getEx2() {
      return this.ex2;
    }

    public createToken_result setEx2(tech.aroma.thrift.exceptions.InvalidArgumentException ex2) {
      this.ex2 = ex2;
      return this;
    }

    public void unsetEx2() {
      this.ex2 = null;
    }

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

    public void setEx2IsSet(boolean value) {
      if (!value) {
        this.ex2 = null;
      }
    }

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

      case EX1:
        if (value == null) {
          unsetEx1();
        } else {
          setEx1((tech.aroma.thrift.exceptions.OperationFailedException)value);
        }
        break;

      case EX2:
        if (value == null) {
          unsetEx2();
        } else {
          setEx2((tech.aroma.thrift.exceptions.InvalidArgumentException)value);
        }
        break;

      }
    }

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

      case EX1:
        return getEx1();

      case EX2:
        return getEx2();

      }
      throw new IllegalStateException();
    }

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

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      case EX1:
        return isSetEx1();
      case EX2:
        return isSetEx2();
      }
      throw new IllegalStateException();
    }

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

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

      boolean this_present_success = true && this.isSetSuccess();
      boolean that_present_success = true && that.isSetSuccess();
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (!this.success.equals(that.success))
          return false;
      }

      boolean this_present_ex1 = true && this.isSetEx1();
      boolean that_present_ex1 = true && that.isSetEx1();
      if (this_present_ex1 || that_present_ex1) {
        if (!(this_present_ex1 && that_present_ex1))
          return false;
        if (!this.ex1.equals(that.ex1))
          return false;
      }

      boolean this_present_ex2 = true && this.isSetEx2();
      boolean that_present_ex2 = true && that.isSetEx2();
      if (this_present_ex2 || that_present_ex2) {
        if (!(this_present_ex2 && that_present_ex2))
          return false;
        if (!this.ex2.equals(that.ex2))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      List list = new ArrayList();

      boolean present_success = true && (isSetSuccess());
      list.add(present_success);
      if (present_success)
        list.add(success);

      boolean present_ex1 = true && (isSetEx1());
      list.add(present_ex1);
      if (present_ex1)
        list.add(ex1);

      boolean present_ex2 = true && (isSetEx2());
      list.add(present_ex2);
      if (present_ex2)
        list.add(ex2);

      return list.hashCode();
    }

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

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetEx1()).compareTo(other.isSetEx1());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetEx1()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ex1, other.ex1);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetEx2()).compareTo(other.isSetEx2());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetEx2()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ex2, other.ex2);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

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

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

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

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

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

    private static class createToken_resultStandardSchemeFactory implements SchemeFactory {
      public createToken_resultStandardScheme getScheme() {
        return new createToken_resultStandardScheme();
      }
    }

    private static class createToken_resultStandardScheme extends StandardScheme {

      public void read(org.apache.thrift.protocol.TProtocol iprot, createToken_result struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TField schemeField;
        iprot.readStructBegin();
        while (true)
        {
          schemeField = iprot.readFieldBegin();
          if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { 
            break;
          }
          switch (schemeField.id) {
            case 0: // SUCCESS
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.success = new CreateTokenResponse();
                struct.success.read(iprot);
                struct.setSuccessIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 1: // EX1
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.ex1 = new tech.aroma.thrift.exceptions.OperationFailedException();
                struct.ex1.read(iprot);
                struct.setEx1IsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // EX2
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.ex2 = new tech.aroma.thrift.exceptions.InvalidArgumentException();
                struct.ex2.read(iprot);
                struct.setEx2IsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            default:
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
          }
          iprot.readFieldEnd();
        }
        iprot.readStructEnd();

        // check for required fields of primitive type, which can't be checked in the validate method
        struct.validate();
      }

      public void write(org.apache.thrift.protocol.TProtocol oprot, createToken_result struct) throws 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.ex1 != null) {
          oprot.writeFieldBegin(EX1_FIELD_DESC);
          struct.ex1.write(oprot);
          oprot.writeFieldEnd();
        }
        if (struct.ex2 != null) {
          oprot.writeFieldBegin(EX2_FIELD_DESC);
          struct.ex2.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class createToken_resultTupleSchemeFactory implements SchemeFactory {
      public createToken_resultTupleScheme getScheme() {
        return new createToken_resultTupleScheme();
      }
    }

    private static class createToken_resultTupleScheme extends TupleScheme {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, createToken_result struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetSuccess()) {
          optionals.set(0);
        }
        if (struct.isSetEx1()) {
          optionals.set(1);
        }
        if (struct.isSetEx2()) {
          optionals.set(2);
        }
        oprot.writeBitSet(optionals, 3);
        if (struct.isSetSuccess()) {
          struct.success.write(oprot);
        }
        if (struct.isSetEx1()) {
          struct.ex1.write(oprot);
        }
        if (struct.isSetEx2()) {
          struct.ex2.write(oprot);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, createToken_result struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(3);
        if (incoming.get(0)) {
          struct.success = new CreateTokenResponse();
          struct.success.read(iprot);
          struct.setSuccessIsSet(true);
        }
        if (incoming.get(1)) {
          struct.ex1 = new tech.aroma.thrift.exceptions.OperationFailedException();
          struct.ex1.read(iprot);
          struct.setEx1IsSet(true);
        }
        if (incoming.get(2)) {
          struct.ex2 = new tech.aroma.thrift.exceptions.InvalidArgumentException();
          struct.ex2.read(iprot);
          struct.setEx2IsSet(true);
        }
      }
    }

  }

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

    private static final org.apache.thrift.protocol.TField REQUEST_FIELD_DESC = new org.apache.thrift.protocol.TField("request", org.apache.thrift.protocol.TType.STRUCT, (short)1);

    private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>();
    static {
      schemes.put(StandardScheme.class, new getTokenInfo_argsStandardSchemeFactory());
      schemes.put(TupleScheme.class, new getTokenInfo_argsTupleSchemeFactory());
    }

    public GetTokenInfoRequest request; // required

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

      private static final Map byName = new HashMap();

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

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // REQUEST
            return REQUEST;
          default:
            return null;
        }
      }

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

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

      private final short _thriftId;
      private final String _fieldName;

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

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.REQUEST, new org.apache.thrift.meta_data.FieldMetaData("request", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, GetTokenInfoRequest.class)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getTokenInfo_args.class, metaDataMap);
    }

    public getTokenInfo_args() {
    }

    public getTokenInfo_args(
      GetTokenInfoRequest request)
    {
      this();
      this.request = request;
    }

    /**
     * Performs a deep copy on other.
     */
    public getTokenInfo_args(getTokenInfo_args other) {
      if (other.isSetRequest()) {
        this.request = new GetTokenInfoRequest(other.request);
      }
    }

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

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

    public GetTokenInfoRequest getRequest() {
      return this.request;
    }

    public getTokenInfo_args setRequest(GetTokenInfoRequest request) {
      this.request = request;
      return this;
    }

    public void unsetRequest() {
      this.request = null;
    }

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

    public void setRequestIsSet(boolean value) {
      if (!value) {
        this.request = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case REQUEST:
        if (value == null) {
          unsetRequest();
        } else {
          setRequest((GetTokenInfoRequest)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case REQUEST:
        return getRequest();

      }
      throw new IllegalStateException();
    }

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

      switch (field) {
      case REQUEST:
        return isSetRequest();
      }
      throw new IllegalStateException();
    }

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

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

      boolean this_present_request = true && this.isSetRequest();
      boolean that_present_request = true && that.isSetRequest();
      if (this_present_request || that_present_request) {
        if (!(this_present_request && that_present_request))
          return false;
        if (!this.request.equals(that.request))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      List list = new ArrayList();

      boolean present_request = true && (isSetRequest());
      list.add(present_request);
      if (present_request)
        list.add(request);

      return list.hashCode();
    }

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

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetRequest()).compareTo(other.isSetRequest());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetRequest()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.request, other.request);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

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

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

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

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

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

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

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

    private static class getTokenInfo_argsStandardSchemeFactory implements SchemeFactory {
      public getTokenInfo_argsStandardScheme getScheme() {
        return new getTokenInfo_argsStandardScheme();
      }
    }

    private static class getTokenInfo_argsStandardScheme extends StandardScheme {

      public void read(org.apache.thrift.protocol.TProtocol iprot, getTokenInfo_args struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TField schemeField;
        iprot.readStructBegin();
        while (true)
        {
          schemeField = iprot.readFieldBegin();
          if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { 
            break;
          }
          switch (schemeField.id) {
            case 1: // REQUEST
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.request = new GetTokenInfoRequest();
                struct.request.read(iprot);
                struct.setRequestIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            default:
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
          }
          iprot.readFieldEnd();
        }
        iprot.readStructEnd();

        // check for required fields of primitive type, which can't be checked in the validate method
        struct.validate();
      }

      public void write(org.apache.thrift.protocol.TProtocol oprot, getTokenInfo_args struct) throws org.apache.thrift.TException {
        struct.validate();

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

    }

    private static class getTokenInfo_argsTupleSchemeFactory implements SchemeFactory {
      public getTokenInfo_argsTupleScheme getScheme() {
        return new getTokenInfo_argsTupleScheme();
      }
    }

    private static class getTokenInfo_argsTupleScheme extends TupleScheme {

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

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, getTokenInfo_args struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(1);
        if (incoming.get(0)) {
          struct.request = new GetTokenInfoRequest();
          struct.request.read(iprot);
          struct.setRequestIsSet(true);
        }
      }
    }

  }

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

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0);
    private static final org.apache.thrift.protocol.TField EX1_FIELD_DESC = new org.apache.thrift.protocol.TField("ex1", org.apache.thrift.protocol.TType.STRUCT, (short)1);
    private static final org.apache.thrift.protocol.TField EX2_FIELD_DESC = new org.apache.thrift.protocol.TField("ex2", org.apache.thrift.protocol.TType.STRUCT, (short)2);
    private static final org.apache.thrift.protocol.TField EX3_FIELD_DESC = new org.apache.thrift.protocol.TField("ex3", org.apache.thrift.protocol.TType.STRUCT, (short)3);

    private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>();
    static {
      schemes.put(StandardScheme.class, new getTokenInfo_resultStandardSchemeFactory());
      schemes.put(TupleScheme.class, new getTokenInfo_resultTupleSchemeFactory());
    }

    public GetTokenInfoResponse success; // required
    public tech.aroma.thrift.exceptions.OperationFailedException ex1; // required
    public tech.aroma.thrift.exceptions.InvalidTokenException ex2; // required
    public tech.aroma.thrift.exceptions.InvalidArgumentException ex3; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      SUCCESS((short)0, "success"),
      EX1((short)1, "ex1"),
      EX2((short)2, "ex2"),
      EX3((short)3, "ex3");

      private static final Map byName = new HashMap();

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

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          case 1: // EX1
            return EX1;
          case 2: // EX2
            return EX2;
          case 3: // EX3
            return EX3;
          default:
            return null;
        }
      }

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

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

      private final short _thriftId;
      private final String _fieldName;

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

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, GetTokenInfoResponse.class)));
      tmpMap.put(_Fields.EX1, new org.apache.thrift.meta_data.FieldMetaData("ex1", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT          , "OperationFailedException")));
      tmpMap.put(_Fields.EX2, new org.apache.thrift.meta_data.FieldMetaData("ex2", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT          , "InvalidTokenException")));
      tmpMap.put(_Fields.EX3, new org.apache.thrift.meta_data.FieldMetaData("ex3", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT          , "InvalidArgumentException")));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getTokenInfo_result.class, metaDataMap);
    }

    public getTokenInfo_result() {
    }

    public getTokenInfo_result(
      GetTokenInfoResponse success,
      tech.aroma.thrift.exceptions.OperationFailedException ex1,
      tech.aroma.thrift.exceptions.InvalidTokenException ex2,
      tech.aroma.thrift.exceptions.InvalidArgumentException ex3)
    {
      this();
      this.success = success;
      this.ex1 = ex1;
      this.ex2 = ex2;
      this.ex3 = ex3;
    }

    /**
     * Performs a deep copy on other.
     */
    public getTokenInfo_result(getTokenInfo_result other) {
      if (other.isSetSuccess()) {
        this.success = new GetTokenInfoResponse(other.success);
      }
      if (other.isSetEx1()) {
        this.ex1 = other.ex1;
      }
      if (other.isSetEx2()) {
        this.ex2 = other.ex2;
      }
      if (other.isSetEx3()) {
        this.ex3 = other.ex3;
      }
    }

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

    @Override
    public void clear() {
      this.success = null;
      this.ex1 = null;
      this.ex2 = null;
      this.ex3 = null;
    }

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

    public getTokenInfo_result setSuccess(GetTokenInfoResponse success) {
      this.success = success;
      return this;
    }

    public void unsetSuccess() {
      this.success = null;
    }

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

    public void setSuccessIsSet(boolean value) {
      if (!value) {
        this.success = null;
      }
    }

    public tech.aroma.thrift.exceptions.OperationFailedException getEx1() {
      return this.ex1;
    }

    public getTokenInfo_result setEx1(tech.aroma.thrift.exceptions.OperationFailedException ex1) {
      this.ex1 = ex1;
      return this;
    }

    public void unsetEx1() {
      this.ex1 = null;
    }

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

    public void setEx1IsSet(boolean value) {
      if (!value) {
        this.ex1 = null;
      }
    }

    public tech.aroma.thrift.exceptions.InvalidTokenException getEx2() {
      return this.ex2;
    }

    public getTokenInfo_result setEx2(tech.aroma.thrift.exceptions.InvalidTokenException ex2) {
      this.ex2 = ex2;
      return this;
    }

    public void unsetEx2() {
      this.ex2 = null;
    }

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

    public void setEx2IsSet(boolean value) {
      if (!value) {
        this.ex2 = null;
      }
    }

    public tech.aroma.thrift.exceptions.InvalidArgumentException getEx3() {
      return this.ex3;
    }

    public getTokenInfo_result setEx3(tech.aroma.thrift.exceptions.InvalidArgumentException ex3) {
      this.ex3 = ex3;
      return this;
    }

    public void unsetEx3() {
      this.ex3 = null;
    }

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

    public void setEx3IsSet(boolean value) {
      if (!value) {
        this.ex3 = null;
      }
    }

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

      case EX1:
        if (value == null) {
          unsetEx1();
        } else {
          setEx1((tech.aroma.thrift.exceptions.OperationFailedException)value);
        }
        break;

      case EX2:
        if (value == null) {
          unsetEx2();
        } else {
          setEx2((tech.aroma.thrift.exceptions.InvalidTokenException)value);
        }
        break;

      case EX3:
        if (value == null) {
          unsetEx3();
        } else {
          setEx3((tech.aroma.thrift.exceptions.InvalidArgumentException)value);
        }
        break;

      }
    }

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

      case EX1:
        return getEx1();

      case EX2:
        return getEx2();

      case EX3:
        return getEx3();

      }
      throw new IllegalStateException();
    }

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

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      case EX1:
        return isSetEx1();
      case EX2:
        return isSetEx2();
      case EX3:
        return isSetEx3();
      }
      throw new IllegalStateException();
    }

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

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

      boolean this_present_success = true && this.isSetSuccess();
      boolean that_present_success = true && that.isSetSuccess();
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (!this.success.equals(that.success))
          return false;
      }

      boolean this_present_ex1 = true && this.isSetEx1();
      boolean that_present_ex1 = true && that.isSetEx1();
      if (this_present_ex1 || that_present_ex1) {
        if (!(this_present_ex1 && that_present_ex1))
          return false;
        if (!this.ex1.equals(that.ex1))
          return false;
      }

      boolean this_present_ex2 = true && this.isSetEx2();
      boolean that_present_ex2 = true && that.isSetEx2();
      if (this_present_ex2 || that_present_ex2) {
        if (!(this_present_ex2 && that_present_ex2))
          return false;
        if (!this.ex2.equals(that.ex2))
          return false;
      }

      boolean this_present_ex3 = true && this.isSetEx3();
      boolean that_present_ex3 = true && that.isSetEx3();
      if (this_present_ex3 || that_present_ex3) {
        if (!(this_present_ex3 && that_present_ex3))
          return false;
        if (!this.ex3.equals(that.ex3))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      List list = new ArrayList();

      boolean present_success = true && (isSetSuccess());
      list.add(present_success);
      if (present_success)
        list.add(success);

      boolean present_ex1 = true && (isSetEx1());
      list.add(present_ex1);
      if (present_ex1)
        list.add(ex1);

      boolean present_ex2 = true && (isSetEx2());
      list.add(present_ex2);
      if (present_ex2)
        list.add(ex2);

      boolean present_ex3 = true && (isSetEx3());
      list.add(present_ex3);
      if (present_ex3)
        list.add(ex3);

      return list.hashCode();
    }

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

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetEx1()).compareTo(other.isSetEx1());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetEx1()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ex1, other.ex1);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetEx2()).compareTo(other.isSetEx2());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetEx2()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ex2, other.ex2);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetEx3()).compareTo(other.isSetEx3());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetEx3()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ex3, other.ex3);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

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

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

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

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

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

    private static class getTokenInfo_resultStandardSchemeFactory implements SchemeFactory {
      public getTokenInfo_resultStandardScheme getScheme() {
        return new getTokenInfo_resultStandardScheme();
      }
    }

    private static class getTokenInfo_resultStandardScheme extends StandardScheme {

      public void read(org.apache.thrift.protocol.TProtocol iprot, getTokenInfo_result struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TField schemeField;
        iprot.readStructBegin();
        while (true)
        {
          schemeField = iprot.readFieldBegin();
          if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { 
            break;
          }
          switch (schemeField.id) {
            case 0: // SUCCESS
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.success = new GetTokenInfoResponse();
                struct.success.read(iprot);
                struct.setSuccessIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 1: // EX1
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.ex1 = new tech.aroma.thrift.exceptions.OperationFailedException();
                struct.ex1.read(iprot);
                struct.setEx1IsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // EX2
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.ex2 = new tech.aroma.thrift.exceptions.InvalidTokenException();
                struct.ex2.read(iprot);
                struct.setEx2IsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 3: // EX3
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.ex3 = new tech.aroma.thrift.exceptions.InvalidArgumentException();
                struct.ex3.read(iprot);
                struct.setEx3IsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            default:
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
          }
          iprot.readFieldEnd();
        }
        iprot.readStructEnd();

        // check for required fields of primitive type, which can't be checked in the validate method
        struct.validate();
      }

      public void write(org.apache.thrift.protocol.TProtocol oprot, getTokenInfo_result struct) throws 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.ex1 != null) {
          oprot.writeFieldBegin(EX1_FIELD_DESC);
          struct.ex1.write(oprot);
          oprot.writeFieldEnd();
        }
        if (struct.ex2 != null) {
          oprot.writeFieldBegin(EX2_FIELD_DESC);
          struct.ex2.write(oprot);
          oprot.writeFieldEnd();
        }
        if (struct.ex3 != null) {
          oprot.writeFieldBegin(EX3_FIELD_DESC);
          struct.ex3.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class getTokenInfo_resultTupleSchemeFactory implements SchemeFactory {
      public getTokenInfo_resultTupleScheme getScheme() {
        return new getTokenInfo_resultTupleScheme();
      }
    }

    private static class getTokenInfo_resultTupleScheme extends TupleScheme {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, getTokenInfo_result struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetSuccess()) {
          optionals.set(0);
        }
        if (struct.isSetEx1()) {
          optionals.set(1);
        }
        if (struct.isSetEx2()) {
          optionals.set(2);
        }
        if (struct.isSetEx3()) {
          optionals.set(3);
        }
        oprot.writeBitSet(optionals, 4);
        if (struct.isSetSuccess()) {
          struct.success.write(oprot);
        }
        if (struct.isSetEx1()) {
          struct.ex1.write(oprot);
        }
        if (struct.isSetEx2()) {
          struct.ex2.write(oprot);
        }
        if (struct.isSetEx3()) {
          struct.ex3.write(oprot);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, getTokenInfo_result struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(4);
        if (incoming.get(0)) {
          struct.success = new GetTokenInfoResponse();
          struct.success.read(iprot);
          struct.setSuccessIsSet(true);
        }
        if (incoming.get(1)) {
          struct.ex1 = new tech.aroma.thrift.exceptions.OperationFailedException();
          struct.ex1.read(iprot);
          struct.setEx1IsSet(true);
        }
        if (incoming.get(2)) {
          struct.ex2 = new tech.aroma.thrift.exceptions.InvalidTokenException();
          struct.ex2.read(iprot);
          struct.setEx2IsSet(true);
        }
        if (incoming.get(3)) {
          struct.ex3 = new tech.aroma.thrift.exceptions.InvalidArgumentException();
          struct.ex3.read(iprot);
          struct.setEx3IsSet(true);
        }
      }
    }

  }

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

    private static final org.apache.thrift.protocol.TField REQUEST_FIELD_DESC = new org.apache.thrift.protocol.TField("request", org.apache.thrift.protocol.TType.STRUCT, (short)1);

    private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>();
    static {
      schemes.put(StandardScheme.class, new invalidateToken_argsStandardSchemeFactory());
      schemes.put(TupleScheme.class, new invalidateToken_argsTupleSchemeFactory());
    }

    public InvalidateTokenRequest request; // required

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

      private static final Map byName = new HashMap();

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

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // REQUEST
            return REQUEST;
          default:
            return null;
        }
      }

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

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

      private final short _thriftId;
      private final String _fieldName;

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

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.REQUEST, new org.apache.thrift.meta_data.FieldMetaData("request", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, InvalidateTokenRequest.class)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(invalidateToken_args.class, metaDataMap);
    }

    public invalidateToken_args() {
    }

    public invalidateToken_args(
      InvalidateTokenRequest request)
    {
      this();
      this.request = request;
    }

    /**
     * Performs a deep copy on other.
     */
    public invalidateToken_args(invalidateToken_args other) {
      if (other.isSetRequest()) {
        this.request = new InvalidateTokenRequest(other.request);
      }
    }

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

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

    public InvalidateTokenRequest getRequest() {
      return this.request;
    }

    public invalidateToken_args setRequest(InvalidateTokenRequest request) {
      this.request = request;
      return this;
    }

    public void unsetRequest() {
      this.request = null;
    }

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

    public void setRequestIsSet(boolean value) {
      if (!value) {
        this.request = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case REQUEST:
        if (value == null) {
          unsetRequest();
        } else {
          setRequest((InvalidateTokenRequest)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case REQUEST:
        return getRequest();

      }
      throw new IllegalStateException();
    }

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

      switch (field) {
      case REQUEST:
        return isSetRequest();
      }
      throw new IllegalStateException();
    }

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

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

      boolean this_present_request = true && this.isSetRequest();
      boolean that_present_request = true && that.isSetRequest();
      if (this_present_request || that_present_request) {
        if (!(this_present_request && that_present_request))
          return false;
        if (!this.request.equals(that.request))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      List list = new ArrayList();

      boolean present_request = true && (isSetRequest());
      list.add(present_request);
      if (present_request)
        list.add(request);

      return list.hashCode();
    }

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

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetRequest()).compareTo(other.isSetRequest());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetRequest()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.request, other.request);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

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

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

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

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

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

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

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

    private static class invalidateToken_argsStandardSchemeFactory implements SchemeFactory {
      public invalidateToken_argsStandardScheme getScheme() {
        return new invalidateToken_argsStandardScheme();
      }
    }

    private static class invalidateToken_argsStandardScheme extends StandardScheme {

      public void read(org.apache.thrift.protocol.TProtocol iprot, invalidateToken_args struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TField schemeField;
        iprot.readStructBegin();
        while (true)
        {
          schemeField = iprot.readFieldBegin();
          if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { 
            break;
          }
          switch (schemeField.id) {
            case 1: // REQUEST
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.request = new InvalidateTokenRequest();
                struct.request.read(iprot);
                struct.setRequestIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            default:
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
          }
          iprot.readFieldEnd();
        }
        iprot.readStructEnd();

        // check for required fields of primitive type, which can't be checked in the validate method
        struct.validate();
      }

      public void write(org.apache.thrift.protocol.TProtocol oprot, invalidateToken_args struct) throws org.apache.thrift.TException {
        struct.validate();

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

    }

    private static class invalidateToken_argsTupleSchemeFactory implements SchemeFactory {
      public invalidateToken_argsTupleScheme getScheme() {
        return new invalidateToken_argsTupleScheme();
      }
    }

    private static class invalidateToken_argsTupleScheme extends TupleScheme {

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

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, invalidateToken_args struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(1);
        if (incoming.get(0)) {
          struct.request = new InvalidateTokenRequest();
          struct.request.read(iprot);
          struct.setRequestIsSet(true);
        }
      }
    }

  }

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

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0);
    private static final org.apache.thrift.protocol.TField EX1_FIELD_DESC = new org.apache.thrift.protocol.TField("ex1", org.apache.thrift.protocol.TType.STRUCT, (short)1);
    private static final org.apache.thrift.protocol.TField EX2_FIELD_DESC = new org.apache.thrift.protocol.TField("ex2", org.apache.thrift.protocol.TType.STRUCT, (short)2);
    private static final org.apache.thrift.protocol.TField EX3_FIELD_DESC = new org.apache.thrift.protocol.TField("ex3", org.apache.thrift.protocol.TType.STRUCT, (short)3);

    private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>();
    static {
      schemes.put(StandardScheme.class, new invalidateToken_resultStandardSchemeFactory());
      schemes.put(TupleScheme.class, new invalidateToken_resultTupleSchemeFactory());
    }

    public InvalidateTokenResponse success; // required
    public tech.aroma.thrift.exceptions.OperationFailedException ex1; // required
    public tech.aroma.thrift.exceptions.InvalidTokenException ex2; // required
    public tech.aroma.thrift.exceptions.InvalidArgumentException ex3; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      SUCCESS((short)0, "success"),
      EX1((short)1, "ex1"),
      EX2((short)2, "ex2"),
      EX3((short)3, "ex3");

      private static final Map byName = new HashMap();

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

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          case 1: // EX1
            return EX1;
          case 2: // EX2
            return EX2;
          case 3: // EX3
            return EX3;
          default:
            return null;
        }
      }

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

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

      private final short _thriftId;
      private final String _fieldName;

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

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, InvalidateTokenResponse.class)));
      tmpMap.put(_Fields.EX1, new org.apache.thrift.meta_data.FieldMetaData("ex1", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT          , "OperationFailedException")));
      tmpMap.put(_Fields.EX2, new org.apache.thrift.meta_data.FieldMetaData("ex2", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT          , "InvalidTokenException")));
      tmpMap.put(_Fields.EX3, new org.apache.thrift.meta_data.FieldMetaData("ex3", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT          , "InvalidArgumentException")));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(invalidateToken_result.class, metaDataMap);
    }

    public invalidateToken_result() {
    }

    public invalidateToken_result(
      InvalidateTokenResponse success,
      tech.aroma.thrift.exceptions.OperationFailedException ex1,
      tech.aroma.thrift.exceptions.InvalidTokenException ex2,
      tech.aroma.thrift.exceptions.InvalidArgumentException ex3)
    {
      this();
      this.success = success;
      this.ex1 = ex1;
      this.ex2 = ex2;
      this.ex3 = ex3;
    }

    /**
     * Performs a deep copy on other.
     */
    public invalidateToken_result(invalidateToken_result other) {
      if (other.isSetSuccess()) {
        this.success = new InvalidateTokenResponse(other.success);
      }
      if (other.isSetEx1()) {
        this.ex1 = other.ex1;
      }
      if (other.isSetEx2()) {
        this.ex2 = other.ex2;
      }
      if (other.isSetEx3()) {
        this.ex3 = other.ex3;
      }
    }

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

    @Override
    public void clear() {
      this.success = null;
      this.ex1 = null;
      this.ex2 = null;
      this.ex3 = null;
    }

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

    public invalidateToken_result setSuccess(InvalidateTokenResponse success) {
      this.success = success;
      return this;
    }

    public void unsetSuccess() {
      this.success = null;
    }

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

    public void setSuccessIsSet(boolean value) {
      if (!value) {
        this.success = null;
      }
    }

    public tech.aroma.thrift.exceptions.OperationFailedException getEx1() {
      return this.ex1;
    }

    public invalidateToken_result setEx1(tech.aroma.thrift.exceptions.OperationFailedException ex1) {
      this.ex1 = ex1;
      return this;
    }

    public void unsetEx1() {
      this.ex1 = null;
    }

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

    public void setEx1IsSet(boolean value) {
      if (!value) {
        this.ex1 = null;
      }
    }

    public tech.aroma.thrift.exceptions.InvalidTokenException getEx2() {
      return this.ex2;
    }

    public invalidateToken_result setEx2(tech.aroma.thrift.exceptions.InvalidTokenException ex2) {
      this.ex2 = ex2;
      return this;
    }

    public void unsetEx2() {
      this.ex2 = null;
    }

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

    public void setEx2IsSet(boolean value) {
      if (!value) {
        this.ex2 = null;
      }
    }

    public tech.aroma.thrift.exceptions.InvalidArgumentException getEx3() {
      return this.ex3;
    }

    public invalidateToken_result setEx3(tech.aroma.thrift.exceptions.InvalidArgumentException ex3) {
      this.ex3 = ex3;
      return this;
    }

    public void unsetEx3() {
      this.ex3 = null;
    }

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

    public void setEx3IsSet(boolean value) {
      if (!value) {
        this.ex3 = null;
      }
    }

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

      case EX1:
        if (value == null) {
          unsetEx1();
        } else {
          setEx1((tech.aroma.thrift.exceptions.OperationFailedException)value);
        }
        break;

      case EX2:
        if (value == null) {
          unsetEx2();
        } else {
          setEx2((tech.aroma.thrift.exceptions.InvalidTokenException)value);
        }
        break;

      case EX3:
        if (value == null) {
          unsetEx3();
        } else {
          setEx3((tech.aroma.thrift.exceptions.InvalidArgumentException)value);
        }
        break;

      }
    }

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

      case EX1:
        return getEx1();

      case EX2:
        return getEx2();

      case EX3:
        return getEx3();

      }
      throw new IllegalStateException();
    }

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

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      case EX1:
        return isSetEx1();
      case EX2:
        return isSetEx2();
      case EX3:
        return isSetEx3();
      }
      throw new IllegalStateException();
    }

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

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

      boolean this_present_success = true && this.isSetSuccess();
      boolean that_present_success = true && that.isSetSuccess();
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (!this.success.equals(that.success))
          return false;
      }

      boolean this_present_ex1 = true && this.isSetEx1();
      boolean that_present_ex1 = true && that.isSetEx1();
      if (this_present_ex1 || that_present_ex1) {
        if (!(this_present_ex1 && that_present_ex1))
          return false;
        if (!this.ex1.equals(that.ex1))
          return false;
      }

      boolean this_present_ex2 = true && this.isSetEx2();
      boolean that_present_ex2 = true && that.isSetEx2();
      if (this_present_ex2 || that_present_ex2) {
        if (!(this_present_ex2 && that_present_ex2))
          return false;
        if (!this.ex2.equals(that.ex2))
          return false;
      }

      boolean this_present_ex3 = true && this.isSetEx3();
      boolean that_present_ex3 = true && that.isSetEx3();
      if (this_present_ex3 || that_present_ex3) {
        if (!(this_present_ex3 && that_present_ex3))
          return false;
        if (!this.ex3.equals(that.ex3))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      List list = new ArrayList();

      boolean present_success = true && (isSetSuccess());
      list.add(present_success);
      if (present_success)
        list.add(success);

      boolean present_ex1 = true && (isSetEx1());
      list.add(present_ex1);
      if (present_ex1)
        list.add(ex1);

      boolean present_ex2 = true && (isSetEx2());
      list.add(present_ex2);
      if (present_ex2)
        list.add(ex2);

      boolean present_ex3 = true && (isSetEx3());
      list.add(present_ex3);
      if (present_ex3)
        list.add(ex3);

      return list.hashCode();
    }

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

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetEx1()).compareTo(other.isSetEx1());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetEx1()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ex1, other.ex1);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetEx2()).compareTo(other.isSetEx2());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetEx2()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ex2, other.ex2);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetEx3()).compareTo(other.isSetEx3());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetEx3()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ex3, other.ex3);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

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

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

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

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

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

    private static class invalidateToken_resultStandardSchemeFactory implements SchemeFactory {
      public invalidateToken_resultStandardScheme getScheme() {
        return new invalidateToken_resultStandardScheme();
      }
    }

    private static class invalidateToken_resultStandardScheme extends StandardScheme {

      public void read(org.apache.thrift.protocol.TProtocol iprot, invalidateToken_result struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TField schemeField;
        iprot.readStructBegin();
        while (true)
        {
          schemeField = iprot.readFieldBegin();
          if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { 
            break;
          }
          switch (schemeField.id) {
            case 0: // SUCCESS
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.success = new InvalidateTokenResponse();
                struct.success.read(iprot);
                struct.setSuccessIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 1: // EX1
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.ex1 = new tech.aroma.thrift.exceptions.OperationFailedException();
                struct.ex1.read(iprot);
                struct.setEx1IsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // EX2
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.ex2 = new tech.aroma.thrift.exceptions.InvalidTokenException();
                struct.ex2.read(iprot);
                struct.setEx2IsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 3: // EX3
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.ex3 = new tech.aroma.thrift.exceptions.InvalidArgumentException();
                struct.ex3.read(iprot);
                struct.setEx3IsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            default:
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
          }
          iprot.readFieldEnd();
        }
        iprot.readStructEnd();

        // check for required fields of primitive type, which can't be checked in the validate method
        struct.validate();
      }

      public void write(org.apache.thrift.protocol.TProtocol oprot, invalidateToken_result struct) throws 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.ex1 != null) {
          oprot.writeFieldBegin(EX1_FIELD_DESC);
          struct.ex1.write(oprot);
          oprot.writeFieldEnd();
        }
        if (struct.ex2 != null) {
          oprot.writeFieldBegin(EX2_FIELD_DESC);
          struct.ex2.write(oprot);
          oprot.writeFieldEnd();
        }
        if (struct.ex3 != null) {
          oprot.writeFieldBegin(EX3_FIELD_DESC);
          struct.ex3.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class invalidateToken_resultTupleSchemeFactory implements SchemeFactory {
      public invalidateToken_resultTupleScheme getScheme() {
        return new invalidateToken_resultTupleScheme();
      }
    }

    private static class invalidateToken_resultTupleScheme extends TupleScheme {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, invalidateToken_result struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetSuccess()) {
          optionals.set(0);
        }
        if (struct.isSetEx1()) {
          optionals.set(1);
        }
        if (struct.isSetEx2()) {
          optionals.set(2);
        }
        if (struct.isSetEx3()) {
          optionals.set(3);
        }
        oprot.writeBitSet(optionals, 4);
        if (struct.isSetSuccess()) {
          struct.success.write(oprot);
        }
        if (struct.isSetEx1()) {
          struct.ex1.write(oprot);
        }
        if (struct.isSetEx2()) {
          struct.ex2.write(oprot);
        }
        if (struct.isSetEx3()) {
          struct.ex3.write(oprot);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, invalidateToken_result struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(4);
        if (incoming.get(0)) {
          struct.success = new InvalidateTokenResponse();
          struct.success.read(iprot);
          struct.setSuccessIsSet(true);
        }
        if (incoming.get(1)) {
          struct.ex1 = new tech.aroma.thrift.exceptions.OperationFailedException();
          struct.ex1.read(iprot);
          struct.setEx1IsSet(true);
        }
        if (incoming.get(2)) {
          struct.ex2 = new tech.aroma.thrift.exceptions.InvalidTokenException();
          struct.ex2.read(iprot);
          struct.setEx2IsSet(true);
        }
        if (incoming.get(3)) {
          struct.ex3 = new tech.aroma.thrift.exceptions.InvalidArgumentException();
          struct.ex3.read(iprot);
          struct.setEx3IsSet(true);
        }
      }
    }

  }

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

    private static final org.apache.thrift.protocol.TField REQUEST_FIELD_DESC = new org.apache.thrift.protocol.TField("request", org.apache.thrift.protocol.TType.STRUCT, (short)1);

    private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>();
    static {
      schemes.put(StandardScheme.class, new verifyToken_argsStandardSchemeFactory());
      schemes.put(TupleScheme.class, new verifyToken_argsTupleSchemeFactory());
    }

    public VerifyTokenRequest request; // required

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

      private static final Map byName = new HashMap();

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

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // REQUEST
            return REQUEST;
          default:
            return null;
        }
      }

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

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

      private final short _thriftId;
      private final String _fieldName;

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

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.REQUEST, new org.apache.thrift.meta_data.FieldMetaData("request", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, VerifyTokenRequest.class)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(verifyToken_args.class, metaDataMap);
    }

    public verifyToken_args() {
    }

    public verifyToken_args(
      VerifyTokenRequest request)
    {
      this();
      this.request = request;
    }

    /**
     * Performs a deep copy on other.
     */
    public verifyToken_args(verifyToken_args other) {
      if (other.isSetRequest()) {
        this.request = new VerifyTokenRequest(other.request);
      }
    }

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

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

    public VerifyTokenRequest getRequest() {
      return this.request;
    }

    public verifyToken_args setRequest(VerifyTokenRequest request) {
      this.request = request;
      return this;
    }

    public void unsetRequest() {
      this.request = null;
    }

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

    public void setRequestIsSet(boolean value) {
      if (!value) {
        this.request = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case REQUEST:
        if (value == null) {
          unsetRequest();
        } else {
          setRequest((VerifyTokenRequest)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case REQUEST:
        return getRequest();

      }
      throw new IllegalStateException();
    }

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

      switch (field) {
      case REQUEST:
        return isSetRequest();
      }
      throw new IllegalStateException();
    }

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

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

      boolean this_present_request = true && this.isSetRequest();
      boolean that_present_request = true && that.isSetRequest();
      if (this_present_request || that_present_request) {
        if (!(this_present_request && that_present_request))
          return false;
        if (!this.request.equals(that.request))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      List list = new ArrayList();

      boolean present_request = true && (isSetRequest());
      list.add(present_request);
      if (present_request)
        list.add(request);

      return list.hashCode();
    }

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

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetRequest()).compareTo(other.isSetRequest());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetRequest()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.request, other.request);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

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

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

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

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

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

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

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

    private static class verifyToken_argsStandardSchemeFactory implements SchemeFactory {
      public verifyToken_argsStandardScheme getScheme() {
        return new verifyToken_argsStandardScheme();
      }
    }

    private static class verifyToken_argsStandardScheme extends StandardScheme {

      public void read(org.apache.thrift.protocol.TProtocol iprot, verifyToken_args struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TField schemeField;
        iprot.readStructBegin();
        while (true)
        {
          schemeField = iprot.readFieldBegin();
          if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { 
            break;
          }
          switch (schemeField.id) {
            case 1: // REQUEST
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.request = new VerifyTokenRequest();
                struct.request.read(iprot);
                struct.setRequestIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            default:
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
          }
          iprot.readFieldEnd();
        }
        iprot.readStructEnd();

        // check for required fields of primitive type, which can't be checked in the validate method
        struct.validate();
      }

      public void write(org.apache.thrift.protocol.TProtocol oprot, verifyToken_args struct) throws org.apache.thrift.TException {
        struct.validate();

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

    }

    private static class verifyToken_argsTupleSchemeFactory implements SchemeFactory {
      public verifyToken_argsTupleScheme getScheme() {
        return new verifyToken_argsTupleScheme();
      }
    }

    private static class verifyToken_argsTupleScheme extends TupleScheme {

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

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, verifyToken_args struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(1);
        if (incoming.get(0)) {
          struct.request = new VerifyTokenRequest();
          struct.request.read(iprot);
          struct.setRequestIsSet(true);
        }
      }
    }

  }

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

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0);
    private static final org.apache.thrift.protocol.TField EX1_FIELD_DESC = new org.apache.thrift.protocol.TField("ex1", org.apache.thrift.protocol.TType.STRUCT, (short)1);
    private static final org.apache.thrift.protocol.TField EX2_FIELD_DESC = new org.apache.thrift.protocol.TField("ex2", org.apache.thrift.protocol.TType.STRUCT, (short)2);
    private static final org.apache.thrift.protocol.TField EX3_FIELD_DESC = new org.apache.thrift.protocol.TField("ex3", org.apache.thrift.protocol.TType.STRUCT, (short)3);

    private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>();
    static {
      schemes.put(StandardScheme.class, new verifyToken_resultStandardSchemeFactory());
      schemes.put(TupleScheme.class, new verifyToken_resultTupleSchemeFactory());
    }

    public VerifyTokenResponse success; // required
    public tech.aroma.thrift.exceptions.OperationFailedException ex1; // required
    public tech.aroma.thrift.exceptions.InvalidTokenException ex2; // required
    public tech.aroma.thrift.exceptions.InvalidArgumentException ex3; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      SUCCESS((short)0, "success"),
      EX1((short)1, "ex1"),
      EX2((short)2, "ex2"),
      EX3((short)3, "ex3");

      private static final Map byName = new HashMap();

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

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          case 1: // EX1
            return EX1;
          case 2: // EX2
            return EX2;
          case 3: // EX3
            return EX3;
          default:
            return null;
        }
      }

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

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

      private final short _thriftId;
      private final String _fieldName;

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

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, VerifyTokenResponse.class)));
      tmpMap.put(_Fields.EX1, new org.apache.thrift.meta_data.FieldMetaData("ex1", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT          , "OperationFailedException")));
      tmpMap.put(_Fields.EX2, new org.apache.thrift.meta_data.FieldMetaData("ex2", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT          , "InvalidTokenException")));
      tmpMap.put(_Fields.EX3, new org.apache.thrift.meta_data.FieldMetaData("ex3", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT          , "InvalidArgumentException")));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(verifyToken_result.class, metaDataMap);
    }

    public verifyToken_result() {
    }

    public verifyToken_result(
      VerifyTokenResponse success,
      tech.aroma.thrift.exceptions.OperationFailedException ex1,
      tech.aroma.thrift.exceptions.InvalidTokenException ex2,
      tech.aroma.thrift.exceptions.InvalidArgumentException ex3)
    {
      this();
      this.success = success;
      this.ex1 = ex1;
      this.ex2 = ex2;
      this.ex3 = ex3;
    }

    /**
     * Performs a deep copy on other.
     */
    public verifyToken_result(verifyToken_result other) {
      if (other.isSetSuccess()) {
        this.success = new VerifyTokenResponse(other.success);
      }
      if (other.isSetEx1()) {
        this.ex1 = other.ex1;
      }
      if (other.isSetEx2()) {
        this.ex2 = other.ex2;
      }
      if (other.isSetEx3()) {
        this.ex3 = other.ex3;
      }
    }

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

    @Override
    public void clear() {
      this.success = null;
      this.ex1 = null;
      this.ex2 = null;
      this.ex3 = null;
    }

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

    public verifyToken_result setSuccess(VerifyTokenResponse success) {
      this.success = success;
      return this;
    }

    public void unsetSuccess() {
      this.success = null;
    }

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

    public void setSuccessIsSet(boolean value) {
      if (!value) {
        this.success = null;
      }
    }

    public tech.aroma.thrift.exceptions.OperationFailedException getEx1() {
      return this.ex1;
    }

    public verifyToken_result setEx1(tech.aroma.thrift.exceptions.OperationFailedException ex1) {
      this.ex1 = ex1;
      return this;
    }

    public void unsetEx1() {
      this.ex1 = null;
    }

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

    public void setEx1IsSet(boolean value) {
      if (!value) {
        this.ex1 = null;
      }
    }

    public tech.aroma.thrift.exceptions.InvalidTokenException getEx2() {
      return this.ex2;
    }

    public verifyToken_result setEx2(tech.aroma.thrift.exceptions.InvalidTokenException ex2) {
      this.ex2 = ex2;
      return this;
    }

    public void unsetEx2() {
      this.ex2 = null;
    }

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

    public void setEx2IsSet(boolean value) {
      if (!value) {
        this.ex2 = null;
      }
    }

    public tech.aroma.thrift.exceptions.InvalidArgumentException getEx3() {
      return this.ex3;
    }

    public verifyToken_result setEx3(tech.aroma.thrift.exceptions.InvalidArgumentException ex3) {
      this.ex3 = ex3;
      return this;
    }

    public void unsetEx3() {
      this.ex3 = null;
    }

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

    public void setEx3IsSet(boolean value) {
      if (!value) {
        this.ex3 = null;
      }
    }

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

      case EX1:
        if (value == null) {
          unsetEx1();
        } else {
          setEx1((tech.aroma.thrift.exceptions.OperationFailedException)value);
        }
        break;

      case EX2:
        if (value == null) {
          unsetEx2();
        } else {
          setEx2((tech.aroma.thrift.exceptions.InvalidTokenException)value);
        }
        break;

      case EX3:
        if (value == null) {
          unsetEx3();
        } else {
          setEx3((tech.aroma.thrift.exceptions.InvalidArgumentException)value);
        }
        break;

      }
    }

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

      case EX1:
        return getEx1();

      case EX2:
        return getEx2();

      case EX3:
        return getEx3();

      }
      throw new IllegalStateException();
    }

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

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      case EX1:
        return isSetEx1();
      case EX2:
        return isSetEx2();
      case EX3:
        return isSetEx3();
      }
      throw new IllegalStateException();
    }

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

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

      boolean this_present_success = true && this.isSetSuccess();
      boolean that_present_success = true && that.isSetSuccess();
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (!this.success.equals(that.success))
          return false;
      }

      boolean this_present_ex1 = true && this.isSetEx1();
      boolean that_present_ex1 = true && that.isSetEx1();
      if (this_present_ex1 || that_present_ex1) {
        if (!(this_present_ex1 && that_present_ex1))
          return false;
        if (!this.ex1.equals(that.ex1))
          return false;
      }

      boolean this_present_ex2 = true && this.isSetEx2();
      boolean that_present_ex2 = true && that.isSetEx2();
      if (this_present_ex2 || that_present_ex2) {
        if (!(this_present_ex2 && that_present_ex2))
          return false;
        if (!this.ex2.equals(that.ex2))
          return false;
      }

      boolean this_present_ex3 = true && this.isSetEx3();
      boolean that_present_ex3 = true && that.isSetEx3();
      if (this_present_ex3 || that_present_ex3) {
        if (!(this_present_ex3 && that_present_ex3))
          return false;
        if (!this.ex3.equals(that.ex3))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      List list = new ArrayList();

      boolean present_success = true && (isSetSuccess());
      list.add(present_success);
      if (present_success)
        list.add(success);

      boolean present_ex1 = true && (isSetEx1());
      list.add(present_ex1);
      if (present_ex1)
        list.add(ex1);

      boolean present_ex2 = true && (isSetEx2());
      list.add(present_ex2);
      if (present_ex2)
        list.add(ex2);

      boolean present_ex3 = true && (isSetEx3());
      list.add(present_ex3);
      if (present_ex3)
        list.add(ex3);

      return list.hashCode();
    }

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

      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetEx1()).compareTo(other.isSetEx1());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetEx1()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ex1, other.ex1);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetEx2()).compareTo(other.isSetEx2());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetEx2()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ex2, other.ex2);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetEx3()).compareTo(other.isSetEx3());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetEx3()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ex3, other.ex3);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

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

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

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

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

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

    private static class verifyToken_resultStandardSchemeFactory implements SchemeFactory {
      public verifyToken_resultStandardScheme getScheme() {
        return new verifyToken_resultStandardScheme();
      }
    }

    private static class verifyToken_resultStandardScheme extends StandardScheme {

      public void read(org.apache.thrift.protocol.TProtocol iprot, verifyToken_result struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TField schemeField;
        iprot.readStructBegin();
        while (true)
        {
          schemeField = iprot.readFieldBegin();
          if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { 
            break;
          }
          switch (schemeField.id) {
            case 0: // SUCCESS
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.success = new VerifyTokenResponse();
                struct.success.read(iprot);
                struct.setSuccessIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 1: // EX1
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.ex1 = new tech.aroma.thrift.exceptions.OperationFailedException();
                struct.ex1.read(iprot);
                struct.setEx1IsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // EX2
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.ex2 = new tech.aroma.thrift.exceptions.InvalidTokenException();
                struct.ex2.read(iprot);
                struct.setEx2IsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 3: // EX3
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.ex3 = new tech.aroma.thrift.exceptions.InvalidArgumentException();
                struct.ex3.read(iprot);
                struct.setEx3IsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            default:
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
          }
          iprot.readFieldEnd();
        }
        iprot.readStructEnd();

        // check for required fields of primitive type, which can't be checked in the validate method
        struct.validate();
      }

      public void write(org.apache.thrift.protocol.TProtocol oprot, verifyToken_result struct) throws 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.ex1 != null) {
          oprot.writeFieldBegin(EX1_FIELD_DESC);
          struct.ex1.write(oprot);
          oprot.writeFieldEnd();
        }
        if (struct.ex2 != null) {
          oprot.writeFieldBegin(EX2_FIELD_DESC);
          struct.ex2.write(oprot);
          oprot.writeFieldEnd();
        }
        if (struct.ex3 != null) {
          oprot.writeFieldBegin(EX3_FIELD_DESC);
          struct.ex3.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class verifyToken_resultTupleSchemeFactory implements SchemeFactory {
      public verifyToken_resultTupleScheme getScheme() {
        return new verifyToken_resultTupleScheme();
      }
    }

    private static class verifyToken_resultTupleScheme extends TupleScheme {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, verifyToken_result struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetSuccess()) {
          optionals.set(0);
        }
        if (struct.isSetEx1()) {
          optionals.set(1);
        }
        if (struct.isSetEx2()) {
          optionals.set(2);
        }
        if (struct.isSetEx3()) {
          optionals.set(3);
        }
        oprot.writeBitSet(optionals, 4);
        if (struct.isSetSuccess()) {
          struct.success.write(oprot);
        }
        if (struct.isSetEx1()) {
          struct.ex1.write(oprot);
        }
        if (struct.isSetEx2()) {
          struct.ex2.write(oprot);
        }
        if (struct.isSetEx3()) {
          struct.ex3.write(oprot);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, verifyToken_result struct) throws org.apache.thrift.TException {
        TTupleProtocol iprot = (TTupleProtocol) prot;
        BitSet incoming = iprot.readBitSet(4);
        if (incoming.get(0)) {
          struct.success = new VerifyTokenResponse();
          struct.success.read(iprot);
          struct.setSuccessIsSet(true);
        }
        if (incoming.get(1)) {
          struct.ex1 = new tech.aroma.thrift.exceptions.OperationFailedException();
          struct.ex1.read(iprot);
          struct.setEx1IsSet(true);
        }
        if (incoming.get(2)) {
          struct.ex2 = new tech.aroma.thrift.exceptions.InvalidTokenException();
          struct.ex2.read(iprot);
          struct.setEx2IsSet(true);
        }
        if (incoming.get(3)) {
          struct.ex3 = new tech.aroma.thrift.exceptions.InvalidArgumentException();
          struct.ex3.read(iprot);
          struct.setEx3IsSet(true);
        }
      }
    }

  }

}