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

com.evernote.edam.notestore.NoteStore Maven / Gradle / Ivy

There is a newer version: 1.25.1
Show newest version
/**
 * Autogenerated by Thrift
 *
 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
 */
package com.evernote.edam.notestore;

import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.util.HashMap;
import java.util.Set;
import java.util.HashSet;

import com.evernote.thrift.*;
import com.evernote.thrift.protocol.*;

public class NoteStore {

  public interface Iface extends NoteStoreIface { }

  public static class Client implements TServiceClient, Iface {
    public Client(TProtocol prot)
    {
      this(prot, prot);
    }

    public Client(TProtocol iprot, TProtocol oprot)
    {
      iprot_ = iprot;
      oprot_ = oprot;
    }

    protected TProtocol iprot_;
    protected TProtocol oprot_;

    protected int seqid_;

    public TProtocol getInputProtocol()
    {
      return this.iprot_;
    }

    public TProtocol getOutputProtocol()
    {
      return this.oprot_;
    }

    public SyncState getSyncState(String authenticationToken) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, TException
    {
      send_getSyncState(authenticationToken);
      return recv_getSyncState();
    }

    public void send_getSyncState(String authenticationToken) throws TException
    {
      oprot_.writeMessageBegin(new TMessage("getSyncState", TMessageType.CALL, ++seqid_));
      getSyncState_args args = new getSyncState_args();
      args.setAuthenticationToken(authenticationToken);
      args.write(oprot_);
      oprot_.writeMessageEnd();
      oprot_.getTransport().flush();
    }

    public SyncState recv_getSyncState() throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, TException
    {
      TMessage msg = iprot_.readMessageBegin();
      if (msg.type == TMessageType.EXCEPTION) {
        TApplicationException x = TApplicationException.read(iprot_);
        iprot_.readMessageEnd();
        throw x;
      }
      if (msg.seqid != seqid_) {
        throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "getSyncState failed: out of sequence response");
      }
      getSyncState_result result = new getSyncState_result();
      result.read(iprot_);
      iprot_.readMessageEnd();
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.userException != null) {
        throw result.userException;
      }
      if (result.systemException != null) {
        throw result.systemException;
      }
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getSyncState failed: unknown result");
    }

    public SyncState getSyncStateWithMetrics(String authenticationToken, ClientUsageMetrics clientMetrics) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, TException
    {
      send_getSyncStateWithMetrics(authenticationToken, clientMetrics);
      return recv_getSyncStateWithMetrics();
    }

    public void send_getSyncStateWithMetrics(String authenticationToken, ClientUsageMetrics clientMetrics) throws TException
    {
      oprot_.writeMessageBegin(new TMessage("getSyncStateWithMetrics", TMessageType.CALL, ++seqid_));
      getSyncStateWithMetrics_args args = new getSyncStateWithMetrics_args();
      args.setAuthenticationToken(authenticationToken);
      args.setClientMetrics(clientMetrics);
      args.write(oprot_);
      oprot_.writeMessageEnd();
      oprot_.getTransport().flush();
    }

    public SyncState recv_getSyncStateWithMetrics() throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, TException
    {
      TMessage msg = iprot_.readMessageBegin();
      if (msg.type == TMessageType.EXCEPTION) {
        TApplicationException x = TApplicationException.read(iprot_);
        iprot_.readMessageEnd();
        throw x;
      }
      if (msg.seqid != seqid_) {
        throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "getSyncStateWithMetrics failed: out of sequence response");
      }
      getSyncStateWithMetrics_result result = new getSyncStateWithMetrics_result();
      result.read(iprot_);
      iprot_.readMessageEnd();
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.userException != null) {
        throw result.userException;
      }
      if (result.systemException != null) {
        throw result.systemException;
      }
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getSyncStateWithMetrics failed: unknown result");
    }

    public SyncChunk getSyncChunk(String authenticationToken, int afterUSN, int maxEntries, boolean fullSyncOnly) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, TException
    {
      send_getSyncChunk(authenticationToken, afterUSN, maxEntries, fullSyncOnly);
      return recv_getSyncChunk();
    }

    public void send_getSyncChunk(String authenticationToken, int afterUSN, int maxEntries, boolean fullSyncOnly) throws TException
    {
      oprot_.writeMessageBegin(new TMessage("getSyncChunk", TMessageType.CALL, ++seqid_));
      getSyncChunk_args args = new getSyncChunk_args();
      args.setAuthenticationToken(authenticationToken);
      args.setAfterUSN(afterUSN);
      args.setMaxEntries(maxEntries);
      args.setFullSyncOnly(fullSyncOnly);
      args.write(oprot_);
      oprot_.writeMessageEnd();
      oprot_.getTransport().flush();
    }

    public SyncChunk recv_getSyncChunk() throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, TException
    {
      TMessage msg = iprot_.readMessageBegin();
      if (msg.type == TMessageType.EXCEPTION) {
        TApplicationException x = TApplicationException.read(iprot_);
        iprot_.readMessageEnd();
        throw x;
      }
      if (msg.seqid != seqid_) {
        throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "getSyncChunk failed: out of sequence response");
      }
      getSyncChunk_result result = new getSyncChunk_result();
      result.read(iprot_);
      iprot_.readMessageEnd();
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.userException != null) {
        throw result.userException;
      }
      if (result.systemException != null) {
        throw result.systemException;
      }
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getSyncChunk failed: unknown result");
    }

    public SyncChunk getFilteredSyncChunk(String authenticationToken, int afterUSN, int maxEntries, SyncChunkFilter filter) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, TException
    {
      send_getFilteredSyncChunk(authenticationToken, afterUSN, maxEntries, filter);
      return recv_getFilteredSyncChunk();
    }

    public void send_getFilteredSyncChunk(String authenticationToken, int afterUSN, int maxEntries, SyncChunkFilter filter) throws TException
    {
      oprot_.writeMessageBegin(new TMessage("getFilteredSyncChunk", TMessageType.CALL, ++seqid_));
      getFilteredSyncChunk_args args = new getFilteredSyncChunk_args();
      args.setAuthenticationToken(authenticationToken);
      args.setAfterUSN(afterUSN);
      args.setMaxEntries(maxEntries);
      args.setFilter(filter);
      args.write(oprot_);
      oprot_.writeMessageEnd();
      oprot_.getTransport().flush();
    }

    public SyncChunk recv_getFilteredSyncChunk() throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, TException
    {
      TMessage msg = iprot_.readMessageBegin();
      if (msg.type == TMessageType.EXCEPTION) {
        TApplicationException x = TApplicationException.read(iprot_);
        iprot_.readMessageEnd();
        throw x;
      }
      if (msg.seqid != seqid_) {
        throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "getFilteredSyncChunk failed: out of sequence response");
      }
      getFilteredSyncChunk_result result = new getFilteredSyncChunk_result();
      result.read(iprot_);
      iprot_.readMessageEnd();
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.userException != null) {
        throw result.userException;
      }
      if (result.systemException != null) {
        throw result.systemException;
      }
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getFilteredSyncChunk failed: unknown result");
    }

    public SyncState getLinkedNotebookSyncState(String authenticationToken, com.evernote.edam.type.LinkedNotebook linkedNotebook) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException
    {
      send_getLinkedNotebookSyncState(authenticationToken, linkedNotebook);
      return recv_getLinkedNotebookSyncState();
    }

    public void send_getLinkedNotebookSyncState(String authenticationToken, com.evernote.edam.type.LinkedNotebook linkedNotebook) throws TException
    {
      oprot_.writeMessageBegin(new TMessage("getLinkedNotebookSyncState", TMessageType.CALL, ++seqid_));
      getLinkedNotebookSyncState_args args = new getLinkedNotebookSyncState_args();
      args.setAuthenticationToken(authenticationToken);
      args.setLinkedNotebook(linkedNotebook);
      args.write(oprot_);
      oprot_.writeMessageEnd();
      oprot_.getTransport().flush();
    }

    public SyncState recv_getLinkedNotebookSyncState() throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException
    {
      TMessage msg = iprot_.readMessageBegin();
      if (msg.type == TMessageType.EXCEPTION) {
        TApplicationException x = TApplicationException.read(iprot_);
        iprot_.readMessageEnd();
        throw x;
      }
      if (msg.seqid != seqid_) {
        throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "getLinkedNotebookSyncState failed: out of sequence response");
      }
      getLinkedNotebookSyncState_result result = new getLinkedNotebookSyncState_result();
      result.read(iprot_);
      iprot_.readMessageEnd();
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.userException != null) {
        throw result.userException;
      }
      if (result.systemException != null) {
        throw result.systemException;
      }
      if (result.notFoundException != null) {
        throw result.notFoundException;
      }
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getLinkedNotebookSyncState failed: unknown result");
    }

    public SyncChunk getLinkedNotebookSyncChunk(String authenticationToken, com.evernote.edam.type.LinkedNotebook linkedNotebook, int afterUSN, int maxEntries, boolean fullSyncOnly) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException
    {
      send_getLinkedNotebookSyncChunk(authenticationToken, linkedNotebook, afterUSN, maxEntries, fullSyncOnly);
      return recv_getLinkedNotebookSyncChunk();
    }

    public void send_getLinkedNotebookSyncChunk(String authenticationToken, com.evernote.edam.type.LinkedNotebook linkedNotebook, int afterUSN, int maxEntries, boolean fullSyncOnly) throws TException
    {
      oprot_.writeMessageBegin(new TMessage("getLinkedNotebookSyncChunk", TMessageType.CALL, ++seqid_));
      getLinkedNotebookSyncChunk_args args = new getLinkedNotebookSyncChunk_args();
      args.setAuthenticationToken(authenticationToken);
      args.setLinkedNotebook(linkedNotebook);
      args.setAfterUSN(afterUSN);
      args.setMaxEntries(maxEntries);
      args.setFullSyncOnly(fullSyncOnly);
      args.write(oprot_);
      oprot_.writeMessageEnd();
      oprot_.getTransport().flush();
    }

    public SyncChunk recv_getLinkedNotebookSyncChunk() throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException
    {
      TMessage msg = iprot_.readMessageBegin();
      if (msg.type == TMessageType.EXCEPTION) {
        TApplicationException x = TApplicationException.read(iprot_);
        iprot_.readMessageEnd();
        throw x;
      }
      if (msg.seqid != seqid_) {
        throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "getLinkedNotebookSyncChunk failed: out of sequence response");
      }
      getLinkedNotebookSyncChunk_result result = new getLinkedNotebookSyncChunk_result();
      result.read(iprot_);
      iprot_.readMessageEnd();
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.userException != null) {
        throw result.userException;
      }
      if (result.systemException != null) {
        throw result.systemException;
      }
      if (result.notFoundException != null) {
        throw result.notFoundException;
      }
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getLinkedNotebookSyncChunk failed: unknown result");
    }

    public List listNotebooks(String authenticationToken) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, TException
    {
      send_listNotebooks(authenticationToken);
      return recv_listNotebooks();
    }

    public void send_listNotebooks(String authenticationToken) throws TException
    {
      oprot_.writeMessageBegin(new TMessage("listNotebooks", TMessageType.CALL, ++seqid_));
      listNotebooks_args args = new listNotebooks_args();
      args.setAuthenticationToken(authenticationToken);
      args.write(oprot_);
      oprot_.writeMessageEnd();
      oprot_.getTransport().flush();
    }

    public List recv_listNotebooks() throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, TException
    {
      TMessage msg = iprot_.readMessageBegin();
      if (msg.type == TMessageType.EXCEPTION) {
        TApplicationException x = TApplicationException.read(iprot_);
        iprot_.readMessageEnd();
        throw x;
      }
      if (msg.seqid != seqid_) {
        throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "listNotebooks failed: out of sequence response");
      }
      listNotebooks_result result = new listNotebooks_result();
      result.read(iprot_);
      iprot_.readMessageEnd();
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.userException != null) {
        throw result.userException;
      }
      if (result.systemException != null) {
        throw result.systemException;
      }
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "listNotebooks failed: unknown result");
    }

    public com.evernote.edam.type.Notebook getNotebook(String authenticationToken, String guid) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException
    {
      send_getNotebook(authenticationToken, guid);
      return recv_getNotebook();
    }

    public void send_getNotebook(String authenticationToken, String guid) throws TException
    {
      oprot_.writeMessageBegin(new TMessage("getNotebook", TMessageType.CALL, ++seqid_));
      getNotebook_args args = new getNotebook_args();
      args.setAuthenticationToken(authenticationToken);
      args.setGuid(guid);
      args.write(oprot_);
      oprot_.writeMessageEnd();
      oprot_.getTransport().flush();
    }

    public com.evernote.edam.type.Notebook recv_getNotebook() throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException
    {
      TMessage msg = iprot_.readMessageBegin();
      if (msg.type == TMessageType.EXCEPTION) {
        TApplicationException x = TApplicationException.read(iprot_);
        iprot_.readMessageEnd();
        throw x;
      }
      if (msg.seqid != seqid_) {
        throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "getNotebook failed: out of sequence response");
      }
      getNotebook_result result = new getNotebook_result();
      result.read(iprot_);
      iprot_.readMessageEnd();
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.userException != null) {
        throw result.userException;
      }
      if (result.systemException != null) {
        throw result.systemException;
      }
      if (result.notFoundException != null) {
        throw result.notFoundException;
      }
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getNotebook failed: unknown result");
    }

    public com.evernote.edam.type.Notebook getDefaultNotebook(String authenticationToken) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, TException
    {
      send_getDefaultNotebook(authenticationToken);
      return recv_getDefaultNotebook();
    }

    public void send_getDefaultNotebook(String authenticationToken) throws TException
    {
      oprot_.writeMessageBegin(new TMessage("getDefaultNotebook", TMessageType.CALL, ++seqid_));
      getDefaultNotebook_args args = new getDefaultNotebook_args();
      args.setAuthenticationToken(authenticationToken);
      args.write(oprot_);
      oprot_.writeMessageEnd();
      oprot_.getTransport().flush();
    }

    public com.evernote.edam.type.Notebook recv_getDefaultNotebook() throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, TException
    {
      TMessage msg = iprot_.readMessageBegin();
      if (msg.type == TMessageType.EXCEPTION) {
        TApplicationException x = TApplicationException.read(iprot_);
        iprot_.readMessageEnd();
        throw x;
      }
      if (msg.seqid != seqid_) {
        throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "getDefaultNotebook failed: out of sequence response");
      }
      getDefaultNotebook_result result = new getDefaultNotebook_result();
      result.read(iprot_);
      iprot_.readMessageEnd();
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.userException != null) {
        throw result.userException;
      }
      if (result.systemException != null) {
        throw result.systemException;
      }
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getDefaultNotebook failed: unknown result");
    }

    public com.evernote.edam.type.Notebook createNotebook(String authenticationToken, com.evernote.edam.type.Notebook notebook) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, TException
    {
      send_createNotebook(authenticationToken, notebook);
      return recv_createNotebook();
    }

    public void send_createNotebook(String authenticationToken, com.evernote.edam.type.Notebook notebook) throws TException
    {
      oprot_.writeMessageBegin(new TMessage("createNotebook", TMessageType.CALL, ++seqid_));
      createNotebook_args args = new createNotebook_args();
      args.setAuthenticationToken(authenticationToken);
      args.setNotebook(notebook);
      args.write(oprot_);
      oprot_.writeMessageEnd();
      oprot_.getTransport().flush();
    }

    public com.evernote.edam.type.Notebook recv_createNotebook() throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, TException
    {
      TMessage msg = iprot_.readMessageBegin();
      if (msg.type == TMessageType.EXCEPTION) {
        TApplicationException x = TApplicationException.read(iprot_);
        iprot_.readMessageEnd();
        throw x;
      }
      if (msg.seqid != seqid_) {
        throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "createNotebook failed: out of sequence response");
      }
      createNotebook_result result = new createNotebook_result();
      result.read(iprot_);
      iprot_.readMessageEnd();
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.userException != null) {
        throw result.userException;
      }
      if (result.systemException != null) {
        throw result.systemException;
      }
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "createNotebook failed: unknown result");
    }

    public int updateNotebook(String authenticationToken, com.evernote.edam.type.Notebook notebook) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException
    {
      send_updateNotebook(authenticationToken, notebook);
      return recv_updateNotebook();
    }

    public void send_updateNotebook(String authenticationToken, com.evernote.edam.type.Notebook notebook) throws TException
    {
      oprot_.writeMessageBegin(new TMessage("updateNotebook", TMessageType.CALL, ++seqid_));
      updateNotebook_args args = new updateNotebook_args();
      args.setAuthenticationToken(authenticationToken);
      args.setNotebook(notebook);
      args.write(oprot_);
      oprot_.writeMessageEnd();
      oprot_.getTransport().flush();
    }

    public int recv_updateNotebook() throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException
    {
      TMessage msg = iprot_.readMessageBegin();
      if (msg.type == TMessageType.EXCEPTION) {
        TApplicationException x = TApplicationException.read(iprot_);
        iprot_.readMessageEnd();
        throw x;
      }
      if (msg.seqid != seqid_) {
        throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "updateNotebook failed: out of sequence response");
      }
      updateNotebook_result result = new updateNotebook_result();
      result.read(iprot_);
      iprot_.readMessageEnd();
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.userException != null) {
        throw result.userException;
      }
      if (result.systemException != null) {
        throw result.systemException;
      }
      if (result.notFoundException != null) {
        throw result.notFoundException;
      }
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "updateNotebook failed: unknown result");
    }

    public int expungeNotebook(String authenticationToken, String guid) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException
    {
      send_expungeNotebook(authenticationToken, guid);
      return recv_expungeNotebook();
    }

    public void send_expungeNotebook(String authenticationToken, String guid) throws TException
    {
      oprot_.writeMessageBegin(new TMessage("expungeNotebook", TMessageType.CALL, ++seqid_));
      expungeNotebook_args args = new expungeNotebook_args();
      args.setAuthenticationToken(authenticationToken);
      args.setGuid(guid);
      args.write(oprot_);
      oprot_.writeMessageEnd();
      oprot_.getTransport().flush();
    }

    public int recv_expungeNotebook() throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException
    {
      TMessage msg = iprot_.readMessageBegin();
      if (msg.type == TMessageType.EXCEPTION) {
        TApplicationException x = TApplicationException.read(iprot_);
        iprot_.readMessageEnd();
        throw x;
      }
      if (msg.seqid != seqid_) {
        throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "expungeNotebook failed: out of sequence response");
      }
      expungeNotebook_result result = new expungeNotebook_result();
      result.read(iprot_);
      iprot_.readMessageEnd();
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.userException != null) {
        throw result.userException;
      }
      if (result.systemException != null) {
        throw result.systemException;
      }
      if (result.notFoundException != null) {
        throw result.notFoundException;
      }
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "expungeNotebook failed: unknown result");
    }

    public List listTags(String authenticationToken) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, TException
    {
      send_listTags(authenticationToken);
      return recv_listTags();
    }

    public void send_listTags(String authenticationToken) throws TException
    {
      oprot_.writeMessageBegin(new TMessage("listTags", TMessageType.CALL, ++seqid_));
      listTags_args args = new listTags_args();
      args.setAuthenticationToken(authenticationToken);
      args.write(oprot_);
      oprot_.writeMessageEnd();
      oprot_.getTransport().flush();
    }

    public List recv_listTags() throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, TException
    {
      TMessage msg = iprot_.readMessageBegin();
      if (msg.type == TMessageType.EXCEPTION) {
        TApplicationException x = TApplicationException.read(iprot_);
        iprot_.readMessageEnd();
        throw x;
      }
      if (msg.seqid != seqid_) {
        throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "listTags failed: out of sequence response");
      }
      listTags_result result = new listTags_result();
      result.read(iprot_);
      iprot_.readMessageEnd();
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.userException != null) {
        throw result.userException;
      }
      if (result.systemException != null) {
        throw result.systemException;
      }
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "listTags failed: unknown result");
    }

    public List listTagsByNotebook(String authenticationToken, String notebookGuid) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException
    {
      send_listTagsByNotebook(authenticationToken, notebookGuid);
      return recv_listTagsByNotebook();
    }

    public void send_listTagsByNotebook(String authenticationToken, String notebookGuid) throws TException
    {
      oprot_.writeMessageBegin(new TMessage("listTagsByNotebook", TMessageType.CALL, ++seqid_));
      listTagsByNotebook_args args = new listTagsByNotebook_args();
      args.setAuthenticationToken(authenticationToken);
      args.setNotebookGuid(notebookGuid);
      args.write(oprot_);
      oprot_.writeMessageEnd();
      oprot_.getTransport().flush();
    }

    public List recv_listTagsByNotebook() throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException
    {
      TMessage msg = iprot_.readMessageBegin();
      if (msg.type == TMessageType.EXCEPTION) {
        TApplicationException x = TApplicationException.read(iprot_);
        iprot_.readMessageEnd();
        throw x;
      }
      if (msg.seqid != seqid_) {
        throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "listTagsByNotebook failed: out of sequence response");
      }
      listTagsByNotebook_result result = new listTagsByNotebook_result();
      result.read(iprot_);
      iprot_.readMessageEnd();
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.userException != null) {
        throw result.userException;
      }
      if (result.systemException != null) {
        throw result.systemException;
      }
      if (result.notFoundException != null) {
        throw result.notFoundException;
      }
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "listTagsByNotebook failed: unknown result");
    }

    public com.evernote.edam.type.Tag getTag(String authenticationToken, String guid) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException
    {
      send_getTag(authenticationToken, guid);
      return recv_getTag();
    }

    public void send_getTag(String authenticationToken, String guid) throws TException
    {
      oprot_.writeMessageBegin(new TMessage("getTag", TMessageType.CALL, ++seqid_));
      getTag_args args = new getTag_args();
      args.setAuthenticationToken(authenticationToken);
      args.setGuid(guid);
      args.write(oprot_);
      oprot_.writeMessageEnd();
      oprot_.getTransport().flush();
    }

    public com.evernote.edam.type.Tag recv_getTag() throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException
    {
      TMessage msg = iprot_.readMessageBegin();
      if (msg.type == TMessageType.EXCEPTION) {
        TApplicationException x = TApplicationException.read(iprot_);
        iprot_.readMessageEnd();
        throw x;
      }
      if (msg.seqid != seqid_) {
        throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "getTag failed: out of sequence response");
      }
      getTag_result result = new getTag_result();
      result.read(iprot_);
      iprot_.readMessageEnd();
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.userException != null) {
        throw result.userException;
      }
      if (result.systemException != null) {
        throw result.systemException;
      }
      if (result.notFoundException != null) {
        throw result.notFoundException;
      }
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getTag failed: unknown result");
    }

    public com.evernote.edam.type.Tag createTag(String authenticationToken, com.evernote.edam.type.Tag tag) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException
    {
      send_createTag(authenticationToken, tag);
      return recv_createTag();
    }

    public void send_createTag(String authenticationToken, com.evernote.edam.type.Tag tag) throws TException
    {
      oprot_.writeMessageBegin(new TMessage("createTag", TMessageType.CALL, ++seqid_));
      createTag_args args = new createTag_args();
      args.setAuthenticationToken(authenticationToken);
      args.setTag(tag);
      args.write(oprot_);
      oprot_.writeMessageEnd();
      oprot_.getTransport().flush();
    }

    public com.evernote.edam.type.Tag recv_createTag() throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException
    {
      TMessage msg = iprot_.readMessageBegin();
      if (msg.type == TMessageType.EXCEPTION) {
        TApplicationException x = TApplicationException.read(iprot_);
        iprot_.readMessageEnd();
        throw x;
      }
      if (msg.seqid != seqid_) {
        throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "createTag failed: out of sequence response");
      }
      createTag_result result = new createTag_result();
      result.read(iprot_);
      iprot_.readMessageEnd();
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.userException != null) {
        throw result.userException;
      }
      if (result.systemException != null) {
        throw result.systemException;
      }
      if (result.notFoundException != null) {
        throw result.notFoundException;
      }
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "createTag failed: unknown result");
    }

    public int updateTag(String authenticationToken, com.evernote.edam.type.Tag tag) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException
    {
      send_updateTag(authenticationToken, tag);
      return recv_updateTag();
    }

    public void send_updateTag(String authenticationToken, com.evernote.edam.type.Tag tag) throws TException
    {
      oprot_.writeMessageBegin(new TMessage("updateTag", TMessageType.CALL, ++seqid_));
      updateTag_args args = new updateTag_args();
      args.setAuthenticationToken(authenticationToken);
      args.setTag(tag);
      args.write(oprot_);
      oprot_.writeMessageEnd();
      oprot_.getTransport().flush();
    }

    public int recv_updateTag() throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException
    {
      TMessage msg = iprot_.readMessageBegin();
      if (msg.type == TMessageType.EXCEPTION) {
        TApplicationException x = TApplicationException.read(iprot_);
        iprot_.readMessageEnd();
        throw x;
      }
      if (msg.seqid != seqid_) {
        throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "updateTag failed: out of sequence response");
      }
      updateTag_result result = new updateTag_result();
      result.read(iprot_);
      iprot_.readMessageEnd();
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.userException != null) {
        throw result.userException;
      }
      if (result.systemException != null) {
        throw result.systemException;
      }
      if (result.notFoundException != null) {
        throw result.notFoundException;
      }
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "updateTag failed: unknown result");
    }

    public void untagAll(String authenticationToken, String guid) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException
    {
      send_untagAll(authenticationToken, guid);
      recv_untagAll();
    }

    public void send_untagAll(String authenticationToken, String guid) throws TException
    {
      oprot_.writeMessageBegin(new TMessage("untagAll", TMessageType.CALL, ++seqid_));
      untagAll_args args = new untagAll_args();
      args.setAuthenticationToken(authenticationToken);
      args.setGuid(guid);
      args.write(oprot_);
      oprot_.writeMessageEnd();
      oprot_.getTransport().flush();
    }

    public void recv_untagAll() throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException
    {
      TMessage msg = iprot_.readMessageBegin();
      if (msg.type == TMessageType.EXCEPTION) {
        TApplicationException x = TApplicationException.read(iprot_);
        iprot_.readMessageEnd();
        throw x;
      }
      if (msg.seqid != seqid_) {
        throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "untagAll failed: out of sequence response");
      }
      untagAll_result result = new untagAll_result();
      result.read(iprot_);
      iprot_.readMessageEnd();
      if (result.userException != null) {
        throw result.userException;
      }
      if (result.systemException != null) {
        throw result.systemException;
      }
      if (result.notFoundException != null) {
        throw result.notFoundException;
      }
      return;
    }

    public int expungeTag(String authenticationToken, String guid) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException
    {
      send_expungeTag(authenticationToken, guid);
      return recv_expungeTag();
    }

    public void send_expungeTag(String authenticationToken, String guid) throws TException
    {
      oprot_.writeMessageBegin(new TMessage("expungeTag", TMessageType.CALL, ++seqid_));
      expungeTag_args args = new expungeTag_args();
      args.setAuthenticationToken(authenticationToken);
      args.setGuid(guid);
      args.write(oprot_);
      oprot_.writeMessageEnd();
      oprot_.getTransport().flush();
    }

    public int recv_expungeTag() throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException
    {
      TMessage msg = iprot_.readMessageBegin();
      if (msg.type == TMessageType.EXCEPTION) {
        TApplicationException x = TApplicationException.read(iprot_);
        iprot_.readMessageEnd();
        throw x;
      }
      if (msg.seqid != seqid_) {
        throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "expungeTag failed: out of sequence response");
      }
      expungeTag_result result = new expungeTag_result();
      result.read(iprot_);
      iprot_.readMessageEnd();
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.userException != null) {
        throw result.userException;
      }
      if (result.systemException != null) {
        throw result.systemException;
      }
      if (result.notFoundException != null) {
        throw result.notFoundException;
      }
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "expungeTag failed: unknown result");
    }

    public List listSearches(String authenticationToken) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, TException
    {
      send_listSearches(authenticationToken);
      return recv_listSearches();
    }

    public void send_listSearches(String authenticationToken) throws TException
    {
      oprot_.writeMessageBegin(new TMessage("listSearches", TMessageType.CALL, ++seqid_));
      listSearches_args args = new listSearches_args();
      args.setAuthenticationToken(authenticationToken);
      args.write(oprot_);
      oprot_.writeMessageEnd();
      oprot_.getTransport().flush();
    }

    public List recv_listSearches() throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, TException
    {
      TMessage msg = iprot_.readMessageBegin();
      if (msg.type == TMessageType.EXCEPTION) {
        TApplicationException x = TApplicationException.read(iprot_);
        iprot_.readMessageEnd();
        throw x;
      }
      if (msg.seqid != seqid_) {
        throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "listSearches failed: out of sequence response");
      }
      listSearches_result result = new listSearches_result();
      result.read(iprot_);
      iprot_.readMessageEnd();
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.userException != null) {
        throw result.userException;
      }
      if (result.systemException != null) {
        throw result.systemException;
      }
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "listSearches failed: unknown result");
    }

    public com.evernote.edam.type.SavedSearch getSearch(String authenticationToken, String guid) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException
    {
      send_getSearch(authenticationToken, guid);
      return recv_getSearch();
    }

    public void send_getSearch(String authenticationToken, String guid) throws TException
    {
      oprot_.writeMessageBegin(new TMessage("getSearch", TMessageType.CALL, ++seqid_));
      getSearch_args args = new getSearch_args();
      args.setAuthenticationToken(authenticationToken);
      args.setGuid(guid);
      args.write(oprot_);
      oprot_.writeMessageEnd();
      oprot_.getTransport().flush();
    }

    public com.evernote.edam.type.SavedSearch recv_getSearch() throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException
    {
      TMessage msg = iprot_.readMessageBegin();
      if (msg.type == TMessageType.EXCEPTION) {
        TApplicationException x = TApplicationException.read(iprot_);
        iprot_.readMessageEnd();
        throw x;
      }
      if (msg.seqid != seqid_) {
        throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "getSearch failed: out of sequence response");
      }
      getSearch_result result = new getSearch_result();
      result.read(iprot_);
      iprot_.readMessageEnd();
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.userException != null) {
        throw result.userException;
      }
      if (result.systemException != null) {
        throw result.systemException;
      }
      if (result.notFoundException != null) {
        throw result.notFoundException;
      }
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getSearch failed: unknown result");
    }

    public com.evernote.edam.type.SavedSearch createSearch(String authenticationToken, com.evernote.edam.type.SavedSearch search) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, TException
    {
      send_createSearch(authenticationToken, search);
      return recv_createSearch();
    }

    public void send_createSearch(String authenticationToken, com.evernote.edam.type.SavedSearch search) throws TException
    {
      oprot_.writeMessageBegin(new TMessage("createSearch", TMessageType.CALL, ++seqid_));
      createSearch_args args = new createSearch_args();
      args.setAuthenticationToken(authenticationToken);
      args.setSearch(search);
      args.write(oprot_);
      oprot_.writeMessageEnd();
      oprot_.getTransport().flush();
    }

    public com.evernote.edam.type.SavedSearch recv_createSearch() throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, TException
    {
      TMessage msg = iprot_.readMessageBegin();
      if (msg.type == TMessageType.EXCEPTION) {
        TApplicationException x = TApplicationException.read(iprot_);
        iprot_.readMessageEnd();
        throw x;
      }
      if (msg.seqid != seqid_) {
        throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "createSearch failed: out of sequence response");
      }
      createSearch_result result = new createSearch_result();
      result.read(iprot_);
      iprot_.readMessageEnd();
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.userException != null) {
        throw result.userException;
      }
      if (result.systemException != null) {
        throw result.systemException;
      }
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "createSearch failed: unknown result");
    }

    public int updateSearch(String authenticationToken, com.evernote.edam.type.SavedSearch search) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException
    {
      send_updateSearch(authenticationToken, search);
      return recv_updateSearch();
    }

    public void send_updateSearch(String authenticationToken, com.evernote.edam.type.SavedSearch search) throws TException
    {
      oprot_.writeMessageBegin(new TMessage("updateSearch", TMessageType.CALL, ++seqid_));
      updateSearch_args args = new updateSearch_args();
      args.setAuthenticationToken(authenticationToken);
      args.setSearch(search);
      args.write(oprot_);
      oprot_.writeMessageEnd();
      oprot_.getTransport().flush();
    }

    public int recv_updateSearch() throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException
    {
      TMessage msg = iprot_.readMessageBegin();
      if (msg.type == TMessageType.EXCEPTION) {
        TApplicationException x = TApplicationException.read(iprot_);
        iprot_.readMessageEnd();
        throw x;
      }
      if (msg.seqid != seqid_) {
        throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "updateSearch failed: out of sequence response");
      }
      updateSearch_result result = new updateSearch_result();
      result.read(iprot_);
      iprot_.readMessageEnd();
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.userException != null) {
        throw result.userException;
      }
      if (result.systemException != null) {
        throw result.systemException;
      }
      if (result.notFoundException != null) {
        throw result.notFoundException;
      }
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "updateSearch failed: unknown result");
    }

    public int expungeSearch(String authenticationToken, String guid) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException
    {
      send_expungeSearch(authenticationToken, guid);
      return recv_expungeSearch();
    }

    public void send_expungeSearch(String authenticationToken, String guid) throws TException
    {
      oprot_.writeMessageBegin(new TMessage("expungeSearch", TMessageType.CALL, ++seqid_));
      expungeSearch_args args = new expungeSearch_args();
      args.setAuthenticationToken(authenticationToken);
      args.setGuid(guid);
      args.write(oprot_);
      oprot_.writeMessageEnd();
      oprot_.getTransport().flush();
    }

    public int recv_expungeSearch() throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException
    {
      TMessage msg = iprot_.readMessageBegin();
      if (msg.type == TMessageType.EXCEPTION) {
        TApplicationException x = TApplicationException.read(iprot_);
        iprot_.readMessageEnd();
        throw x;
      }
      if (msg.seqid != seqid_) {
        throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "expungeSearch failed: out of sequence response");
      }
      expungeSearch_result result = new expungeSearch_result();
      result.read(iprot_);
      iprot_.readMessageEnd();
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.userException != null) {
        throw result.userException;
      }
      if (result.systemException != null) {
        throw result.systemException;
      }
      if (result.notFoundException != null) {
        throw result.notFoundException;
      }
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "expungeSearch failed: unknown result");
    }

    public NoteList findNotes(String authenticationToken, NoteFilter filter, int offset, int maxNotes) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException
    {
      send_findNotes(authenticationToken, filter, offset, maxNotes);
      return recv_findNotes();
    }

    public void send_findNotes(String authenticationToken, NoteFilter filter, int offset, int maxNotes) throws TException
    {
      oprot_.writeMessageBegin(new TMessage("findNotes", TMessageType.CALL, ++seqid_));
      findNotes_args args = new findNotes_args();
      args.setAuthenticationToken(authenticationToken);
      args.setFilter(filter);
      args.setOffset(offset);
      args.setMaxNotes(maxNotes);
      args.write(oprot_);
      oprot_.writeMessageEnd();
      oprot_.getTransport().flush();
    }

    public NoteList recv_findNotes() throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException
    {
      TMessage msg = iprot_.readMessageBegin();
      if (msg.type == TMessageType.EXCEPTION) {
        TApplicationException x = TApplicationException.read(iprot_);
        iprot_.readMessageEnd();
        throw x;
      }
      if (msg.seqid != seqid_) {
        throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "findNotes failed: out of sequence response");
      }
      findNotes_result result = new findNotes_result();
      result.read(iprot_);
      iprot_.readMessageEnd();
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.userException != null) {
        throw result.userException;
      }
      if (result.systemException != null) {
        throw result.systemException;
      }
      if (result.notFoundException != null) {
        throw result.notFoundException;
      }
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "findNotes failed: unknown result");
    }

    public int findNoteOffset(String authenticationToken, NoteFilter filter, String guid) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException
    {
      send_findNoteOffset(authenticationToken, filter, guid);
      return recv_findNoteOffset();
    }

    public void send_findNoteOffset(String authenticationToken, NoteFilter filter, String guid) throws TException
    {
      oprot_.writeMessageBegin(new TMessage("findNoteOffset", TMessageType.CALL, ++seqid_));
      findNoteOffset_args args = new findNoteOffset_args();
      args.setAuthenticationToken(authenticationToken);
      args.setFilter(filter);
      args.setGuid(guid);
      args.write(oprot_);
      oprot_.writeMessageEnd();
      oprot_.getTransport().flush();
    }

    public int recv_findNoteOffset() throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException
    {
      TMessage msg = iprot_.readMessageBegin();
      if (msg.type == TMessageType.EXCEPTION) {
        TApplicationException x = TApplicationException.read(iprot_);
        iprot_.readMessageEnd();
        throw x;
      }
      if (msg.seqid != seqid_) {
        throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "findNoteOffset failed: out of sequence response");
      }
      findNoteOffset_result result = new findNoteOffset_result();
      result.read(iprot_);
      iprot_.readMessageEnd();
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.userException != null) {
        throw result.userException;
      }
      if (result.systemException != null) {
        throw result.systemException;
      }
      if (result.notFoundException != null) {
        throw result.notFoundException;
      }
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "findNoteOffset failed: unknown result");
    }

    public NotesMetadataList findNotesMetadata(String authenticationToken, NoteFilter filter, int offset, int maxNotes, NotesMetadataResultSpec resultSpec) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException
    {
      send_findNotesMetadata(authenticationToken, filter, offset, maxNotes, resultSpec);
      return recv_findNotesMetadata();
    }

    public void send_findNotesMetadata(String authenticationToken, NoteFilter filter, int offset, int maxNotes, NotesMetadataResultSpec resultSpec) throws TException
    {
      oprot_.writeMessageBegin(new TMessage("findNotesMetadata", TMessageType.CALL, ++seqid_));
      findNotesMetadata_args args = new findNotesMetadata_args();
      args.setAuthenticationToken(authenticationToken);
      args.setFilter(filter);
      args.setOffset(offset);
      args.setMaxNotes(maxNotes);
      args.setResultSpec(resultSpec);
      args.write(oprot_);
      oprot_.writeMessageEnd();
      oprot_.getTransport().flush();
    }

    public NotesMetadataList recv_findNotesMetadata() throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException
    {
      TMessage msg = iprot_.readMessageBegin();
      if (msg.type == TMessageType.EXCEPTION) {
        TApplicationException x = TApplicationException.read(iprot_);
        iprot_.readMessageEnd();
        throw x;
      }
      if (msg.seqid != seqid_) {
        throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "findNotesMetadata failed: out of sequence response");
      }
      findNotesMetadata_result result = new findNotesMetadata_result();
      result.read(iprot_);
      iprot_.readMessageEnd();
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.userException != null) {
        throw result.userException;
      }
      if (result.systemException != null) {
        throw result.systemException;
      }
      if (result.notFoundException != null) {
        throw result.notFoundException;
      }
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "findNotesMetadata failed: unknown result");
    }

    public NoteCollectionCounts findNoteCounts(String authenticationToken, NoteFilter filter, boolean withTrash) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException
    {
      send_findNoteCounts(authenticationToken, filter, withTrash);
      return recv_findNoteCounts();
    }

    public void send_findNoteCounts(String authenticationToken, NoteFilter filter, boolean withTrash) throws TException
    {
      oprot_.writeMessageBegin(new TMessage("findNoteCounts", TMessageType.CALL, ++seqid_));
      findNoteCounts_args args = new findNoteCounts_args();
      args.setAuthenticationToken(authenticationToken);
      args.setFilter(filter);
      args.setWithTrash(withTrash);
      args.write(oprot_);
      oprot_.writeMessageEnd();
      oprot_.getTransport().flush();
    }

    public NoteCollectionCounts recv_findNoteCounts() throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException
    {
      TMessage msg = iprot_.readMessageBegin();
      if (msg.type == TMessageType.EXCEPTION) {
        TApplicationException x = TApplicationException.read(iprot_);
        iprot_.readMessageEnd();
        throw x;
      }
      if (msg.seqid != seqid_) {
        throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "findNoteCounts failed: out of sequence response");
      }
      findNoteCounts_result result = new findNoteCounts_result();
      result.read(iprot_);
      iprot_.readMessageEnd();
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.userException != null) {
        throw result.userException;
      }
      if (result.systemException != null) {
        throw result.systemException;
      }
      if (result.notFoundException != null) {
        throw result.notFoundException;
      }
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "findNoteCounts failed: unknown result");
    }

    public com.evernote.edam.type.Note getNote(String authenticationToken, String guid, boolean withContent, boolean withResourcesData, boolean withResourcesRecognition, boolean withResourcesAlternateData) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException
    {
      send_getNote(authenticationToken, guid, withContent, withResourcesData, withResourcesRecognition, withResourcesAlternateData);
      return recv_getNote();
    }

    public void send_getNote(String authenticationToken, String guid, boolean withContent, boolean withResourcesData, boolean withResourcesRecognition, boolean withResourcesAlternateData) throws TException
    {
      oprot_.writeMessageBegin(new TMessage("getNote", TMessageType.CALL, ++seqid_));
      getNote_args args = new getNote_args();
      args.setAuthenticationToken(authenticationToken);
      args.setGuid(guid);
      args.setWithContent(withContent);
      args.setWithResourcesData(withResourcesData);
      args.setWithResourcesRecognition(withResourcesRecognition);
      args.setWithResourcesAlternateData(withResourcesAlternateData);
      args.write(oprot_);
      oprot_.writeMessageEnd();
      oprot_.getTransport().flush();
    }

    public com.evernote.edam.type.Note recv_getNote() throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException
    {
      TMessage msg = iprot_.readMessageBegin();
      if (msg.type == TMessageType.EXCEPTION) {
        TApplicationException x = TApplicationException.read(iprot_);
        iprot_.readMessageEnd();
        throw x;
      }
      if (msg.seqid != seqid_) {
        throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "getNote failed: out of sequence response");
      }
      getNote_result result = new getNote_result();
      result.read(iprot_);
      iprot_.readMessageEnd();
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.userException != null) {
        throw result.userException;
      }
      if (result.systemException != null) {
        throw result.systemException;
      }
      if (result.notFoundException != null) {
        throw result.notFoundException;
      }
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getNote failed: unknown result");
    }

    public com.evernote.edam.type.LazyMap getNoteApplicationData(String authenticationToken, String guid) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException
    {
      send_getNoteApplicationData(authenticationToken, guid);
      return recv_getNoteApplicationData();
    }

    public void send_getNoteApplicationData(String authenticationToken, String guid) throws TException
    {
      oprot_.writeMessageBegin(new TMessage("getNoteApplicationData", TMessageType.CALL, ++seqid_));
      getNoteApplicationData_args args = new getNoteApplicationData_args();
      args.setAuthenticationToken(authenticationToken);
      args.setGuid(guid);
      args.write(oprot_);
      oprot_.writeMessageEnd();
      oprot_.getTransport().flush();
    }

    public com.evernote.edam.type.LazyMap recv_getNoteApplicationData() throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException
    {
      TMessage msg = iprot_.readMessageBegin();
      if (msg.type == TMessageType.EXCEPTION) {
        TApplicationException x = TApplicationException.read(iprot_);
        iprot_.readMessageEnd();
        throw x;
      }
      if (msg.seqid != seqid_) {
        throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "getNoteApplicationData failed: out of sequence response");
      }
      getNoteApplicationData_result result = new getNoteApplicationData_result();
      result.read(iprot_);
      iprot_.readMessageEnd();
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.userException != null) {
        throw result.userException;
      }
      if (result.systemException != null) {
        throw result.systemException;
      }
      if (result.notFoundException != null) {
        throw result.notFoundException;
      }
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getNoteApplicationData failed: unknown result");
    }

    public String getNoteApplicationDataEntry(String authenticationToken, String guid, String key) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException
    {
      send_getNoteApplicationDataEntry(authenticationToken, guid, key);
      return recv_getNoteApplicationDataEntry();
    }

    public void send_getNoteApplicationDataEntry(String authenticationToken, String guid, String key) throws TException
    {
      oprot_.writeMessageBegin(new TMessage("getNoteApplicationDataEntry", TMessageType.CALL, ++seqid_));
      getNoteApplicationDataEntry_args args = new getNoteApplicationDataEntry_args();
      args.setAuthenticationToken(authenticationToken);
      args.setGuid(guid);
      args.setKey(key);
      args.write(oprot_);
      oprot_.writeMessageEnd();
      oprot_.getTransport().flush();
    }

    public String recv_getNoteApplicationDataEntry() throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException
    {
      TMessage msg = iprot_.readMessageBegin();
      if (msg.type == TMessageType.EXCEPTION) {
        TApplicationException x = TApplicationException.read(iprot_);
        iprot_.readMessageEnd();
        throw x;
      }
      if (msg.seqid != seqid_) {
        throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "getNoteApplicationDataEntry failed: out of sequence response");
      }
      getNoteApplicationDataEntry_result result = new getNoteApplicationDataEntry_result();
      result.read(iprot_);
      iprot_.readMessageEnd();
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.userException != null) {
        throw result.userException;
      }
      if (result.systemException != null) {
        throw result.systemException;
      }
      if (result.notFoundException != null) {
        throw result.notFoundException;
      }
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getNoteApplicationDataEntry failed: unknown result");
    }

    public int setNoteApplicationDataEntry(String authenticationToken, String guid, String key, String value) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException
    {
      send_setNoteApplicationDataEntry(authenticationToken, guid, key, value);
      return recv_setNoteApplicationDataEntry();
    }

    public void send_setNoteApplicationDataEntry(String authenticationToken, String guid, String key, String value) throws TException
    {
      oprot_.writeMessageBegin(new TMessage("setNoteApplicationDataEntry", TMessageType.CALL, ++seqid_));
      setNoteApplicationDataEntry_args args = new setNoteApplicationDataEntry_args();
      args.setAuthenticationToken(authenticationToken);
      args.setGuid(guid);
      args.setKey(key);
      args.setValue(value);
      args.write(oprot_);
      oprot_.writeMessageEnd();
      oprot_.getTransport().flush();
    }

    public int recv_setNoteApplicationDataEntry() throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException
    {
      TMessage msg = iprot_.readMessageBegin();
      if (msg.type == TMessageType.EXCEPTION) {
        TApplicationException x = TApplicationException.read(iprot_);
        iprot_.readMessageEnd();
        throw x;
      }
      if (msg.seqid != seqid_) {
        throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "setNoteApplicationDataEntry failed: out of sequence response");
      }
      setNoteApplicationDataEntry_result result = new setNoteApplicationDataEntry_result();
      result.read(iprot_);
      iprot_.readMessageEnd();
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.userException != null) {
        throw result.userException;
      }
      if (result.systemException != null) {
        throw result.systemException;
      }
      if (result.notFoundException != null) {
        throw result.notFoundException;
      }
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "setNoteApplicationDataEntry failed: unknown result");
    }

    public int unsetNoteApplicationDataEntry(String authenticationToken, String guid, String key) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException
    {
      send_unsetNoteApplicationDataEntry(authenticationToken, guid, key);
      return recv_unsetNoteApplicationDataEntry();
    }

    public void send_unsetNoteApplicationDataEntry(String authenticationToken, String guid, String key) throws TException
    {
      oprot_.writeMessageBegin(new TMessage("unsetNoteApplicationDataEntry", TMessageType.CALL, ++seqid_));
      unsetNoteApplicationDataEntry_args args = new unsetNoteApplicationDataEntry_args();
      args.setAuthenticationToken(authenticationToken);
      args.setGuid(guid);
      args.setKey(key);
      args.write(oprot_);
      oprot_.writeMessageEnd();
      oprot_.getTransport().flush();
    }

    public int recv_unsetNoteApplicationDataEntry() throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException
    {
      TMessage msg = iprot_.readMessageBegin();
      if (msg.type == TMessageType.EXCEPTION) {
        TApplicationException x = TApplicationException.read(iprot_);
        iprot_.readMessageEnd();
        throw x;
      }
      if (msg.seqid != seqid_) {
        throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "unsetNoteApplicationDataEntry failed: out of sequence response");
      }
      unsetNoteApplicationDataEntry_result result = new unsetNoteApplicationDataEntry_result();
      result.read(iprot_);
      iprot_.readMessageEnd();
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.userException != null) {
        throw result.userException;
      }
      if (result.systemException != null) {
        throw result.systemException;
      }
      if (result.notFoundException != null) {
        throw result.notFoundException;
      }
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "unsetNoteApplicationDataEntry failed: unknown result");
    }

    public String getNoteContent(String authenticationToken, String guid) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException
    {
      send_getNoteContent(authenticationToken, guid);
      return recv_getNoteContent();
    }

    public void send_getNoteContent(String authenticationToken, String guid) throws TException
    {
      oprot_.writeMessageBegin(new TMessage("getNoteContent", TMessageType.CALL, ++seqid_));
      getNoteContent_args args = new getNoteContent_args();
      args.setAuthenticationToken(authenticationToken);
      args.setGuid(guid);
      args.write(oprot_);
      oprot_.writeMessageEnd();
      oprot_.getTransport().flush();
    }

    public String recv_getNoteContent() throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException
    {
      TMessage msg = iprot_.readMessageBegin();
      if (msg.type == TMessageType.EXCEPTION) {
        TApplicationException x = TApplicationException.read(iprot_);
        iprot_.readMessageEnd();
        throw x;
      }
      if (msg.seqid != seqid_) {
        throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "getNoteContent failed: out of sequence response");
      }
      getNoteContent_result result = new getNoteContent_result();
      result.read(iprot_);
      iprot_.readMessageEnd();
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.userException != null) {
        throw result.userException;
      }
      if (result.systemException != null) {
        throw result.systemException;
      }
      if (result.notFoundException != null) {
        throw result.notFoundException;
      }
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getNoteContent failed: unknown result");
    }

    public String getNoteSearchText(String authenticationToken, String guid, boolean noteOnly, boolean tokenizeForIndexing) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException
    {
      send_getNoteSearchText(authenticationToken, guid, noteOnly, tokenizeForIndexing);
      return recv_getNoteSearchText();
    }

    public void send_getNoteSearchText(String authenticationToken, String guid, boolean noteOnly, boolean tokenizeForIndexing) throws TException
    {
      oprot_.writeMessageBegin(new TMessage("getNoteSearchText", TMessageType.CALL, ++seqid_));
      getNoteSearchText_args args = new getNoteSearchText_args();
      args.setAuthenticationToken(authenticationToken);
      args.setGuid(guid);
      args.setNoteOnly(noteOnly);
      args.setTokenizeForIndexing(tokenizeForIndexing);
      args.write(oprot_);
      oprot_.writeMessageEnd();
      oprot_.getTransport().flush();
    }

    public String recv_getNoteSearchText() throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException
    {
      TMessage msg = iprot_.readMessageBegin();
      if (msg.type == TMessageType.EXCEPTION) {
        TApplicationException x = TApplicationException.read(iprot_);
        iprot_.readMessageEnd();
        throw x;
      }
      if (msg.seqid != seqid_) {
        throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "getNoteSearchText failed: out of sequence response");
      }
      getNoteSearchText_result result = new getNoteSearchText_result();
      result.read(iprot_);
      iprot_.readMessageEnd();
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.userException != null) {
        throw result.userException;
      }
      if (result.systemException != null) {
        throw result.systemException;
      }
      if (result.notFoundException != null) {
        throw result.notFoundException;
      }
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getNoteSearchText failed: unknown result");
    }

    public String getResourceSearchText(String authenticationToken, String guid) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException
    {
      send_getResourceSearchText(authenticationToken, guid);
      return recv_getResourceSearchText();
    }

    public void send_getResourceSearchText(String authenticationToken, String guid) throws TException
    {
      oprot_.writeMessageBegin(new TMessage("getResourceSearchText", TMessageType.CALL, ++seqid_));
      getResourceSearchText_args args = new getResourceSearchText_args();
      args.setAuthenticationToken(authenticationToken);
      args.setGuid(guid);
      args.write(oprot_);
      oprot_.writeMessageEnd();
      oprot_.getTransport().flush();
    }

    public String recv_getResourceSearchText() throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException
    {
      TMessage msg = iprot_.readMessageBegin();
      if (msg.type == TMessageType.EXCEPTION) {
        TApplicationException x = TApplicationException.read(iprot_);
        iprot_.readMessageEnd();
        throw x;
      }
      if (msg.seqid != seqid_) {
        throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "getResourceSearchText failed: out of sequence response");
      }
      getResourceSearchText_result result = new getResourceSearchText_result();
      result.read(iprot_);
      iprot_.readMessageEnd();
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.userException != null) {
        throw result.userException;
      }
      if (result.systemException != null) {
        throw result.systemException;
      }
      if (result.notFoundException != null) {
        throw result.notFoundException;
      }
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getResourceSearchText failed: unknown result");
    }

    public List getNoteTagNames(String authenticationToken, String guid) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException
    {
      send_getNoteTagNames(authenticationToken, guid);
      return recv_getNoteTagNames();
    }

    public void send_getNoteTagNames(String authenticationToken, String guid) throws TException
    {
      oprot_.writeMessageBegin(new TMessage("getNoteTagNames", TMessageType.CALL, ++seqid_));
      getNoteTagNames_args args = new getNoteTagNames_args();
      args.setAuthenticationToken(authenticationToken);
      args.setGuid(guid);
      args.write(oprot_);
      oprot_.writeMessageEnd();
      oprot_.getTransport().flush();
    }

    public List recv_getNoteTagNames() throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException
    {
      TMessage msg = iprot_.readMessageBegin();
      if (msg.type == TMessageType.EXCEPTION) {
        TApplicationException x = TApplicationException.read(iprot_);
        iprot_.readMessageEnd();
        throw x;
      }
      if (msg.seqid != seqid_) {
        throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "getNoteTagNames failed: out of sequence response");
      }
      getNoteTagNames_result result = new getNoteTagNames_result();
      result.read(iprot_);
      iprot_.readMessageEnd();
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.userException != null) {
        throw result.userException;
      }
      if (result.systemException != null) {
        throw result.systemException;
      }
      if (result.notFoundException != null) {
        throw result.notFoundException;
      }
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getNoteTagNames failed: unknown result");
    }

    public com.evernote.edam.type.Note createNote(String authenticationToken, com.evernote.edam.type.Note note) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException
    {
      send_createNote(authenticationToken, note);
      return recv_createNote();
    }

    public void send_createNote(String authenticationToken, com.evernote.edam.type.Note note) throws TException
    {
      oprot_.writeMessageBegin(new TMessage("createNote", TMessageType.CALL, ++seqid_));
      createNote_args args = new createNote_args();
      args.setAuthenticationToken(authenticationToken);
      args.setNote(note);
      args.write(oprot_);
      oprot_.writeMessageEnd();
      oprot_.getTransport().flush();
    }

    public com.evernote.edam.type.Note recv_createNote() throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException
    {
      TMessage msg = iprot_.readMessageBegin();
      if (msg.type == TMessageType.EXCEPTION) {
        TApplicationException x = TApplicationException.read(iprot_);
        iprot_.readMessageEnd();
        throw x;
      }
      if (msg.seqid != seqid_) {
        throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "createNote failed: out of sequence response");
      }
      createNote_result result = new createNote_result();
      result.read(iprot_);
      iprot_.readMessageEnd();
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.userException != null) {
        throw result.userException;
      }
      if (result.systemException != null) {
        throw result.systemException;
      }
      if (result.notFoundException != null) {
        throw result.notFoundException;
      }
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "createNote failed: unknown result");
    }

    public com.evernote.edam.type.Note updateNote(String authenticationToken, com.evernote.edam.type.Note note) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException
    {
      send_updateNote(authenticationToken, note);
      return recv_updateNote();
    }

    public void send_updateNote(String authenticationToken, com.evernote.edam.type.Note note) throws TException
    {
      oprot_.writeMessageBegin(new TMessage("updateNote", TMessageType.CALL, ++seqid_));
      updateNote_args args = new updateNote_args();
      args.setAuthenticationToken(authenticationToken);
      args.setNote(note);
      args.write(oprot_);
      oprot_.writeMessageEnd();
      oprot_.getTransport().flush();
    }

    public com.evernote.edam.type.Note recv_updateNote() throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException
    {
      TMessage msg = iprot_.readMessageBegin();
      if (msg.type == TMessageType.EXCEPTION) {
        TApplicationException x = TApplicationException.read(iprot_);
        iprot_.readMessageEnd();
        throw x;
      }
      if (msg.seqid != seqid_) {
        throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "updateNote failed: out of sequence response");
      }
      updateNote_result result = new updateNote_result();
      result.read(iprot_);
      iprot_.readMessageEnd();
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.userException != null) {
        throw result.userException;
      }
      if (result.systemException != null) {
        throw result.systemException;
      }
      if (result.notFoundException != null) {
        throw result.notFoundException;
      }
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "updateNote failed: unknown result");
    }

    public int deleteNote(String authenticationToken, String guid) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException
    {
      send_deleteNote(authenticationToken, guid);
      return recv_deleteNote();
    }

    public void send_deleteNote(String authenticationToken, String guid) throws TException
    {
      oprot_.writeMessageBegin(new TMessage("deleteNote", TMessageType.CALL, ++seqid_));
      deleteNote_args args = new deleteNote_args();
      args.setAuthenticationToken(authenticationToken);
      args.setGuid(guid);
      args.write(oprot_);
      oprot_.writeMessageEnd();
      oprot_.getTransport().flush();
    }

    public int recv_deleteNote() throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException
    {
      TMessage msg = iprot_.readMessageBegin();
      if (msg.type == TMessageType.EXCEPTION) {
        TApplicationException x = TApplicationException.read(iprot_);
        iprot_.readMessageEnd();
        throw x;
      }
      if (msg.seqid != seqid_) {
        throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "deleteNote failed: out of sequence response");
      }
      deleteNote_result result = new deleteNote_result();
      result.read(iprot_);
      iprot_.readMessageEnd();
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.userException != null) {
        throw result.userException;
      }
      if (result.systemException != null) {
        throw result.systemException;
      }
      if (result.notFoundException != null) {
        throw result.notFoundException;
      }
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "deleteNote failed: unknown result");
    }

    public int expungeNote(String authenticationToken, String guid) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException
    {
      send_expungeNote(authenticationToken, guid);
      return recv_expungeNote();
    }

    public void send_expungeNote(String authenticationToken, String guid) throws TException
    {
      oprot_.writeMessageBegin(new TMessage("expungeNote", TMessageType.CALL, ++seqid_));
      expungeNote_args args = new expungeNote_args();
      args.setAuthenticationToken(authenticationToken);
      args.setGuid(guid);
      args.write(oprot_);
      oprot_.writeMessageEnd();
      oprot_.getTransport().flush();
    }

    public int recv_expungeNote() throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException
    {
      TMessage msg = iprot_.readMessageBegin();
      if (msg.type == TMessageType.EXCEPTION) {
        TApplicationException x = TApplicationException.read(iprot_);
        iprot_.readMessageEnd();
        throw x;
      }
      if (msg.seqid != seqid_) {
        throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "expungeNote failed: out of sequence response");
      }
      expungeNote_result result = new expungeNote_result();
      result.read(iprot_);
      iprot_.readMessageEnd();
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.userException != null) {
        throw result.userException;
      }
      if (result.systemException != null) {
        throw result.systemException;
      }
      if (result.notFoundException != null) {
        throw result.notFoundException;
      }
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "expungeNote failed: unknown result");
    }

    public int expungeNotes(String authenticationToken, List noteGuids) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException
    {
      send_expungeNotes(authenticationToken, noteGuids);
      return recv_expungeNotes();
    }

    public void send_expungeNotes(String authenticationToken, List noteGuids) throws TException
    {
      oprot_.writeMessageBegin(new TMessage("expungeNotes", TMessageType.CALL, ++seqid_));
      expungeNotes_args args = new expungeNotes_args();
      args.setAuthenticationToken(authenticationToken);
      args.setNoteGuids(noteGuids);
      args.write(oprot_);
      oprot_.writeMessageEnd();
      oprot_.getTransport().flush();
    }

    public int recv_expungeNotes() throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException
    {
      TMessage msg = iprot_.readMessageBegin();
      if (msg.type == TMessageType.EXCEPTION) {
        TApplicationException x = TApplicationException.read(iprot_);
        iprot_.readMessageEnd();
        throw x;
      }
      if (msg.seqid != seqid_) {
        throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "expungeNotes failed: out of sequence response");
      }
      expungeNotes_result result = new expungeNotes_result();
      result.read(iprot_);
      iprot_.readMessageEnd();
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.userException != null) {
        throw result.userException;
      }
      if (result.systemException != null) {
        throw result.systemException;
      }
      if (result.notFoundException != null) {
        throw result.notFoundException;
      }
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "expungeNotes failed: unknown result");
    }

    public int expungeInactiveNotes(String authenticationToken) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, TException
    {
      send_expungeInactiveNotes(authenticationToken);
      return recv_expungeInactiveNotes();
    }

    public void send_expungeInactiveNotes(String authenticationToken) throws TException
    {
      oprot_.writeMessageBegin(new TMessage("expungeInactiveNotes", TMessageType.CALL, ++seqid_));
      expungeInactiveNotes_args args = new expungeInactiveNotes_args();
      args.setAuthenticationToken(authenticationToken);
      args.write(oprot_);
      oprot_.writeMessageEnd();
      oprot_.getTransport().flush();
    }

    public int recv_expungeInactiveNotes() throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, TException
    {
      TMessage msg = iprot_.readMessageBegin();
      if (msg.type == TMessageType.EXCEPTION) {
        TApplicationException x = TApplicationException.read(iprot_);
        iprot_.readMessageEnd();
        throw x;
      }
      if (msg.seqid != seqid_) {
        throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "expungeInactiveNotes failed: out of sequence response");
      }
      expungeInactiveNotes_result result = new expungeInactiveNotes_result();
      result.read(iprot_);
      iprot_.readMessageEnd();
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.userException != null) {
        throw result.userException;
      }
      if (result.systemException != null) {
        throw result.systemException;
      }
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "expungeInactiveNotes failed: unknown result");
    }

    public com.evernote.edam.type.Note copyNote(String authenticationToken, String noteGuid, String toNotebookGuid) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException
    {
      send_copyNote(authenticationToken, noteGuid, toNotebookGuid);
      return recv_copyNote();
    }

    public void send_copyNote(String authenticationToken, String noteGuid, String toNotebookGuid) throws TException
    {
      oprot_.writeMessageBegin(new TMessage("copyNote", TMessageType.CALL, ++seqid_));
      copyNote_args args = new copyNote_args();
      args.setAuthenticationToken(authenticationToken);
      args.setNoteGuid(noteGuid);
      args.setToNotebookGuid(toNotebookGuid);
      args.write(oprot_);
      oprot_.writeMessageEnd();
      oprot_.getTransport().flush();
    }

    public com.evernote.edam.type.Note recv_copyNote() throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException
    {
      TMessage msg = iprot_.readMessageBegin();
      if (msg.type == TMessageType.EXCEPTION) {
        TApplicationException x = TApplicationException.read(iprot_);
        iprot_.readMessageEnd();
        throw x;
      }
      if (msg.seqid != seqid_) {
        throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "copyNote failed: out of sequence response");
      }
      copyNote_result result = new copyNote_result();
      result.read(iprot_);
      iprot_.readMessageEnd();
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.userException != null) {
        throw result.userException;
      }
      if (result.systemException != null) {
        throw result.systemException;
      }
      if (result.notFoundException != null) {
        throw result.notFoundException;
      }
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "copyNote failed: unknown result");
    }

    public List listNoteVersions(String authenticationToken, String noteGuid) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException
    {
      send_listNoteVersions(authenticationToken, noteGuid);
      return recv_listNoteVersions();
    }

    public void send_listNoteVersions(String authenticationToken, String noteGuid) throws TException
    {
      oprot_.writeMessageBegin(new TMessage("listNoteVersions", TMessageType.CALL, ++seqid_));
      listNoteVersions_args args = new listNoteVersions_args();
      args.setAuthenticationToken(authenticationToken);
      args.setNoteGuid(noteGuid);
      args.write(oprot_);
      oprot_.writeMessageEnd();
      oprot_.getTransport().flush();
    }

    public List recv_listNoteVersions() throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException
    {
      TMessage msg = iprot_.readMessageBegin();
      if (msg.type == TMessageType.EXCEPTION) {
        TApplicationException x = TApplicationException.read(iprot_);
        iprot_.readMessageEnd();
        throw x;
      }
      if (msg.seqid != seqid_) {
        throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "listNoteVersions failed: out of sequence response");
      }
      listNoteVersions_result result = new listNoteVersions_result();
      result.read(iprot_);
      iprot_.readMessageEnd();
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.userException != null) {
        throw result.userException;
      }
      if (result.systemException != null) {
        throw result.systemException;
      }
      if (result.notFoundException != null) {
        throw result.notFoundException;
      }
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "listNoteVersions failed: unknown result");
    }

    public com.evernote.edam.type.Note getNoteVersion(String authenticationToken, String noteGuid, int updateSequenceNum, boolean withResourcesData, boolean withResourcesRecognition, boolean withResourcesAlternateData) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException
    {
      send_getNoteVersion(authenticationToken, noteGuid, updateSequenceNum, withResourcesData, withResourcesRecognition, withResourcesAlternateData);
      return recv_getNoteVersion();
    }

    public void send_getNoteVersion(String authenticationToken, String noteGuid, int updateSequenceNum, boolean withResourcesData, boolean withResourcesRecognition, boolean withResourcesAlternateData) throws TException
    {
      oprot_.writeMessageBegin(new TMessage("getNoteVersion", TMessageType.CALL, ++seqid_));
      getNoteVersion_args args = new getNoteVersion_args();
      args.setAuthenticationToken(authenticationToken);
      args.setNoteGuid(noteGuid);
      args.setUpdateSequenceNum(updateSequenceNum);
      args.setWithResourcesData(withResourcesData);
      args.setWithResourcesRecognition(withResourcesRecognition);
      args.setWithResourcesAlternateData(withResourcesAlternateData);
      args.write(oprot_);
      oprot_.writeMessageEnd();
      oprot_.getTransport().flush();
    }

    public com.evernote.edam.type.Note recv_getNoteVersion() throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException
    {
      TMessage msg = iprot_.readMessageBegin();
      if (msg.type == TMessageType.EXCEPTION) {
        TApplicationException x = TApplicationException.read(iprot_);
        iprot_.readMessageEnd();
        throw x;
      }
      if (msg.seqid != seqid_) {
        throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "getNoteVersion failed: out of sequence response");
      }
      getNoteVersion_result result = new getNoteVersion_result();
      result.read(iprot_);
      iprot_.readMessageEnd();
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.userException != null) {
        throw result.userException;
      }
      if (result.systemException != null) {
        throw result.systemException;
      }
      if (result.notFoundException != null) {
        throw result.notFoundException;
      }
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getNoteVersion failed: unknown result");
    }

    public com.evernote.edam.type.Resource getResource(String authenticationToken, String guid, boolean withData, boolean withRecognition, boolean withAttributes, boolean withAlternateData) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException
    {
      send_getResource(authenticationToken, guid, withData, withRecognition, withAttributes, withAlternateData);
      return recv_getResource();
    }

    public void send_getResource(String authenticationToken, String guid, boolean withData, boolean withRecognition, boolean withAttributes, boolean withAlternateData) throws TException
    {
      oprot_.writeMessageBegin(new TMessage("getResource", TMessageType.CALL, ++seqid_));
      getResource_args args = new getResource_args();
      args.setAuthenticationToken(authenticationToken);
      args.setGuid(guid);
      args.setWithData(withData);
      args.setWithRecognition(withRecognition);
      args.setWithAttributes(withAttributes);
      args.setWithAlternateData(withAlternateData);
      args.write(oprot_);
      oprot_.writeMessageEnd();
      oprot_.getTransport().flush();
    }

    public com.evernote.edam.type.Resource recv_getResource() throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException
    {
      TMessage msg = iprot_.readMessageBegin();
      if (msg.type == TMessageType.EXCEPTION) {
        TApplicationException x = TApplicationException.read(iprot_);
        iprot_.readMessageEnd();
        throw x;
      }
      if (msg.seqid != seqid_) {
        throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "getResource failed: out of sequence response");
      }
      getResource_result result = new getResource_result();
      result.read(iprot_);
      iprot_.readMessageEnd();
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.userException != null) {
        throw result.userException;
      }
      if (result.systemException != null) {
        throw result.systemException;
      }
      if (result.notFoundException != null) {
        throw result.notFoundException;
      }
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getResource failed: unknown result");
    }

    public com.evernote.edam.type.LazyMap getResourceApplicationData(String authenticationToken, String guid) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException
    {
      send_getResourceApplicationData(authenticationToken, guid);
      return recv_getResourceApplicationData();
    }

    public void send_getResourceApplicationData(String authenticationToken, String guid) throws TException
    {
      oprot_.writeMessageBegin(new TMessage("getResourceApplicationData", TMessageType.CALL, ++seqid_));
      getResourceApplicationData_args args = new getResourceApplicationData_args();
      args.setAuthenticationToken(authenticationToken);
      args.setGuid(guid);
      args.write(oprot_);
      oprot_.writeMessageEnd();
      oprot_.getTransport().flush();
    }

    public com.evernote.edam.type.LazyMap recv_getResourceApplicationData() throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException
    {
      TMessage msg = iprot_.readMessageBegin();
      if (msg.type == TMessageType.EXCEPTION) {
        TApplicationException x = TApplicationException.read(iprot_);
        iprot_.readMessageEnd();
        throw x;
      }
      if (msg.seqid != seqid_) {
        throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "getResourceApplicationData failed: out of sequence response");
      }
      getResourceApplicationData_result result = new getResourceApplicationData_result();
      result.read(iprot_);
      iprot_.readMessageEnd();
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.userException != null) {
        throw result.userException;
      }
      if (result.systemException != null) {
        throw result.systemException;
      }
      if (result.notFoundException != null) {
        throw result.notFoundException;
      }
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getResourceApplicationData failed: unknown result");
    }

    public String getResourceApplicationDataEntry(String authenticationToken, String guid, String key) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException
    {
      send_getResourceApplicationDataEntry(authenticationToken, guid, key);
      return recv_getResourceApplicationDataEntry();
    }

    public void send_getResourceApplicationDataEntry(String authenticationToken, String guid, String key) throws TException
    {
      oprot_.writeMessageBegin(new TMessage("getResourceApplicationDataEntry", TMessageType.CALL, ++seqid_));
      getResourceApplicationDataEntry_args args = new getResourceApplicationDataEntry_args();
      args.setAuthenticationToken(authenticationToken);
      args.setGuid(guid);
      args.setKey(key);
      args.write(oprot_);
      oprot_.writeMessageEnd();
      oprot_.getTransport().flush();
    }

    public String recv_getResourceApplicationDataEntry() throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException
    {
      TMessage msg = iprot_.readMessageBegin();
      if (msg.type == TMessageType.EXCEPTION) {
        TApplicationException x = TApplicationException.read(iprot_);
        iprot_.readMessageEnd();
        throw x;
      }
      if (msg.seqid != seqid_) {
        throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "getResourceApplicationDataEntry failed: out of sequence response");
      }
      getResourceApplicationDataEntry_result result = new getResourceApplicationDataEntry_result();
      result.read(iprot_);
      iprot_.readMessageEnd();
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.userException != null) {
        throw result.userException;
      }
      if (result.systemException != null) {
        throw result.systemException;
      }
      if (result.notFoundException != null) {
        throw result.notFoundException;
      }
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getResourceApplicationDataEntry failed: unknown result");
    }

    public int setResourceApplicationDataEntry(String authenticationToken, String guid, String key, String value) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException
    {
      send_setResourceApplicationDataEntry(authenticationToken, guid, key, value);
      return recv_setResourceApplicationDataEntry();
    }

    public void send_setResourceApplicationDataEntry(String authenticationToken, String guid, String key, String value) throws TException
    {
      oprot_.writeMessageBegin(new TMessage("setResourceApplicationDataEntry", TMessageType.CALL, ++seqid_));
      setResourceApplicationDataEntry_args args = new setResourceApplicationDataEntry_args();
      args.setAuthenticationToken(authenticationToken);
      args.setGuid(guid);
      args.setKey(key);
      args.setValue(value);
      args.write(oprot_);
      oprot_.writeMessageEnd();
      oprot_.getTransport().flush();
    }

    public int recv_setResourceApplicationDataEntry() throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException
    {
      TMessage msg = iprot_.readMessageBegin();
      if (msg.type == TMessageType.EXCEPTION) {
        TApplicationException x = TApplicationException.read(iprot_);
        iprot_.readMessageEnd();
        throw x;
      }
      if (msg.seqid != seqid_) {
        throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "setResourceApplicationDataEntry failed: out of sequence response");
      }
      setResourceApplicationDataEntry_result result = new setResourceApplicationDataEntry_result();
      result.read(iprot_);
      iprot_.readMessageEnd();
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.userException != null) {
        throw result.userException;
      }
      if (result.systemException != null) {
        throw result.systemException;
      }
      if (result.notFoundException != null) {
        throw result.notFoundException;
      }
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "setResourceApplicationDataEntry failed: unknown result");
    }

    public int unsetResourceApplicationDataEntry(String authenticationToken, String guid, String key) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException
    {
      send_unsetResourceApplicationDataEntry(authenticationToken, guid, key);
      return recv_unsetResourceApplicationDataEntry();
    }

    public void send_unsetResourceApplicationDataEntry(String authenticationToken, String guid, String key) throws TException
    {
      oprot_.writeMessageBegin(new TMessage("unsetResourceApplicationDataEntry", TMessageType.CALL, ++seqid_));
      unsetResourceApplicationDataEntry_args args = new unsetResourceApplicationDataEntry_args();
      args.setAuthenticationToken(authenticationToken);
      args.setGuid(guid);
      args.setKey(key);
      args.write(oprot_);
      oprot_.writeMessageEnd();
      oprot_.getTransport().flush();
    }

    public int recv_unsetResourceApplicationDataEntry() throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException
    {
      TMessage msg = iprot_.readMessageBegin();
      if (msg.type == TMessageType.EXCEPTION) {
        TApplicationException x = TApplicationException.read(iprot_);
        iprot_.readMessageEnd();
        throw x;
      }
      if (msg.seqid != seqid_) {
        throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "unsetResourceApplicationDataEntry failed: out of sequence response");
      }
      unsetResourceApplicationDataEntry_result result = new unsetResourceApplicationDataEntry_result();
      result.read(iprot_);
      iprot_.readMessageEnd();
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.userException != null) {
        throw result.userException;
      }
      if (result.systemException != null) {
        throw result.systemException;
      }
      if (result.notFoundException != null) {
        throw result.notFoundException;
      }
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "unsetResourceApplicationDataEntry failed: unknown result");
    }

    public int updateResource(String authenticationToken, com.evernote.edam.type.Resource resource) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException
    {
      send_updateResource(authenticationToken, resource);
      return recv_updateResource();
    }

    public void send_updateResource(String authenticationToken, com.evernote.edam.type.Resource resource) throws TException
    {
      oprot_.writeMessageBegin(new TMessage("updateResource", TMessageType.CALL, ++seqid_));
      updateResource_args args = new updateResource_args();
      args.setAuthenticationToken(authenticationToken);
      args.setResource(resource);
      args.write(oprot_);
      oprot_.writeMessageEnd();
      oprot_.getTransport().flush();
    }

    public int recv_updateResource() throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException
    {
      TMessage msg = iprot_.readMessageBegin();
      if (msg.type == TMessageType.EXCEPTION) {
        TApplicationException x = TApplicationException.read(iprot_);
        iprot_.readMessageEnd();
        throw x;
      }
      if (msg.seqid != seqid_) {
        throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "updateResource failed: out of sequence response");
      }
      updateResource_result result = new updateResource_result();
      result.read(iprot_);
      iprot_.readMessageEnd();
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.userException != null) {
        throw result.userException;
      }
      if (result.systemException != null) {
        throw result.systemException;
      }
      if (result.notFoundException != null) {
        throw result.notFoundException;
      }
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "updateResource failed: unknown result");
    }

    public byte[] getResourceData(String authenticationToken, String guid) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException
    {
      send_getResourceData(authenticationToken, guid);
      return recv_getResourceData();
    }

    public void send_getResourceData(String authenticationToken, String guid) throws TException
    {
      oprot_.writeMessageBegin(new TMessage("getResourceData", TMessageType.CALL, ++seqid_));
      getResourceData_args args = new getResourceData_args();
      args.setAuthenticationToken(authenticationToken);
      args.setGuid(guid);
      args.write(oprot_);
      oprot_.writeMessageEnd();
      oprot_.getTransport().flush();
    }

    public byte[] recv_getResourceData() throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException
    {
      TMessage msg = iprot_.readMessageBegin();
      if (msg.type == TMessageType.EXCEPTION) {
        TApplicationException x = TApplicationException.read(iprot_);
        iprot_.readMessageEnd();
        throw x;
      }
      if (msg.seqid != seqid_) {
        throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "getResourceData failed: out of sequence response");
      }
      getResourceData_result result = new getResourceData_result();
      result.read(iprot_);
      iprot_.readMessageEnd();
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.userException != null) {
        throw result.userException;
      }
      if (result.systemException != null) {
        throw result.systemException;
      }
      if (result.notFoundException != null) {
        throw result.notFoundException;
      }
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getResourceData failed: unknown result");
    }

    public com.evernote.edam.type.Resource getResourceByHash(String authenticationToken, String noteGuid, byte[] contentHash, boolean withData, boolean withRecognition, boolean withAlternateData) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException
    {
      send_getResourceByHash(authenticationToken, noteGuid, contentHash, withData, withRecognition, withAlternateData);
      return recv_getResourceByHash();
    }

    public void send_getResourceByHash(String authenticationToken, String noteGuid, byte[] contentHash, boolean withData, boolean withRecognition, boolean withAlternateData) throws TException
    {
      oprot_.writeMessageBegin(new TMessage("getResourceByHash", TMessageType.CALL, ++seqid_));
      getResourceByHash_args args = new getResourceByHash_args();
      args.setAuthenticationToken(authenticationToken);
      args.setNoteGuid(noteGuid);
      args.setContentHash(contentHash);
      args.setWithData(withData);
      args.setWithRecognition(withRecognition);
      args.setWithAlternateData(withAlternateData);
      args.write(oprot_);
      oprot_.writeMessageEnd();
      oprot_.getTransport().flush();
    }

    public com.evernote.edam.type.Resource recv_getResourceByHash() throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException
    {
      TMessage msg = iprot_.readMessageBegin();
      if (msg.type == TMessageType.EXCEPTION) {
        TApplicationException x = TApplicationException.read(iprot_);
        iprot_.readMessageEnd();
        throw x;
      }
      if (msg.seqid != seqid_) {
        throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "getResourceByHash failed: out of sequence response");
      }
      getResourceByHash_result result = new getResourceByHash_result();
      result.read(iprot_);
      iprot_.readMessageEnd();
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.userException != null) {
        throw result.userException;
      }
      if (result.systemException != null) {
        throw result.systemException;
      }
      if (result.notFoundException != null) {
        throw result.notFoundException;
      }
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getResourceByHash failed: unknown result");
    }

    public byte[] getResourceRecognition(String authenticationToken, String guid) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException
    {
      send_getResourceRecognition(authenticationToken, guid);
      return recv_getResourceRecognition();
    }

    public void send_getResourceRecognition(String authenticationToken, String guid) throws TException
    {
      oprot_.writeMessageBegin(new TMessage("getResourceRecognition", TMessageType.CALL, ++seqid_));
      getResourceRecognition_args args = new getResourceRecognition_args();
      args.setAuthenticationToken(authenticationToken);
      args.setGuid(guid);
      args.write(oprot_);
      oprot_.writeMessageEnd();
      oprot_.getTransport().flush();
    }

    public byte[] recv_getResourceRecognition() throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException
    {
      TMessage msg = iprot_.readMessageBegin();
      if (msg.type == TMessageType.EXCEPTION) {
        TApplicationException x = TApplicationException.read(iprot_);
        iprot_.readMessageEnd();
        throw x;
      }
      if (msg.seqid != seqid_) {
        throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "getResourceRecognition failed: out of sequence response");
      }
      getResourceRecognition_result result = new getResourceRecognition_result();
      result.read(iprot_);
      iprot_.readMessageEnd();
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.userException != null) {
        throw result.userException;
      }
      if (result.systemException != null) {
        throw result.systemException;
      }
      if (result.notFoundException != null) {
        throw result.notFoundException;
      }
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getResourceRecognition failed: unknown result");
    }

    public byte[] getResourceAlternateData(String authenticationToken, String guid) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException
    {
      send_getResourceAlternateData(authenticationToken, guid);
      return recv_getResourceAlternateData();
    }

    public void send_getResourceAlternateData(String authenticationToken, String guid) throws TException
    {
      oprot_.writeMessageBegin(new TMessage("getResourceAlternateData", TMessageType.CALL, ++seqid_));
      getResourceAlternateData_args args = new getResourceAlternateData_args();
      args.setAuthenticationToken(authenticationToken);
      args.setGuid(guid);
      args.write(oprot_);
      oprot_.writeMessageEnd();
      oprot_.getTransport().flush();
    }

    public byte[] recv_getResourceAlternateData() throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException
    {
      TMessage msg = iprot_.readMessageBegin();
      if (msg.type == TMessageType.EXCEPTION) {
        TApplicationException x = TApplicationException.read(iprot_);
        iprot_.readMessageEnd();
        throw x;
      }
      if (msg.seqid != seqid_) {
        throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "getResourceAlternateData failed: out of sequence response");
      }
      getResourceAlternateData_result result = new getResourceAlternateData_result();
      result.read(iprot_);
      iprot_.readMessageEnd();
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.userException != null) {
        throw result.userException;
      }
      if (result.systemException != null) {
        throw result.systemException;
      }
      if (result.notFoundException != null) {
        throw result.notFoundException;
      }
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getResourceAlternateData failed: unknown result");
    }

    public com.evernote.edam.type.ResourceAttributes getResourceAttributes(String authenticationToken, String guid) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException
    {
      send_getResourceAttributes(authenticationToken, guid);
      return recv_getResourceAttributes();
    }

    public void send_getResourceAttributes(String authenticationToken, String guid) throws TException
    {
      oprot_.writeMessageBegin(new TMessage("getResourceAttributes", TMessageType.CALL, ++seqid_));
      getResourceAttributes_args args = new getResourceAttributes_args();
      args.setAuthenticationToken(authenticationToken);
      args.setGuid(guid);
      args.write(oprot_);
      oprot_.writeMessageEnd();
      oprot_.getTransport().flush();
    }

    public com.evernote.edam.type.ResourceAttributes recv_getResourceAttributes() throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException
    {
      TMessage msg = iprot_.readMessageBegin();
      if (msg.type == TMessageType.EXCEPTION) {
        TApplicationException x = TApplicationException.read(iprot_);
        iprot_.readMessageEnd();
        throw x;
      }
      if (msg.seqid != seqid_) {
        throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "getResourceAttributes failed: out of sequence response");
      }
      getResourceAttributes_result result = new getResourceAttributes_result();
      result.read(iprot_);
      iprot_.readMessageEnd();
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.userException != null) {
        throw result.userException;
      }
      if (result.systemException != null) {
        throw result.systemException;
      }
      if (result.notFoundException != null) {
        throw result.notFoundException;
      }
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getResourceAttributes failed: unknown result");
    }

    public com.evernote.edam.type.Notebook getPublicNotebook(int userId, String publicUri) throws com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException
    {
      send_getPublicNotebook(userId, publicUri);
      return recv_getPublicNotebook();
    }

    public void send_getPublicNotebook(int userId, String publicUri) throws TException
    {
      oprot_.writeMessageBegin(new TMessage("getPublicNotebook", TMessageType.CALL, ++seqid_));
      getPublicNotebook_args args = new getPublicNotebook_args();
      args.setUserId(userId);
      args.setPublicUri(publicUri);
      args.write(oprot_);
      oprot_.writeMessageEnd();
      oprot_.getTransport().flush();
    }

    public com.evernote.edam.type.Notebook recv_getPublicNotebook() throws com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException
    {
      TMessage msg = iprot_.readMessageBegin();
      if (msg.type == TMessageType.EXCEPTION) {
        TApplicationException x = TApplicationException.read(iprot_);
        iprot_.readMessageEnd();
        throw x;
      }
      if (msg.seqid != seqid_) {
        throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "getPublicNotebook failed: out of sequence response");
      }
      getPublicNotebook_result result = new getPublicNotebook_result();
      result.read(iprot_);
      iprot_.readMessageEnd();
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.systemException != null) {
        throw result.systemException;
      }
      if (result.notFoundException != null) {
        throw result.notFoundException;
      }
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getPublicNotebook failed: unknown result");
    }

    public com.evernote.edam.type.SharedNotebook createSharedNotebook(String authenticationToken, com.evernote.edam.type.SharedNotebook sharedNotebook) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMNotFoundException, com.evernote.edam.error.EDAMSystemException, TException
    {
      send_createSharedNotebook(authenticationToken, sharedNotebook);
      return recv_createSharedNotebook();
    }

    public void send_createSharedNotebook(String authenticationToken, com.evernote.edam.type.SharedNotebook sharedNotebook) throws TException
    {
      oprot_.writeMessageBegin(new TMessage("createSharedNotebook", TMessageType.CALL, ++seqid_));
      createSharedNotebook_args args = new createSharedNotebook_args();
      args.setAuthenticationToken(authenticationToken);
      args.setSharedNotebook(sharedNotebook);
      args.write(oprot_);
      oprot_.writeMessageEnd();
      oprot_.getTransport().flush();
    }

    public com.evernote.edam.type.SharedNotebook recv_createSharedNotebook() throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMNotFoundException, com.evernote.edam.error.EDAMSystemException, TException
    {
      TMessage msg = iprot_.readMessageBegin();
      if (msg.type == TMessageType.EXCEPTION) {
        TApplicationException x = TApplicationException.read(iprot_);
        iprot_.readMessageEnd();
        throw x;
      }
      if (msg.seqid != seqid_) {
        throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "createSharedNotebook failed: out of sequence response");
      }
      createSharedNotebook_result result = new createSharedNotebook_result();
      result.read(iprot_);
      iprot_.readMessageEnd();
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.userException != null) {
        throw result.userException;
      }
      if (result.notFoundException != null) {
        throw result.notFoundException;
      }
      if (result.systemException != null) {
        throw result.systemException;
      }
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "createSharedNotebook failed: unknown result");
    }

    public int updateSharedNotebook(String authenticationToken, com.evernote.edam.type.SharedNotebook sharedNotebook) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMNotFoundException, com.evernote.edam.error.EDAMSystemException, TException
    {
      send_updateSharedNotebook(authenticationToken, sharedNotebook);
      return recv_updateSharedNotebook();
    }

    public void send_updateSharedNotebook(String authenticationToken, com.evernote.edam.type.SharedNotebook sharedNotebook) throws TException
    {
      oprot_.writeMessageBegin(new TMessage("updateSharedNotebook", TMessageType.CALL, ++seqid_));
      updateSharedNotebook_args args = new updateSharedNotebook_args();
      args.setAuthenticationToken(authenticationToken);
      args.setSharedNotebook(sharedNotebook);
      args.write(oprot_);
      oprot_.writeMessageEnd();
      oprot_.getTransport().flush();
    }

    public int recv_updateSharedNotebook() throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMNotFoundException, com.evernote.edam.error.EDAMSystemException, TException
    {
      TMessage msg = iprot_.readMessageBegin();
      if (msg.type == TMessageType.EXCEPTION) {
        TApplicationException x = TApplicationException.read(iprot_);
        iprot_.readMessageEnd();
        throw x;
      }
      if (msg.seqid != seqid_) {
        throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "updateSharedNotebook failed: out of sequence response");
      }
      updateSharedNotebook_result result = new updateSharedNotebook_result();
      result.read(iprot_);
      iprot_.readMessageEnd();
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.userException != null) {
        throw result.userException;
      }
      if (result.notFoundException != null) {
        throw result.notFoundException;
      }
      if (result.systemException != null) {
        throw result.systemException;
      }
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "updateSharedNotebook failed: unknown result");
    }

    public int sendMessageToSharedNotebookMembers(String authenticationToken, String notebookGuid, String messageText, List recipients) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMNotFoundException, com.evernote.edam.error.EDAMSystemException, TException
    {
      send_sendMessageToSharedNotebookMembers(authenticationToken, notebookGuid, messageText, recipients);
      return recv_sendMessageToSharedNotebookMembers();
    }

    public void send_sendMessageToSharedNotebookMembers(String authenticationToken, String notebookGuid, String messageText, List recipients) throws TException
    {
      oprot_.writeMessageBegin(new TMessage("sendMessageToSharedNotebookMembers", TMessageType.CALL, ++seqid_));
      sendMessageToSharedNotebookMembers_args args = new sendMessageToSharedNotebookMembers_args();
      args.setAuthenticationToken(authenticationToken);
      args.setNotebookGuid(notebookGuid);
      args.setMessageText(messageText);
      args.setRecipients(recipients);
      args.write(oprot_);
      oprot_.writeMessageEnd();
      oprot_.getTransport().flush();
    }

    public int recv_sendMessageToSharedNotebookMembers() throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMNotFoundException, com.evernote.edam.error.EDAMSystemException, TException
    {
      TMessage msg = iprot_.readMessageBegin();
      if (msg.type == TMessageType.EXCEPTION) {
        TApplicationException x = TApplicationException.read(iprot_);
        iprot_.readMessageEnd();
        throw x;
      }
      if (msg.seqid != seqid_) {
        throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "sendMessageToSharedNotebookMembers failed: out of sequence response");
      }
      sendMessageToSharedNotebookMembers_result result = new sendMessageToSharedNotebookMembers_result();
      result.read(iprot_);
      iprot_.readMessageEnd();
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.userException != null) {
        throw result.userException;
      }
      if (result.notFoundException != null) {
        throw result.notFoundException;
      }
      if (result.systemException != null) {
        throw result.systemException;
      }
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "sendMessageToSharedNotebookMembers failed: unknown result");
    }

    public List listSharedNotebooks(String authenticationToken) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMNotFoundException, com.evernote.edam.error.EDAMSystemException, TException
    {
      send_listSharedNotebooks(authenticationToken);
      return recv_listSharedNotebooks();
    }

    public void send_listSharedNotebooks(String authenticationToken) throws TException
    {
      oprot_.writeMessageBegin(new TMessage("listSharedNotebooks", TMessageType.CALL, ++seqid_));
      listSharedNotebooks_args args = new listSharedNotebooks_args();
      args.setAuthenticationToken(authenticationToken);
      args.write(oprot_);
      oprot_.writeMessageEnd();
      oprot_.getTransport().flush();
    }

    public List recv_listSharedNotebooks() throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMNotFoundException, com.evernote.edam.error.EDAMSystemException, TException
    {
      TMessage msg = iprot_.readMessageBegin();
      if (msg.type == TMessageType.EXCEPTION) {
        TApplicationException x = TApplicationException.read(iprot_);
        iprot_.readMessageEnd();
        throw x;
      }
      if (msg.seqid != seqid_) {
        throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "listSharedNotebooks failed: out of sequence response");
      }
      listSharedNotebooks_result result = new listSharedNotebooks_result();
      result.read(iprot_);
      iprot_.readMessageEnd();
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.userException != null) {
        throw result.userException;
      }
      if (result.notFoundException != null) {
        throw result.notFoundException;
      }
      if (result.systemException != null) {
        throw result.systemException;
      }
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "listSharedNotebooks failed: unknown result");
    }

    public int expungeSharedNotebooks(String authenticationToken, List sharedNotebookIds) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMNotFoundException, com.evernote.edam.error.EDAMSystemException, TException
    {
      send_expungeSharedNotebooks(authenticationToken, sharedNotebookIds);
      return recv_expungeSharedNotebooks();
    }

    public void send_expungeSharedNotebooks(String authenticationToken, List sharedNotebookIds) throws TException
    {
      oprot_.writeMessageBegin(new TMessage("expungeSharedNotebooks", TMessageType.CALL, ++seqid_));
      expungeSharedNotebooks_args args = new expungeSharedNotebooks_args();
      args.setAuthenticationToken(authenticationToken);
      args.setSharedNotebookIds(sharedNotebookIds);
      args.write(oprot_);
      oprot_.writeMessageEnd();
      oprot_.getTransport().flush();
    }

    public int recv_expungeSharedNotebooks() throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMNotFoundException, com.evernote.edam.error.EDAMSystemException, TException
    {
      TMessage msg = iprot_.readMessageBegin();
      if (msg.type == TMessageType.EXCEPTION) {
        TApplicationException x = TApplicationException.read(iprot_);
        iprot_.readMessageEnd();
        throw x;
      }
      if (msg.seqid != seqid_) {
        throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "expungeSharedNotebooks failed: out of sequence response");
      }
      expungeSharedNotebooks_result result = new expungeSharedNotebooks_result();
      result.read(iprot_);
      iprot_.readMessageEnd();
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.userException != null) {
        throw result.userException;
      }
      if (result.notFoundException != null) {
        throw result.notFoundException;
      }
      if (result.systemException != null) {
        throw result.systemException;
      }
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "expungeSharedNotebooks failed: unknown result");
    }

    public com.evernote.edam.type.LinkedNotebook createLinkedNotebook(String authenticationToken, com.evernote.edam.type.LinkedNotebook linkedNotebook) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMNotFoundException, com.evernote.edam.error.EDAMSystemException, TException
    {
      send_createLinkedNotebook(authenticationToken, linkedNotebook);
      return recv_createLinkedNotebook();
    }

    public void send_createLinkedNotebook(String authenticationToken, com.evernote.edam.type.LinkedNotebook linkedNotebook) throws TException
    {
      oprot_.writeMessageBegin(new TMessage("createLinkedNotebook", TMessageType.CALL, ++seqid_));
      createLinkedNotebook_args args = new createLinkedNotebook_args();
      args.setAuthenticationToken(authenticationToken);
      args.setLinkedNotebook(linkedNotebook);
      args.write(oprot_);
      oprot_.writeMessageEnd();
      oprot_.getTransport().flush();
    }

    public com.evernote.edam.type.LinkedNotebook recv_createLinkedNotebook() throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMNotFoundException, com.evernote.edam.error.EDAMSystemException, TException
    {
      TMessage msg = iprot_.readMessageBegin();
      if (msg.type == TMessageType.EXCEPTION) {
        TApplicationException x = TApplicationException.read(iprot_);
        iprot_.readMessageEnd();
        throw x;
      }
      if (msg.seqid != seqid_) {
        throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "createLinkedNotebook failed: out of sequence response");
      }
      createLinkedNotebook_result result = new createLinkedNotebook_result();
      result.read(iprot_);
      iprot_.readMessageEnd();
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.userException != null) {
        throw result.userException;
      }
      if (result.notFoundException != null) {
        throw result.notFoundException;
      }
      if (result.systemException != null) {
        throw result.systemException;
      }
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "createLinkedNotebook failed: unknown result");
    }

    public int updateLinkedNotebook(String authenticationToken, com.evernote.edam.type.LinkedNotebook linkedNotebook) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMNotFoundException, com.evernote.edam.error.EDAMSystemException, TException
    {
      send_updateLinkedNotebook(authenticationToken, linkedNotebook);
      return recv_updateLinkedNotebook();
    }

    public void send_updateLinkedNotebook(String authenticationToken, com.evernote.edam.type.LinkedNotebook linkedNotebook) throws TException
    {
      oprot_.writeMessageBegin(new TMessage("updateLinkedNotebook", TMessageType.CALL, ++seqid_));
      updateLinkedNotebook_args args = new updateLinkedNotebook_args();
      args.setAuthenticationToken(authenticationToken);
      args.setLinkedNotebook(linkedNotebook);
      args.write(oprot_);
      oprot_.writeMessageEnd();
      oprot_.getTransport().flush();
    }

    public int recv_updateLinkedNotebook() throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMNotFoundException, com.evernote.edam.error.EDAMSystemException, TException
    {
      TMessage msg = iprot_.readMessageBegin();
      if (msg.type == TMessageType.EXCEPTION) {
        TApplicationException x = TApplicationException.read(iprot_);
        iprot_.readMessageEnd();
        throw x;
      }
      if (msg.seqid != seqid_) {
        throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "updateLinkedNotebook failed: out of sequence response");
      }
      updateLinkedNotebook_result result = new updateLinkedNotebook_result();
      result.read(iprot_);
      iprot_.readMessageEnd();
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.userException != null) {
        throw result.userException;
      }
      if (result.notFoundException != null) {
        throw result.notFoundException;
      }
      if (result.systemException != null) {
        throw result.systemException;
      }
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "updateLinkedNotebook failed: unknown result");
    }

    public List listLinkedNotebooks(String authenticationToken) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMNotFoundException, com.evernote.edam.error.EDAMSystemException, TException
    {
      send_listLinkedNotebooks(authenticationToken);
      return recv_listLinkedNotebooks();
    }

    public void send_listLinkedNotebooks(String authenticationToken) throws TException
    {
      oprot_.writeMessageBegin(new TMessage("listLinkedNotebooks", TMessageType.CALL, ++seqid_));
      listLinkedNotebooks_args args = new listLinkedNotebooks_args();
      args.setAuthenticationToken(authenticationToken);
      args.write(oprot_);
      oprot_.writeMessageEnd();
      oprot_.getTransport().flush();
    }

    public List recv_listLinkedNotebooks() throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMNotFoundException, com.evernote.edam.error.EDAMSystemException, TException
    {
      TMessage msg = iprot_.readMessageBegin();
      if (msg.type == TMessageType.EXCEPTION) {
        TApplicationException x = TApplicationException.read(iprot_);
        iprot_.readMessageEnd();
        throw x;
      }
      if (msg.seqid != seqid_) {
        throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "listLinkedNotebooks failed: out of sequence response");
      }
      listLinkedNotebooks_result result = new listLinkedNotebooks_result();
      result.read(iprot_);
      iprot_.readMessageEnd();
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.userException != null) {
        throw result.userException;
      }
      if (result.notFoundException != null) {
        throw result.notFoundException;
      }
      if (result.systemException != null) {
        throw result.systemException;
      }
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "listLinkedNotebooks failed: unknown result");
    }

    public int expungeLinkedNotebook(String authenticationToken, String guid) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMNotFoundException, com.evernote.edam.error.EDAMSystemException, TException
    {
      send_expungeLinkedNotebook(authenticationToken, guid);
      return recv_expungeLinkedNotebook();
    }

    public void send_expungeLinkedNotebook(String authenticationToken, String guid) throws TException
    {
      oprot_.writeMessageBegin(new TMessage("expungeLinkedNotebook", TMessageType.CALL, ++seqid_));
      expungeLinkedNotebook_args args = new expungeLinkedNotebook_args();
      args.setAuthenticationToken(authenticationToken);
      args.setGuid(guid);
      args.write(oprot_);
      oprot_.writeMessageEnd();
      oprot_.getTransport().flush();
    }

    public int recv_expungeLinkedNotebook() throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMNotFoundException, com.evernote.edam.error.EDAMSystemException, TException
    {
      TMessage msg = iprot_.readMessageBegin();
      if (msg.type == TMessageType.EXCEPTION) {
        TApplicationException x = TApplicationException.read(iprot_);
        iprot_.readMessageEnd();
        throw x;
      }
      if (msg.seqid != seqid_) {
        throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "expungeLinkedNotebook failed: out of sequence response");
      }
      expungeLinkedNotebook_result result = new expungeLinkedNotebook_result();
      result.read(iprot_);
      iprot_.readMessageEnd();
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.userException != null) {
        throw result.userException;
      }
      if (result.notFoundException != null) {
        throw result.notFoundException;
      }
      if (result.systemException != null) {
        throw result.systemException;
      }
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "expungeLinkedNotebook failed: unknown result");
    }

    public com.evernote.edam.userstore.AuthenticationResult authenticateToSharedNotebook(String shareKey, String authenticationToken) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMNotFoundException, com.evernote.edam.error.EDAMSystemException, TException
    {
      send_authenticateToSharedNotebook(shareKey, authenticationToken);
      return recv_authenticateToSharedNotebook();
    }

    public void send_authenticateToSharedNotebook(String shareKey, String authenticationToken) throws TException
    {
      oprot_.writeMessageBegin(new TMessage("authenticateToSharedNotebook", TMessageType.CALL, ++seqid_));
      authenticateToSharedNotebook_args args = new authenticateToSharedNotebook_args();
      args.setShareKey(shareKey);
      args.setAuthenticationToken(authenticationToken);
      args.write(oprot_);
      oprot_.writeMessageEnd();
      oprot_.getTransport().flush();
    }

    public com.evernote.edam.userstore.AuthenticationResult recv_authenticateToSharedNotebook() throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMNotFoundException, com.evernote.edam.error.EDAMSystemException, TException
    {
      TMessage msg = iprot_.readMessageBegin();
      if (msg.type == TMessageType.EXCEPTION) {
        TApplicationException x = TApplicationException.read(iprot_);
        iprot_.readMessageEnd();
        throw x;
      }
      if (msg.seqid != seqid_) {
        throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "authenticateToSharedNotebook failed: out of sequence response");
      }
      authenticateToSharedNotebook_result result = new authenticateToSharedNotebook_result();
      result.read(iprot_);
      iprot_.readMessageEnd();
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.userException != null) {
        throw result.userException;
      }
      if (result.notFoundException != null) {
        throw result.notFoundException;
      }
      if (result.systemException != null) {
        throw result.systemException;
      }
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "authenticateToSharedNotebook failed: unknown result");
    }

    public com.evernote.edam.type.SharedNotebook getSharedNotebookByAuth(String authenticationToken) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMNotFoundException, com.evernote.edam.error.EDAMSystemException, TException
    {
      send_getSharedNotebookByAuth(authenticationToken);
      return recv_getSharedNotebookByAuth();
    }

    public void send_getSharedNotebookByAuth(String authenticationToken) throws TException
    {
      oprot_.writeMessageBegin(new TMessage("getSharedNotebookByAuth", TMessageType.CALL, ++seqid_));
      getSharedNotebookByAuth_args args = new getSharedNotebookByAuth_args();
      args.setAuthenticationToken(authenticationToken);
      args.write(oprot_);
      oprot_.writeMessageEnd();
      oprot_.getTransport().flush();
    }

    public com.evernote.edam.type.SharedNotebook recv_getSharedNotebookByAuth() throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMNotFoundException, com.evernote.edam.error.EDAMSystemException, TException
    {
      TMessage msg = iprot_.readMessageBegin();
      if (msg.type == TMessageType.EXCEPTION) {
        TApplicationException x = TApplicationException.read(iprot_);
        iprot_.readMessageEnd();
        throw x;
      }
      if (msg.seqid != seqid_) {
        throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "getSharedNotebookByAuth failed: out of sequence response");
      }
      getSharedNotebookByAuth_result result = new getSharedNotebookByAuth_result();
      result.read(iprot_);
      iprot_.readMessageEnd();
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.userException != null) {
        throw result.userException;
      }
      if (result.notFoundException != null) {
        throw result.notFoundException;
      }
      if (result.systemException != null) {
        throw result.systemException;
      }
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getSharedNotebookByAuth failed: unknown result");
    }

    public void emailNote(String authenticationToken, NoteEmailParameters parameters) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMNotFoundException, com.evernote.edam.error.EDAMSystemException, TException
    {
      send_emailNote(authenticationToken, parameters);
      recv_emailNote();
    }

    public void send_emailNote(String authenticationToken, NoteEmailParameters parameters) throws TException
    {
      oprot_.writeMessageBegin(new TMessage("emailNote", TMessageType.CALL, ++seqid_));
      emailNote_args args = new emailNote_args();
      args.setAuthenticationToken(authenticationToken);
      args.setParameters(parameters);
      args.write(oprot_);
      oprot_.writeMessageEnd();
      oprot_.getTransport().flush();
    }

    public void recv_emailNote() throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMNotFoundException, com.evernote.edam.error.EDAMSystemException, TException
    {
      TMessage msg = iprot_.readMessageBegin();
      if (msg.type == TMessageType.EXCEPTION) {
        TApplicationException x = TApplicationException.read(iprot_);
        iprot_.readMessageEnd();
        throw x;
      }
      if (msg.seqid != seqid_) {
        throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "emailNote failed: out of sequence response");
      }
      emailNote_result result = new emailNote_result();
      result.read(iprot_);
      iprot_.readMessageEnd();
      if (result.userException != null) {
        throw result.userException;
      }
      if (result.notFoundException != null) {
        throw result.notFoundException;
      }
      if (result.systemException != null) {
        throw result.systemException;
      }
      return;
    }

    public String shareNote(String authenticationToken, String guid) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMNotFoundException, com.evernote.edam.error.EDAMSystemException, TException
    {
      send_shareNote(authenticationToken, guid);
      return recv_shareNote();
    }

    public void send_shareNote(String authenticationToken, String guid) throws TException
    {
      oprot_.writeMessageBegin(new TMessage("shareNote", TMessageType.CALL, ++seqid_));
      shareNote_args args = new shareNote_args();
      args.setAuthenticationToken(authenticationToken);
      args.setGuid(guid);
      args.write(oprot_);
      oprot_.writeMessageEnd();
      oprot_.getTransport().flush();
    }

    public String recv_shareNote() throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMNotFoundException, com.evernote.edam.error.EDAMSystemException, TException
    {
      TMessage msg = iprot_.readMessageBegin();
      if (msg.type == TMessageType.EXCEPTION) {
        TApplicationException x = TApplicationException.read(iprot_);
        iprot_.readMessageEnd();
        throw x;
      }
      if (msg.seqid != seqid_) {
        throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "shareNote failed: out of sequence response");
      }
      shareNote_result result = new shareNote_result();
      result.read(iprot_);
      iprot_.readMessageEnd();
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.userException != null) {
        throw result.userException;
      }
      if (result.notFoundException != null) {
        throw result.notFoundException;
      }
      if (result.systemException != null) {
        throw result.systemException;
      }
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "shareNote failed: unknown result");
    }

    public void stopSharingNote(String authenticationToken, String guid) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMNotFoundException, com.evernote.edam.error.EDAMSystemException, TException
    {
      send_stopSharingNote(authenticationToken, guid);
      recv_stopSharingNote();
    }

    public void send_stopSharingNote(String authenticationToken, String guid) throws TException
    {
      oprot_.writeMessageBegin(new TMessage("stopSharingNote", TMessageType.CALL, ++seqid_));
      stopSharingNote_args args = new stopSharingNote_args();
      args.setAuthenticationToken(authenticationToken);
      args.setGuid(guid);
      args.write(oprot_);
      oprot_.writeMessageEnd();
      oprot_.getTransport().flush();
    }

    public void recv_stopSharingNote() throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMNotFoundException, com.evernote.edam.error.EDAMSystemException, TException
    {
      TMessage msg = iprot_.readMessageBegin();
      if (msg.type == TMessageType.EXCEPTION) {
        TApplicationException x = TApplicationException.read(iprot_);
        iprot_.readMessageEnd();
        throw x;
      }
      if (msg.seqid != seqid_) {
        throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "stopSharingNote failed: out of sequence response");
      }
      stopSharingNote_result result = new stopSharingNote_result();
      result.read(iprot_);
      iprot_.readMessageEnd();
      if (result.userException != null) {
        throw result.userException;
      }
      if (result.notFoundException != null) {
        throw result.notFoundException;
      }
      if (result.systemException != null) {
        throw result.systemException;
      }
      return;
    }

    public com.evernote.edam.userstore.AuthenticationResult authenticateToSharedNote(String guid, String noteKey) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMNotFoundException, com.evernote.edam.error.EDAMSystemException, TException
    {
      send_authenticateToSharedNote(guid, noteKey);
      return recv_authenticateToSharedNote();
    }

    public void send_authenticateToSharedNote(String guid, String noteKey) throws TException
    {
      oprot_.writeMessageBegin(new TMessage("authenticateToSharedNote", TMessageType.CALL, ++seqid_));
      authenticateToSharedNote_args args = new authenticateToSharedNote_args();
      args.setGuid(guid);
      args.setNoteKey(noteKey);
      args.write(oprot_);
      oprot_.writeMessageEnd();
      oprot_.getTransport().flush();
    }

    public com.evernote.edam.userstore.AuthenticationResult recv_authenticateToSharedNote() throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMNotFoundException, com.evernote.edam.error.EDAMSystemException, TException
    {
      TMessage msg = iprot_.readMessageBegin();
      if (msg.type == TMessageType.EXCEPTION) {
        TApplicationException x = TApplicationException.read(iprot_);
        iprot_.readMessageEnd();
        throw x;
      }
      if (msg.seqid != seqid_) {
        throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "authenticateToSharedNote failed: out of sequence response");
      }
      authenticateToSharedNote_result result = new authenticateToSharedNote_result();
      result.read(iprot_);
      iprot_.readMessageEnd();
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.userException != null) {
        throw result.userException;
      }
      if (result.notFoundException != null) {
        throw result.notFoundException;
      }
      if (result.systemException != null) {
        throw result.systemException;
      }
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "authenticateToSharedNote failed: unknown result");
    }

    public RelatedResult findRelated(String authenticationToken, RelatedQuery query, RelatedResultSpec resultSpec) throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException
    {
      send_findRelated(authenticationToken, query, resultSpec);
      return recv_findRelated();
    }

    public void send_findRelated(String authenticationToken, RelatedQuery query, RelatedResultSpec resultSpec) throws TException
    {
      oprot_.writeMessageBegin(new TMessage("findRelated", TMessageType.CALL, ++seqid_));
      findRelated_args args = new findRelated_args();
      args.setAuthenticationToken(authenticationToken);
      args.setQuery(query);
      args.setResultSpec(resultSpec);
      args.write(oprot_);
      oprot_.writeMessageEnd();
      oprot_.getTransport().flush();
    }

    public RelatedResult recv_findRelated() throws com.evernote.edam.error.EDAMUserException, com.evernote.edam.error.EDAMSystemException, com.evernote.edam.error.EDAMNotFoundException, TException
    {
      TMessage msg = iprot_.readMessageBegin();
      if (msg.type == TMessageType.EXCEPTION) {
        TApplicationException x = TApplicationException.read(iprot_);
        iprot_.readMessageEnd();
        throw x;
      }
      if (msg.seqid != seqid_) {
        throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "findRelated failed: out of sequence response");
      }
      findRelated_result result = new findRelated_result();
      result.read(iprot_);
      iprot_.readMessageEnd();
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.userException != null) {
        throw result.userException;
      }
      if (result.systemException != null) {
        throw result.systemException;
      }
      if (result.notFoundException != null) {
        throw result.notFoundException;
      }
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "findRelated failed: unknown result");
    }

  }
  private static class getSyncState_args implements TBase, java.io.Serializable, Cloneable   {
    private static final TStruct STRUCT_DESC = new TStruct("getSyncState_args");

    private static final TField AUTHENTICATION_TOKEN_FIELD_DESC = new TField("authenticationToken", TType.STRING, (short)1);

    private String authenticationToken;


    // isset id assignments

    public getSyncState_args() {
    }

    /**
     * Performs a deep copy on other.
     */
    public getSyncState_args(getSyncState_args other) {
      if (other.isSetAuthenticationToken()) {
        this.authenticationToken = other.authenticationToken;
      }
    }

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

    public void clear() {
      this.authenticationToken = null;
    }

    public void setAuthenticationToken(String authenticationToken) {
      this.authenticationToken = authenticationToken;
    }

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

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

      int lastComparison = 0;
      getSyncState_args typedOther = (getSyncState_args)other;

      lastComparison = Boolean.valueOf(isSetAuthenticationToken()).compareTo(typedOther.isSetAuthenticationToken());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetAuthenticationToken()) {        lastComparison = TBaseHelper.compareTo(this.authenticationToken, typedOther.authenticationToken);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public void read(TProtocol iprot) throws TException {
      TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // AUTHENTICATION_TOKEN
            if (field.type == TType.STRING) {
              this.authenticationToken = iprot.readString();
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(TProtocol oprot) throws TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      if (this.authenticationToken != null) {
        oprot.writeFieldBegin(AUTHENTICATION_TOKEN_FIELD_DESC);
        oprot.writeString(this.authenticationToken);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    public void validate() throws TException {
      // check for required fields
    }

  }

  private static class getSyncState_result implements TBase, java.io.Serializable, Cloneable   {
    private static final TStruct STRUCT_DESC = new TStruct("getSyncState_result");

    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
    private static final TField USER_EXCEPTION_FIELD_DESC = new TField("userException", TType.STRUCT, (short)1);
    private static final TField SYSTEM_EXCEPTION_FIELD_DESC = new TField("systemException", TType.STRUCT, (short)2);

    private SyncState success;
    private com.evernote.edam.error.EDAMUserException userException;
    private com.evernote.edam.error.EDAMSystemException systemException;


    // isset id assignments

    public getSyncState_result() {
    }

    /**
     * Performs a deep copy on other.
     */
    public getSyncState_result(getSyncState_result other) {
      if (other.isSetSuccess()) {
        this.success = new SyncState(other.success);
      }
      if (other.isSetUserException()) {
        this.userException = new com.evernote.edam.error.EDAMUserException(other.userException);
      }
      if (other.isSetSystemException()) {
        this.systemException = new com.evernote.edam.error.EDAMSystemException(other.systemException);
      }
    }

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

    public void clear() {
      this.success = null;
      this.userException = null;
      this.systemException = null;
    }

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

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

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

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

      int lastComparison = 0;
      getSyncState_result typedOther = (getSyncState_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {        lastComparison = TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetUserException()).compareTo(typedOther.isSetUserException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetUserException()) {        lastComparison = TBaseHelper.compareTo(this.userException, typedOther.userException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetSystemException()).compareTo(typedOther.isSetSystemException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSystemException()) {        lastComparison = TBaseHelper.compareTo(this.systemException, typedOther.systemException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public void read(TProtocol iprot) throws TException {
      TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == TType.STRUCT) {
              this.success = new SyncState();
              this.success.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 1: // USER_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.userException = new com.evernote.edam.error.EDAMUserException();
              this.userException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // SYSTEM_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.systemException = new com.evernote.edam.error.EDAMSystemException();
              this.systemException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(TProtocol oprot) throws TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        this.success.write(oprot);
        oprot.writeFieldEnd();
      } else if (this.isSetUserException()) {
        oprot.writeFieldBegin(USER_EXCEPTION_FIELD_DESC);
        this.userException.write(oprot);
        oprot.writeFieldEnd();
      } else if (this.isSetSystemException()) {
        oprot.writeFieldBegin(SYSTEM_EXCEPTION_FIELD_DESC);
        this.systemException.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    public void validate() throws TException {
      // check for required fields
    }

  }

  private static class getSyncStateWithMetrics_args implements TBase, java.io.Serializable, Cloneable   {
    private static final TStruct STRUCT_DESC = new TStruct("getSyncStateWithMetrics_args");

    private static final TField AUTHENTICATION_TOKEN_FIELD_DESC = new TField("authenticationToken", TType.STRING, (short)1);
    private static final TField CLIENT_METRICS_FIELD_DESC = new TField("clientMetrics", TType.STRUCT, (short)2);

    private String authenticationToken;
    private ClientUsageMetrics clientMetrics;


    // isset id assignments

    public getSyncStateWithMetrics_args() {
    }

    /**
     * Performs a deep copy on other.
     */
    public getSyncStateWithMetrics_args(getSyncStateWithMetrics_args other) {
      if (other.isSetAuthenticationToken()) {
        this.authenticationToken = other.authenticationToken;
      }
      if (other.isSetClientMetrics()) {
        this.clientMetrics = new ClientUsageMetrics(other.clientMetrics);
      }
    }

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

    public void clear() {
      this.authenticationToken = null;
      this.clientMetrics = null;
    }

    public void setAuthenticationToken(String authenticationToken) {
      this.authenticationToken = authenticationToken;
    }

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

    public void setClientMetrics(ClientUsageMetrics clientMetrics) {
      this.clientMetrics = clientMetrics;
    }

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

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

      int lastComparison = 0;
      getSyncStateWithMetrics_args typedOther = (getSyncStateWithMetrics_args)other;

      lastComparison = Boolean.valueOf(isSetAuthenticationToken()).compareTo(typedOther.isSetAuthenticationToken());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetAuthenticationToken()) {        lastComparison = TBaseHelper.compareTo(this.authenticationToken, typedOther.authenticationToken);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetClientMetrics()).compareTo(typedOther.isSetClientMetrics());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetClientMetrics()) {        lastComparison = TBaseHelper.compareTo(this.clientMetrics, typedOther.clientMetrics);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public void read(TProtocol iprot) throws TException {
      TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // AUTHENTICATION_TOKEN
            if (field.type == TType.STRING) {
              this.authenticationToken = iprot.readString();
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // CLIENT_METRICS
            if (field.type == TType.STRUCT) {
              this.clientMetrics = new ClientUsageMetrics();
              this.clientMetrics.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(TProtocol oprot) throws TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      if (this.authenticationToken != null) {
        oprot.writeFieldBegin(AUTHENTICATION_TOKEN_FIELD_DESC);
        oprot.writeString(this.authenticationToken);
        oprot.writeFieldEnd();
      }
      if (this.clientMetrics != null) {
        oprot.writeFieldBegin(CLIENT_METRICS_FIELD_DESC);
        this.clientMetrics.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    public void validate() throws TException {
      // check for required fields
    }

  }

  private static class getSyncStateWithMetrics_result implements TBase, java.io.Serializable, Cloneable   {
    private static final TStruct STRUCT_DESC = new TStruct("getSyncStateWithMetrics_result");

    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
    private static final TField USER_EXCEPTION_FIELD_DESC = new TField("userException", TType.STRUCT, (short)1);
    private static final TField SYSTEM_EXCEPTION_FIELD_DESC = new TField("systemException", TType.STRUCT, (short)2);

    private SyncState success;
    private com.evernote.edam.error.EDAMUserException userException;
    private com.evernote.edam.error.EDAMSystemException systemException;


    // isset id assignments

    public getSyncStateWithMetrics_result() {
    }

    /**
     * Performs a deep copy on other.
     */
    public getSyncStateWithMetrics_result(getSyncStateWithMetrics_result other) {
      if (other.isSetSuccess()) {
        this.success = new SyncState(other.success);
      }
      if (other.isSetUserException()) {
        this.userException = new com.evernote.edam.error.EDAMUserException(other.userException);
      }
      if (other.isSetSystemException()) {
        this.systemException = new com.evernote.edam.error.EDAMSystemException(other.systemException);
      }
    }

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

    public void clear() {
      this.success = null;
      this.userException = null;
      this.systemException = null;
    }

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

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

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

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

      int lastComparison = 0;
      getSyncStateWithMetrics_result typedOther = (getSyncStateWithMetrics_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {        lastComparison = TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetUserException()).compareTo(typedOther.isSetUserException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetUserException()) {        lastComparison = TBaseHelper.compareTo(this.userException, typedOther.userException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetSystemException()).compareTo(typedOther.isSetSystemException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSystemException()) {        lastComparison = TBaseHelper.compareTo(this.systemException, typedOther.systemException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public void read(TProtocol iprot) throws TException {
      TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == TType.STRUCT) {
              this.success = new SyncState();
              this.success.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 1: // USER_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.userException = new com.evernote.edam.error.EDAMUserException();
              this.userException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // SYSTEM_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.systemException = new com.evernote.edam.error.EDAMSystemException();
              this.systemException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(TProtocol oprot) throws TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        this.success.write(oprot);
        oprot.writeFieldEnd();
      } else if (this.isSetUserException()) {
        oprot.writeFieldBegin(USER_EXCEPTION_FIELD_DESC);
        this.userException.write(oprot);
        oprot.writeFieldEnd();
      } else if (this.isSetSystemException()) {
        oprot.writeFieldBegin(SYSTEM_EXCEPTION_FIELD_DESC);
        this.systemException.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    public void validate() throws TException {
      // check for required fields
    }

  }

  private static class getSyncChunk_args implements TBase, java.io.Serializable, Cloneable   {
    private static final TStruct STRUCT_DESC = new TStruct("getSyncChunk_args");

    private static final TField AUTHENTICATION_TOKEN_FIELD_DESC = new TField("authenticationToken", TType.STRING, (short)1);
    private static final TField AFTER_USN_FIELD_DESC = new TField("afterUSN", TType.I32, (short)2);
    private static final TField MAX_ENTRIES_FIELD_DESC = new TField("maxEntries", TType.I32, (short)3);
    private static final TField FULL_SYNC_ONLY_FIELD_DESC = new TField("fullSyncOnly", TType.BOOL, (short)4);

    private String authenticationToken;
    private int afterUSN;
    private int maxEntries;
    private boolean fullSyncOnly;


    // isset id assignments
    private static final int __AFTERUSN_ISSET_ID = 0;
    private static final int __MAXENTRIES_ISSET_ID = 1;
    private static final int __FULLSYNCONLY_ISSET_ID = 2;
    private boolean[] __isset_vector = new boolean[3];

    public getSyncChunk_args() {
    }

    /**
     * Performs a deep copy on other.
     */
    public getSyncChunk_args(getSyncChunk_args other) {
      System.arraycopy(other.__isset_vector, 0, __isset_vector, 0, other.__isset_vector.length);
      if (other.isSetAuthenticationToken()) {
        this.authenticationToken = other.authenticationToken;
      }
      this.afterUSN = other.afterUSN;
      this.maxEntries = other.maxEntries;
      this.fullSyncOnly = other.fullSyncOnly;
    }

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

    public void clear() {
      this.authenticationToken = null;
      setAfterUSNIsSet(false);
      this.afterUSN = 0;
      setMaxEntriesIsSet(false);
      this.maxEntries = 0;
      setFullSyncOnlyIsSet(false);
      this.fullSyncOnly = false;
    }

    public void setAuthenticationToken(String authenticationToken) {
      this.authenticationToken = authenticationToken;
    }

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

    public void setAfterUSN(int afterUSN) {
      this.afterUSN = afterUSN;
      setAfterUSNIsSet(true);
    }

    /** Returns true if field afterUSN is set (has been asigned a value) and false otherwise */
    public boolean isSetAfterUSN() {
      return __isset_vector[__AFTERUSN_ISSET_ID];
    }

    public void setAfterUSNIsSet(boolean value) {
      __isset_vector[__AFTERUSN_ISSET_ID] = value;
    }

    public void setMaxEntries(int maxEntries) {
      this.maxEntries = maxEntries;
      setMaxEntriesIsSet(true);
    }

    /** Returns true if field maxEntries is set (has been asigned a value) and false otherwise */
    public boolean isSetMaxEntries() {
      return __isset_vector[__MAXENTRIES_ISSET_ID];
    }

    public void setMaxEntriesIsSet(boolean value) {
      __isset_vector[__MAXENTRIES_ISSET_ID] = value;
    }

    public void setFullSyncOnly(boolean fullSyncOnly) {
      this.fullSyncOnly = fullSyncOnly;
      setFullSyncOnlyIsSet(true);
    }

    /** Returns true if field fullSyncOnly is set (has been asigned a value) and false otherwise */
    public boolean isSetFullSyncOnly() {
      return __isset_vector[__FULLSYNCONLY_ISSET_ID];
    }

    public void setFullSyncOnlyIsSet(boolean value) {
      __isset_vector[__FULLSYNCONLY_ISSET_ID] = value;
    }

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

      int lastComparison = 0;
      getSyncChunk_args typedOther = (getSyncChunk_args)other;

      lastComparison = Boolean.valueOf(isSetAuthenticationToken()).compareTo(typedOther.isSetAuthenticationToken());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetAuthenticationToken()) {        lastComparison = TBaseHelper.compareTo(this.authenticationToken, typedOther.authenticationToken);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetAfterUSN()).compareTo(typedOther.isSetAfterUSN());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetAfterUSN()) {        lastComparison = TBaseHelper.compareTo(this.afterUSN, typedOther.afterUSN);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetMaxEntries()).compareTo(typedOther.isSetMaxEntries());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetMaxEntries()) {        lastComparison = TBaseHelper.compareTo(this.maxEntries, typedOther.maxEntries);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetFullSyncOnly()).compareTo(typedOther.isSetFullSyncOnly());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetFullSyncOnly()) {        lastComparison = TBaseHelper.compareTo(this.fullSyncOnly, typedOther.fullSyncOnly);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public void read(TProtocol iprot) throws TException {
      TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // AUTHENTICATION_TOKEN
            if (field.type == TType.STRING) {
              this.authenticationToken = iprot.readString();
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // AFTER_USN
            if (field.type == TType.I32) {
              this.afterUSN = iprot.readI32();
              setAfterUSNIsSet(true);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 3: // MAX_ENTRIES
            if (field.type == TType.I32) {
              this.maxEntries = iprot.readI32();
              setMaxEntriesIsSet(true);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 4: // FULL_SYNC_ONLY
            if (field.type == TType.BOOL) {
              this.fullSyncOnly = iprot.readBool();
              setFullSyncOnlyIsSet(true);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(TProtocol oprot) throws TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      if (this.authenticationToken != null) {
        oprot.writeFieldBegin(AUTHENTICATION_TOKEN_FIELD_DESC);
        oprot.writeString(this.authenticationToken);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldBegin(AFTER_USN_FIELD_DESC);
      oprot.writeI32(this.afterUSN);
      oprot.writeFieldEnd();
      oprot.writeFieldBegin(MAX_ENTRIES_FIELD_DESC);
      oprot.writeI32(this.maxEntries);
      oprot.writeFieldEnd();
      oprot.writeFieldBegin(FULL_SYNC_ONLY_FIELD_DESC);
      oprot.writeBool(this.fullSyncOnly);
      oprot.writeFieldEnd();
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    public void validate() throws TException {
      // check for required fields
    }

  }

  private static class getSyncChunk_result implements TBase, java.io.Serializable, Cloneable   {
    private static final TStruct STRUCT_DESC = new TStruct("getSyncChunk_result");

    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
    private static final TField USER_EXCEPTION_FIELD_DESC = new TField("userException", TType.STRUCT, (short)1);
    private static final TField SYSTEM_EXCEPTION_FIELD_DESC = new TField("systemException", TType.STRUCT, (short)2);

    private SyncChunk success;
    private com.evernote.edam.error.EDAMUserException userException;
    private com.evernote.edam.error.EDAMSystemException systemException;


    // isset id assignments

    public getSyncChunk_result() {
    }

    /**
     * Performs a deep copy on other.
     */
    public getSyncChunk_result(getSyncChunk_result other) {
      if (other.isSetSuccess()) {
        this.success = new SyncChunk(other.success);
      }
      if (other.isSetUserException()) {
        this.userException = new com.evernote.edam.error.EDAMUserException(other.userException);
      }
      if (other.isSetSystemException()) {
        this.systemException = new com.evernote.edam.error.EDAMSystemException(other.systemException);
      }
    }

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

    public void clear() {
      this.success = null;
      this.userException = null;
      this.systemException = null;
    }

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

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

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

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

      int lastComparison = 0;
      getSyncChunk_result typedOther = (getSyncChunk_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {        lastComparison = TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetUserException()).compareTo(typedOther.isSetUserException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetUserException()) {        lastComparison = TBaseHelper.compareTo(this.userException, typedOther.userException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetSystemException()).compareTo(typedOther.isSetSystemException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSystemException()) {        lastComparison = TBaseHelper.compareTo(this.systemException, typedOther.systemException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public void read(TProtocol iprot) throws TException {
      TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == TType.STRUCT) {
              this.success = new SyncChunk();
              this.success.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 1: // USER_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.userException = new com.evernote.edam.error.EDAMUserException();
              this.userException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // SYSTEM_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.systemException = new com.evernote.edam.error.EDAMSystemException();
              this.systemException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(TProtocol oprot) throws TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        this.success.write(oprot);
        oprot.writeFieldEnd();
      } else if (this.isSetUserException()) {
        oprot.writeFieldBegin(USER_EXCEPTION_FIELD_DESC);
        this.userException.write(oprot);
        oprot.writeFieldEnd();
      } else if (this.isSetSystemException()) {
        oprot.writeFieldBegin(SYSTEM_EXCEPTION_FIELD_DESC);
        this.systemException.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    public void validate() throws TException {
      // check for required fields
    }

  }

  private static class getFilteredSyncChunk_args implements TBase, java.io.Serializable, Cloneable   {
    private static final TStruct STRUCT_DESC = new TStruct("getFilteredSyncChunk_args");

    private static final TField AUTHENTICATION_TOKEN_FIELD_DESC = new TField("authenticationToken", TType.STRING, (short)1);
    private static final TField AFTER_USN_FIELD_DESC = new TField("afterUSN", TType.I32, (short)2);
    private static final TField MAX_ENTRIES_FIELD_DESC = new TField("maxEntries", TType.I32, (short)3);
    private static final TField FILTER_FIELD_DESC = new TField("filter", TType.STRUCT, (short)4);

    private String authenticationToken;
    private int afterUSN;
    private int maxEntries;
    private SyncChunkFilter filter;


    // isset id assignments
    private static final int __AFTERUSN_ISSET_ID = 0;
    private static final int __MAXENTRIES_ISSET_ID = 1;
    private boolean[] __isset_vector = new boolean[2];

    public getFilteredSyncChunk_args() {
    }

    /**
     * Performs a deep copy on other.
     */
    public getFilteredSyncChunk_args(getFilteredSyncChunk_args other) {
      System.arraycopy(other.__isset_vector, 0, __isset_vector, 0, other.__isset_vector.length);
      if (other.isSetAuthenticationToken()) {
        this.authenticationToken = other.authenticationToken;
      }
      this.afterUSN = other.afterUSN;
      this.maxEntries = other.maxEntries;
      if (other.isSetFilter()) {
        this.filter = new SyncChunkFilter(other.filter);
      }
    }

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

    public void clear() {
      this.authenticationToken = null;
      setAfterUSNIsSet(false);
      this.afterUSN = 0;
      setMaxEntriesIsSet(false);
      this.maxEntries = 0;
      this.filter = null;
    }

    public void setAuthenticationToken(String authenticationToken) {
      this.authenticationToken = authenticationToken;
    }

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

    public void setAfterUSN(int afterUSN) {
      this.afterUSN = afterUSN;
      setAfterUSNIsSet(true);
    }

    /** Returns true if field afterUSN is set (has been asigned a value) and false otherwise */
    public boolean isSetAfterUSN() {
      return __isset_vector[__AFTERUSN_ISSET_ID];
    }

    public void setAfterUSNIsSet(boolean value) {
      __isset_vector[__AFTERUSN_ISSET_ID] = value;
    }

    public void setMaxEntries(int maxEntries) {
      this.maxEntries = maxEntries;
      setMaxEntriesIsSet(true);
    }

    /** Returns true if field maxEntries is set (has been asigned a value) and false otherwise */
    public boolean isSetMaxEntries() {
      return __isset_vector[__MAXENTRIES_ISSET_ID];
    }

    public void setMaxEntriesIsSet(boolean value) {
      __isset_vector[__MAXENTRIES_ISSET_ID] = value;
    }

    public void setFilter(SyncChunkFilter filter) {
      this.filter = filter;
    }

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

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

      int lastComparison = 0;
      getFilteredSyncChunk_args typedOther = (getFilteredSyncChunk_args)other;

      lastComparison = Boolean.valueOf(isSetAuthenticationToken()).compareTo(typedOther.isSetAuthenticationToken());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetAuthenticationToken()) {        lastComparison = TBaseHelper.compareTo(this.authenticationToken, typedOther.authenticationToken);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetAfterUSN()).compareTo(typedOther.isSetAfterUSN());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetAfterUSN()) {        lastComparison = TBaseHelper.compareTo(this.afterUSN, typedOther.afterUSN);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetMaxEntries()).compareTo(typedOther.isSetMaxEntries());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetMaxEntries()) {        lastComparison = TBaseHelper.compareTo(this.maxEntries, typedOther.maxEntries);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetFilter()).compareTo(typedOther.isSetFilter());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetFilter()) {        lastComparison = TBaseHelper.compareTo(this.filter, typedOther.filter);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public void read(TProtocol iprot) throws TException {
      TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // AUTHENTICATION_TOKEN
            if (field.type == TType.STRING) {
              this.authenticationToken = iprot.readString();
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // AFTER_USN
            if (field.type == TType.I32) {
              this.afterUSN = iprot.readI32();
              setAfterUSNIsSet(true);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 3: // MAX_ENTRIES
            if (field.type == TType.I32) {
              this.maxEntries = iprot.readI32();
              setMaxEntriesIsSet(true);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 4: // FILTER
            if (field.type == TType.STRUCT) {
              this.filter = new SyncChunkFilter();
              this.filter.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(TProtocol oprot) throws TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      if (this.authenticationToken != null) {
        oprot.writeFieldBegin(AUTHENTICATION_TOKEN_FIELD_DESC);
        oprot.writeString(this.authenticationToken);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldBegin(AFTER_USN_FIELD_DESC);
      oprot.writeI32(this.afterUSN);
      oprot.writeFieldEnd();
      oprot.writeFieldBegin(MAX_ENTRIES_FIELD_DESC);
      oprot.writeI32(this.maxEntries);
      oprot.writeFieldEnd();
      if (this.filter != null) {
        oprot.writeFieldBegin(FILTER_FIELD_DESC);
        this.filter.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    public void validate() throws TException {
      // check for required fields
    }

  }

  private static class getFilteredSyncChunk_result implements TBase, java.io.Serializable, Cloneable   {
    private static final TStruct STRUCT_DESC = new TStruct("getFilteredSyncChunk_result");

    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
    private static final TField USER_EXCEPTION_FIELD_DESC = new TField("userException", TType.STRUCT, (short)1);
    private static final TField SYSTEM_EXCEPTION_FIELD_DESC = new TField("systemException", TType.STRUCT, (short)2);

    private SyncChunk success;
    private com.evernote.edam.error.EDAMUserException userException;
    private com.evernote.edam.error.EDAMSystemException systemException;


    // isset id assignments

    public getFilteredSyncChunk_result() {
    }

    /**
     * Performs a deep copy on other.
     */
    public getFilteredSyncChunk_result(getFilteredSyncChunk_result other) {
      if (other.isSetSuccess()) {
        this.success = new SyncChunk(other.success);
      }
      if (other.isSetUserException()) {
        this.userException = new com.evernote.edam.error.EDAMUserException(other.userException);
      }
      if (other.isSetSystemException()) {
        this.systemException = new com.evernote.edam.error.EDAMSystemException(other.systemException);
      }
    }

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

    public void clear() {
      this.success = null;
      this.userException = null;
      this.systemException = null;
    }

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

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

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

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

      int lastComparison = 0;
      getFilteredSyncChunk_result typedOther = (getFilteredSyncChunk_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {        lastComparison = TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetUserException()).compareTo(typedOther.isSetUserException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetUserException()) {        lastComparison = TBaseHelper.compareTo(this.userException, typedOther.userException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetSystemException()).compareTo(typedOther.isSetSystemException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSystemException()) {        lastComparison = TBaseHelper.compareTo(this.systemException, typedOther.systemException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public void read(TProtocol iprot) throws TException {
      TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == TType.STRUCT) {
              this.success = new SyncChunk();
              this.success.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 1: // USER_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.userException = new com.evernote.edam.error.EDAMUserException();
              this.userException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // SYSTEM_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.systemException = new com.evernote.edam.error.EDAMSystemException();
              this.systemException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(TProtocol oprot) throws TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        this.success.write(oprot);
        oprot.writeFieldEnd();
      } else if (this.isSetUserException()) {
        oprot.writeFieldBegin(USER_EXCEPTION_FIELD_DESC);
        this.userException.write(oprot);
        oprot.writeFieldEnd();
      } else if (this.isSetSystemException()) {
        oprot.writeFieldBegin(SYSTEM_EXCEPTION_FIELD_DESC);
        this.systemException.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    public void validate() throws TException {
      // check for required fields
    }

  }

  private static class getLinkedNotebookSyncState_args implements TBase, java.io.Serializable, Cloneable   {
    private static final TStruct STRUCT_DESC = new TStruct("getLinkedNotebookSyncState_args");

    private static final TField AUTHENTICATION_TOKEN_FIELD_DESC = new TField("authenticationToken", TType.STRING, (short)1);
    private static final TField LINKED_NOTEBOOK_FIELD_DESC = new TField("linkedNotebook", TType.STRUCT, (short)2);

    private String authenticationToken;
    private com.evernote.edam.type.LinkedNotebook linkedNotebook;


    // isset id assignments

    public getLinkedNotebookSyncState_args() {
    }

    /**
     * Performs a deep copy on other.
     */
    public getLinkedNotebookSyncState_args(getLinkedNotebookSyncState_args other) {
      if (other.isSetAuthenticationToken()) {
        this.authenticationToken = other.authenticationToken;
      }
      if (other.isSetLinkedNotebook()) {
        this.linkedNotebook = new com.evernote.edam.type.LinkedNotebook(other.linkedNotebook);
      }
    }

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

    public void clear() {
      this.authenticationToken = null;
      this.linkedNotebook = null;
    }

    public void setAuthenticationToken(String authenticationToken) {
      this.authenticationToken = authenticationToken;
    }

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

    public void setLinkedNotebook(com.evernote.edam.type.LinkedNotebook linkedNotebook) {
      this.linkedNotebook = linkedNotebook;
    }

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

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

      int lastComparison = 0;
      getLinkedNotebookSyncState_args typedOther = (getLinkedNotebookSyncState_args)other;

      lastComparison = Boolean.valueOf(isSetAuthenticationToken()).compareTo(typedOther.isSetAuthenticationToken());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetAuthenticationToken()) {        lastComparison = TBaseHelper.compareTo(this.authenticationToken, typedOther.authenticationToken);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetLinkedNotebook()).compareTo(typedOther.isSetLinkedNotebook());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetLinkedNotebook()) {        lastComparison = TBaseHelper.compareTo(this.linkedNotebook, typedOther.linkedNotebook);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public void read(TProtocol iprot) throws TException {
      TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // AUTHENTICATION_TOKEN
            if (field.type == TType.STRING) {
              this.authenticationToken = iprot.readString();
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // LINKED_NOTEBOOK
            if (field.type == TType.STRUCT) {
              this.linkedNotebook = new com.evernote.edam.type.LinkedNotebook();
              this.linkedNotebook.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(TProtocol oprot) throws TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      if (this.authenticationToken != null) {
        oprot.writeFieldBegin(AUTHENTICATION_TOKEN_FIELD_DESC);
        oprot.writeString(this.authenticationToken);
        oprot.writeFieldEnd();
      }
      if (this.linkedNotebook != null) {
        oprot.writeFieldBegin(LINKED_NOTEBOOK_FIELD_DESC);
        this.linkedNotebook.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    public void validate() throws TException {
      // check for required fields
    }

  }

  private static class getLinkedNotebookSyncState_result implements TBase, java.io.Serializable, Cloneable   {
    private static final TStruct STRUCT_DESC = new TStruct("getLinkedNotebookSyncState_result");

    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
    private static final TField USER_EXCEPTION_FIELD_DESC = new TField("userException", TType.STRUCT, (short)1);
    private static final TField SYSTEM_EXCEPTION_FIELD_DESC = new TField("systemException", TType.STRUCT, (short)2);
    private static final TField NOT_FOUND_EXCEPTION_FIELD_DESC = new TField("notFoundException", TType.STRUCT, (short)3);

    private SyncState success;
    private com.evernote.edam.error.EDAMUserException userException;
    private com.evernote.edam.error.EDAMSystemException systemException;
    private com.evernote.edam.error.EDAMNotFoundException notFoundException;


    // isset id assignments

    public getLinkedNotebookSyncState_result() {
    }

    /**
     * Performs a deep copy on other.
     */
    public getLinkedNotebookSyncState_result(getLinkedNotebookSyncState_result other) {
      if (other.isSetSuccess()) {
        this.success = new SyncState(other.success);
      }
      if (other.isSetUserException()) {
        this.userException = new com.evernote.edam.error.EDAMUserException(other.userException);
      }
      if (other.isSetSystemException()) {
        this.systemException = new com.evernote.edam.error.EDAMSystemException(other.systemException);
      }
      if (other.isSetNotFoundException()) {
        this.notFoundException = new com.evernote.edam.error.EDAMNotFoundException(other.notFoundException);
      }
    }

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

    public void clear() {
      this.success = null;
      this.userException = null;
      this.systemException = null;
      this.notFoundException = null;
    }

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

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

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

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

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

      int lastComparison = 0;
      getLinkedNotebookSyncState_result typedOther = (getLinkedNotebookSyncState_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {        lastComparison = TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetUserException()).compareTo(typedOther.isSetUserException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetUserException()) {        lastComparison = TBaseHelper.compareTo(this.userException, typedOther.userException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetSystemException()).compareTo(typedOther.isSetSystemException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSystemException()) {        lastComparison = TBaseHelper.compareTo(this.systemException, typedOther.systemException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetNotFoundException()).compareTo(typedOther.isSetNotFoundException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetNotFoundException()) {        lastComparison = TBaseHelper.compareTo(this.notFoundException, typedOther.notFoundException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public void read(TProtocol iprot) throws TException {
      TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == TType.STRUCT) {
              this.success = new SyncState();
              this.success.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 1: // USER_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.userException = new com.evernote.edam.error.EDAMUserException();
              this.userException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // SYSTEM_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.systemException = new com.evernote.edam.error.EDAMSystemException();
              this.systemException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 3: // NOT_FOUND_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.notFoundException = new com.evernote.edam.error.EDAMNotFoundException();
              this.notFoundException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(TProtocol oprot) throws TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        this.success.write(oprot);
        oprot.writeFieldEnd();
      } else if (this.isSetUserException()) {
        oprot.writeFieldBegin(USER_EXCEPTION_FIELD_DESC);
        this.userException.write(oprot);
        oprot.writeFieldEnd();
      } else if (this.isSetSystemException()) {
        oprot.writeFieldBegin(SYSTEM_EXCEPTION_FIELD_DESC);
        this.systemException.write(oprot);
        oprot.writeFieldEnd();
      } else if (this.isSetNotFoundException()) {
        oprot.writeFieldBegin(NOT_FOUND_EXCEPTION_FIELD_DESC);
        this.notFoundException.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    public void validate() throws TException {
      // check for required fields
    }

  }

  private static class getLinkedNotebookSyncChunk_args implements TBase, java.io.Serializable, Cloneable   {
    private static final TStruct STRUCT_DESC = new TStruct("getLinkedNotebookSyncChunk_args");

    private static final TField AUTHENTICATION_TOKEN_FIELD_DESC = new TField("authenticationToken", TType.STRING, (short)1);
    private static final TField LINKED_NOTEBOOK_FIELD_DESC = new TField("linkedNotebook", TType.STRUCT, (short)2);
    private static final TField AFTER_USN_FIELD_DESC = new TField("afterUSN", TType.I32, (short)3);
    private static final TField MAX_ENTRIES_FIELD_DESC = new TField("maxEntries", TType.I32, (short)4);
    private static final TField FULL_SYNC_ONLY_FIELD_DESC = new TField("fullSyncOnly", TType.BOOL, (short)5);

    private String authenticationToken;
    private com.evernote.edam.type.LinkedNotebook linkedNotebook;
    private int afterUSN;
    private int maxEntries;
    private boolean fullSyncOnly;


    // isset id assignments
    private static final int __AFTERUSN_ISSET_ID = 0;
    private static final int __MAXENTRIES_ISSET_ID = 1;
    private static final int __FULLSYNCONLY_ISSET_ID = 2;
    private boolean[] __isset_vector = new boolean[3];

    public getLinkedNotebookSyncChunk_args() {
    }

    /**
     * Performs a deep copy on other.
     */
    public getLinkedNotebookSyncChunk_args(getLinkedNotebookSyncChunk_args other) {
      System.arraycopy(other.__isset_vector, 0, __isset_vector, 0, other.__isset_vector.length);
      if (other.isSetAuthenticationToken()) {
        this.authenticationToken = other.authenticationToken;
      }
      if (other.isSetLinkedNotebook()) {
        this.linkedNotebook = new com.evernote.edam.type.LinkedNotebook(other.linkedNotebook);
      }
      this.afterUSN = other.afterUSN;
      this.maxEntries = other.maxEntries;
      this.fullSyncOnly = other.fullSyncOnly;
    }

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

    public void clear() {
      this.authenticationToken = null;
      this.linkedNotebook = null;
      setAfterUSNIsSet(false);
      this.afterUSN = 0;
      setMaxEntriesIsSet(false);
      this.maxEntries = 0;
      setFullSyncOnlyIsSet(false);
      this.fullSyncOnly = false;
    }

    public void setAuthenticationToken(String authenticationToken) {
      this.authenticationToken = authenticationToken;
    }

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

    public void setLinkedNotebook(com.evernote.edam.type.LinkedNotebook linkedNotebook) {
      this.linkedNotebook = linkedNotebook;
    }

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

    public void setAfterUSN(int afterUSN) {
      this.afterUSN = afterUSN;
      setAfterUSNIsSet(true);
    }

    /** Returns true if field afterUSN is set (has been asigned a value) and false otherwise */
    public boolean isSetAfterUSN() {
      return __isset_vector[__AFTERUSN_ISSET_ID];
    }

    public void setAfterUSNIsSet(boolean value) {
      __isset_vector[__AFTERUSN_ISSET_ID] = value;
    }

    public void setMaxEntries(int maxEntries) {
      this.maxEntries = maxEntries;
      setMaxEntriesIsSet(true);
    }

    /** Returns true if field maxEntries is set (has been asigned a value) and false otherwise */
    public boolean isSetMaxEntries() {
      return __isset_vector[__MAXENTRIES_ISSET_ID];
    }

    public void setMaxEntriesIsSet(boolean value) {
      __isset_vector[__MAXENTRIES_ISSET_ID] = value;
    }

    public void setFullSyncOnly(boolean fullSyncOnly) {
      this.fullSyncOnly = fullSyncOnly;
      setFullSyncOnlyIsSet(true);
    }

    /** Returns true if field fullSyncOnly is set (has been asigned a value) and false otherwise */
    public boolean isSetFullSyncOnly() {
      return __isset_vector[__FULLSYNCONLY_ISSET_ID];
    }

    public void setFullSyncOnlyIsSet(boolean value) {
      __isset_vector[__FULLSYNCONLY_ISSET_ID] = value;
    }

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

      int lastComparison = 0;
      getLinkedNotebookSyncChunk_args typedOther = (getLinkedNotebookSyncChunk_args)other;

      lastComparison = Boolean.valueOf(isSetAuthenticationToken()).compareTo(typedOther.isSetAuthenticationToken());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetAuthenticationToken()) {        lastComparison = TBaseHelper.compareTo(this.authenticationToken, typedOther.authenticationToken);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetLinkedNotebook()).compareTo(typedOther.isSetLinkedNotebook());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetLinkedNotebook()) {        lastComparison = TBaseHelper.compareTo(this.linkedNotebook, typedOther.linkedNotebook);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetAfterUSN()).compareTo(typedOther.isSetAfterUSN());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetAfterUSN()) {        lastComparison = TBaseHelper.compareTo(this.afterUSN, typedOther.afterUSN);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetMaxEntries()).compareTo(typedOther.isSetMaxEntries());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetMaxEntries()) {        lastComparison = TBaseHelper.compareTo(this.maxEntries, typedOther.maxEntries);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetFullSyncOnly()).compareTo(typedOther.isSetFullSyncOnly());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetFullSyncOnly()) {        lastComparison = TBaseHelper.compareTo(this.fullSyncOnly, typedOther.fullSyncOnly);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public void read(TProtocol iprot) throws TException {
      TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // AUTHENTICATION_TOKEN
            if (field.type == TType.STRING) {
              this.authenticationToken = iprot.readString();
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // LINKED_NOTEBOOK
            if (field.type == TType.STRUCT) {
              this.linkedNotebook = new com.evernote.edam.type.LinkedNotebook();
              this.linkedNotebook.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 3: // AFTER_USN
            if (field.type == TType.I32) {
              this.afterUSN = iprot.readI32();
              setAfterUSNIsSet(true);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 4: // MAX_ENTRIES
            if (field.type == TType.I32) {
              this.maxEntries = iprot.readI32();
              setMaxEntriesIsSet(true);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 5: // FULL_SYNC_ONLY
            if (field.type == TType.BOOL) {
              this.fullSyncOnly = iprot.readBool();
              setFullSyncOnlyIsSet(true);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(TProtocol oprot) throws TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      if (this.authenticationToken != null) {
        oprot.writeFieldBegin(AUTHENTICATION_TOKEN_FIELD_DESC);
        oprot.writeString(this.authenticationToken);
        oprot.writeFieldEnd();
      }
      if (this.linkedNotebook != null) {
        oprot.writeFieldBegin(LINKED_NOTEBOOK_FIELD_DESC);
        this.linkedNotebook.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldBegin(AFTER_USN_FIELD_DESC);
      oprot.writeI32(this.afterUSN);
      oprot.writeFieldEnd();
      oprot.writeFieldBegin(MAX_ENTRIES_FIELD_DESC);
      oprot.writeI32(this.maxEntries);
      oprot.writeFieldEnd();
      oprot.writeFieldBegin(FULL_SYNC_ONLY_FIELD_DESC);
      oprot.writeBool(this.fullSyncOnly);
      oprot.writeFieldEnd();
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    public void validate() throws TException {
      // check for required fields
    }

  }

  private static class getLinkedNotebookSyncChunk_result implements TBase, java.io.Serializable, Cloneable   {
    private static final TStruct STRUCT_DESC = new TStruct("getLinkedNotebookSyncChunk_result");

    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
    private static final TField USER_EXCEPTION_FIELD_DESC = new TField("userException", TType.STRUCT, (short)1);
    private static final TField SYSTEM_EXCEPTION_FIELD_DESC = new TField("systemException", TType.STRUCT, (short)2);
    private static final TField NOT_FOUND_EXCEPTION_FIELD_DESC = new TField("notFoundException", TType.STRUCT, (short)3);

    private SyncChunk success;
    private com.evernote.edam.error.EDAMUserException userException;
    private com.evernote.edam.error.EDAMSystemException systemException;
    private com.evernote.edam.error.EDAMNotFoundException notFoundException;


    // isset id assignments

    public getLinkedNotebookSyncChunk_result() {
    }

    /**
     * Performs a deep copy on other.
     */
    public getLinkedNotebookSyncChunk_result(getLinkedNotebookSyncChunk_result other) {
      if (other.isSetSuccess()) {
        this.success = new SyncChunk(other.success);
      }
      if (other.isSetUserException()) {
        this.userException = new com.evernote.edam.error.EDAMUserException(other.userException);
      }
      if (other.isSetSystemException()) {
        this.systemException = new com.evernote.edam.error.EDAMSystemException(other.systemException);
      }
      if (other.isSetNotFoundException()) {
        this.notFoundException = new com.evernote.edam.error.EDAMNotFoundException(other.notFoundException);
      }
    }

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

    public void clear() {
      this.success = null;
      this.userException = null;
      this.systemException = null;
      this.notFoundException = null;
    }

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

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

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

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

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

      int lastComparison = 0;
      getLinkedNotebookSyncChunk_result typedOther = (getLinkedNotebookSyncChunk_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {        lastComparison = TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetUserException()).compareTo(typedOther.isSetUserException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetUserException()) {        lastComparison = TBaseHelper.compareTo(this.userException, typedOther.userException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetSystemException()).compareTo(typedOther.isSetSystemException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSystemException()) {        lastComparison = TBaseHelper.compareTo(this.systemException, typedOther.systemException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetNotFoundException()).compareTo(typedOther.isSetNotFoundException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetNotFoundException()) {        lastComparison = TBaseHelper.compareTo(this.notFoundException, typedOther.notFoundException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public void read(TProtocol iprot) throws TException {
      TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == TType.STRUCT) {
              this.success = new SyncChunk();
              this.success.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 1: // USER_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.userException = new com.evernote.edam.error.EDAMUserException();
              this.userException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // SYSTEM_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.systemException = new com.evernote.edam.error.EDAMSystemException();
              this.systemException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 3: // NOT_FOUND_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.notFoundException = new com.evernote.edam.error.EDAMNotFoundException();
              this.notFoundException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(TProtocol oprot) throws TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        this.success.write(oprot);
        oprot.writeFieldEnd();
      } else if (this.isSetUserException()) {
        oprot.writeFieldBegin(USER_EXCEPTION_FIELD_DESC);
        this.userException.write(oprot);
        oprot.writeFieldEnd();
      } else if (this.isSetSystemException()) {
        oprot.writeFieldBegin(SYSTEM_EXCEPTION_FIELD_DESC);
        this.systemException.write(oprot);
        oprot.writeFieldEnd();
      } else if (this.isSetNotFoundException()) {
        oprot.writeFieldBegin(NOT_FOUND_EXCEPTION_FIELD_DESC);
        this.notFoundException.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    public void validate() throws TException {
      // check for required fields
    }

  }

  private static class listNotebooks_args implements TBase, java.io.Serializable, Cloneable   {
    private static final TStruct STRUCT_DESC = new TStruct("listNotebooks_args");

    private static final TField AUTHENTICATION_TOKEN_FIELD_DESC = new TField("authenticationToken", TType.STRING, (short)1);

    private String authenticationToken;


    // isset id assignments

    public listNotebooks_args() {
    }

    /**
     * Performs a deep copy on other.
     */
    public listNotebooks_args(listNotebooks_args other) {
      if (other.isSetAuthenticationToken()) {
        this.authenticationToken = other.authenticationToken;
      }
    }

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

    public void clear() {
      this.authenticationToken = null;
    }

    public void setAuthenticationToken(String authenticationToken) {
      this.authenticationToken = authenticationToken;
    }

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

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

      int lastComparison = 0;
      listNotebooks_args typedOther = (listNotebooks_args)other;

      lastComparison = Boolean.valueOf(isSetAuthenticationToken()).compareTo(typedOther.isSetAuthenticationToken());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetAuthenticationToken()) {        lastComparison = TBaseHelper.compareTo(this.authenticationToken, typedOther.authenticationToken);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public void read(TProtocol iprot) throws TException {
      TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // AUTHENTICATION_TOKEN
            if (field.type == TType.STRING) {
              this.authenticationToken = iprot.readString();
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(TProtocol oprot) throws TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      if (this.authenticationToken != null) {
        oprot.writeFieldBegin(AUTHENTICATION_TOKEN_FIELD_DESC);
        oprot.writeString(this.authenticationToken);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    public void validate() throws TException {
      // check for required fields
    }

  }

  private static class listNotebooks_result implements TBase, java.io.Serializable, Cloneable   {
    private static final TStruct STRUCT_DESC = new TStruct("listNotebooks_result");

    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
    private static final TField USER_EXCEPTION_FIELD_DESC = new TField("userException", TType.STRUCT, (short)1);
    private static final TField SYSTEM_EXCEPTION_FIELD_DESC = new TField("systemException", TType.STRUCT, (short)2);

    private List success;
    private com.evernote.edam.error.EDAMUserException userException;
    private com.evernote.edam.error.EDAMSystemException systemException;


    // isset id assignments

    public listNotebooks_result() {
    }

    /**
     * Performs a deep copy on other.
     */
    public listNotebooks_result(listNotebooks_result other) {
      if (other.isSetSuccess()) {
        List __this__success = new ArrayList();
        for (com.evernote.edam.type.Notebook other_element : other.success) {
          __this__success.add(new com.evernote.edam.type.Notebook(other_element));
        }
        this.success = __this__success;
      }
      if (other.isSetUserException()) {
        this.userException = new com.evernote.edam.error.EDAMUserException(other.userException);
      }
      if (other.isSetSystemException()) {
        this.systemException = new com.evernote.edam.error.EDAMSystemException(other.systemException);
      }
    }

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

    public void clear() {
      this.success = null;
      this.userException = null;
      this.systemException = null;
    }

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

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

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

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

      int lastComparison = 0;
      listNotebooks_result typedOther = (listNotebooks_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {        lastComparison = TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetUserException()).compareTo(typedOther.isSetUserException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetUserException()) {        lastComparison = TBaseHelper.compareTo(this.userException, typedOther.userException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetSystemException()).compareTo(typedOther.isSetSystemException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSystemException()) {        lastComparison = TBaseHelper.compareTo(this.systemException, typedOther.systemException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public void read(TProtocol iprot) throws TException {
      TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == TType.LIST) {
              {
                TList _list110 = iprot.readListBegin();
                this.success = new ArrayList(_list110.size);
                for (int _i111 = 0; _i111 < _list110.size; ++_i111)
                {
                  com.evernote.edam.type.Notebook _elem112;
                  _elem112 = new com.evernote.edam.type.Notebook();
                  _elem112.read(iprot);
                  this.success.add(_elem112);
                }
                iprot.readListEnd();
              }
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 1: // USER_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.userException = new com.evernote.edam.error.EDAMUserException();
              this.userException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // SYSTEM_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.systemException = new com.evernote.edam.error.EDAMSystemException();
              this.systemException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(TProtocol oprot) throws TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        {
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
          for (com.evernote.edam.type.Notebook _iter113 : this.success)
          {
            _iter113.write(oprot);
          }
          oprot.writeListEnd();
        }
        oprot.writeFieldEnd();
      } else if (this.isSetUserException()) {
        oprot.writeFieldBegin(USER_EXCEPTION_FIELD_DESC);
        this.userException.write(oprot);
        oprot.writeFieldEnd();
      } else if (this.isSetSystemException()) {
        oprot.writeFieldBegin(SYSTEM_EXCEPTION_FIELD_DESC);
        this.systemException.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    public void validate() throws TException {
      // check for required fields
    }

  }

  private static class getNotebook_args implements TBase, java.io.Serializable, Cloneable   {
    private static final TStruct STRUCT_DESC = new TStruct("getNotebook_args");

    private static final TField AUTHENTICATION_TOKEN_FIELD_DESC = new TField("authenticationToken", TType.STRING, (short)1);
    private static final TField GUID_FIELD_DESC = new TField("guid", TType.STRING, (short)2);

    private String authenticationToken;
    private String guid;


    // isset id assignments

    public getNotebook_args() {
    }

    /**
     * Performs a deep copy on other.
     */
    public getNotebook_args(getNotebook_args other) {
      if (other.isSetAuthenticationToken()) {
        this.authenticationToken = other.authenticationToken;
      }
      if (other.isSetGuid()) {
        this.guid = other.guid;
      }
    }

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

    public void clear() {
      this.authenticationToken = null;
      this.guid = null;
    }

    public void setAuthenticationToken(String authenticationToken) {
      this.authenticationToken = authenticationToken;
    }

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

    public void setGuid(String guid) {
      this.guid = guid;
    }

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

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

      int lastComparison = 0;
      getNotebook_args typedOther = (getNotebook_args)other;

      lastComparison = Boolean.valueOf(isSetAuthenticationToken()).compareTo(typedOther.isSetAuthenticationToken());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetAuthenticationToken()) {        lastComparison = TBaseHelper.compareTo(this.authenticationToken, typedOther.authenticationToken);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetGuid()).compareTo(typedOther.isSetGuid());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetGuid()) {        lastComparison = TBaseHelper.compareTo(this.guid, typedOther.guid);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public void read(TProtocol iprot) throws TException {
      TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // AUTHENTICATION_TOKEN
            if (field.type == TType.STRING) {
              this.authenticationToken = iprot.readString();
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // GUID
            if (field.type == TType.STRING) {
              this.guid = iprot.readString();
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(TProtocol oprot) throws TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      if (this.authenticationToken != null) {
        oprot.writeFieldBegin(AUTHENTICATION_TOKEN_FIELD_DESC);
        oprot.writeString(this.authenticationToken);
        oprot.writeFieldEnd();
      }
      if (this.guid != null) {
        oprot.writeFieldBegin(GUID_FIELD_DESC);
        oprot.writeString(this.guid);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    public void validate() throws TException {
      // check for required fields
    }

  }

  private static class getNotebook_result implements TBase, java.io.Serializable, Cloneable   {
    private static final TStruct STRUCT_DESC = new TStruct("getNotebook_result");

    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
    private static final TField USER_EXCEPTION_FIELD_DESC = new TField("userException", TType.STRUCT, (short)1);
    private static final TField SYSTEM_EXCEPTION_FIELD_DESC = new TField("systemException", TType.STRUCT, (short)2);
    private static final TField NOT_FOUND_EXCEPTION_FIELD_DESC = new TField("notFoundException", TType.STRUCT, (short)3);

    private com.evernote.edam.type.Notebook success;
    private com.evernote.edam.error.EDAMUserException userException;
    private com.evernote.edam.error.EDAMSystemException systemException;
    private com.evernote.edam.error.EDAMNotFoundException notFoundException;


    // isset id assignments

    public getNotebook_result() {
    }

    /**
     * Performs a deep copy on other.
     */
    public getNotebook_result(getNotebook_result other) {
      if (other.isSetSuccess()) {
        this.success = new com.evernote.edam.type.Notebook(other.success);
      }
      if (other.isSetUserException()) {
        this.userException = new com.evernote.edam.error.EDAMUserException(other.userException);
      }
      if (other.isSetSystemException()) {
        this.systemException = new com.evernote.edam.error.EDAMSystemException(other.systemException);
      }
      if (other.isSetNotFoundException()) {
        this.notFoundException = new com.evernote.edam.error.EDAMNotFoundException(other.notFoundException);
      }
    }

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

    public void clear() {
      this.success = null;
      this.userException = null;
      this.systemException = null;
      this.notFoundException = null;
    }

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

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

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

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

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

      int lastComparison = 0;
      getNotebook_result typedOther = (getNotebook_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {        lastComparison = TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetUserException()).compareTo(typedOther.isSetUserException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetUserException()) {        lastComparison = TBaseHelper.compareTo(this.userException, typedOther.userException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetSystemException()).compareTo(typedOther.isSetSystemException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSystemException()) {        lastComparison = TBaseHelper.compareTo(this.systemException, typedOther.systemException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetNotFoundException()).compareTo(typedOther.isSetNotFoundException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetNotFoundException()) {        lastComparison = TBaseHelper.compareTo(this.notFoundException, typedOther.notFoundException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public void read(TProtocol iprot) throws TException {
      TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == TType.STRUCT) {
              this.success = new com.evernote.edam.type.Notebook();
              this.success.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 1: // USER_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.userException = new com.evernote.edam.error.EDAMUserException();
              this.userException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // SYSTEM_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.systemException = new com.evernote.edam.error.EDAMSystemException();
              this.systemException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 3: // NOT_FOUND_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.notFoundException = new com.evernote.edam.error.EDAMNotFoundException();
              this.notFoundException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(TProtocol oprot) throws TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        this.success.write(oprot);
        oprot.writeFieldEnd();
      } else if (this.isSetUserException()) {
        oprot.writeFieldBegin(USER_EXCEPTION_FIELD_DESC);
        this.userException.write(oprot);
        oprot.writeFieldEnd();
      } else if (this.isSetSystemException()) {
        oprot.writeFieldBegin(SYSTEM_EXCEPTION_FIELD_DESC);
        this.systemException.write(oprot);
        oprot.writeFieldEnd();
      } else if (this.isSetNotFoundException()) {
        oprot.writeFieldBegin(NOT_FOUND_EXCEPTION_FIELD_DESC);
        this.notFoundException.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    public void validate() throws TException {
      // check for required fields
    }

  }

  private static class getDefaultNotebook_args implements TBase, java.io.Serializable, Cloneable   {
    private static final TStruct STRUCT_DESC = new TStruct("getDefaultNotebook_args");

    private static final TField AUTHENTICATION_TOKEN_FIELD_DESC = new TField("authenticationToken", TType.STRING, (short)1);

    private String authenticationToken;


    // isset id assignments

    public getDefaultNotebook_args() {
    }

    /**
     * Performs a deep copy on other.
     */
    public getDefaultNotebook_args(getDefaultNotebook_args other) {
      if (other.isSetAuthenticationToken()) {
        this.authenticationToken = other.authenticationToken;
      }
    }

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

    public void clear() {
      this.authenticationToken = null;
    }

    public void setAuthenticationToken(String authenticationToken) {
      this.authenticationToken = authenticationToken;
    }

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

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

      int lastComparison = 0;
      getDefaultNotebook_args typedOther = (getDefaultNotebook_args)other;

      lastComparison = Boolean.valueOf(isSetAuthenticationToken()).compareTo(typedOther.isSetAuthenticationToken());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetAuthenticationToken()) {        lastComparison = TBaseHelper.compareTo(this.authenticationToken, typedOther.authenticationToken);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public void read(TProtocol iprot) throws TException {
      TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // AUTHENTICATION_TOKEN
            if (field.type == TType.STRING) {
              this.authenticationToken = iprot.readString();
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(TProtocol oprot) throws TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      if (this.authenticationToken != null) {
        oprot.writeFieldBegin(AUTHENTICATION_TOKEN_FIELD_DESC);
        oprot.writeString(this.authenticationToken);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    public void validate() throws TException {
      // check for required fields
    }

  }

  private static class getDefaultNotebook_result implements TBase, java.io.Serializable, Cloneable   {
    private static final TStruct STRUCT_DESC = new TStruct("getDefaultNotebook_result");

    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
    private static final TField USER_EXCEPTION_FIELD_DESC = new TField("userException", TType.STRUCT, (short)1);
    private static final TField SYSTEM_EXCEPTION_FIELD_DESC = new TField("systemException", TType.STRUCT, (short)2);

    private com.evernote.edam.type.Notebook success;
    private com.evernote.edam.error.EDAMUserException userException;
    private com.evernote.edam.error.EDAMSystemException systemException;


    // isset id assignments

    public getDefaultNotebook_result() {
    }

    /**
     * Performs a deep copy on other.
     */
    public getDefaultNotebook_result(getDefaultNotebook_result other) {
      if (other.isSetSuccess()) {
        this.success = new com.evernote.edam.type.Notebook(other.success);
      }
      if (other.isSetUserException()) {
        this.userException = new com.evernote.edam.error.EDAMUserException(other.userException);
      }
      if (other.isSetSystemException()) {
        this.systemException = new com.evernote.edam.error.EDAMSystemException(other.systemException);
      }
    }

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

    public void clear() {
      this.success = null;
      this.userException = null;
      this.systemException = null;
    }

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

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

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

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

      int lastComparison = 0;
      getDefaultNotebook_result typedOther = (getDefaultNotebook_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {        lastComparison = TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetUserException()).compareTo(typedOther.isSetUserException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetUserException()) {        lastComparison = TBaseHelper.compareTo(this.userException, typedOther.userException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetSystemException()).compareTo(typedOther.isSetSystemException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSystemException()) {        lastComparison = TBaseHelper.compareTo(this.systemException, typedOther.systemException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public void read(TProtocol iprot) throws TException {
      TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == TType.STRUCT) {
              this.success = new com.evernote.edam.type.Notebook();
              this.success.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 1: // USER_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.userException = new com.evernote.edam.error.EDAMUserException();
              this.userException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // SYSTEM_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.systemException = new com.evernote.edam.error.EDAMSystemException();
              this.systemException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(TProtocol oprot) throws TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        this.success.write(oprot);
        oprot.writeFieldEnd();
      } else if (this.isSetUserException()) {
        oprot.writeFieldBegin(USER_EXCEPTION_FIELD_DESC);
        this.userException.write(oprot);
        oprot.writeFieldEnd();
      } else if (this.isSetSystemException()) {
        oprot.writeFieldBegin(SYSTEM_EXCEPTION_FIELD_DESC);
        this.systemException.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    public void validate() throws TException {
      // check for required fields
    }

  }

  private static class createNotebook_args implements TBase, java.io.Serializable, Cloneable   {
    private static final TStruct STRUCT_DESC = new TStruct("createNotebook_args");

    private static final TField AUTHENTICATION_TOKEN_FIELD_DESC = new TField("authenticationToken", TType.STRING, (short)1);
    private static final TField NOTEBOOK_FIELD_DESC = new TField("notebook", TType.STRUCT, (short)2);

    private String authenticationToken;
    private com.evernote.edam.type.Notebook notebook;


    // isset id assignments

    public createNotebook_args() {
    }

    /**
     * Performs a deep copy on other.
     */
    public createNotebook_args(createNotebook_args other) {
      if (other.isSetAuthenticationToken()) {
        this.authenticationToken = other.authenticationToken;
      }
      if (other.isSetNotebook()) {
        this.notebook = new com.evernote.edam.type.Notebook(other.notebook);
      }
    }

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

    public void clear() {
      this.authenticationToken = null;
      this.notebook = null;
    }

    public void setAuthenticationToken(String authenticationToken) {
      this.authenticationToken = authenticationToken;
    }

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

    public void setNotebook(com.evernote.edam.type.Notebook notebook) {
      this.notebook = notebook;
    }

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

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

      int lastComparison = 0;
      createNotebook_args typedOther = (createNotebook_args)other;

      lastComparison = Boolean.valueOf(isSetAuthenticationToken()).compareTo(typedOther.isSetAuthenticationToken());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetAuthenticationToken()) {        lastComparison = TBaseHelper.compareTo(this.authenticationToken, typedOther.authenticationToken);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetNotebook()).compareTo(typedOther.isSetNotebook());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetNotebook()) {        lastComparison = TBaseHelper.compareTo(this.notebook, typedOther.notebook);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public void read(TProtocol iprot) throws TException {
      TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // AUTHENTICATION_TOKEN
            if (field.type == TType.STRING) {
              this.authenticationToken = iprot.readString();
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // NOTEBOOK
            if (field.type == TType.STRUCT) {
              this.notebook = new com.evernote.edam.type.Notebook();
              this.notebook.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(TProtocol oprot) throws TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      if (this.authenticationToken != null) {
        oprot.writeFieldBegin(AUTHENTICATION_TOKEN_FIELD_DESC);
        oprot.writeString(this.authenticationToken);
        oprot.writeFieldEnd();
      }
      if (this.notebook != null) {
        oprot.writeFieldBegin(NOTEBOOK_FIELD_DESC);
        this.notebook.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    public void validate() throws TException {
      // check for required fields
    }

  }

  private static class createNotebook_result implements TBase, java.io.Serializable, Cloneable   {
    private static final TStruct STRUCT_DESC = new TStruct("createNotebook_result");

    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
    private static final TField USER_EXCEPTION_FIELD_DESC = new TField("userException", TType.STRUCT, (short)1);
    private static final TField SYSTEM_EXCEPTION_FIELD_DESC = new TField("systemException", TType.STRUCT, (short)2);

    private com.evernote.edam.type.Notebook success;
    private com.evernote.edam.error.EDAMUserException userException;
    private com.evernote.edam.error.EDAMSystemException systemException;


    // isset id assignments

    public createNotebook_result() {
    }

    /**
     * Performs a deep copy on other.
     */
    public createNotebook_result(createNotebook_result other) {
      if (other.isSetSuccess()) {
        this.success = new com.evernote.edam.type.Notebook(other.success);
      }
      if (other.isSetUserException()) {
        this.userException = new com.evernote.edam.error.EDAMUserException(other.userException);
      }
      if (other.isSetSystemException()) {
        this.systemException = new com.evernote.edam.error.EDAMSystemException(other.systemException);
      }
    }

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

    public void clear() {
      this.success = null;
      this.userException = null;
      this.systemException = null;
    }

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

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

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

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

      int lastComparison = 0;
      createNotebook_result typedOther = (createNotebook_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {        lastComparison = TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetUserException()).compareTo(typedOther.isSetUserException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetUserException()) {        lastComparison = TBaseHelper.compareTo(this.userException, typedOther.userException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetSystemException()).compareTo(typedOther.isSetSystemException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSystemException()) {        lastComparison = TBaseHelper.compareTo(this.systemException, typedOther.systemException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public void read(TProtocol iprot) throws TException {
      TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == TType.STRUCT) {
              this.success = new com.evernote.edam.type.Notebook();
              this.success.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 1: // USER_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.userException = new com.evernote.edam.error.EDAMUserException();
              this.userException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // SYSTEM_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.systemException = new com.evernote.edam.error.EDAMSystemException();
              this.systemException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(TProtocol oprot) throws TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        this.success.write(oprot);
        oprot.writeFieldEnd();
      } else if (this.isSetUserException()) {
        oprot.writeFieldBegin(USER_EXCEPTION_FIELD_DESC);
        this.userException.write(oprot);
        oprot.writeFieldEnd();
      } else if (this.isSetSystemException()) {
        oprot.writeFieldBegin(SYSTEM_EXCEPTION_FIELD_DESC);
        this.systemException.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    public void validate() throws TException {
      // check for required fields
    }

  }

  private static class updateNotebook_args implements TBase, java.io.Serializable, Cloneable   {
    private static final TStruct STRUCT_DESC = new TStruct("updateNotebook_args");

    private static final TField AUTHENTICATION_TOKEN_FIELD_DESC = new TField("authenticationToken", TType.STRING, (short)1);
    private static final TField NOTEBOOK_FIELD_DESC = new TField("notebook", TType.STRUCT, (short)2);

    private String authenticationToken;
    private com.evernote.edam.type.Notebook notebook;


    // isset id assignments

    public updateNotebook_args() {
    }

    /**
     * Performs a deep copy on other.
     */
    public updateNotebook_args(updateNotebook_args other) {
      if (other.isSetAuthenticationToken()) {
        this.authenticationToken = other.authenticationToken;
      }
      if (other.isSetNotebook()) {
        this.notebook = new com.evernote.edam.type.Notebook(other.notebook);
      }
    }

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

    public void clear() {
      this.authenticationToken = null;
      this.notebook = null;
    }

    public void setAuthenticationToken(String authenticationToken) {
      this.authenticationToken = authenticationToken;
    }

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

    public void setNotebook(com.evernote.edam.type.Notebook notebook) {
      this.notebook = notebook;
    }

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

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

      int lastComparison = 0;
      updateNotebook_args typedOther = (updateNotebook_args)other;

      lastComparison = Boolean.valueOf(isSetAuthenticationToken()).compareTo(typedOther.isSetAuthenticationToken());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetAuthenticationToken()) {        lastComparison = TBaseHelper.compareTo(this.authenticationToken, typedOther.authenticationToken);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetNotebook()).compareTo(typedOther.isSetNotebook());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetNotebook()) {        lastComparison = TBaseHelper.compareTo(this.notebook, typedOther.notebook);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public void read(TProtocol iprot) throws TException {
      TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // AUTHENTICATION_TOKEN
            if (field.type == TType.STRING) {
              this.authenticationToken = iprot.readString();
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // NOTEBOOK
            if (field.type == TType.STRUCT) {
              this.notebook = new com.evernote.edam.type.Notebook();
              this.notebook.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(TProtocol oprot) throws TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      if (this.authenticationToken != null) {
        oprot.writeFieldBegin(AUTHENTICATION_TOKEN_FIELD_DESC);
        oprot.writeString(this.authenticationToken);
        oprot.writeFieldEnd();
      }
      if (this.notebook != null) {
        oprot.writeFieldBegin(NOTEBOOK_FIELD_DESC);
        this.notebook.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    public void validate() throws TException {
      // check for required fields
    }

  }

  private static class updateNotebook_result implements TBase, java.io.Serializable, Cloneable   {
    private static final TStruct STRUCT_DESC = new TStruct("updateNotebook_result");

    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.I32, (short)0);
    private static final TField USER_EXCEPTION_FIELD_DESC = new TField("userException", TType.STRUCT, (short)1);
    private static final TField SYSTEM_EXCEPTION_FIELD_DESC = new TField("systemException", TType.STRUCT, (short)2);
    private static final TField NOT_FOUND_EXCEPTION_FIELD_DESC = new TField("notFoundException", TType.STRUCT, (short)3);

    private int success;
    private com.evernote.edam.error.EDAMUserException userException;
    private com.evernote.edam.error.EDAMSystemException systemException;
    private com.evernote.edam.error.EDAMNotFoundException notFoundException;


    // isset id assignments
    private static final int __SUCCESS_ISSET_ID = 0;
    private boolean[] __isset_vector = new boolean[1];

    public updateNotebook_result() {
    }

    /**
     * Performs a deep copy on other.
     */
    public updateNotebook_result(updateNotebook_result other) {
      System.arraycopy(other.__isset_vector, 0, __isset_vector, 0, other.__isset_vector.length);
      this.success = other.success;
      if (other.isSetUserException()) {
        this.userException = new com.evernote.edam.error.EDAMUserException(other.userException);
      }
      if (other.isSetSystemException()) {
        this.systemException = new com.evernote.edam.error.EDAMSystemException(other.systemException);
      }
      if (other.isSetNotFoundException()) {
        this.notFoundException = new com.evernote.edam.error.EDAMNotFoundException(other.notFoundException);
      }
    }

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

    public void clear() {
      setSuccessIsSet(false);
      this.success = 0;
      this.userException = null;
      this.systemException = null;
      this.notFoundException = null;
    }

    /** Returns true if field success is set (has been asigned a value) and false otherwise */
    public boolean isSetSuccess() {
      return __isset_vector[__SUCCESS_ISSET_ID];
    }

    public void setSuccessIsSet(boolean value) {
      __isset_vector[__SUCCESS_ISSET_ID] = value;
    }

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

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

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

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

      int lastComparison = 0;
      updateNotebook_result typedOther = (updateNotebook_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {        lastComparison = TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetUserException()).compareTo(typedOther.isSetUserException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetUserException()) {        lastComparison = TBaseHelper.compareTo(this.userException, typedOther.userException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetSystemException()).compareTo(typedOther.isSetSystemException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSystemException()) {        lastComparison = TBaseHelper.compareTo(this.systemException, typedOther.systemException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetNotFoundException()).compareTo(typedOther.isSetNotFoundException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetNotFoundException()) {        lastComparison = TBaseHelper.compareTo(this.notFoundException, typedOther.notFoundException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public void read(TProtocol iprot) throws TException {
      TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == TType.I32) {
              this.success = iprot.readI32();
              setSuccessIsSet(true);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 1: // USER_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.userException = new com.evernote.edam.error.EDAMUserException();
              this.userException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // SYSTEM_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.systemException = new com.evernote.edam.error.EDAMSystemException();
              this.systemException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 3: // NOT_FOUND_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.notFoundException = new com.evernote.edam.error.EDAMNotFoundException();
              this.notFoundException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(TProtocol oprot) throws TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        oprot.writeI32(this.success);
        oprot.writeFieldEnd();
      } else if (this.isSetUserException()) {
        oprot.writeFieldBegin(USER_EXCEPTION_FIELD_DESC);
        this.userException.write(oprot);
        oprot.writeFieldEnd();
      } else if (this.isSetSystemException()) {
        oprot.writeFieldBegin(SYSTEM_EXCEPTION_FIELD_DESC);
        this.systemException.write(oprot);
        oprot.writeFieldEnd();
      } else if (this.isSetNotFoundException()) {
        oprot.writeFieldBegin(NOT_FOUND_EXCEPTION_FIELD_DESC);
        this.notFoundException.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    public void validate() throws TException {
      // check for required fields
    }

  }

  private static class expungeNotebook_args implements TBase, java.io.Serializable, Cloneable   {
    private static final TStruct STRUCT_DESC = new TStruct("expungeNotebook_args");

    private static final TField AUTHENTICATION_TOKEN_FIELD_DESC = new TField("authenticationToken", TType.STRING, (short)1);
    private static final TField GUID_FIELD_DESC = new TField("guid", TType.STRING, (short)2);

    private String authenticationToken;
    private String guid;


    // isset id assignments

    public expungeNotebook_args() {
    }

    /**
     * Performs a deep copy on other.
     */
    public expungeNotebook_args(expungeNotebook_args other) {
      if (other.isSetAuthenticationToken()) {
        this.authenticationToken = other.authenticationToken;
      }
      if (other.isSetGuid()) {
        this.guid = other.guid;
      }
    }

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

    public void clear() {
      this.authenticationToken = null;
      this.guid = null;
    }

    public void setAuthenticationToken(String authenticationToken) {
      this.authenticationToken = authenticationToken;
    }

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

    public void setGuid(String guid) {
      this.guid = guid;
    }

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

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

      int lastComparison = 0;
      expungeNotebook_args typedOther = (expungeNotebook_args)other;

      lastComparison = Boolean.valueOf(isSetAuthenticationToken()).compareTo(typedOther.isSetAuthenticationToken());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetAuthenticationToken()) {        lastComparison = TBaseHelper.compareTo(this.authenticationToken, typedOther.authenticationToken);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetGuid()).compareTo(typedOther.isSetGuid());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetGuid()) {        lastComparison = TBaseHelper.compareTo(this.guid, typedOther.guid);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public void read(TProtocol iprot) throws TException {
      TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // AUTHENTICATION_TOKEN
            if (field.type == TType.STRING) {
              this.authenticationToken = iprot.readString();
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // GUID
            if (field.type == TType.STRING) {
              this.guid = iprot.readString();
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(TProtocol oprot) throws TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      if (this.authenticationToken != null) {
        oprot.writeFieldBegin(AUTHENTICATION_TOKEN_FIELD_DESC);
        oprot.writeString(this.authenticationToken);
        oprot.writeFieldEnd();
      }
      if (this.guid != null) {
        oprot.writeFieldBegin(GUID_FIELD_DESC);
        oprot.writeString(this.guid);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    public void validate() throws TException {
      // check for required fields
    }

  }

  private static class expungeNotebook_result implements TBase, java.io.Serializable, Cloneable   {
    private static final TStruct STRUCT_DESC = new TStruct("expungeNotebook_result");

    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.I32, (short)0);
    private static final TField USER_EXCEPTION_FIELD_DESC = new TField("userException", TType.STRUCT, (short)1);
    private static final TField SYSTEM_EXCEPTION_FIELD_DESC = new TField("systemException", TType.STRUCT, (short)2);
    private static final TField NOT_FOUND_EXCEPTION_FIELD_DESC = new TField("notFoundException", TType.STRUCT, (short)3);

    private int success;
    private com.evernote.edam.error.EDAMUserException userException;
    private com.evernote.edam.error.EDAMSystemException systemException;
    private com.evernote.edam.error.EDAMNotFoundException notFoundException;


    // isset id assignments
    private static final int __SUCCESS_ISSET_ID = 0;
    private boolean[] __isset_vector = new boolean[1];

    public expungeNotebook_result() {
    }

    /**
     * Performs a deep copy on other.
     */
    public expungeNotebook_result(expungeNotebook_result other) {
      System.arraycopy(other.__isset_vector, 0, __isset_vector, 0, other.__isset_vector.length);
      this.success = other.success;
      if (other.isSetUserException()) {
        this.userException = new com.evernote.edam.error.EDAMUserException(other.userException);
      }
      if (other.isSetSystemException()) {
        this.systemException = new com.evernote.edam.error.EDAMSystemException(other.systemException);
      }
      if (other.isSetNotFoundException()) {
        this.notFoundException = new com.evernote.edam.error.EDAMNotFoundException(other.notFoundException);
      }
    }

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

    public void clear() {
      setSuccessIsSet(false);
      this.success = 0;
      this.userException = null;
      this.systemException = null;
      this.notFoundException = null;
    }

    /** Returns true if field success is set (has been asigned a value) and false otherwise */
    public boolean isSetSuccess() {
      return __isset_vector[__SUCCESS_ISSET_ID];
    }

    public void setSuccessIsSet(boolean value) {
      __isset_vector[__SUCCESS_ISSET_ID] = value;
    }

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

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

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

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

      int lastComparison = 0;
      expungeNotebook_result typedOther = (expungeNotebook_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {        lastComparison = TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetUserException()).compareTo(typedOther.isSetUserException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetUserException()) {        lastComparison = TBaseHelper.compareTo(this.userException, typedOther.userException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetSystemException()).compareTo(typedOther.isSetSystemException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSystemException()) {        lastComparison = TBaseHelper.compareTo(this.systemException, typedOther.systemException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetNotFoundException()).compareTo(typedOther.isSetNotFoundException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetNotFoundException()) {        lastComparison = TBaseHelper.compareTo(this.notFoundException, typedOther.notFoundException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public void read(TProtocol iprot) throws TException {
      TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == TType.I32) {
              this.success = iprot.readI32();
              setSuccessIsSet(true);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 1: // USER_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.userException = new com.evernote.edam.error.EDAMUserException();
              this.userException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // SYSTEM_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.systemException = new com.evernote.edam.error.EDAMSystemException();
              this.systemException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 3: // NOT_FOUND_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.notFoundException = new com.evernote.edam.error.EDAMNotFoundException();
              this.notFoundException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(TProtocol oprot) throws TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        oprot.writeI32(this.success);
        oprot.writeFieldEnd();
      } else if (this.isSetUserException()) {
        oprot.writeFieldBegin(USER_EXCEPTION_FIELD_DESC);
        this.userException.write(oprot);
        oprot.writeFieldEnd();
      } else if (this.isSetSystemException()) {
        oprot.writeFieldBegin(SYSTEM_EXCEPTION_FIELD_DESC);
        this.systemException.write(oprot);
        oprot.writeFieldEnd();
      } else if (this.isSetNotFoundException()) {
        oprot.writeFieldBegin(NOT_FOUND_EXCEPTION_FIELD_DESC);
        this.notFoundException.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    public void validate() throws TException {
      // check for required fields
    }

  }

  private static class listTags_args implements TBase, java.io.Serializable, Cloneable   {
    private static final TStruct STRUCT_DESC = new TStruct("listTags_args");

    private static final TField AUTHENTICATION_TOKEN_FIELD_DESC = new TField("authenticationToken", TType.STRING, (short)1);

    private String authenticationToken;


    // isset id assignments

    public listTags_args() {
    }

    /**
     * Performs a deep copy on other.
     */
    public listTags_args(listTags_args other) {
      if (other.isSetAuthenticationToken()) {
        this.authenticationToken = other.authenticationToken;
      }
    }

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

    public void clear() {
      this.authenticationToken = null;
    }

    public void setAuthenticationToken(String authenticationToken) {
      this.authenticationToken = authenticationToken;
    }

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

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

      int lastComparison = 0;
      listTags_args typedOther = (listTags_args)other;

      lastComparison = Boolean.valueOf(isSetAuthenticationToken()).compareTo(typedOther.isSetAuthenticationToken());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetAuthenticationToken()) {        lastComparison = TBaseHelper.compareTo(this.authenticationToken, typedOther.authenticationToken);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public void read(TProtocol iprot) throws TException {
      TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // AUTHENTICATION_TOKEN
            if (field.type == TType.STRING) {
              this.authenticationToken = iprot.readString();
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(TProtocol oprot) throws TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      if (this.authenticationToken != null) {
        oprot.writeFieldBegin(AUTHENTICATION_TOKEN_FIELD_DESC);
        oprot.writeString(this.authenticationToken);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    public void validate() throws TException {
      // check for required fields
    }

  }

  private static class listTags_result implements TBase, java.io.Serializable, Cloneable   {
    private static final TStruct STRUCT_DESC = new TStruct("listTags_result");

    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
    private static final TField USER_EXCEPTION_FIELD_DESC = new TField("userException", TType.STRUCT, (short)1);
    private static final TField SYSTEM_EXCEPTION_FIELD_DESC = new TField("systemException", TType.STRUCT, (short)2);

    private List success;
    private com.evernote.edam.error.EDAMUserException userException;
    private com.evernote.edam.error.EDAMSystemException systemException;


    // isset id assignments

    public listTags_result() {
    }

    /**
     * Performs a deep copy on other.
     */
    public listTags_result(listTags_result other) {
      if (other.isSetSuccess()) {
        List __this__success = new ArrayList();
        for (com.evernote.edam.type.Tag other_element : other.success) {
          __this__success.add(new com.evernote.edam.type.Tag(other_element));
        }
        this.success = __this__success;
      }
      if (other.isSetUserException()) {
        this.userException = new com.evernote.edam.error.EDAMUserException(other.userException);
      }
      if (other.isSetSystemException()) {
        this.systemException = new com.evernote.edam.error.EDAMSystemException(other.systemException);
      }
    }

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

    public void clear() {
      this.success = null;
      this.userException = null;
      this.systemException = null;
    }

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

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

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

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

      int lastComparison = 0;
      listTags_result typedOther = (listTags_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {        lastComparison = TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetUserException()).compareTo(typedOther.isSetUserException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetUserException()) {        lastComparison = TBaseHelper.compareTo(this.userException, typedOther.userException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetSystemException()).compareTo(typedOther.isSetSystemException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSystemException()) {        lastComparison = TBaseHelper.compareTo(this.systemException, typedOther.systemException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public void read(TProtocol iprot) throws TException {
      TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == TType.LIST) {
              {
                TList _list114 = iprot.readListBegin();
                this.success = new ArrayList(_list114.size);
                for (int _i115 = 0; _i115 < _list114.size; ++_i115)
                {
                  com.evernote.edam.type.Tag _elem116;
                  _elem116 = new com.evernote.edam.type.Tag();
                  _elem116.read(iprot);
                  this.success.add(_elem116);
                }
                iprot.readListEnd();
              }
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 1: // USER_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.userException = new com.evernote.edam.error.EDAMUserException();
              this.userException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // SYSTEM_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.systemException = new com.evernote.edam.error.EDAMSystemException();
              this.systemException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(TProtocol oprot) throws TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        {
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
          for (com.evernote.edam.type.Tag _iter117 : this.success)
          {
            _iter117.write(oprot);
          }
          oprot.writeListEnd();
        }
        oprot.writeFieldEnd();
      } else if (this.isSetUserException()) {
        oprot.writeFieldBegin(USER_EXCEPTION_FIELD_DESC);
        this.userException.write(oprot);
        oprot.writeFieldEnd();
      } else if (this.isSetSystemException()) {
        oprot.writeFieldBegin(SYSTEM_EXCEPTION_FIELD_DESC);
        this.systemException.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    public void validate() throws TException {
      // check for required fields
    }

  }

  private static class listTagsByNotebook_args implements TBase, java.io.Serializable, Cloneable   {
    private static final TStruct STRUCT_DESC = new TStruct("listTagsByNotebook_args");

    private static final TField AUTHENTICATION_TOKEN_FIELD_DESC = new TField("authenticationToken", TType.STRING, (short)1);
    private static final TField NOTEBOOK_GUID_FIELD_DESC = new TField("notebookGuid", TType.STRING, (short)2);

    private String authenticationToken;
    private String notebookGuid;


    // isset id assignments

    public listTagsByNotebook_args() {
    }

    /**
     * Performs a deep copy on other.
     */
    public listTagsByNotebook_args(listTagsByNotebook_args other) {
      if (other.isSetAuthenticationToken()) {
        this.authenticationToken = other.authenticationToken;
      }
      if (other.isSetNotebookGuid()) {
        this.notebookGuid = other.notebookGuid;
      }
    }

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

    public void clear() {
      this.authenticationToken = null;
      this.notebookGuid = null;
    }

    public void setAuthenticationToken(String authenticationToken) {
      this.authenticationToken = authenticationToken;
    }

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

    public void setNotebookGuid(String notebookGuid) {
      this.notebookGuid = notebookGuid;
    }

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

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

      int lastComparison = 0;
      listTagsByNotebook_args typedOther = (listTagsByNotebook_args)other;

      lastComparison = Boolean.valueOf(isSetAuthenticationToken()).compareTo(typedOther.isSetAuthenticationToken());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetAuthenticationToken()) {        lastComparison = TBaseHelper.compareTo(this.authenticationToken, typedOther.authenticationToken);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetNotebookGuid()).compareTo(typedOther.isSetNotebookGuid());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetNotebookGuid()) {        lastComparison = TBaseHelper.compareTo(this.notebookGuid, typedOther.notebookGuid);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public void read(TProtocol iprot) throws TException {
      TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // AUTHENTICATION_TOKEN
            if (field.type == TType.STRING) {
              this.authenticationToken = iprot.readString();
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // NOTEBOOK_GUID
            if (field.type == TType.STRING) {
              this.notebookGuid = iprot.readString();
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(TProtocol oprot) throws TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      if (this.authenticationToken != null) {
        oprot.writeFieldBegin(AUTHENTICATION_TOKEN_FIELD_DESC);
        oprot.writeString(this.authenticationToken);
        oprot.writeFieldEnd();
      }
      if (this.notebookGuid != null) {
        oprot.writeFieldBegin(NOTEBOOK_GUID_FIELD_DESC);
        oprot.writeString(this.notebookGuid);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    public void validate() throws TException {
      // check for required fields
    }

  }

  private static class listTagsByNotebook_result implements TBase, java.io.Serializable, Cloneable   {
    private static final TStruct STRUCT_DESC = new TStruct("listTagsByNotebook_result");

    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
    private static final TField USER_EXCEPTION_FIELD_DESC = new TField("userException", TType.STRUCT, (short)1);
    private static final TField SYSTEM_EXCEPTION_FIELD_DESC = new TField("systemException", TType.STRUCT, (short)2);
    private static final TField NOT_FOUND_EXCEPTION_FIELD_DESC = new TField("notFoundException", TType.STRUCT, (short)3);

    private List success;
    private com.evernote.edam.error.EDAMUserException userException;
    private com.evernote.edam.error.EDAMSystemException systemException;
    private com.evernote.edam.error.EDAMNotFoundException notFoundException;


    // isset id assignments

    public listTagsByNotebook_result() {
    }

    /**
     * Performs a deep copy on other.
     */
    public listTagsByNotebook_result(listTagsByNotebook_result other) {
      if (other.isSetSuccess()) {
        List __this__success = new ArrayList();
        for (com.evernote.edam.type.Tag other_element : other.success) {
          __this__success.add(new com.evernote.edam.type.Tag(other_element));
        }
        this.success = __this__success;
      }
      if (other.isSetUserException()) {
        this.userException = new com.evernote.edam.error.EDAMUserException(other.userException);
      }
      if (other.isSetSystemException()) {
        this.systemException = new com.evernote.edam.error.EDAMSystemException(other.systemException);
      }
      if (other.isSetNotFoundException()) {
        this.notFoundException = new com.evernote.edam.error.EDAMNotFoundException(other.notFoundException);
      }
    }

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

    public void clear() {
      this.success = null;
      this.userException = null;
      this.systemException = null;
      this.notFoundException = null;
    }

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

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

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

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

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

      int lastComparison = 0;
      listTagsByNotebook_result typedOther = (listTagsByNotebook_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {        lastComparison = TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetUserException()).compareTo(typedOther.isSetUserException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetUserException()) {        lastComparison = TBaseHelper.compareTo(this.userException, typedOther.userException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetSystemException()).compareTo(typedOther.isSetSystemException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSystemException()) {        lastComparison = TBaseHelper.compareTo(this.systemException, typedOther.systemException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetNotFoundException()).compareTo(typedOther.isSetNotFoundException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetNotFoundException()) {        lastComparison = TBaseHelper.compareTo(this.notFoundException, typedOther.notFoundException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public void read(TProtocol iprot) throws TException {
      TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == TType.LIST) {
              {
                TList _list118 = iprot.readListBegin();
                this.success = new ArrayList(_list118.size);
                for (int _i119 = 0; _i119 < _list118.size; ++_i119)
                {
                  com.evernote.edam.type.Tag _elem120;
                  _elem120 = new com.evernote.edam.type.Tag();
                  _elem120.read(iprot);
                  this.success.add(_elem120);
                }
                iprot.readListEnd();
              }
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 1: // USER_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.userException = new com.evernote.edam.error.EDAMUserException();
              this.userException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // SYSTEM_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.systemException = new com.evernote.edam.error.EDAMSystemException();
              this.systemException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 3: // NOT_FOUND_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.notFoundException = new com.evernote.edam.error.EDAMNotFoundException();
              this.notFoundException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(TProtocol oprot) throws TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        {
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
          for (com.evernote.edam.type.Tag _iter121 : this.success)
          {
            _iter121.write(oprot);
          }
          oprot.writeListEnd();
        }
        oprot.writeFieldEnd();
      } else if (this.isSetUserException()) {
        oprot.writeFieldBegin(USER_EXCEPTION_FIELD_DESC);
        this.userException.write(oprot);
        oprot.writeFieldEnd();
      } else if (this.isSetSystemException()) {
        oprot.writeFieldBegin(SYSTEM_EXCEPTION_FIELD_DESC);
        this.systemException.write(oprot);
        oprot.writeFieldEnd();
      } else if (this.isSetNotFoundException()) {
        oprot.writeFieldBegin(NOT_FOUND_EXCEPTION_FIELD_DESC);
        this.notFoundException.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    public void validate() throws TException {
      // check for required fields
    }

  }

  private static class getTag_args implements TBase, java.io.Serializable, Cloneable   {
    private static final TStruct STRUCT_DESC = new TStruct("getTag_args");

    private static final TField AUTHENTICATION_TOKEN_FIELD_DESC = new TField("authenticationToken", TType.STRING, (short)1);
    private static final TField GUID_FIELD_DESC = new TField("guid", TType.STRING, (short)2);

    private String authenticationToken;
    private String guid;


    // isset id assignments

    public getTag_args() {
    }

    /**
     * Performs a deep copy on other.
     */
    public getTag_args(getTag_args other) {
      if (other.isSetAuthenticationToken()) {
        this.authenticationToken = other.authenticationToken;
      }
      if (other.isSetGuid()) {
        this.guid = other.guid;
      }
    }

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

    public void clear() {
      this.authenticationToken = null;
      this.guid = null;
    }

    public void setAuthenticationToken(String authenticationToken) {
      this.authenticationToken = authenticationToken;
    }

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

    public void setGuid(String guid) {
      this.guid = guid;
    }

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

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

      int lastComparison = 0;
      getTag_args typedOther = (getTag_args)other;

      lastComparison = Boolean.valueOf(isSetAuthenticationToken()).compareTo(typedOther.isSetAuthenticationToken());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetAuthenticationToken()) {        lastComparison = TBaseHelper.compareTo(this.authenticationToken, typedOther.authenticationToken);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetGuid()).compareTo(typedOther.isSetGuid());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetGuid()) {        lastComparison = TBaseHelper.compareTo(this.guid, typedOther.guid);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public void read(TProtocol iprot) throws TException {
      TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // AUTHENTICATION_TOKEN
            if (field.type == TType.STRING) {
              this.authenticationToken = iprot.readString();
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // GUID
            if (field.type == TType.STRING) {
              this.guid = iprot.readString();
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(TProtocol oprot) throws TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      if (this.authenticationToken != null) {
        oprot.writeFieldBegin(AUTHENTICATION_TOKEN_FIELD_DESC);
        oprot.writeString(this.authenticationToken);
        oprot.writeFieldEnd();
      }
      if (this.guid != null) {
        oprot.writeFieldBegin(GUID_FIELD_DESC);
        oprot.writeString(this.guid);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    public void validate() throws TException {
      // check for required fields
    }

  }

  private static class getTag_result implements TBase, java.io.Serializable, Cloneable   {
    private static final TStruct STRUCT_DESC = new TStruct("getTag_result");

    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
    private static final TField USER_EXCEPTION_FIELD_DESC = new TField("userException", TType.STRUCT, (short)1);
    private static final TField SYSTEM_EXCEPTION_FIELD_DESC = new TField("systemException", TType.STRUCT, (short)2);
    private static final TField NOT_FOUND_EXCEPTION_FIELD_DESC = new TField("notFoundException", TType.STRUCT, (short)3);

    private com.evernote.edam.type.Tag success;
    private com.evernote.edam.error.EDAMUserException userException;
    private com.evernote.edam.error.EDAMSystemException systemException;
    private com.evernote.edam.error.EDAMNotFoundException notFoundException;


    // isset id assignments

    public getTag_result() {
    }

    /**
     * Performs a deep copy on other.
     */
    public getTag_result(getTag_result other) {
      if (other.isSetSuccess()) {
        this.success = new com.evernote.edam.type.Tag(other.success);
      }
      if (other.isSetUserException()) {
        this.userException = new com.evernote.edam.error.EDAMUserException(other.userException);
      }
      if (other.isSetSystemException()) {
        this.systemException = new com.evernote.edam.error.EDAMSystemException(other.systemException);
      }
      if (other.isSetNotFoundException()) {
        this.notFoundException = new com.evernote.edam.error.EDAMNotFoundException(other.notFoundException);
      }
    }

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

    public void clear() {
      this.success = null;
      this.userException = null;
      this.systemException = null;
      this.notFoundException = null;
    }

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

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

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

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

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

      int lastComparison = 0;
      getTag_result typedOther = (getTag_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {        lastComparison = TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetUserException()).compareTo(typedOther.isSetUserException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetUserException()) {        lastComparison = TBaseHelper.compareTo(this.userException, typedOther.userException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetSystemException()).compareTo(typedOther.isSetSystemException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSystemException()) {        lastComparison = TBaseHelper.compareTo(this.systemException, typedOther.systemException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetNotFoundException()).compareTo(typedOther.isSetNotFoundException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetNotFoundException()) {        lastComparison = TBaseHelper.compareTo(this.notFoundException, typedOther.notFoundException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public void read(TProtocol iprot) throws TException {
      TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == TType.STRUCT) {
              this.success = new com.evernote.edam.type.Tag();
              this.success.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 1: // USER_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.userException = new com.evernote.edam.error.EDAMUserException();
              this.userException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // SYSTEM_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.systemException = new com.evernote.edam.error.EDAMSystemException();
              this.systemException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 3: // NOT_FOUND_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.notFoundException = new com.evernote.edam.error.EDAMNotFoundException();
              this.notFoundException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(TProtocol oprot) throws TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        this.success.write(oprot);
        oprot.writeFieldEnd();
      } else if (this.isSetUserException()) {
        oprot.writeFieldBegin(USER_EXCEPTION_FIELD_DESC);
        this.userException.write(oprot);
        oprot.writeFieldEnd();
      } else if (this.isSetSystemException()) {
        oprot.writeFieldBegin(SYSTEM_EXCEPTION_FIELD_DESC);
        this.systemException.write(oprot);
        oprot.writeFieldEnd();
      } else if (this.isSetNotFoundException()) {
        oprot.writeFieldBegin(NOT_FOUND_EXCEPTION_FIELD_DESC);
        this.notFoundException.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    public void validate() throws TException {
      // check for required fields
    }

  }

  private static class createTag_args implements TBase, java.io.Serializable, Cloneable   {
    private static final TStruct STRUCT_DESC = new TStruct("createTag_args");

    private static final TField AUTHENTICATION_TOKEN_FIELD_DESC = new TField("authenticationToken", TType.STRING, (short)1);
    private static final TField TAG_FIELD_DESC = new TField("tag", TType.STRUCT, (short)2);

    private String authenticationToken;
    private com.evernote.edam.type.Tag tag;


    // isset id assignments

    public createTag_args() {
    }

    /**
     * Performs a deep copy on other.
     */
    public createTag_args(createTag_args other) {
      if (other.isSetAuthenticationToken()) {
        this.authenticationToken = other.authenticationToken;
      }
      if (other.isSetTag()) {
        this.tag = new com.evernote.edam.type.Tag(other.tag);
      }
    }

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

    public void clear() {
      this.authenticationToken = null;
      this.tag = null;
    }

    public void setAuthenticationToken(String authenticationToken) {
      this.authenticationToken = authenticationToken;
    }

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

    public void setTag(com.evernote.edam.type.Tag tag) {
      this.tag = tag;
    }

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

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

      int lastComparison = 0;
      createTag_args typedOther = (createTag_args)other;

      lastComparison = Boolean.valueOf(isSetAuthenticationToken()).compareTo(typedOther.isSetAuthenticationToken());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetAuthenticationToken()) {        lastComparison = TBaseHelper.compareTo(this.authenticationToken, typedOther.authenticationToken);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetTag()).compareTo(typedOther.isSetTag());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetTag()) {        lastComparison = TBaseHelper.compareTo(this.tag, typedOther.tag);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public void read(TProtocol iprot) throws TException {
      TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // AUTHENTICATION_TOKEN
            if (field.type == TType.STRING) {
              this.authenticationToken = iprot.readString();
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // TAG
            if (field.type == TType.STRUCT) {
              this.tag = new com.evernote.edam.type.Tag();
              this.tag.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(TProtocol oprot) throws TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      if (this.authenticationToken != null) {
        oprot.writeFieldBegin(AUTHENTICATION_TOKEN_FIELD_DESC);
        oprot.writeString(this.authenticationToken);
        oprot.writeFieldEnd();
      }
      if (this.tag != null) {
        oprot.writeFieldBegin(TAG_FIELD_DESC);
        this.tag.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    public void validate() throws TException {
      // check for required fields
    }

  }

  private static class createTag_result implements TBase, java.io.Serializable, Cloneable   {
    private static final TStruct STRUCT_DESC = new TStruct("createTag_result");

    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
    private static final TField USER_EXCEPTION_FIELD_DESC = new TField("userException", TType.STRUCT, (short)1);
    private static final TField SYSTEM_EXCEPTION_FIELD_DESC = new TField("systemException", TType.STRUCT, (short)2);
    private static final TField NOT_FOUND_EXCEPTION_FIELD_DESC = new TField("notFoundException", TType.STRUCT, (short)3);

    private com.evernote.edam.type.Tag success;
    private com.evernote.edam.error.EDAMUserException userException;
    private com.evernote.edam.error.EDAMSystemException systemException;
    private com.evernote.edam.error.EDAMNotFoundException notFoundException;


    // isset id assignments

    public createTag_result() {
    }

    /**
     * Performs a deep copy on other.
     */
    public createTag_result(createTag_result other) {
      if (other.isSetSuccess()) {
        this.success = new com.evernote.edam.type.Tag(other.success);
      }
      if (other.isSetUserException()) {
        this.userException = new com.evernote.edam.error.EDAMUserException(other.userException);
      }
      if (other.isSetSystemException()) {
        this.systemException = new com.evernote.edam.error.EDAMSystemException(other.systemException);
      }
      if (other.isSetNotFoundException()) {
        this.notFoundException = new com.evernote.edam.error.EDAMNotFoundException(other.notFoundException);
      }
    }

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

    public void clear() {
      this.success = null;
      this.userException = null;
      this.systemException = null;
      this.notFoundException = null;
    }

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

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

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

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

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

      int lastComparison = 0;
      createTag_result typedOther = (createTag_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {        lastComparison = TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetUserException()).compareTo(typedOther.isSetUserException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetUserException()) {        lastComparison = TBaseHelper.compareTo(this.userException, typedOther.userException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetSystemException()).compareTo(typedOther.isSetSystemException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSystemException()) {        lastComparison = TBaseHelper.compareTo(this.systemException, typedOther.systemException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetNotFoundException()).compareTo(typedOther.isSetNotFoundException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetNotFoundException()) {        lastComparison = TBaseHelper.compareTo(this.notFoundException, typedOther.notFoundException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public void read(TProtocol iprot) throws TException {
      TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == TType.STRUCT) {
              this.success = new com.evernote.edam.type.Tag();
              this.success.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 1: // USER_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.userException = new com.evernote.edam.error.EDAMUserException();
              this.userException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // SYSTEM_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.systemException = new com.evernote.edam.error.EDAMSystemException();
              this.systemException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 3: // NOT_FOUND_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.notFoundException = new com.evernote.edam.error.EDAMNotFoundException();
              this.notFoundException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(TProtocol oprot) throws TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        this.success.write(oprot);
        oprot.writeFieldEnd();
      } else if (this.isSetUserException()) {
        oprot.writeFieldBegin(USER_EXCEPTION_FIELD_DESC);
        this.userException.write(oprot);
        oprot.writeFieldEnd();
      } else if (this.isSetSystemException()) {
        oprot.writeFieldBegin(SYSTEM_EXCEPTION_FIELD_DESC);
        this.systemException.write(oprot);
        oprot.writeFieldEnd();
      } else if (this.isSetNotFoundException()) {
        oprot.writeFieldBegin(NOT_FOUND_EXCEPTION_FIELD_DESC);
        this.notFoundException.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    public void validate() throws TException {
      // check for required fields
    }

  }

  private static class updateTag_args implements TBase, java.io.Serializable, Cloneable   {
    private static final TStruct STRUCT_DESC = new TStruct("updateTag_args");

    private static final TField AUTHENTICATION_TOKEN_FIELD_DESC = new TField("authenticationToken", TType.STRING, (short)1);
    private static final TField TAG_FIELD_DESC = new TField("tag", TType.STRUCT, (short)2);

    private String authenticationToken;
    private com.evernote.edam.type.Tag tag;


    // isset id assignments

    public updateTag_args() {
    }

    /**
     * Performs a deep copy on other.
     */
    public updateTag_args(updateTag_args other) {
      if (other.isSetAuthenticationToken()) {
        this.authenticationToken = other.authenticationToken;
      }
      if (other.isSetTag()) {
        this.tag = new com.evernote.edam.type.Tag(other.tag);
      }
    }

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

    public void clear() {
      this.authenticationToken = null;
      this.tag = null;
    }

    public void setAuthenticationToken(String authenticationToken) {
      this.authenticationToken = authenticationToken;
    }

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

    public void setTag(com.evernote.edam.type.Tag tag) {
      this.tag = tag;
    }

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

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

      int lastComparison = 0;
      updateTag_args typedOther = (updateTag_args)other;

      lastComparison = Boolean.valueOf(isSetAuthenticationToken()).compareTo(typedOther.isSetAuthenticationToken());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetAuthenticationToken()) {        lastComparison = TBaseHelper.compareTo(this.authenticationToken, typedOther.authenticationToken);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetTag()).compareTo(typedOther.isSetTag());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetTag()) {        lastComparison = TBaseHelper.compareTo(this.tag, typedOther.tag);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public void read(TProtocol iprot) throws TException {
      TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // AUTHENTICATION_TOKEN
            if (field.type == TType.STRING) {
              this.authenticationToken = iprot.readString();
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // TAG
            if (field.type == TType.STRUCT) {
              this.tag = new com.evernote.edam.type.Tag();
              this.tag.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(TProtocol oprot) throws TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      if (this.authenticationToken != null) {
        oprot.writeFieldBegin(AUTHENTICATION_TOKEN_FIELD_DESC);
        oprot.writeString(this.authenticationToken);
        oprot.writeFieldEnd();
      }
      if (this.tag != null) {
        oprot.writeFieldBegin(TAG_FIELD_DESC);
        this.tag.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    public void validate() throws TException {
      // check for required fields
    }

  }

  private static class updateTag_result implements TBase, java.io.Serializable, Cloneable   {
    private static final TStruct STRUCT_DESC = new TStruct("updateTag_result");

    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.I32, (short)0);
    private static final TField USER_EXCEPTION_FIELD_DESC = new TField("userException", TType.STRUCT, (short)1);
    private static final TField SYSTEM_EXCEPTION_FIELD_DESC = new TField("systemException", TType.STRUCT, (short)2);
    private static final TField NOT_FOUND_EXCEPTION_FIELD_DESC = new TField("notFoundException", TType.STRUCT, (short)3);

    private int success;
    private com.evernote.edam.error.EDAMUserException userException;
    private com.evernote.edam.error.EDAMSystemException systemException;
    private com.evernote.edam.error.EDAMNotFoundException notFoundException;


    // isset id assignments
    private static final int __SUCCESS_ISSET_ID = 0;
    private boolean[] __isset_vector = new boolean[1];

    public updateTag_result() {
    }

    /**
     * Performs a deep copy on other.
     */
    public updateTag_result(updateTag_result other) {
      System.arraycopy(other.__isset_vector, 0, __isset_vector, 0, other.__isset_vector.length);
      this.success = other.success;
      if (other.isSetUserException()) {
        this.userException = new com.evernote.edam.error.EDAMUserException(other.userException);
      }
      if (other.isSetSystemException()) {
        this.systemException = new com.evernote.edam.error.EDAMSystemException(other.systemException);
      }
      if (other.isSetNotFoundException()) {
        this.notFoundException = new com.evernote.edam.error.EDAMNotFoundException(other.notFoundException);
      }
    }

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

    public void clear() {
      setSuccessIsSet(false);
      this.success = 0;
      this.userException = null;
      this.systemException = null;
      this.notFoundException = null;
    }

    /** Returns true if field success is set (has been asigned a value) and false otherwise */
    public boolean isSetSuccess() {
      return __isset_vector[__SUCCESS_ISSET_ID];
    }

    public void setSuccessIsSet(boolean value) {
      __isset_vector[__SUCCESS_ISSET_ID] = value;
    }

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

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

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

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

      int lastComparison = 0;
      updateTag_result typedOther = (updateTag_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {        lastComparison = TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetUserException()).compareTo(typedOther.isSetUserException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetUserException()) {        lastComparison = TBaseHelper.compareTo(this.userException, typedOther.userException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetSystemException()).compareTo(typedOther.isSetSystemException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSystemException()) {        lastComparison = TBaseHelper.compareTo(this.systemException, typedOther.systemException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetNotFoundException()).compareTo(typedOther.isSetNotFoundException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetNotFoundException()) {        lastComparison = TBaseHelper.compareTo(this.notFoundException, typedOther.notFoundException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public void read(TProtocol iprot) throws TException {
      TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == TType.I32) {
              this.success = iprot.readI32();
              setSuccessIsSet(true);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 1: // USER_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.userException = new com.evernote.edam.error.EDAMUserException();
              this.userException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // SYSTEM_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.systemException = new com.evernote.edam.error.EDAMSystemException();
              this.systemException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 3: // NOT_FOUND_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.notFoundException = new com.evernote.edam.error.EDAMNotFoundException();
              this.notFoundException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(TProtocol oprot) throws TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        oprot.writeI32(this.success);
        oprot.writeFieldEnd();
      } else if (this.isSetUserException()) {
        oprot.writeFieldBegin(USER_EXCEPTION_FIELD_DESC);
        this.userException.write(oprot);
        oprot.writeFieldEnd();
      } else if (this.isSetSystemException()) {
        oprot.writeFieldBegin(SYSTEM_EXCEPTION_FIELD_DESC);
        this.systemException.write(oprot);
        oprot.writeFieldEnd();
      } else if (this.isSetNotFoundException()) {
        oprot.writeFieldBegin(NOT_FOUND_EXCEPTION_FIELD_DESC);
        this.notFoundException.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    public void validate() throws TException {
      // check for required fields
    }

  }

  private static class untagAll_args implements TBase, java.io.Serializable, Cloneable   {
    private static final TStruct STRUCT_DESC = new TStruct("untagAll_args");

    private static final TField AUTHENTICATION_TOKEN_FIELD_DESC = new TField("authenticationToken", TType.STRING, (short)1);
    private static final TField GUID_FIELD_DESC = new TField("guid", TType.STRING, (short)2);

    private String authenticationToken;
    private String guid;


    // isset id assignments

    public untagAll_args() {
    }

    /**
     * Performs a deep copy on other.
     */
    public untagAll_args(untagAll_args other) {
      if (other.isSetAuthenticationToken()) {
        this.authenticationToken = other.authenticationToken;
      }
      if (other.isSetGuid()) {
        this.guid = other.guid;
      }
    }

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

    public void clear() {
      this.authenticationToken = null;
      this.guid = null;
    }

    public void setAuthenticationToken(String authenticationToken) {
      this.authenticationToken = authenticationToken;
    }

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

    public void setGuid(String guid) {
      this.guid = guid;
    }

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

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

      int lastComparison = 0;
      untagAll_args typedOther = (untagAll_args)other;

      lastComparison = Boolean.valueOf(isSetAuthenticationToken()).compareTo(typedOther.isSetAuthenticationToken());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetAuthenticationToken()) {        lastComparison = TBaseHelper.compareTo(this.authenticationToken, typedOther.authenticationToken);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetGuid()).compareTo(typedOther.isSetGuid());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetGuid()) {        lastComparison = TBaseHelper.compareTo(this.guid, typedOther.guid);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public void read(TProtocol iprot) throws TException {
      TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // AUTHENTICATION_TOKEN
            if (field.type == TType.STRING) {
              this.authenticationToken = iprot.readString();
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // GUID
            if (field.type == TType.STRING) {
              this.guid = iprot.readString();
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(TProtocol oprot) throws TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      if (this.authenticationToken != null) {
        oprot.writeFieldBegin(AUTHENTICATION_TOKEN_FIELD_DESC);
        oprot.writeString(this.authenticationToken);
        oprot.writeFieldEnd();
      }
      if (this.guid != null) {
        oprot.writeFieldBegin(GUID_FIELD_DESC);
        oprot.writeString(this.guid);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    public void validate() throws TException {
      // check for required fields
    }

  }

  private static class untagAll_result implements TBase, java.io.Serializable, Cloneable   {
    private static final TStruct STRUCT_DESC = new TStruct("untagAll_result");

    private static final TField USER_EXCEPTION_FIELD_DESC = new TField("userException", TType.STRUCT, (short)1);
    private static final TField SYSTEM_EXCEPTION_FIELD_DESC = new TField("systemException", TType.STRUCT, (short)2);
    private static final TField NOT_FOUND_EXCEPTION_FIELD_DESC = new TField("notFoundException", TType.STRUCT, (short)3);

    private com.evernote.edam.error.EDAMUserException userException;
    private com.evernote.edam.error.EDAMSystemException systemException;
    private com.evernote.edam.error.EDAMNotFoundException notFoundException;


    // isset id assignments

    public untagAll_result() {
    }

    /**
     * Performs a deep copy on other.
     */
    public untagAll_result(untagAll_result other) {
      if (other.isSetUserException()) {
        this.userException = new com.evernote.edam.error.EDAMUserException(other.userException);
      }
      if (other.isSetSystemException()) {
        this.systemException = new com.evernote.edam.error.EDAMSystemException(other.systemException);
      }
      if (other.isSetNotFoundException()) {
        this.notFoundException = new com.evernote.edam.error.EDAMNotFoundException(other.notFoundException);
      }
    }

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

    public void clear() {
      this.userException = null;
      this.systemException = null;
      this.notFoundException = null;
    }

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

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

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

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

      int lastComparison = 0;
      untagAll_result typedOther = (untagAll_result)other;

      lastComparison = Boolean.valueOf(isSetUserException()).compareTo(typedOther.isSetUserException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetUserException()) {        lastComparison = TBaseHelper.compareTo(this.userException, typedOther.userException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetSystemException()).compareTo(typedOther.isSetSystemException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSystemException()) {        lastComparison = TBaseHelper.compareTo(this.systemException, typedOther.systemException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetNotFoundException()).compareTo(typedOther.isSetNotFoundException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetNotFoundException()) {        lastComparison = TBaseHelper.compareTo(this.notFoundException, typedOther.notFoundException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public void read(TProtocol iprot) throws TException {
      TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // USER_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.userException = new com.evernote.edam.error.EDAMUserException();
              this.userException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // SYSTEM_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.systemException = new com.evernote.edam.error.EDAMSystemException();
              this.systemException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 3: // NOT_FOUND_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.notFoundException = new com.evernote.edam.error.EDAMNotFoundException();
              this.notFoundException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(TProtocol oprot) throws TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetUserException()) {
        oprot.writeFieldBegin(USER_EXCEPTION_FIELD_DESC);
        this.userException.write(oprot);
        oprot.writeFieldEnd();
      } else if (this.isSetSystemException()) {
        oprot.writeFieldBegin(SYSTEM_EXCEPTION_FIELD_DESC);
        this.systemException.write(oprot);
        oprot.writeFieldEnd();
      } else if (this.isSetNotFoundException()) {
        oprot.writeFieldBegin(NOT_FOUND_EXCEPTION_FIELD_DESC);
        this.notFoundException.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    public void validate() throws TException {
      // check for required fields
    }

  }

  private static class expungeTag_args implements TBase, java.io.Serializable, Cloneable   {
    private static final TStruct STRUCT_DESC = new TStruct("expungeTag_args");

    private static final TField AUTHENTICATION_TOKEN_FIELD_DESC = new TField("authenticationToken", TType.STRING, (short)1);
    private static final TField GUID_FIELD_DESC = new TField("guid", TType.STRING, (short)2);

    private String authenticationToken;
    private String guid;


    // isset id assignments

    public expungeTag_args() {
    }

    /**
     * Performs a deep copy on other.
     */
    public expungeTag_args(expungeTag_args other) {
      if (other.isSetAuthenticationToken()) {
        this.authenticationToken = other.authenticationToken;
      }
      if (other.isSetGuid()) {
        this.guid = other.guid;
      }
    }

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

    public void clear() {
      this.authenticationToken = null;
      this.guid = null;
    }

    public void setAuthenticationToken(String authenticationToken) {
      this.authenticationToken = authenticationToken;
    }

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

    public void setGuid(String guid) {
      this.guid = guid;
    }

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

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

      int lastComparison = 0;
      expungeTag_args typedOther = (expungeTag_args)other;

      lastComparison = Boolean.valueOf(isSetAuthenticationToken()).compareTo(typedOther.isSetAuthenticationToken());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetAuthenticationToken()) {        lastComparison = TBaseHelper.compareTo(this.authenticationToken, typedOther.authenticationToken);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetGuid()).compareTo(typedOther.isSetGuid());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetGuid()) {        lastComparison = TBaseHelper.compareTo(this.guid, typedOther.guid);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public void read(TProtocol iprot) throws TException {
      TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // AUTHENTICATION_TOKEN
            if (field.type == TType.STRING) {
              this.authenticationToken = iprot.readString();
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // GUID
            if (field.type == TType.STRING) {
              this.guid = iprot.readString();
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(TProtocol oprot) throws TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      if (this.authenticationToken != null) {
        oprot.writeFieldBegin(AUTHENTICATION_TOKEN_FIELD_DESC);
        oprot.writeString(this.authenticationToken);
        oprot.writeFieldEnd();
      }
      if (this.guid != null) {
        oprot.writeFieldBegin(GUID_FIELD_DESC);
        oprot.writeString(this.guid);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    public void validate() throws TException {
      // check for required fields
    }

  }

  private static class expungeTag_result implements TBase, java.io.Serializable, Cloneable   {
    private static final TStruct STRUCT_DESC = new TStruct("expungeTag_result");

    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.I32, (short)0);
    private static final TField USER_EXCEPTION_FIELD_DESC = new TField("userException", TType.STRUCT, (short)1);
    private static final TField SYSTEM_EXCEPTION_FIELD_DESC = new TField("systemException", TType.STRUCT, (short)2);
    private static final TField NOT_FOUND_EXCEPTION_FIELD_DESC = new TField("notFoundException", TType.STRUCT, (short)3);

    private int success;
    private com.evernote.edam.error.EDAMUserException userException;
    private com.evernote.edam.error.EDAMSystemException systemException;
    private com.evernote.edam.error.EDAMNotFoundException notFoundException;


    // isset id assignments
    private static final int __SUCCESS_ISSET_ID = 0;
    private boolean[] __isset_vector = new boolean[1];

    public expungeTag_result() {
    }

    /**
     * Performs a deep copy on other.
     */
    public expungeTag_result(expungeTag_result other) {
      System.arraycopy(other.__isset_vector, 0, __isset_vector, 0, other.__isset_vector.length);
      this.success = other.success;
      if (other.isSetUserException()) {
        this.userException = new com.evernote.edam.error.EDAMUserException(other.userException);
      }
      if (other.isSetSystemException()) {
        this.systemException = new com.evernote.edam.error.EDAMSystemException(other.systemException);
      }
      if (other.isSetNotFoundException()) {
        this.notFoundException = new com.evernote.edam.error.EDAMNotFoundException(other.notFoundException);
      }
    }

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

    public void clear() {
      setSuccessIsSet(false);
      this.success = 0;
      this.userException = null;
      this.systemException = null;
      this.notFoundException = null;
    }

    /** Returns true if field success is set (has been asigned a value) and false otherwise */
    public boolean isSetSuccess() {
      return __isset_vector[__SUCCESS_ISSET_ID];
    }

    public void setSuccessIsSet(boolean value) {
      __isset_vector[__SUCCESS_ISSET_ID] = value;
    }

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

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

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

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

      int lastComparison = 0;
      expungeTag_result typedOther = (expungeTag_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {        lastComparison = TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetUserException()).compareTo(typedOther.isSetUserException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetUserException()) {        lastComparison = TBaseHelper.compareTo(this.userException, typedOther.userException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetSystemException()).compareTo(typedOther.isSetSystemException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSystemException()) {        lastComparison = TBaseHelper.compareTo(this.systemException, typedOther.systemException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetNotFoundException()).compareTo(typedOther.isSetNotFoundException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetNotFoundException()) {        lastComparison = TBaseHelper.compareTo(this.notFoundException, typedOther.notFoundException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public void read(TProtocol iprot) throws TException {
      TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == TType.I32) {
              this.success = iprot.readI32();
              setSuccessIsSet(true);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 1: // USER_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.userException = new com.evernote.edam.error.EDAMUserException();
              this.userException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // SYSTEM_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.systemException = new com.evernote.edam.error.EDAMSystemException();
              this.systemException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 3: // NOT_FOUND_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.notFoundException = new com.evernote.edam.error.EDAMNotFoundException();
              this.notFoundException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(TProtocol oprot) throws TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        oprot.writeI32(this.success);
        oprot.writeFieldEnd();
      } else if (this.isSetUserException()) {
        oprot.writeFieldBegin(USER_EXCEPTION_FIELD_DESC);
        this.userException.write(oprot);
        oprot.writeFieldEnd();
      } else if (this.isSetSystemException()) {
        oprot.writeFieldBegin(SYSTEM_EXCEPTION_FIELD_DESC);
        this.systemException.write(oprot);
        oprot.writeFieldEnd();
      } else if (this.isSetNotFoundException()) {
        oprot.writeFieldBegin(NOT_FOUND_EXCEPTION_FIELD_DESC);
        this.notFoundException.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    public void validate() throws TException {
      // check for required fields
    }

  }

  private static class listSearches_args implements TBase, java.io.Serializable, Cloneable   {
    private static final TStruct STRUCT_DESC = new TStruct("listSearches_args");

    private static final TField AUTHENTICATION_TOKEN_FIELD_DESC = new TField("authenticationToken", TType.STRING, (short)1);

    private String authenticationToken;


    // isset id assignments

    public listSearches_args() {
    }

    /**
     * Performs a deep copy on other.
     */
    public listSearches_args(listSearches_args other) {
      if (other.isSetAuthenticationToken()) {
        this.authenticationToken = other.authenticationToken;
      }
    }

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

    public void clear() {
      this.authenticationToken = null;
    }

    public void setAuthenticationToken(String authenticationToken) {
      this.authenticationToken = authenticationToken;
    }

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

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

      int lastComparison = 0;
      listSearches_args typedOther = (listSearches_args)other;

      lastComparison = Boolean.valueOf(isSetAuthenticationToken()).compareTo(typedOther.isSetAuthenticationToken());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetAuthenticationToken()) {        lastComparison = TBaseHelper.compareTo(this.authenticationToken, typedOther.authenticationToken);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public void read(TProtocol iprot) throws TException {
      TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // AUTHENTICATION_TOKEN
            if (field.type == TType.STRING) {
              this.authenticationToken = iprot.readString();
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(TProtocol oprot) throws TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      if (this.authenticationToken != null) {
        oprot.writeFieldBegin(AUTHENTICATION_TOKEN_FIELD_DESC);
        oprot.writeString(this.authenticationToken);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    public void validate() throws TException {
      // check for required fields
    }

  }

  private static class listSearches_result implements TBase, java.io.Serializable, Cloneable   {
    private static final TStruct STRUCT_DESC = new TStruct("listSearches_result");

    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
    private static final TField USER_EXCEPTION_FIELD_DESC = new TField("userException", TType.STRUCT, (short)1);
    private static final TField SYSTEM_EXCEPTION_FIELD_DESC = new TField("systemException", TType.STRUCT, (short)2);

    private List success;
    private com.evernote.edam.error.EDAMUserException userException;
    private com.evernote.edam.error.EDAMSystemException systemException;


    // isset id assignments

    public listSearches_result() {
    }

    /**
     * Performs a deep copy on other.
     */
    public listSearches_result(listSearches_result other) {
      if (other.isSetSuccess()) {
        List __this__success = new ArrayList();
        for (com.evernote.edam.type.SavedSearch other_element : other.success) {
          __this__success.add(new com.evernote.edam.type.SavedSearch(other_element));
        }
        this.success = __this__success;
      }
      if (other.isSetUserException()) {
        this.userException = new com.evernote.edam.error.EDAMUserException(other.userException);
      }
      if (other.isSetSystemException()) {
        this.systemException = new com.evernote.edam.error.EDAMSystemException(other.systemException);
      }
    }

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

    public void clear() {
      this.success = null;
      this.userException = null;
      this.systemException = null;
    }

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

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

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

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

      int lastComparison = 0;
      listSearches_result typedOther = (listSearches_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {        lastComparison = TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetUserException()).compareTo(typedOther.isSetUserException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetUserException()) {        lastComparison = TBaseHelper.compareTo(this.userException, typedOther.userException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetSystemException()).compareTo(typedOther.isSetSystemException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSystemException()) {        lastComparison = TBaseHelper.compareTo(this.systemException, typedOther.systemException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public void read(TProtocol iprot) throws TException {
      TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == TType.LIST) {
              {
                TList _list122 = iprot.readListBegin();
                this.success = new ArrayList(_list122.size);
                for (int _i123 = 0; _i123 < _list122.size; ++_i123)
                {
                  com.evernote.edam.type.SavedSearch _elem124;
                  _elem124 = new com.evernote.edam.type.SavedSearch();
                  _elem124.read(iprot);
                  this.success.add(_elem124);
                }
                iprot.readListEnd();
              }
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 1: // USER_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.userException = new com.evernote.edam.error.EDAMUserException();
              this.userException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // SYSTEM_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.systemException = new com.evernote.edam.error.EDAMSystemException();
              this.systemException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(TProtocol oprot) throws TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        {
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
          for (com.evernote.edam.type.SavedSearch _iter125 : this.success)
          {
            _iter125.write(oprot);
          }
          oprot.writeListEnd();
        }
        oprot.writeFieldEnd();
      } else if (this.isSetUserException()) {
        oprot.writeFieldBegin(USER_EXCEPTION_FIELD_DESC);
        this.userException.write(oprot);
        oprot.writeFieldEnd();
      } else if (this.isSetSystemException()) {
        oprot.writeFieldBegin(SYSTEM_EXCEPTION_FIELD_DESC);
        this.systemException.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    public void validate() throws TException {
      // check for required fields
    }

  }

  private static class getSearch_args implements TBase, java.io.Serializable, Cloneable   {
    private static final TStruct STRUCT_DESC = new TStruct("getSearch_args");

    private static final TField AUTHENTICATION_TOKEN_FIELD_DESC = new TField("authenticationToken", TType.STRING, (short)1);
    private static final TField GUID_FIELD_DESC = new TField("guid", TType.STRING, (short)2);

    private String authenticationToken;
    private String guid;


    // isset id assignments

    public getSearch_args() {
    }

    /**
     * Performs a deep copy on other.
     */
    public getSearch_args(getSearch_args other) {
      if (other.isSetAuthenticationToken()) {
        this.authenticationToken = other.authenticationToken;
      }
      if (other.isSetGuid()) {
        this.guid = other.guid;
      }
    }

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

    public void clear() {
      this.authenticationToken = null;
      this.guid = null;
    }

    public void setAuthenticationToken(String authenticationToken) {
      this.authenticationToken = authenticationToken;
    }

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

    public void setGuid(String guid) {
      this.guid = guid;
    }

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

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

      int lastComparison = 0;
      getSearch_args typedOther = (getSearch_args)other;

      lastComparison = Boolean.valueOf(isSetAuthenticationToken()).compareTo(typedOther.isSetAuthenticationToken());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetAuthenticationToken()) {        lastComparison = TBaseHelper.compareTo(this.authenticationToken, typedOther.authenticationToken);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetGuid()).compareTo(typedOther.isSetGuid());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetGuid()) {        lastComparison = TBaseHelper.compareTo(this.guid, typedOther.guid);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public void read(TProtocol iprot) throws TException {
      TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // AUTHENTICATION_TOKEN
            if (field.type == TType.STRING) {
              this.authenticationToken = iprot.readString();
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // GUID
            if (field.type == TType.STRING) {
              this.guid = iprot.readString();
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(TProtocol oprot) throws TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      if (this.authenticationToken != null) {
        oprot.writeFieldBegin(AUTHENTICATION_TOKEN_FIELD_DESC);
        oprot.writeString(this.authenticationToken);
        oprot.writeFieldEnd();
      }
      if (this.guid != null) {
        oprot.writeFieldBegin(GUID_FIELD_DESC);
        oprot.writeString(this.guid);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    public void validate() throws TException {
      // check for required fields
    }

  }

  private static class getSearch_result implements TBase, java.io.Serializable, Cloneable   {
    private static final TStruct STRUCT_DESC = new TStruct("getSearch_result");

    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
    private static final TField USER_EXCEPTION_FIELD_DESC = new TField("userException", TType.STRUCT, (short)1);
    private static final TField SYSTEM_EXCEPTION_FIELD_DESC = new TField("systemException", TType.STRUCT, (short)2);
    private static final TField NOT_FOUND_EXCEPTION_FIELD_DESC = new TField("notFoundException", TType.STRUCT, (short)3);

    private com.evernote.edam.type.SavedSearch success;
    private com.evernote.edam.error.EDAMUserException userException;
    private com.evernote.edam.error.EDAMSystemException systemException;
    private com.evernote.edam.error.EDAMNotFoundException notFoundException;


    // isset id assignments

    public getSearch_result() {
    }

    /**
     * Performs a deep copy on other.
     */
    public getSearch_result(getSearch_result other) {
      if (other.isSetSuccess()) {
        this.success = new com.evernote.edam.type.SavedSearch(other.success);
      }
      if (other.isSetUserException()) {
        this.userException = new com.evernote.edam.error.EDAMUserException(other.userException);
      }
      if (other.isSetSystemException()) {
        this.systemException = new com.evernote.edam.error.EDAMSystemException(other.systemException);
      }
      if (other.isSetNotFoundException()) {
        this.notFoundException = new com.evernote.edam.error.EDAMNotFoundException(other.notFoundException);
      }
    }

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

    public void clear() {
      this.success = null;
      this.userException = null;
      this.systemException = null;
      this.notFoundException = null;
    }

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

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

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

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

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

      int lastComparison = 0;
      getSearch_result typedOther = (getSearch_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {        lastComparison = TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetUserException()).compareTo(typedOther.isSetUserException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetUserException()) {        lastComparison = TBaseHelper.compareTo(this.userException, typedOther.userException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetSystemException()).compareTo(typedOther.isSetSystemException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSystemException()) {        lastComparison = TBaseHelper.compareTo(this.systemException, typedOther.systemException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetNotFoundException()).compareTo(typedOther.isSetNotFoundException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetNotFoundException()) {        lastComparison = TBaseHelper.compareTo(this.notFoundException, typedOther.notFoundException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public void read(TProtocol iprot) throws TException {
      TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == TType.STRUCT) {
              this.success = new com.evernote.edam.type.SavedSearch();
              this.success.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 1: // USER_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.userException = new com.evernote.edam.error.EDAMUserException();
              this.userException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // SYSTEM_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.systemException = new com.evernote.edam.error.EDAMSystemException();
              this.systemException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 3: // NOT_FOUND_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.notFoundException = new com.evernote.edam.error.EDAMNotFoundException();
              this.notFoundException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(TProtocol oprot) throws TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        this.success.write(oprot);
        oprot.writeFieldEnd();
      } else if (this.isSetUserException()) {
        oprot.writeFieldBegin(USER_EXCEPTION_FIELD_DESC);
        this.userException.write(oprot);
        oprot.writeFieldEnd();
      } else if (this.isSetSystemException()) {
        oprot.writeFieldBegin(SYSTEM_EXCEPTION_FIELD_DESC);
        this.systemException.write(oprot);
        oprot.writeFieldEnd();
      } else if (this.isSetNotFoundException()) {
        oprot.writeFieldBegin(NOT_FOUND_EXCEPTION_FIELD_DESC);
        this.notFoundException.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    public void validate() throws TException {
      // check for required fields
    }

  }

  private static class createSearch_args implements TBase, java.io.Serializable, Cloneable   {
    private static final TStruct STRUCT_DESC = new TStruct("createSearch_args");

    private static final TField AUTHENTICATION_TOKEN_FIELD_DESC = new TField("authenticationToken", TType.STRING, (short)1);
    private static final TField SEARCH_FIELD_DESC = new TField("search", TType.STRUCT, (short)2);

    private String authenticationToken;
    private com.evernote.edam.type.SavedSearch search;


    // isset id assignments

    public createSearch_args() {
    }

    /**
     * Performs a deep copy on other.
     */
    public createSearch_args(createSearch_args other) {
      if (other.isSetAuthenticationToken()) {
        this.authenticationToken = other.authenticationToken;
      }
      if (other.isSetSearch()) {
        this.search = new com.evernote.edam.type.SavedSearch(other.search);
      }
    }

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

    public void clear() {
      this.authenticationToken = null;
      this.search = null;
    }

    public void setAuthenticationToken(String authenticationToken) {
      this.authenticationToken = authenticationToken;
    }

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

    public void setSearch(com.evernote.edam.type.SavedSearch search) {
      this.search = search;
    }

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

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

      int lastComparison = 0;
      createSearch_args typedOther = (createSearch_args)other;

      lastComparison = Boolean.valueOf(isSetAuthenticationToken()).compareTo(typedOther.isSetAuthenticationToken());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetAuthenticationToken()) {        lastComparison = TBaseHelper.compareTo(this.authenticationToken, typedOther.authenticationToken);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetSearch()).compareTo(typedOther.isSetSearch());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSearch()) {        lastComparison = TBaseHelper.compareTo(this.search, typedOther.search);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public void read(TProtocol iprot) throws TException {
      TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // AUTHENTICATION_TOKEN
            if (field.type == TType.STRING) {
              this.authenticationToken = iprot.readString();
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // SEARCH
            if (field.type == TType.STRUCT) {
              this.search = new com.evernote.edam.type.SavedSearch();
              this.search.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(TProtocol oprot) throws TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      if (this.authenticationToken != null) {
        oprot.writeFieldBegin(AUTHENTICATION_TOKEN_FIELD_DESC);
        oprot.writeString(this.authenticationToken);
        oprot.writeFieldEnd();
      }
      if (this.search != null) {
        oprot.writeFieldBegin(SEARCH_FIELD_DESC);
        this.search.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    public void validate() throws TException {
      // check for required fields
    }

  }

  private static class createSearch_result implements TBase, java.io.Serializable, Cloneable   {
    private static final TStruct STRUCT_DESC = new TStruct("createSearch_result");

    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
    private static final TField USER_EXCEPTION_FIELD_DESC = new TField("userException", TType.STRUCT, (short)1);
    private static final TField SYSTEM_EXCEPTION_FIELD_DESC = new TField("systemException", TType.STRUCT, (short)2);

    private com.evernote.edam.type.SavedSearch success;
    private com.evernote.edam.error.EDAMUserException userException;
    private com.evernote.edam.error.EDAMSystemException systemException;


    // isset id assignments

    public createSearch_result() {
    }

    /**
     * Performs a deep copy on other.
     */
    public createSearch_result(createSearch_result other) {
      if (other.isSetSuccess()) {
        this.success = new com.evernote.edam.type.SavedSearch(other.success);
      }
      if (other.isSetUserException()) {
        this.userException = new com.evernote.edam.error.EDAMUserException(other.userException);
      }
      if (other.isSetSystemException()) {
        this.systemException = new com.evernote.edam.error.EDAMSystemException(other.systemException);
      }
    }

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

    public void clear() {
      this.success = null;
      this.userException = null;
      this.systemException = null;
    }

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

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

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

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

      int lastComparison = 0;
      createSearch_result typedOther = (createSearch_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {        lastComparison = TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetUserException()).compareTo(typedOther.isSetUserException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetUserException()) {        lastComparison = TBaseHelper.compareTo(this.userException, typedOther.userException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetSystemException()).compareTo(typedOther.isSetSystemException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSystemException()) {        lastComparison = TBaseHelper.compareTo(this.systemException, typedOther.systemException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public void read(TProtocol iprot) throws TException {
      TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == TType.STRUCT) {
              this.success = new com.evernote.edam.type.SavedSearch();
              this.success.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 1: // USER_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.userException = new com.evernote.edam.error.EDAMUserException();
              this.userException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // SYSTEM_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.systemException = new com.evernote.edam.error.EDAMSystemException();
              this.systemException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(TProtocol oprot) throws TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        this.success.write(oprot);
        oprot.writeFieldEnd();
      } else if (this.isSetUserException()) {
        oprot.writeFieldBegin(USER_EXCEPTION_FIELD_DESC);
        this.userException.write(oprot);
        oprot.writeFieldEnd();
      } else if (this.isSetSystemException()) {
        oprot.writeFieldBegin(SYSTEM_EXCEPTION_FIELD_DESC);
        this.systemException.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    public void validate() throws TException {
      // check for required fields
    }

  }

  private static class updateSearch_args implements TBase, java.io.Serializable, Cloneable   {
    private static final TStruct STRUCT_DESC = new TStruct("updateSearch_args");

    private static final TField AUTHENTICATION_TOKEN_FIELD_DESC = new TField("authenticationToken", TType.STRING, (short)1);
    private static final TField SEARCH_FIELD_DESC = new TField("search", TType.STRUCT, (short)2);

    private String authenticationToken;
    private com.evernote.edam.type.SavedSearch search;


    // isset id assignments

    public updateSearch_args() {
    }

    /**
     * Performs a deep copy on other.
     */
    public updateSearch_args(updateSearch_args other) {
      if (other.isSetAuthenticationToken()) {
        this.authenticationToken = other.authenticationToken;
      }
      if (other.isSetSearch()) {
        this.search = new com.evernote.edam.type.SavedSearch(other.search);
      }
    }

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

    public void clear() {
      this.authenticationToken = null;
      this.search = null;
    }

    public void setAuthenticationToken(String authenticationToken) {
      this.authenticationToken = authenticationToken;
    }

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

    public void setSearch(com.evernote.edam.type.SavedSearch search) {
      this.search = search;
    }

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

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

      int lastComparison = 0;
      updateSearch_args typedOther = (updateSearch_args)other;

      lastComparison = Boolean.valueOf(isSetAuthenticationToken()).compareTo(typedOther.isSetAuthenticationToken());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetAuthenticationToken()) {        lastComparison = TBaseHelper.compareTo(this.authenticationToken, typedOther.authenticationToken);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetSearch()).compareTo(typedOther.isSetSearch());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSearch()) {        lastComparison = TBaseHelper.compareTo(this.search, typedOther.search);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public void read(TProtocol iprot) throws TException {
      TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // AUTHENTICATION_TOKEN
            if (field.type == TType.STRING) {
              this.authenticationToken = iprot.readString();
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // SEARCH
            if (field.type == TType.STRUCT) {
              this.search = new com.evernote.edam.type.SavedSearch();
              this.search.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(TProtocol oprot) throws TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      if (this.authenticationToken != null) {
        oprot.writeFieldBegin(AUTHENTICATION_TOKEN_FIELD_DESC);
        oprot.writeString(this.authenticationToken);
        oprot.writeFieldEnd();
      }
      if (this.search != null) {
        oprot.writeFieldBegin(SEARCH_FIELD_DESC);
        this.search.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    public void validate() throws TException {
      // check for required fields
    }

  }

  private static class updateSearch_result implements TBase, java.io.Serializable, Cloneable   {
    private static final TStruct STRUCT_DESC = new TStruct("updateSearch_result");

    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.I32, (short)0);
    private static final TField USER_EXCEPTION_FIELD_DESC = new TField("userException", TType.STRUCT, (short)1);
    private static final TField SYSTEM_EXCEPTION_FIELD_DESC = new TField("systemException", TType.STRUCT, (short)2);
    private static final TField NOT_FOUND_EXCEPTION_FIELD_DESC = new TField("notFoundException", TType.STRUCT, (short)3);

    private int success;
    private com.evernote.edam.error.EDAMUserException userException;
    private com.evernote.edam.error.EDAMSystemException systemException;
    private com.evernote.edam.error.EDAMNotFoundException notFoundException;


    // isset id assignments
    private static final int __SUCCESS_ISSET_ID = 0;
    private boolean[] __isset_vector = new boolean[1];

    public updateSearch_result() {
    }

    /**
     * Performs a deep copy on other.
     */
    public updateSearch_result(updateSearch_result other) {
      System.arraycopy(other.__isset_vector, 0, __isset_vector, 0, other.__isset_vector.length);
      this.success = other.success;
      if (other.isSetUserException()) {
        this.userException = new com.evernote.edam.error.EDAMUserException(other.userException);
      }
      if (other.isSetSystemException()) {
        this.systemException = new com.evernote.edam.error.EDAMSystemException(other.systemException);
      }
      if (other.isSetNotFoundException()) {
        this.notFoundException = new com.evernote.edam.error.EDAMNotFoundException(other.notFoundException);
      }
    }

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

    public void clear() {
      setSuccessIsSet(false);
      this.success = 0;
      this.userException = null;
      this.systemException = null;
      this.notFoundException = null;
    }

    /** Returns true if field success is set (has been asigned a value) and false otherwise */
    public boolean isSetSuccess() {
      return __isset_vector[__SUCCESS_ISSET_ID];
    }

    public void setSuccessIsSet(boolean value) {
      __isset_vector[__SUCCESS_ISSET_ID] = value;
    }

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

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

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

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

      int lastComparison = 0;
      updateSearch_result typedOther = (updateSearch_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {        lastComparison = TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetUserException()).compareTo(typedOther.isSetUserException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetUserException()) {        lastComparison = TBaseHelper.compareTo(this.userException, typedOther.userException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetSystemException()).compareTo(typedOther.isSetSystemException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSystemException()) {        lastComparison = TBaseHelper.compareTo(this.systemException, typedOther.systemException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetNotFoundException()).compareTo(typedOther.isSetNotFoundException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetNotFoundException()) {        lastComparison = TBaseHelper.compareTo(this.notFoundException, typedOther.notFoundException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public void read(TProtocol iprot) throws TException {
      TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == TType.I32) {
              this.success = iprot.readI32();
              setSuccessIsSet(true);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 1: // USER_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.userException = new com.evernote.edam.error.EDAMUserException();
              this.userException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // SYSTEM_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.systemException = new com.evernote.edam.error.EDAMSystemException();
              this.systemException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 3: // NOT_FOUND_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.notFoundException = new com.evernote.edam.error.EDAMNotFoundException();
              this.notFoundException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(TProtocol oprot) throws TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        oprot.writeI32(this.success);
        oprot.writeFieldEnd();
      } else if (this.isSetUserException()) {
        oprot.writeFieldBegin(USER_EXCEPTION_FIELD_DESC);
        this.userException.write(oprot);
        oprot.writeFieldEnd();
      } else if (this.isSetSystemException()) {
        oprot.writeFieldBegin(SYSTEM_EXCEPTION_FIELD_DESC);
        this.systemException.write(oprot);
        oprot.writeFieldEnd();
      } else if (this.isSetNotFoundException()) {
        oprot.writeFieldBegin(NOT_FOUND_EXCEPTION_FIELD_DESC);
        this.notFoundException.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    public void validate() throws TException {
      // check for required fields
    }

  }

  private static class expungeSearch_args implements TBase, java.io.Serializable, Cloneable   {
    private static final TStruct STRUCT_DESC = new TStruct("expungeSearch_args");

    private static final TField AUTHENTICATION_TOKEN_FIELD_DESC = new TField("authenticationToken", TType.STRING, (short)1);
    private static final TField GUID_FIELD_DESC = new TField("guid", TType.STRING, (short)2);

    private String authenticationToken;
    private String guid;


    // isset id assignments

    public expungeSearch_args() {
    }

    /**
     * Performs a deep copy on other.
     */
    public expungeSearch_args(expungeSearch_args other) {
      if (other.isSetAuthenticationToken()) {
        this.authenticationToken = other.authenticationToken;
      }
      if (other.isSetGuid()) {
        this.guid = other.guid;
      }
    }

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

    public void clear() {
      this.authenticationToken = null;
      this.guid = null;
    }

    public void setAuthenticationToken(String authenticationToken) {
      this.authenticationToken = authenticationToken;
    }

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

    public void setGuid(String guid) {
      this.guid = guid;
    }

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

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

      int lastComparison = 0;
      expungeSearch_args typedOther = (expungeSearch_args)other;

      lastComparison = Boolean.valueOf(isSetAuthenticationToken()).compareTo(typedOther.isSetAuthenticationToken());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetAuthenticationToken()) {        lastComparison = TBaseHelper.compareTo(this.authenticationToken, typedOther.authenticationToken);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetGuid()).compareTo(typedOther.isSetGuid());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetGuid()) {        lastComparison = TBaseHelper.compareTo(this.guid, typedOther.guid);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public void read(TProtocol iprot) throws TException {
      TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // AUTHENTICATION_TOKEN
            if (field.type == TType.STRING) {
              this.authenticationToken = iprot.readString();
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // GUID
            if (field.type == TType.STRING) {
              this.guid = iprot.readString();
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(TProtocol oprot) throws TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      if (this.authenticationToken != null) {
        oprot.writeFieldBegin(AUTHENTICATION_TOKEN_FIELD_DESC);
        oprot.writeString(this.authenticationToken);
        oprot.writeFieldEnd();
      }
      if (this.guid != null) {
        oprot.writeFieldBegin(GUID_FIELD_DESC);
        oprot.writeString(this.guid);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    public void validate() throws TException {
      // check for required fields
    }

  }

  private static class expungeSearch_result implements TBase, java.io.Serializable, Cloneable   {
    private static final TStruct STRUCT_DESC = new TStruct("expungeSearch_result");

    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.I32, (short)0);
    private static final TField USER_EXCEPTION_FIELD_DESC = new TField("userException", TType.STRUCT, (short)1);
    private static final TField SYSTEM_EXCEPTION_FIELD_DESC = new TField("systemException", TType.STRUCT, (short)2);
    private static final TField NOT_FOUND_EXCEPTION_FIELD_DESC = new TField("notFoundException", TType.STRUCT, (short)3);

    private int success;
    private com.evernote.edam.error.EDAMUserException userException;
    private com.evernote.edam.error.EDAMSystemException systemException;
    private com.evernote.edam.error.EDAMNotFoundException notFoundException;


    // isset id assignments
    private static final int __SUCCESS_ISSET_ID = 0;
    private boolean[] __isset_vector = new boolean[1];

    public expungeSearch_result() {
    }

    /**
     * Performs a deep copy on other.
     */
    public expungeSearch_result(expungeSearch_result other) {
      System.arraycopy(other.__isset_vector, 0, __isset_vector, 0, other.__isset_vector.length);
      this.success = other.success;
      if (other.isSetUserException()) {
        this.userException = new com.evernote.edam.error.EDAMUserException(other.userException);
      }
      if (other.isSetSystemException()) {
        this.systemException = new com.evernote.edam.error.EDAMSystemException(other.systemException);
      }
      if (other.isSetNotFoundException()) {
        this.notFoundException = new com.evernote.edam.error.EDAMNotFoundException(other.notFoundException);
      }
    }

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

    public void clear() {
      setSuccessIsSet(false);
      this.success = 0;
      this.userException = null;
      this.systemException = null;
      this.notFoundException = null;
    }

    /** Returns true if field success is set (has been asigned a value) and false otherwise */
    public boolean isSetSuccess() {
      return __isset_vector[__SUCCESS_ISSET_ID];
    }

    public void setSuccessIsSet(boolean value) {
      __isset_vector[__SUCCESS_ISSET_ID] = value;
    }

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

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

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

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

      int lastComparison = 0;
      expungeSearch_result typedOther = (expungeSearch_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {        lastComparison = TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetUserException()).compareTo(typedOther.isSetUserException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetUserException()) {        lastComparison = TBaseHelper.compareTo(this.userException, typedOther.userException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetSystemException()).compareTo(typedOther.isSetSystemException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSystemException()) {        lastComparison = TBaseHelper.compareTo(this.systemException, typedOther.systemException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetNotFoundException()).compareTo(typedOther.isSetNotFoundException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetNotFoundException()) {        lastComparison = TBaseHelper.compareTo(this.notFoundException, typedOther.notFoundException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public void read(TProtocol iprot) throws TException {
      TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == TType.I32) {
              this.success = iprot.readI32();
              setSuccessIsSet(true);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 1: // USER_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.userException = new com.evernote.edam.error.EDAMUserException();
              this.userException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // SYSTEM_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.systemException = new com.evernote.edam.error.EDAMSystemException();
              this.systemException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 3: // NOT_FOUND_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.notFoundException = new com.evernote.edam.error.EDAMNotFoundException();
              this.notFoundException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(TProtocol oprot) throws TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        oprot.writeI32(this.success);
        oprot.writeFieldEnd();
      } else if (this.isSetUserException()) {
        oprot.writeFieldBegin(USER_EXCEPTION_FIELD_DESC);
        this.userException.write(oprot);
        oprot.writeFieldEnd();
      } else if (this.isSetSystemException()) {
        oprot.writeFieldBegin(SYSTEM_EXCEPTION_FIELD_DESC);
        this.systemException.write(oprot);
        oprot.writeFieldEnd();
      } else if (this.isSetNotFoundException()) {
        oprot.writeFieldBegin(NOT_FOUND_EXCEPTION_FIELD_DESC);
        this.notFoundException.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    public void validate() throws TException {
      // check for required fields
    }

  }

  private static class findNotes_args implements TBase, java.io.Serializable, Cloneable   {
    private static final TStruct STRUCT_DESC = new TStruct("findNotes_args");

    private static final TField AUTHENTICATION_TOKEN_FIELD_DESC = new TField("authenticationToken", TType.STRING, (short)1);
    private static final TField FILTER_FIELD_DESC = new TField("filter", TType.STRUCT, (short)2);
    private static final TField OFFSET_FIELD_DESC = new TField("offset", TType.I32, (short)3);
    private static final TField MAX_NOTES_FIELD_DESC = new TField("maxNotes", TType.I32, (short)4);

    private String authenticationToken;
    private NoteFilter filter;
    private int offset;
    private int maxNotes;


    // isset id assignments
    private static final int __OFFSET_ISSET_ID = 0;
    private static final int __MAXNOTES_ISSET_ID = 1;
    private boolean[] __isset_vector = new boolean[2];

    public findNotes_args() {
    }

    /**
     * Performs a deep copy on other.
     */
    public findNotes_args(findNotes_args other) {
      System.arraycopy(other.__isset_vector, 0, __isset_vector, 0, other.__isset_vector.length);
      if (other.isSetAuthenticationToken()) {
        this.authenticationToken = other.authenticationToken;
      }
      if (other.isSetFilter()) {
        this.filter = new NoteFilter(other.filter);
      }
      this.offset = other.offset;
      this.maxNotes = other.maxNotes;
    }

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

    public void clear() {
      this.authenticationToken = null;
      this.filter = null;
      setOffsetIsSet(false);
      this.offset = 0;
      setMaxNotesIsSet(false);
      this.maxNotes = 0;
    }

    public void setAuthenticationToken(String authenticationToken) {
      this.authenticationToken = authenticationToken;
    }

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

    public void setFilter(NoteFilter filter) {
      this.filter = filter;
    }

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

    public void setOffset(int offset) {
      this.offset = offset;
      setOffsetIsSet(true);
    }

    /** Returns true if field offset is set (has been asigned a value) and false otherwise */
    public boolean isSetOffset() {
      return __isset_vector[__OFFSET_ISSET_ID];
    }

    public void setOffsetIsSet(boolean value) {
      __isset_vector[__OFFSET_ISSET_ID] = value;
    }

    public void setMaxNotes(int maxNotes) {
      this.maxNotes = maxNotes;
      setMaxNotesIsSet(true);
    }

    /** Returns true if field maxNotes is set (has been asigned a value) and false otherwise */
    public boolean isSetMaxNotes() {
      return __isset_vector[__MAXNOTES_ISSET_ID];
    }

    public void setMaxNotesIsSet(boolean value) {
      __isset_vector[__MAXNOTES_ISSET_ID] = value;
    }

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

      int lastComparison = 0;
      findNotes_args typedOther = (findNotes_args)other;

      lastComparison = Boolean.valueOf(isSetAuthenticationToken()).compareTo(typedOther.isSetAuthenticationToken());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetAuthenticationToken()) {        lastComparison = TBaseHelper.compareTo(this.authenticationToken, typedOther.authenticationToken);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetFilter()).compareTo(typedOther.isSetFilter());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetFilter()) {        lastComparison = TBaseHelper.compareTo(this.filter, typedOther.filter);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetOffset()).compareTo(typedOther.isSetOffset());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetOffset()) {        lastComparison = TBaseHelper.compareTo(this.offset, typedOther.offset);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetMaxNotes()).compareTo(typedOther.isSetMaxNotes());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetMaxNotes()) {        lastComparison = TBaseHelper.compareTo(this.maxNotes, typedOther.maxNotes);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public void read(TProtocol iprot) throws TException {
      TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // AUTHENTICATION_TOKEN
            if (field.type == TType.STRING) {
              this.authenticationToken = iprot.readString();
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // FILTER
            if (field.type == TType.STRUCT) {
              this.filter = new NoteFilter();
              this.filter.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 3: // OFFSET
            if (field.type == TType.I32) {
              this.offset = iprot.readI32();
              setOffsetIsSet(true);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 4: // MAX_NOTES
            if (field.type == TType.I32) {
              this.maxNotes = iprot.readI32();
              setMaxNotesIsSet(true);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(TProtocol oprot) throws TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      if (this.authenticationToken != null) {
        oprot.writeFieldBegin(AUTHENTICATION_TOKEN_FIELD_DESC);
        oprot.writeString(this.authenticationToken);
        oprot.writeFieldEnd();
      }
      if (this.filter != null) {
        oprot.writeFieldBegin(FILTER_FIELD_DESC);
        this.filter.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldBegin(OFFSET_FIELD_DESC);
      oprot.writeI32(this.offset);
      oprot.writeFieldEnd();
      oprot.writeFieldBegin(MAX_NOTES_FIELD_DESC);
      oprot.writeI32(this.maxNotes);
      oprot.writeFieldEnd();
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    public void validate() throws TException {
      // check for required fields
    }

  }

  private static class findNotes_result implements TBase, java.io.Serializable, Cloneable   {
    private static final TStruct STRUCT_DESC = new TStruct("findNotes_result");

    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
    private static final TField USER_EXCEPTION_FIELD_DESC = new TField("userException", TType.STRUCT, (short)1);
    private static final TField SYSTEM_EXCEPTION_FIELD_DESC = new TField("systemException", TType.STRUCT, (short)2);
    private static final TField NOT_FOUND_EXCEPTION_FIELD_DESC = new TField("notFoundException", TType.STRUCT, (short)3);

    private NoteList success;
    private com.evernote.edam.error.EDAMUserException userException;
    private com.evernote.edam.error.EDAMSystemException systemException;
    private com.evernote.edam.error.EDAMNotFoundException notFoundException;


    // isset id assignments

    public findNotes_result() {
    }

    /**
     * Performs a deep copy on other.
     */
    public findNotes_result(findNotes_result other) {
      if (other.isSetSuccess()) {
        this.success = new NoteList(other.success);
      }
      if (other.isSetUserException()) {
        this.userException = new com.evernote.edam.error.EDAMUserException(other.userException);
      }
      if (other.isSetSystemException()) {
        this.systemException = new com.evernote.edam.error.EDAMSystemException(other.systemException);
      }
      if (other.isSetNotFoundException()) {
        this.notFoundException = new com.evernote.edam.error.EDAMNotFoundException(other.notFoundException);
      }
    }

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

    public void clear() {
      this.success = null;
      this.userException = null;
      this.systemException = null;
      this.notFoundException = null;
    }

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

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

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

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

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

      int lastComparison = 0;
      findNotes_result typedOther = (findNotes_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {        lastComparison = TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetUserException()).compareTo(typedOther.isSetUserException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetUserException()) {        lastComparison = TBaseHelper.compareTo(this.userException, typedOther.userException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetSystemException()).compareTo(typedOther.isSetSystemException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSystemException()) {        lastComparison = TBaseHelper.compareTo(this.systemException, typedOther.systemException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetNotFoundException()).compareTo(typedOther.isSetNotFoundException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetNotFoundException()) {        lastComparison = TBaseHelper.compareTo(this.notFoundException, typedOther.notFoundException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public void read(TProtocol iprot) throws TException {
      TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == TType.STRUCT) {
              this.success = new NoteList();
              this.success.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 1: // USER_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.userException = new com.evernote.edam.error.EDAMUserException();
              this.userException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // SYSTEM_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.systemException = new com.evernote.edam.error.EDAMSystemException();
              this.systemException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 3: // NOT_FOUND_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.notFoundException = new com.evernote.edam.error.EDAMNotFoundException();
              this.notFoundException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(TProtocol oprot) throws TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        this.success.write(oprot);
        oprot.writeFieldEnd();
      } else if (this.isSetUserException()) {
        oprot.writeFieldBegin(USER_EXCEPTION_FIELD_DESC);
        this.userException.write(oprot);
        oprot.writeFieldEnd();
      } else if (this.isSetSystemException()) {
        oprot.writeFieldBegin(SYSTEM_EXCEPTION_FIELD_DESC);
        this.systemException.write(oprot);
        oprot.writeFieldEnd();
      } else if (this.isSetNotFoundException()) {
        oprot.writeFieldBegin(NOT_FOUND_EXCEPTION_FIELD_DESC);
        this.notFoundException.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    public void validate() throws TException {
      // check for required fields
    }

  }

  private static class findNoteOffset_args implements TBase, java.io.Serializable, Cloneable   {
    private static final TStruct STRUCT_DESC = new TStruct("findNoteOffset_args");

    private static final TField AUTHENTICATION_TOKEN_FIELD_DESC = new TField("authenticationToken", TType.STRING, (short)1);
    private static final TField FILTER_FIELD_DESC = new TField("filter", TType.STRUCT, (short)2);
    private static final TField GUID_FIELD_DESC = new TField("guid", TType.STRING, (short)3);

    private String authenticationToken;
    private NoteFilter filter;
    private String guid;


    // isset id assignments

    public findNoteOffset_args() {
    }

    /**
     * Performs a deep copy on other.
     */
    public findNoteOffset_args(findNoteOffset_args other) {
      if (other.isSetAuthenticationToken()) {
        this.authenticationToken = other.authenticationToken;
      }
      if (other.isSetFilter()) {
        this.filter = new NoteFilter(other.filter);
      }
      if (other.isSetGuid()) {
        this.guid = other.guid;
      }
    }

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

    public void clear() {
      this.authenticationToken = null;
      this.filter = null;
      this.guid = null;
    }

    public void setAuthenticationToken(String authenticationToken) {
      this.authenticationToken = authenticationToken;
    }

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

    public void setFilter(NoteFilter filter) {
      this.filter = filter;
    }

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

    public void setGuid(String guid) {
      this.guid = guid;
    }

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

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

      int lastComparison = 0;
      findNoteOffset_args typedOther = (findNoteOffset_args)other;

      lastComparison = Boolean.valueOf(isSetAuthenticationToken()).compareTo(typedOther.isSetAuthenticationToken());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetAuthenticationToken()) {        lastComparison = TBaseHelper.compareTo(this.authenticationToken, typedOther.authenticationToken);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetFilter()).compareTo(typedOther.isSetFilter());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetFilter()) {        lastComparison = TBaseHelper.compareTo(this.filter, typedOther.filter);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetGuid()).compareTo(typedOther.isSetGuid());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetGuid()) {        lastComparison = TBaseHelper.compareTo(this.guid, typedOther.guid);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public void read(TProtocol iprot) throws TException {
      TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // AUTHENTICATION_TOKEN
            if (field.type == TType.STRING) {
              this.authenticationToken = iprot.readString();
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // FILTER
            if (field.type == TType.STRUCT) {
              this.filter = new NoteFilter();
              this.filter.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 3: // GUID
            if (field.type == TType.STRING) {
              this.guid = iprot.readString();
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(TProtocol oprot) throws TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      if (this.authenticationToken != null) {
        oprot.writeFieldBegin(AUTHENTICATION_TOKEN_FIELD_DESC);
        oprot.writeString(this.authenticationToken);
        oprot.writeFieldEnd();
      }
      if (this.filter != null) {
        oprot.writeFieldBegin(FILTER_FIELD_DESC);
        this.filter.write(oprot);
        oprot.writeFieldEnd();
      }
      if (this.guid != null) {
        oprot.writeFieldBegin(GUID_FIELD_DESC);
        oprot.writeString(this.guid);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    public void validate() throws TException {
      // check for required fields
    }

  }

  private static class findNoteOffset_result implements TBase, java.io.Serializable, Cloneable   {
    private static final TStruct STRUCT_DESC = new TStruct("findNoteOffset_result");

    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.I32, (short)0);
    private static final TField USER_EXCEPTION_FIELD_DESC = new TField("userException", TType.STRUCT, (short)1);
    private static final TField SYSTEM_EXCEPTION_FIELD_DESC = new TField("systemException", TType.STRUCT, (short)2);
    private static final TField NOT_FOUND_EXCEPTION_FIELD_DESC = new TField("notFoundException", TType.STRUCT, (short)3);

    private int success;
    private com.evernote.edam.error.EDAMUserException userException;
    private com.evernote.edam.error.EDAMSystemException systemException;
    private com.evernote.edam.error.EDAMNotFoundException notFoundException;


    // isset id assignments
    private static final int __SUCCESS_ISSET_ID = 0;
    private boolean[] __isset_vector = new boolean[1];

    public findNoteOffset_result() {
    }

    /**
     * Performs a deep copy on other.
     */
    public findNoteOffset_result(findNoteOffset_result other) {
      System.arraycopy(other.__isset_vector, 0, __isset_vector, 0, other.__isset_vector.length);
      this.success = other.success;
      if (other.isSetUserException()) {
        this.userException = new com.evernote.edam.error.EDAMUserException(other.userException);
      }
      if (other.isSetSystemException()) {
        this.systemException = new com.evernote.edam.error.EDAMSystemException(other.systemException);
      }
      if (other.isSetNotFoundException()) {
        this.notFoundException = new com.evernote.edam.error.EDAMNotFoundException(other.notFoundException);
      }
    }

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

    public void clear() {
      setSuccessIsSet(false);
      this.success = 0;
      this.userException = null;
      this.systemException = null;
      this.notFoundException = null;
    }

    /** Returns true if field success is set (has been asigned a value) and false otherwise */
    public boolean isSetSuccess() {
      return __isset_vector[__SUCCESS_ISSET_ID];
    }

    public void setSuccessIsSet(boolean value) {
      __isset_vector[__SUCCESS_ISSET_ID] = value;
    }

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

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

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

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

      int lastComparison = 0;
      findNoteOffset_result typedOther = (findNoteOffset_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {        lastComparison = TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetUserException()).compareTo(typedOther.isSetUserException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetUserException()) {        lastComparison = TBaseHelper.compareTo(this.userException, typedOther.userException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetSystemException()).compareTo(typedOther.isSetSystemException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSystemException()) {        lastComparison = TBaseHelper.compareTo(this.systemException, typedOther.systemException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetNotFoundException()).compareTo(typedOther.isSetNotFoundException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetNotFoundException()) {        lastComparison = TBaseHelper.compareTo(this.notFoundException, typedOther.notFoundException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public void read(TProtocol iprot) throws TException {
      TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == TType.I32) {
              this.success = iprot.readI32();
              setSuccessIsSet(true);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 1: // USER_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.userException = new com.evernote.edam.error.EDAMUserException();
              this.userException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // SYSTEM_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.systemException = new com.evernote.edam.error.EDAMSystemException();
              this.systemException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 3: // NOT_FOUND_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.notFoundException = new com.evernote.edam.error.EDAMNotFoundException();
              this.notFoundException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(TProtocol oprot) throws TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        oprot.writeI32(this.success);
        oprot.writeFieldEnd();
      } else if (this.isSetUserException()) {
        oprot.writeFieldBegin(USER_EXCEPTION_FIELD_DESC);
        this.userException.write(oprot);
        oprot.writeFieldEnd();
      } else if (this.isSetSystemException()) {
        oprot.writeFieldBegin(SYSTEM_EXCEPTION_FIELD_DESC);
        this.systemException.write(oprot);
        oprot.writeFieldEnd();
      } else if (this.isSetNotFoundException()) {
        oprot.writeFieldBegin(NOT_FOUND_EXCEPTION_FIELD_DESC);
        this.notFoundException.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    public void validate() throws TException {
      // check for required fields
    }

  }

  private static class findNotesMetadata_args implements TBase, java.io.Serializable, Cloneable   {
    private static final TStruct STRUCT_DESC = new TStruct("findNotesMetadata_args");

    private static final TField AUTHENTICATION_TOKEN_FIELD_DESC = new TField("authenticationToken", TType.STRING, (short)1);
    private static final TField FILTER_FIELD_DESC = new TField("filter", TType.STRUCT, (short)2);
    private static final TField OFFSET_FIELD_DESC = new TField("offset", TType.I32, (short)3);
    private static final TField MAX_NOTES_FIELD_DESC = new TField("maxNotes", TType.I32, (short)4);
    private static final TField RESULT_SPEC_FIELD_DESC = new TField("resultSpec", TType.STRUCT, (short)5);

    private String authenticationToken;
    private NoteFilter filter;
    private int offset;
    private int maxNotes;
    private NotesMetadataResultSpec resultSpec;


    // isset id assignments
    private static final int __OFFSET_ISSET_ID = 0;
    private static final int __MAXNOTES_ISSET_ID = 1;
    private boolean[] __isset_vector = new boolean[2];

    public findNotesMetadata_args() {
    }

    /**
     * Performs a deep copy on other.
     */
    public findNotesMetadata_args(findNotesMetadata_args other) {
      System.arraycopy(other.__isset_vector, 0, __isset_vector, 0, other.__isset_vector.length);
      if (other.isSetAuthenticationToken()) {
        this.authenticationToken = other.authenticationToken;
      }
      if (other.isSetFilter()) {
        this.filter = new NoteFilter(other.filter);
      }
      this.offset = other.offset;
      this.maxNotes = other.maxNotes;
      if (other.isSetResultSpec()) {
        this.resultSpec = new NotesMetadataResultSpec(other.resultSpec);
      }
    }

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

    public void clear() {
      this.authenticationToken = null;
      this.filter = null;
      setOffsetIsSet(false);
      this.offset = 0;
      setMaxNotesIsSet(false);
      this.maxNotes = 0;
      this.resultSpec = null;
    }

    public void setAuthenticationToken(String authenticationToken) {
      this.authenticationToken = authenticationToken;
    }

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

    public void setFilter(NoteFilter filter) {
      this.filter = filter;
    }

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

    public void setOffset(int offset) {
      this.offset = offset;
      setOffsetIsSet(true);
    }

    /** Returns true if field offset is set (has been asigned a value) and false otherwise */
    public boolean isSetOffset() {
      return __isset_vector[__OFFSET_ISSET_ID];
    }

    public void setOffsetIsSet(boolean value) {
      __isset_vector[__OFFSET_ISSET_ID] = value;
    }

    public void setMaxNotes(int maxNotes) {
      this.maxNotes = maxNotes;
      setMaxNotesIsSet(true);
    }

    /** Returns true if field maxNotes is set (has been asigned a value) and false otherwise */
    public boolean isSetMaxNotes() {
      return __isset_vector[__MAXNOTES_ISSET_ID];
    }

    public void setMaxNotesIsSet(boolean value) {
      __isset_vector[__MAXNOTES_ISSET_ID] = value;
    }

    public void setResultSpec(NotesMetadataResultSpec resultSpec) {
      this.resultSpec = resultSpec;
    }

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

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

      int lastComparison = 0;
      findNotesMetadata_args typedOther = (findNotesMetadata_args)other;

      lastComparison = Boolean.valueOf(isSetAuthenticationToken()).compareTo(typedOther.isSetAuthenticationToken());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetAuthenticationToken()) {        lastComparison = TBaseHelper.compareTo(this.authenticationToken, typedOther.authenticationToken);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetFilter()).compareTo(typedOther.isSetFilter());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetFilter()) {        lastComparison = TBaseHelper.compareTo(this.filter, typedOther.filter);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetOffset()).compareTo(typedOther.isSetOffset());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetOffset()) {        lastComparison = TBaseHelper.compareTo(this.offset, typedOther.offset);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetMaxNotes()).compareTo(typedOther.isSetMaxNotes());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetMaxNotes()) {        lastComparison = TBaseHelper.compareTo(this.maxNotes, typedOther.maxNotes);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetResultSpec()).compareTo(typedOther.isSetResultSpec());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetResultSpec()) {        lastComparison = TBaseHelper.compareTo(this.resultSpec, typedOther.resultSpec);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public void read(TProtocol iprot) throws TException {
      TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // AUTHENTICATION_TOKEN
            if (field.type == TType.STRING) {
              this.authenticationToken = iprot.readString();
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // FILTER
            if (field.type == TType.STRUCT) {
              this.filter = new NoteFilter();
              this.filter.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 3: // OFFSET
            if (field.type == TType.I32) {
              this.offset = iprot.readI32();
              setOffsetIsSet(true);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 4: // MAX_NOTES
            if (field.type == TType.I32) {
              this.maxNotes = iprot.readI32();
              setMaxNotesIsSet(true);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 5: // RESULT_SPEC
            if (field.type == TType.STRUCT) {
              this.resultSpec = new NotesMetadataResultSpec();
              this.resultSpec.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(TProtocol oprot) throws TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      if (this.authenticationToken != null) {
        oprot.writeFieldBegin(AUTHENTICATION_TOKEN_FIELD_DESC);
        oprot.writeString(this.authenticationToken);
        oprot.writeFieldEnd();
      }
      if (this.filter != null) {
        oprot.writeFieldBegin(FILTER_FIELD_DESC);
        this.filter.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldBegin(OFFSET_FIELD_DESC);
      oprot.writeI32(this.offset);
      oprot.writeFieldEnd();
      oprot.writeFieldBegin(MAX_NOTES_FIELD_DESC);
      oprot.writeI32(this.maxNotes);
      oprot.writeFieldEnd();
      if (this.resultSpec != null) {
        oprot.writeFieldBegin(RESULT_SPEC_FIELD_DESC);
        this.resultSpec.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    public void validate() throws TException {
      // check for required fields
    }

  }

  private static class findNotesMetadata_result implements TBase, java.io.Serializable, Cloneable   {
    private static final TStruct STRUCT_DESC = new TStruct("findNotesMetadata_result");

    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
    private static final TField USER_EXCEPTION_FIELD_DESC = new TField("userException", TType.STRUCT, (short)1);
    private static final TField SYSTEM_EXCEPTION_FIELD_DESC = new TField("systemException", TType.STRUCT, (short)2);
    private static final TField NOT_FOUND_EXCEPTION_FIELD_DESC = new TField("notFoundException", TType.STRUCT, (short)3);

    private NotesMetadataList success;
    private com.evernote.edam.error.EDAMUserException userException;
    private com.evernote.edam.error.EDAMSystemException systemException;
    private com.evernote.edam.error.EDAMNotFoundException notFoundException;


    // isset id assignments

    public findNotesMetadata_result() {
    }

    /**
     * Performs a deep copy on other.
     */
    public findNotesMetadata_result(findNotesMetadata_result other) {
      if (other.isSetSuccess()) {
        this.success = new NotesMetadataList(other.success);
      }
      if (other.isSetUserException()) {
        this.userException = new com.evernote.edam.error.EDAMUserException(other.userException);
      }
      if (other.isSetSystemException()) {
        this.systemException = new com.evernote.edam.error.EDAMSystemException(other.systemException);
      }
      if (other.isSetNotFoundException()) {
        this.notFoundException = new com.evernote.edam.error.EDAMNotFoundException(other.notFoundException);
      }
    }

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

    public void clear() {
      this.success = null;
      this.userException = null;
      this.systemException = null;
      this.notFoundException = null;
    }

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

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

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

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

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

      int lastComparison = 0;
      findNotesMetadata_result typedOther = (findNotesMetadata_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {        lastComparison = TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetUserException()).compareTo(typedOther.isSetUserException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetUserException()) {        lastComparison = TBaseHelper.compareTo(this.userException, typedOther.userException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetSystemException()).compareTo(typedOther.isSetSystemException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSystemException()) {        lastComparison = TBaseHelper.compareTo(this.systemException, typedOther.systemException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetNotFoundException()).compareTo(typedOther.isSetNotFoundException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetNotFoundException()) {        lastComparison = TBaseHelper.compareTo(this.notFoundException, typedOther.notFoundException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public void read(TProtocol iprot) throws TException {
      TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == TType.STRUCT) {
              this.success = new NotesMetadataList();
              this.success.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 1: // USER_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.userException = new com.evernote.edam.error.EDAMUserException();
              this.userException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // SYSTEM_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.systemException = new com.evernote.edam.error.EDAMSystemException();
              this.systemException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 3: // NOT_FOUND_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.notFoundException = new com.evernote.edam.error.EDAMNotFoundException();
              this.notFoundException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(TProtocol oprot) throws TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        this.success.write(oprot);
        oprot.writeFieldEnd();
      } else if (this.isSetUserException()) {
        oprot.writeFieldBegin(USER_EXCEPTION_FIELD_DESC);
        this.userException.write(oprot);
        oprot.writeFieldEnd();
      } else if (this.isSetSystemException()) {
        oprot.writeFieldBegin(SYSTEM_EXCEPTION_FIELD_DESC);
        this.systemException.write(oprot);
        oprot.writeFieldEnd();
      } else if (this.isSetNotFoundException()) {
        oprot.writeFieldBegin(NOT_FOUND_EXCEPTION_FIELD_DESC);
        this.notFoundException.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    public void validate() throws TException {
      // check for required fields
    }

  }

  private static class findNoteCounts_args implements TBase, java.io.Serializable, Cloneable   {
    private static final TStruct STRUCT_DESC = new TStruct("findNoteCounts_args");

    private static final TField AUTHENTICATION_TOKEN_FIELD_DESC = new TField("authenticationToken", TType.STRING, (short)1);
    private static final TField FILTER_FIELD_DESC = new TField("filter", TType.STRUCT, (short)2);
    private static final TField WITH_TRASH_FIELD_DESC = new TField("withTrash", TType.BOOL, (short)3);

    private String authenticationToken;
    private NoteFilter filter;
    private boolean withTrash;


    // isset id assignments
    private static final int __WITHTRASH_ISSET_ID = 0;
    private boolean[] __isset_vector = new boolean[1];

    public findNoteCounts_args() {
    }

    /**
     * Performs a deep copy on other.
     */
    public findNoteCounts_args(findNoteCounts_args other) {
      System.arraycopy(other.__isset_vector, 0, __isset_vector, 0, other.__isset_vector.length);
      if (other.isSetAuthenticationToken()) {
        this.authenticationToken = other.authenticationToken;
      }
      if (other.isSetFilter()) {
        this.filter = new NoteFilter(other.filter);
      }
      this.withTrash = other.withTrash;
    }

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

    public void clear() {
      this.authenticationToken = null;
      this.filter = null;
      setWithTrashIsSet(false);
      this.withTrash = false;
    }

    public void setAuthenticationToken(String authenticationToken) {
      this.authenticationToken = authenticationToken;
    }

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

    public void setFilter(NoteFilter filter) {
      this.filter = filter;
    }

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

    public void setWithTrash(boolean withTrash) {
      this.withTrash = withTrash;
      setWithTrashIsSet(true);
    }

    /** Returns true if field withTrash is set (has been asigned a value) and false otherwise */
    public boolean isSetWithTrash() {
      return __isset_vector[__WITHTRASH_ISSET_ID];
    }

    public void setWithTrashIsSet(boolean value) {
      __isset_vector[__WITHTRASH_ISSET_ID] = value;
    }

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

      int lastComparison = 0;
      findNoteCounts_args typedOther = (findNoteCounts_args)other;

      lastComparison = Boolean.valueOf(isSetAuthenticationToken()).compareTo(typedOther.isSetAuthenticationToken());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetAuthenticationToken()) {        lastComparison = TBaseHelper.compareTo(this.authenticationToken, typedOther.authenticationToken);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetFilter()).compareTo(typedOther.isSetFilter());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetFilter()) {        lastComparison = TBaseHelper.compareTo(this.filter, typedOther.filter);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetWithTrash()).compareTo(typedOther.isSetWithTrash());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetWithTrash()) {        lastComparison = TBaseHelper.compareTo(this.withTrash, typedOther.withTrash);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public void read(TProtocol iprot) throws TException {
      TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // AUTHENTICATION_TOKEN
            if (field.type == TType.STRING) {
              this.authenticationToken = iprot.readString();
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // FILTER
            if (field.type == TType.STRUCT) {
              this.filter = new NoteFilter();
              this.filter.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 3: // WITH_TRASH
            if (field.type == TType.BOOL) {
              this.withTrash = iprot.readBool();
              setWithTrashIsSet(true);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(TProtocol oprot) throws TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      if (this.authenticationToken != null) {
        oprot.writeFieldBegin(AUTHENTICATION_TOKEN_FIELD_DESC);
        oprot.writeString(this.authenticationToken);
        oprot.writeFieldEnd();
      }
      if (this.filter != null) {
        oprot.writeFieldBegin(FILTER_FIELD_DESC);
        this.filter.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldBegin(WITH_TRASH_FIELD_DESC);
      oprot.writeBool(this.withTrash);
      oprot.writeFieldEnd();
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    public void validate() throws TException {
      // check for required fields
    }

  }

  private static class findNoteCounts_result implements TBase, java.io.Serializable, Cloneable   {
    private static final TStruct STRUCT_DESC = new TStruct("findNoteCounts_result");

    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
    private static final TField USER_EXCEPTION_FIELD_DESC = new TField("userException", TType.STRUCT, (short)1);
    private static final TField SYSTEM_EXCEPTION_FIELD_DESC = new TField("systemException", TType.STRUCT, (short)2);
    private static final TField NOT_FOUND_EXCEPTION_FIELD_DESC = new TField("notFoundException", TType.STRUCT, (short)3);

    private NoteCollectionCounts success;
    private com.evernote.edam.error.EDAMUserException userException;
    private com.evernote.edam.error.EDAMSystemException systemException;
    private com.evernote.edam.error.EDAMNotFoundException notFoundException;


    // isset id assignments

    public findNoteCounts_result() {
    }

    /**
     * Performs a deep copy on other.
     */
    public findNoteCounts_result(findNoteCounts_result other) {
      if (other.isSetSuccess()) {
        this.success = new NoteCollectionCounts(other.success);
      }
      if (other.isSetUserException()) {
        this.userException = new com.evernote.edam.error.EDAMUserException(other.userException);
      }
      if (other.isSetSystemException()) {
        this.systemException = new com.evernote.edam.error.EDAMSystemException(other.systemException);
      }
      if (other.isSetNotFoundException()) {
        this.notFoundException = new com.evernote.edam.error.EDAMNotFoundException(other.notFoundException);
      }
    }

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

    public void clear() {
      this.success = null;
      this.userException = null;
      this.systemException = null;
      this.notFoundException = null;
    }

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

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

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

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

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

      int lastComparison = 0;
      findNoteCounts_result typedOther = (findNoteCounts_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {        lastComparison = TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetUserException()).compareTo(typedOther.isSetUserException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetUserException()) {        lastComparison = TBaseHelper.compareTo(this.userException, typedOther.userException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetSystemException()).compareTo(typedOther.isSetSystemException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSystemException()) {        lastComparison = TBaseHelper.compareTo(this.systemException, typedOther.systemException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetNotFoundException()).compareTo(typedOther.isSetNotFoundException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetNotFoundException()) {        lastComparison = TBaseHelper.compareTo(this.notFoundException, typedOther.notFoundException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public void read(TProtocol iprot) throws TException {
      TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == TType.STRUCT) {
              this.success = new NoteCollectionCounts();
              this.success.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 1: // USER_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.userException = new com.evernote.edam.error.EDAMUserException();
              this.userException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // SYSTEM_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.systemException = new com.evernote.edam.error.EDAMSystemException();
              this.systemException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 3: // NOT_FOUND_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.notFoundException = new com.evernote.edam.error.EDAMNotFoundException();
              this.notFoundException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(TProtocol oprot) throws TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        this.success.write(oprot);
        oprot.writeFieldEnd();
      } else if (this.isSetUserException()) {
        oprot.writeFieldBegin(USER_EXCEPTION_FIELD_DESC);
        this.userException.write(oprot);
        oprot.writeFieldEnd();
      } else if (this.isSetSystemException()) {
        oprot.writeFieldBegin(SYSTEM_EXCEPTION_FIELD_DESC);
        this.systemException.write(oprot);
        oprot.writeFieldEnd();
      } else if (this.isSetNotFoundException()) {
        oprot.writeFieldBegin(NOT_FOUND_EXCEPTION_FIELD_DESC);
        this.notFoundException.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    public void validate() throws TException {
      // check for required fields
    }

  }

  private static class getNote_args implements TBase, java.io.Serializable, Cloneable   {
    private static final TStruct STRUCT_DESC = new TStruct("getNote_args");

    private static final TField AUTHENTICATION_TOKEN_FIELD_DESC = new TField("authenticationToken", TType.STRING, (short)1);
    private static final TField GUID_FIELD_DESC = new TField("guid", TType.STRING, (short)2);
    private static final TField WITH_CONTENT_FIELD_DESC = new TField("withContent", TType.BOOL, (short)3);
    private static final TField WITH_RESOURCES_DATA_FIELD_DESC = new TField("withResourcesData", TType.BOOL, (short)4);
    private static final TField WITH_RESOURCES_RECOGNITION_FIELD_DESC = new TField("withResourcesRecognition", TType.BOOL, (short)5);
    private static final TField WITH_RESOURCES_ALTERNATE_DATA_FIELD_DESC = new TField("withResourcesAlternateData", TType.BOOL, (short)6);

    private String authenticationToken;
    private String guid;
    private boolean withContent;
    private boolean withResourcesData;
    private boolean withResourcesRecognition;
    private boolean withResourcesAlternateData;


    // isset id assignments
    private static final int __WITHCONTENT_ISSET_ID = 0;
    private static final int __WITHRESOURCESDATA_ISSET_ID = 1;
    private static final int __WITHRESOURCESRECOGNITION_ISSET_ID = 2;
    private static final int __WITHRESOURCESALTERNATEDATA_ISSET_ID = 3;
    private boolean[] __isset_vector = new boolean[4];

    public getNote_args() {
    }

    /**
     * Performs a deep copy on other.
     */
    public getNote_args(getNote_args other) {
      System.arraycopy(other.__isset_vector, 0, __isset_vector, 0, other.__isset_vector.length);
      if (other.isSetAuthenticationToken()) {
        this.authenticationToken = other.authenticationToken;
      }
      if (other.isSetGuid()) {
        this.guid = other.guid;
      }
      this.withContent = other.withContent;
      this.withResourcesData = other.withResourcesData;
      this.withResourcesRecognition = other.withResourcesRecognition;
      this.withResourcesAlternateData = other.withResourcesAlternateData;
    }

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

    public void clear() {
      this.authenticationToken = null;
      this.guid = null;
      setWithContentIsSet(false);
      this.withContent = false;
      setWithResourcesDataIsSet(false);
      this.withResourcesData = false;
      setWithResourcesRecognitionIsSet(false);
      this.withResourcesRecognition = false;
      setWithResourcesAlternateDataIsSet(false);
      this.withResourcesAlternateData = false;
    }

    public void setAuthenticationToken(String authenticationToken) {
      this.authenticationToken = authenticationToken;
    }

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

    public void setGuid(String guid) {
      this.guid = guid;
    }

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

    public void setWithContent(boolean withContent) {
      this.withContent = withContent;
      setWithContentIsSet(true);
    }

    /** Returns true if field withContent is set (has been asigned a value) and false otherwise */
    public boolean isSetWithContent() {
      return __isset_vector[__WITHCONTENT_ISSET_ID];
    }

    public void setWithContentIsSet(boolean value) {
      __isset_vector[__WITHCONTENT_ISSET_ID] = value;
    }

    public void setWithResourcesData(boolean withResourcesData) {
      this.withResourcesData = withResourcesData;
      setWithResourcesDataIsSet(true);
    }

    /** Returns true if field withResourcesData is set (has been asigned a value) and false otherwise */
    public boolean isSetWithResourcesData() {
      return __isset_vector[__WITHRESOURCESDATA_ISSET_ID];
    }

    public void setWithResourcesDataIsSet(boolean value) {
      __isset_vector[__WITHRESOURCESDATA_ISSET_ID] = value;
    }

    public void setWithResourcesRecognition(boolean withResourcesRecognition) {
      this.withResourcesRecognition = withResourcesRecognition;
      setWithResourcesRecognitionIsSet(true);
    }

    /** Returns true if field withResourcesRecognition is set (has been asigned a value) and false otherwise */
    public boolean isSetWithResourcesRecognition() {
      return __isset_vector[__WITHRESOURCESRECOGNITION_ISSET_ID];
    }

    public void setWithResourcesRecognitionIsSet(boolean value) {
      __isset_vector[__WITHRESOURCESRECOGNITION_ISSET_ID] = value;
    }

    public void setWithResourcesAlternateData(boolean withResourcesAlternateData) {
      this.withResourcesAlternateData = withResourcesAlternateData;
      setWithResourcesAlternateDataIsSet(true);
    }

    /** Returns true if field withResourcesAlternateData is set (has been asigned a value) and false otherwise */
    public boolean isSetWithResourcesAlternateData() {
      return __isset_vector[__WITHRESOURCESALTERNATEDATA_ISSET_ID];
    }

    public void setWithResourcesAlternateDataIsSet(boolean value) {
      __isset_vector[__WITHRESOURCESALTERNATEDATA_ISSET_ID] = value;
    }

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

      int lastComparison = 0;
      getNote_args typedOther = (getNote_args)other;

      lastComparison = Boolean.valueOf(isSetAuthenticationToken()).compareTo(typedOther.isSetAuthenticationToken());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetAuthenticationToken()) {        lastComparison = TBaseHelper.compareTo(this.authenticationToken, typedOther.authenticationToken);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetGuid()).compareTo(typedOther.isSetGuid());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetGuid()) {        lastComparison = TBaseHelper.compareTo(this.guid, typedOther.guid);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetWithContent()).compareTo(typedOther.isSetWithContent());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetWithContent()) {        lastComparison = TBaseHelper.compareTo(this.withContent, typedOther.withContent);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetWithResourcesData()).compareTo(typedOther.isSetWithResourcesData());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetWithResourcesData()) {        lastComparison = TBaseHelper.compareTo(this.withResourcesData, typedOther.withResourcesData);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetWithResourcesRecognition()).compareTo(typedOther.isSetWithResourcesRecognition());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetWithResourcesRecognition()) {        lastComparison = TBaseHelper.compareTo(this.withResourcesRecognition, typedOther.withResourcesRecognition);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetWithResourcesAlternateData()).compareTo(typedOther.isSetWithResourcesAlternateData());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetWithResourcesAlternateData()) {        lastComparison = TBaseHelper.compareTo(this.withResourcesAlternateData, typedOther.withResourcesAlternateData);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public void read(TProtocol iprot) throws TException {
      TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // AUTHENTICATION_TOKEN
            if (field.type == TType.STRING) {
              this.authenticationToken = iprot.readString();
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // GUID
            if (field.type == TType.STRING) {
              this.guid = iprot.readString();
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 3: // WITH_CONTENT
            if (field.type == TType.BOOL) {
              this.withContent = iprot.readBool();
              setWithContentIsSet(true);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 4: // WITH_RESOURCES_DATA
            if (field.type == TType.BOOL) {
              this.withResourcesData = iprot.readBool();
              setWithResourcesDataIsSet(true);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 5: // WITH_RESOURCES_RECOGNITION
            if (field.type == TType.BOOL) {
              this.withResourcesRecognition = iprot.readBool();
              setWithResourcesRecognitionIsSet(true);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 6: // WITH_RESOURCES_ALTERNATE_DATA
            if (field.type == TType.BOOL) {
              this.withResourcesAlternateData = iprot.readBool();
              setWithResourcesAlternateDataIsSet(true);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(TProtocol oprot) throws TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      if (this.authenticationToken != null) {
        oprot.writeFieldBegin(AUTHENTICATION_TOKEN_FIELD_DESC);
        oprot.writeString(this.authenticationToken);
        oprot.writeFieldEnd();
      }
      if (this.guid != null) {
        oprot.writeFieldBegin(GUID_FIELD_DESC);
        oprot.writeString(this.guid);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldBegin(WITH_CONTENT_FIELD_DESC);
      oprot.writeBool(this.withContent);
      oprot.writeFieldEnd();
      oprot.writeFieldBegin(WITH_RESOURCES_DATA_FIELD_DESC);
      oprot.writeBool(this.withResourcesData);
      oprot.writeFieldEnd();
      oprot.writeFieldBegin(WITH_RESOURCES_RECOGNITION_FIELD_DESC);
      oprot.writeBool(this.withResourcesRecognition);
      oprot.writeFieldEnd();
      oprot.writeFieldBegin(WITH_RESOURCES_ALTERNATE_DATA_FIELD_DESC);
      oprot.writeBool(this.withResourcesAlternateData);
      oprot.writeFieldEnd();
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    public void validate() throws TException {
      // check for required fields
    }

  }

  private static class getNote_result implements TBase, java.io.Serializable, Cloneable   {
    private static final TStruct STRUCT_DESC = new TStruct("getNote_result");

    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
    private static final TField USER_EXCEPTION_FIELD_DESC = new TField("userException", TType.STRUCT, (short)1);
    private static final TField SYSTEM_EXCEPTION_FIELD_DESC = new TField("systemException", TType.STRUCT, (short)2);
    private static final TField NOT_FOUND_EXCEPTION_FIELD_DESC = new TField("notFoundException", TType.STRUCT, (short)3);

    private com.evernote.edam.type.Note success;
    private com.evernote.edam.error.EDAMUserException userException;
    private com.evernote.edam.error.EDAMSystemException systemException;
    private com.evernote.edam.error.EDAMNotFoundException notFoundException;


    // isset id assignments

    public getNote_result() {
    }

    /**
     * Performs a deep copy on other.
     */
    public getNote_result(getNote_result other) {
      if (other.isSetSuccess()) {
        this.success = new com.evernote.edam.type.Note(other.success);
      }
      if (other.isSetUserException()) {
        this.userException = new com.evernote.edam.error.EDAMUserException(other.userException);
      }
      if (other.isSetSystemException()) {
        this.systemException = new com.evernote.edam.error.EDAMSystemException(other.systemException);
      }
      if (other.isSetNotFoundException()) {
        this.notFoundException = new com.evernote.edam.error.EDAMNotFoundException(other.notFoundException);
      }
    }

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

    public void clear() {
      this.success = null;
      this.userException = null;
      this.systemException = null;
      this.notFoundException = null;
    }

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

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

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

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

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

      int lastComparison = 0;
      getNote_result typedOther = (getNote_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {        lastComparison = TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetUserException()).compareTo(typedOther.isSetUserException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetUserException()) {        lastComparison = TBaseHelper.compareTo(this.userException, typedOther.userException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetSystemException()).compareTo(typedOther.isSetSystemException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSystemException()) {        lastComparison = TBaseHelper.compareTo(this.systemException, typedOther.systemException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetNotFoundException()).compareTo(typedOther.isSetNotFoundException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetNotFoundException()) {        lastComparison = TBaseHelper.compareTo(this.notFoundException, typedOther.notFoundException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public void read(TProtocol iprot) throws TException {
      TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == TType.STRUCT) {
              this.success = new com.evernote.edam.type.Note();
              this.success.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 1: // USER_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.userException = new com.evernote.edam.error.EDAMUserException();
              this.userException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // SYSTEM_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.systemException = new com.evernote.edam.error.EDAMSystemException();
              this.systemException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 3: // NOT_FOUND_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.notFoundException = new com.evernote.edam.error.EDAMNotFoundException();
              this.notFoundException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(TProtocol oprot) throws TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        this.success.write(oprot);
        oprot.writeFieldEnd();
      } else if (this.isSetUserException()) {
        oprot.writeFieldBegin(USER_EXCEPTION_FIELD_DESC);
        this.userException.write(oprot);
        oprot.writeFieldEnd();
      } else if (this.isSetSystemException()) {
        oprot.writeFieldBegin(SYSTEM_EXCEPTION_FIELD_DESC);
        this.systemException.write(oprot);
        oprot.writeFieldEnd();
      } else if (this.isSetNotFoundException()) {
        oprot.writeFieldBegin(NOT_FOUND_EXCEPTION_FIELD_DESC);
        this.notFoundException.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    public void validate() throws TException {
      // check for required fields
    }

  }

  private static class getNoteApplicationData_args implements TBase, java.io.Serializable, Cloneable   {
    private static final TStruct STRUCT_DESC = new TStruct("getNoteApplicationData_args");

    private static final TField AUTHENTICATION_TOKEN_FIELD_DESC = new TField("authenticationToken", TType.STRING, (short)1);
    private static final TField GUID_FIELD_DESC = new TField("guid", TType.STRING, (short)2);

    private String authenticationToken;
    private String guid;


    // isset id assignments

    public getNoteApplicationData_args() {
    }

    /**
     * Performs a deep copy on other.
     */
    public getNoteApplicationData_args(getNoteApplicationData_args other) {
      if (other.isSetAuthenticationToken()) {
        this.authenticationToken = other.authenticationToken;
      }
      if (other.isSetGuid()) {
        this.guid = other.guid;
      }
    }

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

    public void clear() {
      this.authenticationToken = null;
      this.guid = null;
    }

    public void setAuthenticationToken(String authenticationToken) {
      this.authenticationToken = authenticationToken;
    }

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

    public void setGuid(String guid) {
      this.guid = guid;
    }

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

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

      int lastComparison = 0;
      getNoteApplicationData_args typedOther = (getNoteApplicationData_args)other;

      lastComparison = Boolean.valueOf(isSetAuthenticationToken()).compareTo(typedOther.isSetAuthenticationToken());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetAuthenticationToken()) {        lastComparison = TBaseHelper.compareTo(this.authenticationToken, typedOther.authenticationToken);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetGuid()).compareTo(typedOther.isSetGuid());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetGuid()) {        lastComparison = TBaseHelper.compareTo(this.guid, typedOther.guid);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public void read(TProtocol iprot) throws TException {
      TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // AUTHENTICATION_TOKEN
            if (field.type == TType.STRING) {
              this.authenticationToken = iprot.readString();
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // GUID
            if (field.type == TType.STRING) {
              this.guid = iprot.readString();
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(TProtocol oprot) throws TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      if (this.authenticationToken != null) {
        oprot.writeFieldBegin(AUTHENTICATION_TOKEN_FIELD_DESC);
        oprot.writeString(this.authenticationToken);
        oprot.writeFieldEnd();
      }
      if (this.guid != null) {
        oprot.writeFieldBegin(GUID_FIELD_DESC);
        oprot.writeString(this.guid);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    public void validate() throws TException {
      // check for required fields
    }

  }

  private static class getNoteApplicationData_result implements TBase, java.io.Serializable, Cloneable   {
    private static final TStruct STRUCT_DESC = new TStruct("getNoteApplicationData_result");

    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
    private static final TField USER_EXCEPTION_FIELD_DESC = new TField("userException", TType.STRUCT, (short)1);
    private static final TField SYSTEM_EXCEPTION_FIELD_DESC = new TField("systemException", TType.STRUCT, (short)2);
    private static final TField NOT_FOUND_EXCEPTION_FIELD_DESC = new TField("notFoundException", TType.STRUCT, (short)3);

    private com.evernote.edam.type.LazyMap success;
    private com.evernote.edam.error.EDAMUserException userException;
    private com.evernote.edam.error.EDAMSystemException systemException;
    private com.evernote.edam.error.EDAMNotFoundException notFoundException;


    // isset id assignments

    public getNoteApplicationData_result() {
    }

    /**
     * Performs a deep copy on other.
     */
    public getNoteApplicationData_result(getNoteApplicationData_result other) {
      if (other.isSetSuccess()) {
        this.success = new com.evernote.edam.type.LazyMap(other.success);
      }
      if (other.isSetUserException()) {
        this.userException = new com.evernote.edam.error.EDAMUserException(other.userException);
      }
      if (other.isSetSystemException()) {
        this.systemException = new com.evernote.edam.error.EDAMSystemException(other.systemException);
      }
      if (other.isSetNotFoundException()) {
        this.notFoundException = new com.evernote.edam.error.EDAMNotFoundException(other.notFoundException);
      }
    }

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

    public void clear() {
      this.success = null;
      this.userException = null;
      this.systemException = null;
      this.notFoundException = null;
    }

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

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

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

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

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

      int lastComparison = 0;
      getNoteApplicationData_result typedOther = (getNoteApplicationData_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {        lastComparison = TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetUserException()).compareTo(typedOther.isSetUserException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetUserException()) {        lastComparison = TBaseHelper.compareTo(this.userException, typedOther.userException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetSystemException()).compareTo(typedOther.isSetSystemException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSystemException()) {        lastComparison = TBaseHelper.compareTo(this.systemException, typedOther.systemException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetNotFoundException()).compareTo(typedOther.isSetNotFoundException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetNotFoundException()) {        lastComparison = TBaseHelper.compareTo(this.notFoundException, typedOther.notFoundException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public void read(TProtocol iprot) throws TException {
      TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == TType.STRUCT) {
              this.success = new com.evernote.edam.type.LazyMap();
              this.success.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 1: // USER_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.userException = new com.evernote.edam.error.EDAMUserException();
              this.userException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // SYSTEM_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.systemException = new com.evernote.edam.error.EDAMSystemException();
              this.systemException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 3: // NOT_FOUND_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.notFoundException = new com.evernote.edam.error.EDAMNotFoundException();
              this.notFoundException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(TProtocol oprot) throws TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        this.success.write(oprot);
        oprot.writeFieldEnd();
      } else if (this.isSetUserException()) {
        oprot.writeFieldBegin(USER_EXCEPTION_FIELD_DESC);
        this.userException.write(oprot);
        oprot.writeFieldEnd();
      } else if (this.isSetSystemException()) {
        oprot.writeFieldBegin(SYSTEM_EXCEPTION_FIELD_DESC);
        this.systemException.write(oprot);
        oprot.writeFieldEnd();
      } else if (this.isSetNotFoundException()) {
        oprot.writeFieldBegin(NOT_FOUND_EXCEPTION_FIELD_DESC);
        this.notFoundException.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    public void validate() throws TException {
      // check for required fields
    }

  }

  private static class getNoteApplicationDataEntry_args implements TBase, java.io.Serializable, Cloneable   {
    private static final TStruct STRUCT_DESC = new TStruct("getNoteApplicationDataEntry_args");

    private static final TField AUTHENTICATION_TOKEN_FIELD_DESC = new TField("authenticationToken", TType.STRING, (short)1);
    private static final TField GUID_FIELD_DESC = new TField("guid", TType.STRING, (short)2);
    private static final TField KEY_FIELD_DESC = new TField("key", TType.STRING, (short)3);

    private String authenticationToken;
    private String guid;
    private String key;


    // isset id assignments

    public getNoteApplicationDataEntry_args() {
    }

    /**
     * Performs a deep copy on other.
     */
    public getNoteApplicationDataEntry_args(getNoteApplicationDataEntry_args other) {
      if (other.isSetAuthenticationToken()) {
        this.authenticationToken = other.authenticationToken;
      }
      if (other.isSetGuid()) {
        this.guid = other.guid;
      }
      if (other.isSetKey()) {
        this.key = other.key;
      }
    }

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

    public void clear() {
      this.authenticationToken = null;
      this.guid = null;
      this.key = null;
    }

    public void setAuthenticationToken(String authenticationToken) {
      this.authenticationToken = authenticationToken;
    }

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

    public void setGuid(String guid) {
      this.guid = guid;
    }

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

    public void setKey(String key) {
      this.key = key;
    }

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

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

      int lastComparison = 0;
      getNoteApplicationDataEntry_args typedOther = (getNoteApplicationDataEntry_args)other;

      lastComparison = Boolean.valueOf(isSetAuthenticationToken()).compareTo(typedOther.isSetAuthenticationToken());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetAuthenticationToken()) {        lastComparison = TBaseHelper.compareTo(this.authenticationToken, typedOther.authenticationToken);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetGuid()).compareTo(typedOther.isSetGuid());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetGuid()) {        lastComparison = TBaseHelper.compareTo(this.guid, typedOther.guid);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetKey()).compareTo(typedOther.isSetKey());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetKey()) {        lastComparison = TBaseHelper.compareTo(this.key, typedOther.key);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public void read(TProtocol iprot) throws TException {
      TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // AUTHENTICATION_TOKEN
            if (field.type == TType.STRING) {
              this.authenticationToken = iprot.readString();
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // GUID
            if (field.type == TType.STRING) {
              this.guid = iprot.readString();
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 3: // KEY
            if (field.type == TType.STRING) {
              this.key = iprot.readString();
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(TProtocol oprot) throws TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      if (this.authenticationToken != null) {
        oprot.writeFieldBegin(AUTHENTICATION_TOKEN_FIELD_DESC);
        oprot.writeString(this.authenticationToken);
        oprot.writeFieldEnd();
      }
      if (this.guid != null) {
        oprot.writeFieldBegin(GUID_FIELD_DESC);
        oprot.writeString(this.guid);
        oprot.writeFieldEnd();
      }
      if (this.key != null) {
        oprot.writeFieldBegin(KEY_FIELD_DESC);
        oprot.writeString(this.key);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    public void validate() throws TException {
      // check for required fields
    }

  }

  private static class getNoteApplicationDataEntry_result implements TBase, java.io.Serializable, Cloneable   {
    private static final TStruct STRUCT_DESC = new TStruct("getNoteApplicationDataEntry_result");

    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRING, (short)0);
    private static final TField USER_EXCEPTION_FIELD_DESC = new TField("userException", TType.STRUCT, (short)1);
    private static final TField SYSTEM_EXCEPTION_FIELD_DESC = new TField("systemException", TType.STRUCT, (short)2);
    private static final TField NOT_FOUND_EXCEPTION_FIELD_DESC = new TField("notFoundException", TType.STRUCT, (short)3);

    private String success;
    private com.evernote.edam.error.EDAMUserException userException;
    private com.evernote.edam.error.EDAMSystemException systemException;
    private com.evernote.edam.error.EDAMNotFoundException notFoundException;


    // isset id assignments

    public getNoteApplicationDataEntry_result() {
    }

    /**
     * Performs a deep copy on other.
     */
    public getNoteApplicationDataEntry_result(getNoteApplicationDataEntry_result other) {
      if (other.isSetSuccess()) {
        this.success = other.success;
      }
      if (other.isSetUserException()) {
        this.userException = new com.evernote.edam.error.EDAMUserException(other.userException);
      }
      if (other.isSetSystemException()) {
        this.systemException = new com.evernote.edam.error.EDAMSystemException(other.systemException);
      }
      if (other.isSetNotFoundException()) {
        this.notFoundException = new com.evernote.edam.error.EDAMNotFoundException(other.notFoundException);
      }
    }

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

    public void clear() {
      this.success = null;
      this.userException = null;
      this.systemException = null;
      this.notFoundException = null;
    }

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

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

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

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

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

      int lastComparison = 0;
      getNoteApplicationDataEntry_result typedOther = (getNoteApplicationDataEntry_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {        lastComparison = TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetUserException()).compareTo(typedOther.isSetUserException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetUserException()) {        lastComparison = TBaseHelper.compareTo(this.userException, typedOther.userException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetSystemException()).compareTo(typedOther.isSetSystemException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSystemException()) {        lastComparison = TBaseHelper.compareTo(this.systemException, typedOther.systemException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetNotFoundException()).compareTo(typedOther.isSetNotFoundException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetNotFoundException()) {        lastComparison = TBaseHelper.compareTo(this.notFoundException, typedOther.notFoundException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public void read(TProtocol iprot) throws TException {
      TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == TType.STRING) {
              this.success = iprot.readString();
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 1: // USER_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.userException = new com.evernote.edam.error.EDAMUserException();
              this.userException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // SYSTEM_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.systemException = new com.evernote.edam.error.EDAMSystemException();
              this.systemException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 3: // NOT_FOUND_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.notFoundException = new com.evernote.edam.error.EDAMNotFoundException();
              this.notFoundException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(TProtocol oprot) throws TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        oprot.writeString(this.success);
        oprot.writeFieldEnd();
      } else if (this.isSetUserException()) {
        oprot.writeFieldBegin(USER_EXCEPTION_FIELD_DESC);
        this.userException.write(oprot);
        oprot.writeFieldEnd();
      } else if (this.isSetSystemException()) {
        oprot.writeFieldBegin(SYSTEM_EXCEPTION_FIELD_DESC);
        this.systemException.write(oprot);
        oprot.writeFieldEnd();
      } else if (this.isSetNotFoundException()) {
        oprot.writeFieldBegin(NOT_FOUND_EXCEPTION_FIELD_DESC);
        this.notFoundException.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    public void validate() throws TException {
      // check for required fields
    }

  }

  private static class setNoteApplicationDataEntry_args implements TBase, java.io.Serializable, Cloneable   {
    private static final TStruct STRUCT_DESC = new TStruct("setNoteApplicationDataEntry_args");

    private static final TField AUTHENTICATION_TOKEN_FIELD_DESC = new TField("authenticationToken", TType.STRING, (short)1);
    private static final TField GUID_FIELD_DESC = new TField("guid", TType.STRING, (short)2);
    private static final TField KEY_FIELD_DESC = new TField("key", TType.STRING, (short)3);
    private static final TField VALUE_FIELD_DESC = new TField("value", TType.STRING, (short)4);

    private String authenticationToken;
    private String guid;
    private String key;
    private String value;


    // isset id assignments

    public setNoteApplicationDataEntry_args() {
    }

    /**
     * Performs a deep copy on other.
     */
    public setNoteApplicationDataEntry_args(setNoteApplicationDataEntry_args other) {
      if (other.isSetAuthenticationToken()) {
        this.authenticationToken = other.authenticationToken;
      }
      if (other.isSetGuid()) {
        this.guid = other.guid;
      }
      if (other.isSetKey()) {
        this.key = other.key;
      }
      if (other.isSetValue()) {
        this.value = other.value;
      }
    }

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

    public void clear() {
      this.authenticationToken = null;
      this.guid = null;
      this.key = null;
      this.value = null;
    }

    public void setAuthenticationToken(String authenticationToken) {
      this.authenticationToken = authenticationToken;
    }

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

    public void setGuid(String guid) {
      this.guid = guid;
    }

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

    public void setKey(String key) {
      this.key = key;
    }

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

    public void setValue(String value) {
      this.value = value;
    }

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

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

      int lastComparison = 0;
      setNoteApplicationDataEntry_args typedOther = (setNoteApplicationDataEntry_args)other;

      lastComparison = Boolean.valueOf(isSetAuthenticationToken()).compareTo(typedOther.isSetAuthenticationToken());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetAuthenticationToken()) {        lastComparison = TBaseHelper.compareTo(this.authenticationToken, typedOther.authenticationToken);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetGuid()).compareTo(typedOther.isSetGuid());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetGuid()) {        lastComparison = TBaseHelper.compareTo(this.guid, typedOther.guid);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetKey()).compareTo(typedOther.isSetKey());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetKey()) {        lastComparison = TBaseHelper.compareTo(this.key, typedOther.key);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetValue()).compareTo(typedOther.isSetValue());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetValue()) {        lastComparison = TBaseHelper.compareTo(this.value, typedOther.value);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public void read(TProtocol iprot) throws TException {
      TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // AUTHENTICATION_TOKEN
            if (field.type == TType.STRING) {
              this.authenticationToken = iprot.readString();
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // GUID
            if (field.type == TType.STRING) {
              this.guid = iprot.readString();
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 3: // KEY
            if (field.type == TType.STRING) {
              this.key = iprot.readString();
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 4: // VALUE
            if (field.type == TType.STRING) {
              this.value = iprot.readString();
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(TProtocol oprot) throws TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      if (this.authenticationToken != null) {
        oprot.writeFieldBegin(AUTHENTICATION_TOKEN_FIELD_DESC);
        oprot.writeString(this.authenticationToken);
        oprot.writeFieldEnd();
      }
      if (this.guid != null) {
        oprot.writeFieldBegin(GUID_FIELD_DESC);
        oprot.writeString(this.guid);
        oprot.writeFieldEnd();
      }
      if (this.key != null) {
        oprot.writeFieldBegin(KEY_FIELD_DESC);
        oprot.writeString(this.key);
        oprot.writeFieldEnd();
      }
      if (this.value != null) {
        oprot.writeFieldBegin(VALUE_FIELD_DESC);
        oprot.writeString(this.value);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    public void validate() throws TException {
      // check for required fields
    }

  }

  private static class setNoteApplicationDataEntry_result implements TBase, java.io.Serializable, Cloneable   {
    private static final TStruct STRUCT_DESC = new TStruct("setNoteApplicationDataEntry_result");

    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.I32, (short)0);
    private static final TField USER_EXCEPTION_FIELD_DESC = new TField("userException", TType.STRUCT, (short)1);
    private static final TField SYSTEM_EXCEPTION_FIELD_DESC = new TField("systemException", TType.STRUCT, (short)2);
    private static final TField NOT_FOUND_EXCEPTION_FIELD_DESC = new TField("notFoundException", TType.STRUCT, (short)3);

    private int success;
    private com.evernote.edam.error.EDAMUserException userException;
    private com.evernote.edam.error.EDAMSystemException systemException;
    private com.evernote.edam.error.EDAMNotFoundException notFoundException;


    // isset id assignments
    private static final int __SUCCESS_ISSET_ID = 0;
    private boolean[] __isset_vector = new boolean[1];

    public setNoteApplicationDataEntry_result() {
    }

    /**
     * Performs a deep copy on other.
     */
    public setNoteApplicationDataEntry_result(setNoteApplicationDataEntry_result other) {
      System.arraycopy(other.__isset_vector, 0, __isset_vector, 0, other.__isset_vector.length);
      this.success = other.success;
      if (other.isSetUserException()) {
        this.userException = new com.evernote.edam.error.EDAMUserException(other.userException);
      }
      if (other.isSetSystemException()) {
        this.systemException = new com.evernote.edam.error.EDAMSystemException(other.systemException);
      }
      if (other.isSetNotFoundException()) {
        this.notFoundException = new com.evernote.edam.error.EDAMNotFoundException(other.notFoundException);
      }
    }

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

    public void clear() {
      setSuccessIsSet(false);
      this.success = 0;
      this.userException = null;
      this.systemException = null;
      this.notFoundException = null;
    }

    /** Returns true if field success is set (has been asigned a value) and false otherwise */
    public boolean isSetSuccess() {
      return __isset_vector[__SUCCESS_ISSET_ID];
    }

    public void setSuccessIsSet(boolean value) {
      __isset_vector[__SUCCESS_ISSET_ID] = value;
    }

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

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

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

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

      int lastComparison = 0;
      setNoteApplicationDataEntry_result typedOther = (setNoteApplicationDataEntry_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {        lastComparison = TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetUserException()).compareTo(typedOther.isSetUserException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetUserException()) {        lastComparison = TBaseHelper.compareTo(this.userException, typedOther.userException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetSystemException()).compareTo(typedOther.isSetSystemException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSystemException()) {        lastComparison = TBaseHelper.compareTo(this.systemException, typedOther.systemException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetNotFoundException()).compareTo(typedOther.isSetNotFoundException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetNotFoundException()) {        lastComparison = TBaseHelper.compareTo(this.notFoundException, typedOther.notFoundException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public void read(TProtocol iprot) throws TException {
      TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == TType.I32) {
              this.success = iprot.readI32();
              setSuccessIsSet(true);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 1: // USER_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.userException = new com.evernote.edam.error.EDAMUserException();
              this.userException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // SYSTEM_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.systemException = new com.evernote.edam.error.EDAMSystemException();
              this.systemException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 3: // NOT_FOUND_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.notFoundException = new com.evernote.edam.error.EDAMNotFoundException();
              this.notFoundException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(TProtocol oprot) throws TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        oprot.writeI32(this.success);
        oprot.writeFieldEnd();
      } else if (this.isSetUserException()) {
        oprot.writeFieldBegin(USER_EXCEPTION_FIELD_DESC);
        this.userException.write(oprot);
        oprot.writeFieldEnd();
      } else if (this.isSetSystemException()) {
        oprot.writeFieldBegin(SYSTEM_EXCEPTION_FIELD_DESC);
        this.systemException.write(oprot);
        oprot.writeFieldEnd();
      } else if (this.isSetNotFoundException()) {
        oprot.writeFieldBegin(NOT_FOUND_EXCEPTION_FIELD_DESC);
        this.notFoundException.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    public void validate() throws TException {
      // check for required fields
    }

  }

  private static class unsetNoteApplicationDataEntry_args implements TBase, java.io.Serializable, Cloneable   {
    private static final TStruct STRUCT_DESC = new TStruct("unsetNoteApplicationDataEntry_args");

    private static final TField AUTHENTICATION_TOKEN_FIELD_DESC = new TField("authenticationToken", TType.STRING, (short)1);
    private static final TField GUID_FIELD_DESC = new TField("guid", TType.STRING, (short)2);
    private static final TField KEY_FIELD_DESC = new TField("key", TType.STRING, (short)3);

    private String authenticationToken;
    private String guid;
    private String key;


    // isset id assignments

    public unsetNoteApplicationDataEntry_args() {
    }

    /**
     * Performs a deep copy on other.
     */
    public unsetNoteApplicationDataEntry_args(unsetNoteApplicationDataEntry_args other) {
      if (other.isSetAuthenticationToken()) {
        this.authenticationToken = other.authenticationToken;
      }
      if (other.isSetGuid()) {
        this.guid = other.guid;
      }
      if (other.isSetKey()) {
        this.key = other.key;
      }
    }

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

    public void clear() {
      this.authenticationToken = null;
      this.guid = null;
      this.key = null;
    }

    public void setAuthenticationToken(String authenticationToken) {
      this.authenticationToken = authenticationToken;
    }

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

    public void setGuid(String guid) {
      this.guid = guid;
    }

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

    public void setKey(String key) {
      this.key = key;
    }

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

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

      int lastComparison = 0;
      unsetNoteApplicationDataEntry_args typedOther = (unsetNoteApplicationDataEntry_args)other;

      lastComparison = Boolean.valueOf(isSetAuthenticationToken()).compareTo(typedOther.isSetAuthenticationToken());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetAuthenticationToken()) {        lastComparison = TBaseHelper.compareTo(this.authenticationToken, typedOther.authenticationToken);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetGuid()).compareTo(typedOther.isSetGuid());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetGuid()) {        lastComparison = TBaseHelper.compareTo(this.guid, typedOther.guid);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetKey()).compareTo(typedOther.isSetKey());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetKey()) {        lastComparison = TBaseHelper.compareTo(this.key, typedOther.key);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public void read(TProtocol iprot) throws TException {
      TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // AUTHENTICATION_TOKEN
            if (field.type == TType.STRING) {
              this.authenticationToken = iprot.readString();
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // GUID
            if (field.type == TType.STRING) {
              this.guid = iprot.readString();
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 3: // KEY
            if (field.type == TType.STRING) {
              this.key = iprot.readString();
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(TProtocol oprot) throws TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      if (this.authenticationToken != null) {
        oprot.writeFieldBegin(AUTHENTICATION_TOKEN_FIELD_DESC);
        oprot.writeString(this.authenticationToken);
        oprot.writeFieldEnd();
      }
      if (this.guid != null) {
        oprot.writeFieldBegin(GUID_FIELD_DESC);
        oprot.writeString(this.guid);
        oprot.writeFieldEnd();
      }
      if (this.key != null) {
        oprot.writeFieldBegin(KEY_FIELD_DESC);
        oprot.writeString(this.key);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    public void validate() throws TException {
      // check for required fields
    }

  }

  private static class unsetNoteApplicationDataEntry_result implements TBase, java.io.Serializable, Cloneable   {
    private static final TStruct STRUCT_DESC = new TStruct("unsetNoteApplicationDataEntry_result");

    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.I32, (short)0);
    private static final TField USER_EXCEPTION_FIELD_DESC = new TField("userException", TType.STRUCT, (short)1);
    private static final TField SYSTEM_EXCEPTION_FIELD_DESC = new TField("systemException", TType.STRUCT, (short)2);
    private static final TField NOT_FOUND_EXCEPTION_FIELD_DESC = new TField("notFoundException", TType.STRUCT, (short)3);

    private int success;
    private com.evernote.edam.error.EDAMUserException userException;
    private com.evernote.edam.error.EDAMSystemException systemException;
    private com.evernote.edam.error.EDAMNotFoundException notFoundException;


    // isset id assignments
    private static final int __SUCCESS_ISSET_ID = 0;
    private boolean[] __isset_vector = new boolean[1];

    public unsetNoteApplicationDataEntry_result() {
    }

    /**
     * Performs a deep copy on other.
     */
    public unsetNoteApplicationDataEntry_result(unsetNoteApplicationDataEntry_result other) {
      System.arraycopy(other.__isset_vector, 0, __isset_vector, 0, other.__isset_vector.length);
      this.success = other.success;
      if (other.isSetUserException()) {
        this.userException = new com.evernote.edam.error.EDAMUserException(other.userException);
      }
      if (other.isSetSystemException()) {
        this.systemException = new com.evernote.edam.error.EDAMSystemException(other.systemException);
      }
      if (other.isSetNotFoundException()) {
        this.notFoundException = new com.evernote.edam.error.EDAMNotFoundException(other.notFoundException);
      }
    }

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

    public void clear() {
      setSuccessIsSet(false);
      this.success = 0;
      this.userException = null;
      this.systemException = null;
      this.notFoundException = null;
    }

    /** Returns true if field success is set (has been asigned a value) and false otherwise */
    public boolean isSetSuccess() {
      return __isset_vector[__SUCCESS_ISSET_ID];
    }

    public void setSuccessIsSet(boolean value) {
      __isset_vector[__SUCCESS_ISSET_ID] = value;
    }

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

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

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

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

      int lastComparison = 0;
      unsetNoteApplicationDataEntry_result typedOther = (unsetNoteApplicationDataEntry_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {        lastComparison = TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetUserException()).compareTo(typedOther.isSetUserException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetUserException()) {        lastComparison = TBaseHelper.compareTo(this.userException, typedOther.userException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetSystemException()).compareTo(typedOther.isSetSystemException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSystemException()) {        lastComparison = TBaseHelper.compareTo(this.systemException, typedOther.systemException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetNotFoundException()).compareTo(typedOther.isSetNotFoundException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetNotFoundException()) {        lastComparison = TBaseHelper.compareTo(this.notFoundException, typedOther.notFoundException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public void read(TProtocol iprot) throws TException {
      TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == TType.I32) {
              this.success = iprot.readI32();
              setSuccessIsSet(true);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 1: // USER_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.userException = new com.evernote.edam.error.EDAMUserException();
              this.userException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // SYSTEM_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.systemException = new com.evernote.edam.error.EDAMSystemException();
              this.systemException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 3: // NOT_FOUND_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.notFoundException = new com.evernote.edam.error.EDAMNotFoundException();
              this.notFoundException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(TProtocol oprot) throws TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        oprot.writeI32(this.success);
        oprot.writeFieldEnd();
      } else if (this.isSetUserException()) {
        oprot.writeFieldBegin(USER_EXCEPTION_FIELD_DESC);
        this.userException.write(oprot);
        oprot.writeFieldEnd();
      } else if (this.isSetSystemException()) {
        oprot.writeFieldBegin(SYSTEM_EXCEPTION_FIELD_DESC);
        this.systemException.write(oprot);
        oprot.writeFieldEnd();
      } else if (this.isSetNotFoundException()) {
        oprot.writeFieldBegin(NOT_FOUND_EXCEPTION_FIELD_DESC);
        this.notFoundException.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    public void validate() throws TException {
      // check for required fields
    }

  }

  private static class getNoteContent_args implements TBase, java.io.Serializable, Cloneable   {
    private static final TStruct STRUCT_DESC = new TStruct("getNoteContent_args");

    private static final TField AUTHENTICATION_TOKEN_FIELD_DESC = new TField("authenticationToken", TType.STRING, (short)1);
    private static final TField GUID_FIELD_DESC = new TField("guid", TType.STRING, (short)2);

    private String authenticationToken;
    private String guid;


    // isset id assignments

    public getNoteContent_args() {
    }

    /**
     * Performs a deep copy on other.
     */
    public getNoteContent_args(getNoteContent_args other) {
      if (other.isSetAuthenticationToken()) {
        this.authenticationToken = other.authenticationToken;
      }
      if (other.isSetGuid()) {
        this.guid = other.guid;
      }
    }

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

    public void clear() {
      this.authenticationToken = null;
      this.guid = null;
    }

    public void setAuthenticationToken(String authenticationToken) {
      this.authenticationToken = authenticationToken;
    }

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

    public void setGuid(String guid) {
      this.guid = guid;
    }

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

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

      int lastComparison = 0;
      getNoteContent_args typedOther = (getNoteContent_args)other;

      lastComparison = Boolean.valueOf(isSetAuthenticationToken()).compareTo(typedOther.isSetAuthenticationToken());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetAuthenticationToken()) {        lastComparison = TBaseHelper.compareTo(this.authenticationToken, typedOther.authenticationToken);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetGuid()).compareTo(typedOther.isSetGuid());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetGuid()) {        lastComparison = TBaseHelper.compareTo(this.guid, typedOther.guid);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public void read(TProtocol iprot) throws TException {
      TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // AUTHENTICATION_TOKEN
            if (field.type == TType.STRING) {
              this.authenticationToken = iprot.readString();
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // GUID
            if (field.type == TType.STRING) {
              this.guid = iprot.readString();
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(TProtocol oprot) throws TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      if (this.authenticationToken != null) {
        oprot.writeFieldBegin(AUTHENTICATION_TOKEN_FIELD_DESC);
        oprot.writeString(this.authenticationToken);
        oprot.writeFieldEnd();
      }
      if (this.guid != null) {
        oprot.writeFieldBegin(GUID_FIELD_DESC);
        oprot.writeString(this.guid);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    public void validate() throws TException {
      // check for required fields
    }

  }

  private static class getNoteContent_result implements TBase, java.io.Serializable, Cloneable   {
    private static final TStruct STRUCT_DESC = new TStruct("getNoteContent_result");

    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRING, (short)0);
    private static final TField USER_EXCEPTION_FIELD_DESC = new TField("userException", TType.STRUCT, (short)1);
    private static final TField SYSTEM_EXCEPTION_FIELD_DESC = new TField("systemException", TType.STRUCT, (short)2);
    private static final TField NOT_FOUND_EXCEPTION_FIELD_DESC = new TField("notFoundException", TType.STRUCT, (short)3);

    private String success;
    private com.evernote.edam.error.EDAMUserException userException;
    private com.evernote.edam.error.EDAMSystemException systemException;
    private com.evernote.edam.error.EDAMNotFoundException notFoundException;


    // isset id assignments

    public getNoteContent_result() {
    }

    /**
     * Performs a deep copy on other.
     */
    public getNoteContent_result(getNoteContent_result other) {
      if (other.isSetSuccess()) {
        this.success = other.success;
      }
      if (other.isSetUserException()) {
        this.userException = new com.evernote.edam.error.EDAMUserException(other.userException);
      }
      if (other.isSetSystemException()) {
        this.systemException = new com.evernote.edam.error.EDAMSystemException(other.systemException);
      }
      if (other.isSetNotFoundException()) {
        this.notFoundException = new com.evernote.edam.error.EDAMNotFoundException(other.notFoundException);
      }
    }

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

    public void clear() {
      this.success = null;
      this.userException = null;
      this.systemException = null;
      this.notFoundException = null;
    }

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

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

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

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

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

      int lastComparison = 0;
      getNoteContent_result typedOther = (getNoteContent_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {        lastComparison = TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetUserException()).compareTo(typedOther.isSetUserException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetUserException()) {        lastComparison = TBaseHelper.compareTo(this.userException, typedOther.userException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetSystemException()).compareTo(typedOther.isSetSystemException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSystemException()) {        lastComparison = TBaseHelper.compareTo(this.systemException, typedOther.systemException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetNotFoundException()).compareTo(typedOther.isSetNotFoundException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetNotFoundException()) {        lastComparison = TBaseHelper.compareTo(this.notFoundException, typedOther.notFoundException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public void read(TProtocol iprot) throws TException {
      TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == TType.STRING) {
              this.success = iprot.readString();
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 1: // USER_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.userException = new com.evernote.edam.error.EDAMUserException();
              this.userException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // SYSTEM_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.systemException = new com.evernote.edam.error.EDAMSystemException();
              this.systemException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 3: // NOT_FOUND_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.notFoundException = new com.evernote.edam.error.EDAMNotFoundException();
              this.notFoundException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(TProtocol oprot) throws TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        oprot.writeString(this.success);
        oprot.writeFieldEnd();
      } else if (this.isSetUserException()) {
        oprot.writeFieldBegin(USER_EXCEPTION_FIELD_DESC);
        this.userException.write(oprot);
        oprot.writeFieldEnd();
      } else if (this.isSetSystemException()) {
        oprot.writeFieldBegin(SYSTEM_EXCEPTION_FIELD_DESC);
        this.systemException.write(oprot);
        oprot.writeFieldEnd();
      } else if (this.isSetNotFoundException()) {
        oprot.writeFieldBegin(NOT_FOUND_EXCEPTION_FIELD_DESC);
        this.notFoundException.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    public void validate() throws TException {
      // check for required fields
    }

  }

  private static class getNoteSearchText_args implements TBase, java.io.Serializable, Cloneable   {
    private static final TStruct STRUCT_DESC = new TStruct("getNoteSearchText_args");

    private static final TField AUTHENTICATION_TOKEN_FIELD_DESC = new TField("authenticationToken", TType.STRING, (short)1);
    private static final TField GUID_FIELD_DESC = new TField("guid", TType.STRING, (short)2);
    private static final TField NOTE_ONLY_FIELD_DESC = new TField("noteOnly", TType.BOOL, (short)3);
    private static final TField TOKENIZE_FOR_INDEXING_FIELD_DESC = new TField("tokenizeForIndexing", TType.BOOL, (short)4);

    private String authenticationToken;
    private String guid;
    private boolean noteOnly;
    private boolean tokenizeForIndexing;


    // isset id assignments
    private static final int __NOTEONLY_ISSET_ID = 0;
    private static final int __TOKENIZEFORINDEXING_ISSET_ID = 1;
    private boolean[] __isset_vector = new boolean[2];

    public getNoteSearchText_args() {
    }

    /**
     * Performs a deep copy on other.
     */
    public getNoteSearchText_args(getNoteSearchText_args other) {
      System.arraycopy(other.__isset_vector, 0, __isset_vector, 0, other.__isset_vector.length);
      if (other.isSetAuthenticationToken()) {
        this.authenticationToken = other.authenticationToken;
      }
      if (other.isSetGuid()) {
        this.guid = other.guid;
      }
      this.noteOnly = other.noteOnly;
      this.tokenizeForIndexing = other.tokenizeForIndexing;
    }

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

    public void clear() {
      this.authenticationToken = null;
      this.guid = null;
      setNoteOnlyIsSet(false);
      this.noteOnly = false;
      setTokenizeForIndexingIsSet(false);
      this.tokenizeForIndexing = false;
    }

    public void setAuthenticationToken(String authenticationToken) {
      this.authenticationToken = authenticationToken;
    }

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

    public void setGuid(String guid) {
      this.guid = guid;
    }

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

    public void setNoteOnly(boolean noteOnly) {
      this.noteOnly = noteOnly;
      setNoteOnlyIsSet(true);
    }

    /** Returns true if field noteOnly is set (has been asigned a value) and false otherwise */
    public boolean isSetNoteOnly() {
      return __isset_vector[__NOTEONLY_ISSET_ID];
    }

    public void setNoteOnlyIsSet(boolean value) {
      __isset_vector[__NOTEONLY_ISSET_ID] = value;
    }

    public void setTokenizeForIndexing(boolean tokenizeForIndexing) {
      this.tokenizeForIndexing = tokenizeForIndexing;
      setTokenizeForIndexingIsSet(true);
    }

    /** Returns true if field tokenizeForIndexing is set (has been asigned a value) and false otherwise */
    public boolean isSetTokenizeForIndexing() {
      return __isset_vector[__TOKENIZEFORINDEXING_ISSET_ID];
    }

    public void setTokenizeForIndexingIsSet(boolean value) {
      __isset_vector[__TOKENIZEFORINDEXING_ISSET_ID] = value;
    }

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

      int lastComparison = 0;
      getNoteSearchText_args typedOther = (getNoteSearchText_args)other;

      lastComparison = Boolean.valueOf(isSetAuthenticationToken()).compareTo(typedOther.isSetAuthenticationToken());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetAuthenticationToken()) {        lastComparison = TBaseHelper.compareTo(this.authenticationToken, typedOther.authenticationToken);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetGuid()).compareTo(typedOther.isSetGuid());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetGuid()) {        lastComparison = TBaseHelper.compareTo(this.guid, typedOther.guid);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetNoteOnly()).compareTo(typedOther.isSetNoteOnly());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetNoteOnly()) {        lastComparison = TBaseHelper.compareTo(this.noteOnly, typedOther.noteOnly);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetTokenizeForIndexing()).compareTo(typedOther.isSetTokenizeForIndexing());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetTokenizeForIndexing()) {        lastComparison = TBaseHelper.compareTo(this.tokenizeForIndexing, typedOther.tokenizeForIndexing);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public void read(TProtocol iprot) throws TException {
      TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // AUTHENTICATION_TOKEN
            if (field.type == TType.STRING) {
              this.authenticationToken = iprot.readString();
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // GUID
            if (field.type == TType.STRING) {
              this.guid = iprot.readString();
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 3: // NOTE_ONLY
            if (field.type == TType.BOOL) {
              this.noteOnly = iprot.readBool();
              setNoteOnlyIsSet(true);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 4: // TOKENIZE_FOR_INDEXING
            if (field.type == TType.BOOL) {
              this.tokenizeForIndexing = iprot.readBool();
              setTokenizeForIndexingIsSet(true);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(TProtocol oprot) throws TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      if (this.authenticationToken != null) {
        oprot.writeFieldBegin(AUTHENTICATION_TOKEN_FIELD_DESC);
        oprot.writeString(this.authenticationToken);
        oprot.writeFieldEnd();
      }
      if (this.guid != null) {
        oprot.writeFieldBegin(GUID_FIELD_DESC);
        oprot.writeString(this.guid);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldBegin(NOTE_ONLY_FIELD_DESC);
      oprot.writeBool(this.noteOnly);
      oprot.writeFieldEnd();
      oprot.writeFieldBegin(TOKENIZE_FOR_INDEXING_FIELD_DESC);
      oprot.writeBool(this.tokenizeForIndexing);
      oprot.writeFieldEnd();
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    public void validate() throws TException {
      // check for required fields
    }

  }

  private static class getNoteSearchText_result implements TBase, java.io.Serializable, Cloneable   {
    private static final TStruct STRUCT_DESC = new TStruct("getNoteSearchText_result");

    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRING, (short)0);
    private static final TField USER_EXCEPTION_FIELD_DESC = new TField("userException", TType.STRUCT, (short)1);
    private static final TField SYSTEM_EXCEPTION_FIELD_DESC = new TField("systemException", TType.STRUCT, (short)2);
    private static final TField NOT_FOUND_EXCEPTION_FIELD_DESC = new TField("notFoundException", TType.STRUCT, (short)3);

    private String success;
    private com.evernote.edam.error.EDAMUserException userException;
    private com.evernote.edam.error.EDAMSystemException systemException;
    private com.evernote.edam.error.EDAMNotFoundException notFoundException;


    // isset id assignments

    public getNoteSearchText_result() {
    }

    /**
     * Performs a deep copy on other.
     */
    public getNoteSearchText_result(getNoteSearchText_result other) {
      if (other.isSetSuccess()) {
        this.success = other.success;
      }
      if (other.isSetUserException()) {
        this.userException = new com.evernote.edam.error.EDAMUserException(other.userException);
      }
      if (other.isSetSystemException()) {
        this.systemException = new com.evernote.edam.error.EDAMSystemException(other.systemException);
      }
      if (other.isSetNotFoundException()) {
        this.notFoundException = new com.evernote.edam.error.EDAMNotFoundException(other.notFoundException);
      }
    }

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

    public void clear() {
      this.success = null;
      this.userException = null;
      this.systemException = null;
      this.notFoundException = null;
    }

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

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

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

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

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

      int lastComparison = 0;
      getNoteSearchText_result typedOther = (getNoteSearchText_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {        lastComparison = TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetUserException()).compareTo(typedOther.isSetUserException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetUserException()) {        lastComparison = TBaseHelper.compareTo(this.userException, typedOther.userException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetSystemException()).compareTo(typedOther.isSetSystemException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSystemException()) {        lastComparison = TBaseHelper.compareTo(this.systemException, typedOther.systemException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetNotFoundException()).compareTo(typedOther.isSetNotFoundException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetNotFoundException()) {        lastComparison = TBaseHelper.compareTo(this.notFoundException, typedOther.notFoundException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public void read(TProtocol iprot) throws TException {
      TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == TType.STRING) {
              this.success = iprot.readString();
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 1: // USER_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.userException = new com.evernote.edam.error.EDAMUserException();
              this.userException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // SYSTEM_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.systemException = new com.evernote.edam.error.EDAMSystemException();
              this.systemException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 3: // NOT_FOUND_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.notFoundException = new com.evernote.edam.error.EDAMNotFoundException();
              this.notFoundException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(TProtocol oprot) throws TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        oprot.writeString(this.success);
        oprot.writeFieldEnd();
      } else if (this.isSetUserException()) {
        oprot.writeFieldBegin(USER_EXCEPTION_FIELD_DESC);
        this.userException.write(oprot);
        oprot.writeFieldEnd();
      } else if (this.isSetSystemException()) {
        oprot.writeFieldBegin(SYSTEM_EXCEPTION_FIELD_DESC);
        this.systemException.write(oprot);
        oprot.writeFieldEnd();
      } else if (this.isSetNotFoundException()) {
        oprot.writeFieldBegin(NOT_FOUND_EXCEPTION_FIELD_DESC);
        this.notFoundException.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    public void validate() throws TException {
      // check for required fields
    }

  }

  private static class getResourceSearchText_args implements TBase, java.io.Serializable, Cloneable   {
    private static final TStruct STRUCT_DESC = new TStruct("getResourceSearchText_args");

    private static final TField AUTHENTICATION_TOKEN_FIELD_DESC = new TField("authenticationToken", TType.STRING, (short)1);
    private static final TField GUID_FIELD_DESC = new TField("guid", TType.STRING, (short)2);

    private String authenticationToken;
    private String guid;


    // isset id assignments

    public getResourceSearchText_args() {
    }

    /**
     * Performs a deep copy on other.
     */
    public getResourceSearchText_args(getResourceSearchText_args other) {
      if (other.isSetAuthenticationToken()) {
        this.authenticationToken = other.authenticationToken;
      }
      if (other.isSetGuid()) {
        this.guid = other.guid;
      }
    }

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

    public void clear() {
      this.authenticationToken = null;
      this.guid = null;
    }

    public void setAuthenticationToken(String authenticationToken) {
      this.authenticationToken = authenticationToken;
    }

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

    public void setGuid(String guid) {
      this.guid = guid;
    }

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

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

      int lastComparison = 0;
      getResourceSearchText_args typedOther = (getResourceSearchText_args)other;

      lastComparison = Boolean.valueOf(isSetAuthenticationToken()).compareTo(typedOther.isSetAuthenticationToken());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetAuthenticationToken()) {        lastComparison = TBaseHelper.compareTo(this.authenticationToken, typedOther.authenticationToken);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetGuid()).compareTo(typedOther.isSetGuid());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetGuid()) {        lastComparison = TBaseHelper.compareTo(this.guid, typedOther.guid);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public void read(TProtocol iprot) throws TException {
      TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // AUTHENTICATION_TOKEN
            if (field.type == TType.STRING) {
              this.authenticationToken = iprot.readString();
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // GUID
            if (field.type == TType.STRING) {
              this.guid = iprot.readString();
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(TProtocol oprot) throws TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      if (this.authenticationToken != null) {
        oprot.writeFieldBegin(AUTHENTICATION_TOKEN_FIELD_DESC);
        oprot.writeString(this.authenticationToken);
        oprot.writeFieldEnd();
      }
      if (this.guid != null) {
        oprot.writeFieldBegin(GUID_FIELD_DESC);
        oprot.writeString(this.guid);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    public void validate() throws TException {
      // check for required fields
    }

  }

  private static class getResourceSearchText_result implements TBase, java.io.Serializable, Cloneable   {
    private static final TStruct STRUCT_DESC = new TStruct("getResourceSearchText_result");

    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRING, (short)0);
    private static final TField USER_EXCEPTION_FIELD_DESC = new TField("userException", TType.STRUCT, (short)1);
    private static final TField SYSTEM_EXCEPTION_FIELD_DESC = new TField("systemException", TType.STRUCT, (short)2);
    private static final TField NOT_FOUND_EXCEPTION_FIELD_DESC = new TField("notFoundException", TType.STRUCT, (short)3);

    private String success;
    private com.evernote.edam.error.EDAMUserException userException;
    private com.evernote.edam.error.EDAMSystemException systemException;
    private com.evernote.edam.error.EDAMNotFoundException notFoundException;


    // isset id assignments

    public getResourceSearchText_result() {
    }

    /**
     * Performs a deep copy on other.
     */
    public getResourceSearchText_result(getResourceSearchText_result other) {
      if (other.isSetSuccess()) {
        this.success = other.success;
      }
      if (other.isSetUserException()) {
        this.userException = new com.evernote.edam.error.EDAMUserException(other.userException);
      }
      if (other.isSetSystemException()) {
        this.systemException = new com.evernote.edam.error.EDAMSystemException(other.systemException);
      }
      if (other.isSetNotFoundException()) {
        this.notFoundException = new com.evernote.edam.error.EDAMNotFoundException(other.notFoundException);
      }
    }

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

    public void clear() {
      this.success = null;
      this.userException = null;
      this.systemException = null;
      this.notFoundException = null;
    }

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

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

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

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

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

      int lastComparison = 0;
      getResourceSearchText_result typedOther = (getResourceSearchText_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {        lastComparison = TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetUserException()).compareTo(typedOther.isSetUserException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetUserException()) {        lastComparison = TBaseHelper.compareTo(this.userException, typedOther.userException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetSystemException()).compareTo(typedOther.isSetSystemException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSystemException()) {        lastComparison = TBaseHelper.compareTo(this.systemException, typedOther.systemException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetNotFoundException()).compareTo(typedOther.isSetNotFoundException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetNotFoundException()) {        lastComparison = TBaseHelper.compareTo(this.notFoundException, typedOther.notFoundException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public void read(TProtocol iprot) throws TException {
      TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == TType.STRING) {
              this.success = iprot.readString();
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 1: // USER_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.userException = new com.evernote.edam.error.EDAMUserException();
              this.userException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // SYSTEM_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.systemException = new com.evernote.edam.error.EDAMSystemException();
              this.systemException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 3: // NOT_FOUND_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.notFoundException = new com.evernote.edam.error.EDAMNotFoundException();
              this.notFoundException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(TProtocol oprot) throws TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        oprot.writeString(this.success);
        oprot.writeFieldEnd();
      } else if (this.isSetUserException()) {
        oprot.writeFieldBegin(USER_EXCEPTION_FIELD_DESC);
        this.userException.write(oprot);
        oprot.writeFieldEnd();
      } else if (this.isSetSystemException()) {
        oprot.writeFieldBegin(SYSTEM_EXCEPTION_FIELD_DESC);
        this.systemException.write(oprot);
        oprot.writeFieldEnd();
      } else if (this.isSetNotFoundException()) {
        oprot.writeFieldBegin(NOT_FOUND_EXCEPTION_FIELD_DESC);
        this.notFoundException.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    public void validate() throws TException {
      // check for required fields
    }

  }

  private static class getNoteTagNames_args implements TBase, java.io.Serializable, Cloneable   {
    private static final TStruct STRUCT_DESC = new TStruct("getNoteTagNames_args");

    private static final TField AUTHENTICATION_TOKEN_FIELD_DESC = new TField("authenticationToken", TType.STRING, (short)1);
    private static final TField GUID_FIELD_DESC = new TField("guid", TType.STRING, (short)2);

    private String authenticationToken;
    private String guid;


    // isset id assignments

    public getNoteTagNames_args() {
    }

    /**
     * Performs a deep copy on other.
     */
    public getNoteTagNames_args(getNoteTagNames_args other) {
      if (other.isSetAuthenticationToken()) {
        this.authenticationToken = other.authenticationToken;
      }
      if (other.isSetGuid()) {
        this.guid = other.guid;
      }
    }

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

    public void clear() {
      this.authenticationToken = null;
      this.guid = null;
    }

    public void setAuthenticationToken(String authenticationToken) {
      this.authenticationToken = authenticationToken;
    }

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

    public void setGuid(String guid) {
      this.guid = guid;
    }

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

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

      int lastComparison = 0;
      getNoteTagNames_args typedOther = (getNoteTagNames_args)other;

      lastComparison = Boolean.valueOf(isSetAuthenticationToken()).compareTo(typedOther.isSetAuthenticationToken());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetAuthenticationToken()) {        lastComparison = TBaseHelper.compareTo(this.authenticationToken, typedOther.authenticationToken);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetGuid()).compareTo(typedOther.isSetGuid());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetGuid()) {        lastComparison = TBaseHelper.compareTo(this.guid, typedOther.guid);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public void read(TProtocol iprot) throws TException {
      TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // AUTHENTICATION_TOKEN
            if (field.type == TType.STRING) {
              this.authenticationToken = iprot.readString();
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // GUID
            if (field.type == TType.STRING) {
              this.guid = iprot.readString();
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(TProtocol oprot) throws TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      if (this.authenticationToken != null) {
        oprot.writeFieldBegin(AUTHENTICATION_TOKEN_FIELD_DESC);
        oprot.writeString(this.authenticationToken);
        oprot.writeFieldEnd();
      }
      if (this.guid != null) {
        oprot.writeFieldBegin(GUID_FIELD_DESC);
        oprot.writeString(this.guid);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    public void validate() throws TException {
      // check for required fields
    }

  }

  private static class getNoteTagNames_result implements TBase, java.io.Serializable, Cloneable   {
    private static final TStruct STRUCT_DESC = new TStruct("getNoteTagNames_result");

    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
    private static final TField USER_EXCEPTION_FIELD_DESC = new TField("userException", TType.STRUCT, (short)1);
    private static final TField SYSTEM_EXCEPTION_FIELD_DESC = new TField("systemException", TType.STRUCT, (short)2);
    private static final TField NOT_FOUND_EXCEPTION_FIELD_DESC = new TField("notFoundException", TType.STRUCT, (short)3);

    private List success;
    private com.evernote.edam.error.EDAMUserException userException;
    private com.evernote.edam.error.EDAMSystemException systemException;
    private com.evernote.edam.error.EDAMNotFoundException notFoundException;


    // isset id assignments

    public getNoteTagNames_result() {
    }

    /**
     * Performs a deep copy on other.
     */
    public getNoteTagNames_result(getNoteTagNames_result other) {
      if (other.isSetSuccess()) {
        List __this__success = new ArrayList();
        for (String other_element : other.success) {
          __this__success.add(other_element);
        }
        this.success = __this__success;
      }
      if (other.isSetUserException()) {
        this.userException = new com.evernote.edam.error.EDAMUserException(other.userException);
      }
      if (other.isSetSystemException()) {
        this.systemException = new com.evernote.edam.error.EDAMSystemException(other.systemException);
      }
      if (other.isSetNotFoundException()) {
        this.notFoundException = new com.evernote.edam.error.EDAMNotFoundException(other.notFoundException);
      }
    }

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

    public void clear() {
      this.success = null;
      this.userException = null;
      this.systemException = null;
      this.notFoundException = null;
    }

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

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

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

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

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

      int lastComparison = 0;
      getNoteTagNames_result typedOther = (getNoteTagNames_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {        lastComparison = TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetUserException()).compareTo(typedOther.isSetUserException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetUserException()) {        lastComparison = TBaseHelper.compareTo(this.userException, typedOther.userException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetSystemException()).compareTo(typedOther.isSetSystemException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSystemException()) {        lastComparison = TBaseHelper.compareTo(this.systemException, typedOther.systemException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetNotFoundException()).compareTo(typedOther.isSetNotFoundException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetNotFoundException()) {        lastComparison = TBaseHelper.compareTo(this.notFoundException, typedOther.notFoundException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public void read(TProtocol iprot) throws TException {
      TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == TType.LIST) {
              {
                TList _list126 = iprot.readListBegin();
                this.success = new ArrayList(_list126.size);
                for (int _i127 = 0; _i127 < _list126.size; ++_i127)
                {
                  String _elem128;
                  _elem128 = iprot.readString();
                  this.success.add(_elem128);
                }
                iprot.readListEnd();
              }
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 1: // USER_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.userException = new com.evernote.edam.error.EDAMUserException();
              this.userException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // SYSTEM_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.systemException = new com.evernote.edam.error.EDAMSystemException();
              this.systemException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 3: // NOT_FOUND_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.notFoundException = new com.evernote.edam.error.EDAMNotFoundException();
              this.notFoundException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(TProtocol oprot) throws TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        {
          oprot.writeListBegin(new TList(TType.STRING, this.success.size()));
          for (String _iter129 : this.success)
          {
            oprot.writeString(_iter129);
          }
          oprot.writeListEnd();
        }
        oprot.writeFieldEnd();
      } else if (this.isSetUserException()) {
        oprot.writeFieldBegin(USER_EXCEPTION_FIELD_DESC);
        this.userException.write(oprot);
        oprot.writeFieldEnd();
      } else if (this.isSetSystemException()) {
        oprot.writeFieldBegin(SYSTEM_EXCEPTION_FIELD_DESC);
        this.systemException.write(oprot);
        oprot.writeFieldEnd();
      } else if (this.isSetNotFoundException()) {
        oprot.writeFieldBegin(NOT_FOUND_EXCEPTION_FIELD_DESC);
        this.notFoundException.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    public void validate() throws TException {
      // check for required fields
    }

  }

  private static class createNote_args implements TBase, java.io.Serializable, Cloneable   {
    private static final TStruct STRUCT_DESC = new TStruct("createNote_args");

    private static final TField AUTHENTICATION_TOKEN_FIELD_DESC = new TField("authenticationToken", TType.STRING, (short)1);
    private static final TField NOTE_FIELD_DESC = new TField("note", TType.STRUCT, (short)2);

    private String authenticationToken;
    private com.evernote.edam.type.Note note;


    // isset id assignments

    public createNote_args() {
    }

    /**
     * Performs a deep copy on other.
     */
    public createNote_args(createNote_args other) {
      if (other.isSetAuthenticationToken()) {
        this.authenticationToken = other.authenticationToken;
      }
      if (other.isSetNote()) {
        this.note = new com.evernote.edam.type.Note(other.note);
      }
    }

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

    public void clear() {
      this.authenticationToken = null;
      this.note = null;
    }

    public void setAuthenticationToken(String authenticationToken) {
      this.authenticationToken = authenticationToken;
    }

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

    public void setNote(com.evernote.edam.type.Note note) {
      this.note = note;
    }

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

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

      int lastComparison = 0;
      createNote_args typedOther = (createNote_args)other;

      lastComparison = Boolean.valueOf(isSetAuthenticationToken()).compareTo(typedOther.isSetAuthenticationToken());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetAuthenticationToken()) {        lastComparison = TBaseHelper.compareTo(this.authenticationToken, typedOther.authenticationToken);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetNote()).compareTo(typedOther.isSetNote());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetNote()) {        lastComparison = TBaseHelper.compareTo(this.note, typedOther.note);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public void read(TProtocol iprot) throws TException {
      TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // AUTHENTICATION_TOKEN
            if (field.type == TType.STRING) {
              this.authenticationToken = iprot.readString();
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // NOTE
            if (field.type == TType.STRUCT) {
              this.note = new com.evernote.edam.type.Note();
              this.note.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(TProtocol oprot) throws TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      if (this.authenticationToken != null) {
        oprot.writeFieldBegin(AUTHENTICATION_TOKEN_FIELD_DESC);
        oprot.writeString(this.authenticationToken);
        oprot.writeFieldEnd();
      }
      if (this.note != null) {
        oprot.writeFieldBegin(NOTE_FIELD_DESC);
        this.note.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    public void validate() throws TException {
      // check for required fields
    }

  }

  private static class createNote_result implements TBase, java.io.Serializable, Cloneable   {
    private static final TStruct STRUCT_DESC = new TStruct("createNote_result");

    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
    private static final TField USER_EXCEPTION_FIELD_DESC = new TField("userException", TType.STRUCT, (short)1);
    private static final TField SYSTEM_EXCEPTION_FIELD_DESC = new TField("systemException", TType.STRUCT, (short)2);
    private static final TField NOT_FOUND_EXCEPTION_FIELD_DESC = new TField("notFoundException", TType.STRUCT, (short)3);

    private com.evernote.edam.type.Note success;
    private com.evernote.edam.error.EDAMUserException userException;
    private com.evernote.edam.error.EDAMSystemException systemException;
    private com.evernote.edam.error.EDAMNotFoundException notFoundException;


    // isset id assignments

    public createNote_result() {
    }

    /**
     * Performs a deep copy on other.
     */
    public createNote_result(createNote_result other) {
      if (other.isSetSuccess()) {
        this.success = new com.evernote.edam.type.Note(other.success);
      }
      if (other.isSetUserException()) {
        this.userException = new com.evernote.edam.error.EDAMUserException(other.userException);
      }
      if (other.isSetSystemException()) {
        this.systemException = new com.evernote.edam.error.EDAMSystemException(other.systemException);
      }
      if (other.isSetNotFoundException()) {
        this.notFoundException = new com.evernote.edam.error.EDAMNotFoundException(other.notFoundException);
      }
    }

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

    public void clear() {
      this.success = null;
      this.userException = null;
      this.systemException = null;
      this.notFoundException = null;
    }

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

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

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

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

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

      int lastComparison = 0;
      createNote_result typedOther = (createNote_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {        lastComparison = TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetUserException()).compareTo(typedOther.isSetUserException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetUserException()) {        lastComparison = TBaseHelper.compareTo(this.userException, typedOther.userException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetSystemException()).compareTo(typedOther.isSetSystemException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSystemException()) {        lastComparison = TBaseHelper.compareTo(this.systemException, typedOther.systemException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetNotFoundException()).compareTo(typedOther.isSetNotFoundException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetNotFoundException()) {        lastComparison = TBaseHelper.compareTo(this.notFoundException, typedOther.notFoundException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public void read(TProtocol iprot) throws TException {
      TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == TType.STRUCT) {
              this.success = new com.evernote.edam.type.Note();
              this.success.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 1: // USER_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.userException = new com.evernote.edam.error.EDAMUserException();
              this.userException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // SYSTEM_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.systemException = new com.evernote.edam.error.EDAMSystemException();
              this.systemException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 3: // NOT_FOUND_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.notFoundException = new com.evernote.edam.error.EDAMNotFoundException();
              this.notFoundException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(TProtocol oprot) throws TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        this.success.write(oprot);
        oprot.writeFieldEnd();
      } else if (this.isSetUserException()) {
        oprot.writeFieldBegin(USER_EXCEPTION_FIELD_DESC);
        this.userException.write(oprot);
        oprot.writeFieldEnd();
      } else if (this.isSetSystemException()) {
        oprot.writeFieldBegin(SYSTEM_EXCEPTION_FIELD_DESC);
        this.systemException.write(oprot);
        oprot.writeFieldEnd();
      } else if (this.isSetNotFoundException()) {
        oprot.writeFieldBegin(NOT_FOUND_EXCEPTION_FIELD_DESC);
        this.notFoundException.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    public void validate() throws TException {
      // check for required fields
    }

  }

  private static class updateNote_args implements TBase, java.io.Serializable, Cloneable   {
    private static final TStruct STRUCT_DESC = new TStruct("updateNote_args");

    private static final TField AUTHENTICATION_TOKEN_FIELD_DESC = new TField("authenticationToken", TType.STRING, (short)1);
    private static final TField NOTE_FIELD_DESC = new TField("note", TType.STRUCT, (short)2);

    private String authenticationToken;
    private com.evernote.edam.type.Note note;


    // isset id assignments

    public updateNote_args() {
    }

    /**
     * Performs a deep copy on other.
     */
    public updateNote_args(updateNote_args other) {
      if (other.isSetAuthenticationToken()) {
        this.authenticationToken = other.authenticationToken;
      }
      if (other.isSetNote()) {
        this.note = new com.evernote.edam.type.Note(other.note);
      }
    }

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

    public void clear() {
      this.authenticationToken = null;
      this.note = null;
    }

    public void setAuthenticationToken(String authenticationToken) {
      this.authenticationToken = authenticationToken;
    }

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

    public void setNote(com.evernote.edam.type.Note note) {
      this.note = note;
    }

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

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

      int lastComparison = 0;
      updateNote_args typedOther = (updateNote_args)other;

      lastComparison = Boolean.valueOf(isSetAuthenticationToken()).compareTo(typedOther.isSetAuthenticationToken());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetAuthenticationToken()) {        lastComparison = TBaseHelper.compareTo(this.authenticationToken, typedOther.authenticationToken);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetNote()).compareTo(typedOther.isSetNote());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetNote()) {        lastComparison = TBaseHelper.compareTo(this.note, typedOther.note);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public void read(TProtocol iprot) throws TException {
      TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // AUTHENTICATION_TOKEN
            if (field.type == TType.STRING) {
              this.authenticationToken = iprot.readString();
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // NOTE
            if (field.type == TType.STRUCT) {
              this.note = new com.evernote.edam.type.Note();
              this.note.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(TProtocol oprot) throws TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      if (this.authenticationToken != null) {
        oprot.writeFieldBegin(AUTHENTICATION_TOKEN_FIELD_DESC);
        oprot.writeString(this.authenticationToken);
        oprot.writeFieldEnd();
      }
      if (this.note != null) {
        oprot.writeFieldBegin(NOTE_FIELD_DESC);
        this.note.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    public void validate() throws TException {
      // check for required fields
    }

  }

  private static class updateNote_result implements TBase, java.io.Serializable, Cloneable   {
    private static final TStruct STRUCT_DESC = new TStruct("updateNote_result");

    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
    private static final TField USER_EXCEPTION_FIELD_DESC = new TField("userException", TType.STRUCT, (short)1);
    private static final TField SYSTEM_EXCEPTION_FIELD_DESC = new TField("systemException", TType.STRUCT, (short)2);
    private static final TField NOT_FOUND_EXCEPTION_FIELD_DESC = new TField("notFoundException", TType.STRUCT, (short)3);

    private com.evernote.edam.type.Note success;
    private com.evernote.edam.error.EDAMUserException userException;
    private com.evernote.edam.error.EDAMSystemException systemException;
    private com.evernote.edam.error.EDAMNotFoundException notFoundException;


    // isset id assignments

    public updateNote_result() {
    }

    /**
     * Performs a deep copy on other.
     */
    public updateNote_result(updateNote_result other) {
      if (other.isSetSuccess()) {
        this.success = new com.evernote.edam.type.Note(other.success);
      }
      if (other.isSetUserException()) {
        this.userException = new com.evernote.edam.error.EDAMUserException(other.userException);
      }
      if (other.isSetSystemException()) {
        this.systemException = new com.evernote.edam.error.EDAMSystemException(other.systemException);
      }
      if (other.isSetNotFoundException()) {
        this.notFoundException = new com.evernote.edam.error.EDAMNotFoundException(other.notFoundException);
      }
    }

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

    public void clear() {
      this.success = null;
      this.userException = null;
      this.systemException = null;
      this.notFoundException = null;
    }

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

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

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

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

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

      int lastComparison = 0;
      updateNote_result typedOther = (updateNote_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {        lastComparison = TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetUserException()).compareTo(typedOther.isSetUserException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetUserException()) {        lastComparison = TBaseHelper.compareTo(this.userException, typedOther.userException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetSystemException()).compareTo(typedOther.isSetSystemException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSystemException()) {        lastComparison = TBaseHelper.compareTo(this.systemException, typedOther.systemException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetNotFoundException()).compareTo(typedOther.isSetNotFoundException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetNotFoundException()) {        lastComparison = TBaseHelper.compareTo(this.notFoundException, typedOther.notFoundException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public void read(TProtocol iprot) throws TException {
      TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == TType.STRUCT) {
              this.success = new com.evernote.edam.type.Note();
              this.success.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 1: // USER_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.userException = new com.evernote.edam.error.EDAMUserException();
              this.userException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // SYSTEM_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.systemException = new com.evernote.edam.error.EDAMSystemException();
              this.systemException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 3: // NOT_FOUND_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.notFoundException = new com.evernote.edam.error.EDAMNotFoundException();
              this.notFoundException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(TProtocol oprot) throws TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        this.success.write(oprot);
        oprot.writeFieldEnd();
      } else if (this.isSetUserException()) {
        oprot.writeFieldBegin(USER_EXCEPTION_FIELD_DESC);
        this.userException.write(oprot);
        oprot.writeFieldEnd();
      } else if (this.isSetSystemException()) {
        oprot.writeFieldBegin(SYSTEM_EXCEPTION_FIELD_DESC);
        this.systemException.write(oprot);
        oprot.writeFieldEnd();
      } else if (this.isSetNotFoundException()) {
        oprot.writeFieldBegin(NOT_FOUND_EXCEPTION_FIELD_DESC);
        this.notFoundException.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    public void validate() throws TException {
      // check for required fields
    }

  }

  private static class deleteNote_args implements TBase, java.io.Serializable, Cloneable   {
    private static final TStruct STRUCT_DESC = new TStruct("deleteNote_args");

    private static final TField AUTHENTICATION_TOKEN_FIELD_DESC = new TField("authenticationToken", TType.STRING, (short)1);
    private static final TField GUID_FIELD_DESC = new TField("guid", TType.STRING, (short)2);

    private String authenticationToken;
    private String guid;


    // isset id assignments

    public deleteNote_args() {
    }

    /**
     * Performs a deep copy on other.
     */
    public deleteNote_args(deleteNote_args other) {
      if (other.isSetAuthenticationToken()) {
        this.authenticationToken = other.authenticationToken;
      }
      if (other.isSetGuid()) {
        this.guid = other.guid;
      }
    }

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

    public void clear() {
      this.authenticationToken = null;
      this.guid = null;
    }

    public void setAuthenticationToken(String authenticationToken) {
      this.authenticationToken = authenticationToken;
    }

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

    public void setGuid(String guid) {
      this.guid = guid;
    }

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

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

      int lastComparison = 0;
      deleteNote_args typedOther = (deleteNote_args)other;

      lastComparison = Boolean.valueOf(isSetAuthenticationToken()).compareTo(typedOther.isSetAuthenticationToken());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetAuthenticationToken()) {        lastComparison = TBaseHelper.compareTo(this.authenticationToken, typedOther.authenticationToken);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetGuid()).compareTo(typedOther.isSetGuid());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetGuid()) {        lastComparison = TBaseHelper.compareTo(this.guid, typedOther.guid);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public void read(TProtocol iprot) throws TException {
      TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // AUTHENTICATION_TOKEN
            if (field.type == TType.STRING) {
              this.authenticationToken = iprot.readString();
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // GUID
            if (field.type == TType.STRING) {
              this.guid = iprot.readString();
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(TProtocol oprot) throws TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      if (this.authenticationToken != null) {
        oprot.writeFieldBegin(AUTHENTICATION_TOKEN_FIELD_DESC);
        oprot.writeString(this.authenticationToken);
        oprot.writeFieldEnd();
      }
      if (this.guid != null) {
        oprot.writeFieldBegin(GUID_FIELD_DESC);
        oprot.writeString(this.guid);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    public void validate() throws TException {
      // check for required fields
    }

  }

  private static class deleteNote_result implements TBase, java.io.Serializable, Cloneable   {
    private static final TStruct STRUCT_DESC = new TStruct("deleteNote_result");

    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.I32, (short)0);
    private static final TField USER_EXCEPTION_FIELD_DESC = new TField("userException", TType.STRUCT, (short)1);
    private static final TField SYSTEM_EXCEPTION_FIELD_DESC = new TField("systemException", TType.STRUCT, (short)2);
    private static final TField NOT_FOUND_EXCEPTION_FIELD_DESC = new TField("notFoundException", TType.STRUCT, (short)3);

    private int success;
    private com.evernote.edam.error.EDAMUserException userException;
    private com.evernote.edam.error.EDAMSystemException systemException;
    private com.evernote.edam.error.EDAMNotFoundException notFoundException;


    // isset id assignments
    private static final int __SUCCESS_ISSET_ID = 0;
    private boolean[] __isset_vector = new boolean[1];

    public deleteNote_result() {
    }

    /**
     * Performs a deep copy on other.
     */
    public deleteNote_result(deleteNote_result other) {
      System.arraycopy(other.__isset_vector, 0, __isset_vector, 0, other.__isset_vector.length);
      this.success = other.success;
      if (other.isSetUserException()) {
        this.userException = new com.evernote.edam.error.EDAMUserException(other.userException);
      }
      if (other.isSetSystemException()) {
        this.systemException = new com.evernote.edam.error.EDAMSystemException(other.systemException);
      }
      if (other.isSetNotFoundException()) {
        this.notFoundException = new com.evernote.edam.error.EDAMNotFoundException(other.notFoundException);
      }
    }

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

    public void clear() {
      setSuccessIsSet(false);
      this.success = 0;
      this.userException = null;
      this.systemException = null;
      this.notFoundException = null;
    }

    /** Returns true if field success is set (has been asigned a value) and false otherwise */
    public boolean isSetSuccess() {
      return __isset_vector[__SUCCESS_ISSET_ID];
    }

    public void setSuccessIsSet(boolean value) {
      __isset_vector[__SUCCESS_ISSET_ID] = value;
    }

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

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

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

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

      int lastComparison = 0;
      deleteNote_result typedOther = (deleteNote_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {        lastComparison = TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetUserException()).compareTo(typedOther.isSetUserException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetUserException()) {        lastComparison = TBaseHelper.compareTo(this.userException, typedOther.userException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetSystemException()).compareTo(typedOther.isSetSystemException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSystemException()) {        lastComparison = TBaseHelper.compareTo(this.systemException, typedOther.systemException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetNotFoundException()).compareTo(typedOther.isSetNotFoundException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetNotFoundException()) {        lastComparison = TBaseHelper.compareTo(this.notFoundException, typedOther.notFoundException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public void read(TProtocol iprot) throws TException {
      TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == TType.I32) {
              this.success = iprot.readI32();
              setSuccessIsSet(true);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 1: // USER_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.userException = new com.evernote.edam.error.EDAMUserException();
              this.userException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // SYSTEM_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.systemException = new com.evernote.edam.error.EDAMSystemException();
              this.systemException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 3: // NOT_FOUND_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.notFoundException = new com.evernote.edam.error.EDAMNotFoundException();
              this.notFoundException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(TProtocol oprot) throws TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        oprot.writeI32(this.success);
        oprot.writeFieldEnd();
      } else if (this.isSetUserException()) {
        oprot.writeFieldBegin(USER_EXCEPTION_FIELD_DESC);
        this.userException.write(oprot);
        oprot.writeFieldEnd();
      } else if (this.isSetSystemException()) {
        oprot.writeFieldBegin(SYSTEM_EXCEPTION_FIELD_DESC);
        this.systemException.write(oprot);
        oprot.writeFieldEnd();
      } else if (this.isSetNotFoundException()) {
        oprot.writeFieldBegin(NOT_FOUND_EXCEPTION_FIELD_DESC);
        this.notFoundException.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    public void validate() throws TException {
      // check for required fields
    }

  }

  private static class expungeNote_args implements TBase, java.io.Serializable, Cloneable   {
    private static final TStruct STRUCT_DESC = new TStruct("expungeNote_args");

    private static final TField AUTHENTICATION_TOKEN_FIELD_DESC = new TField("authenticationToken", TType.STRING, (short)1);
    private static final TField GUID_FIELD_DESC = new TField("guid", TType.STRING, (short)2);

    private String authenticationToken;
    private String guid;


    // isset id assignments

    public expungeNote_args() {
    }

    /**
     * Performs a deep copy on other.
     */
    public expungeNote_args(expungeNote_args other) {
      if (other.isSetAuthenticationToken()) {
        this.authenticationToken = other.authenticationToken;
      }
      if (other.isSetGuid()) {
        this.guid = other.guid;
      }
    }

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

    public void clear() {
      this.authenticationToken = null;
      this.guid = null;
    }

    public void setAuthenticationToken(String authenticationToken) {
      this.authenticationToken = authenticationToken;
    }

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

    public void setGuid(String guid) {
      this.guid = guid;
    }

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

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

      int lastComparison = 0;
      expungeNote_args typedOther = (expungeNote_args)other;

      lastComparison = Boolean.valueOf(isSetAuthenticationToken()).compareTo(typedOther.isSetAuthenticationToken());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetAuthenticationToken()) {        lastComparison = TBaseHelper.compareTo(this.authenticationToken, typedOther.authenticationToken);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetGuid()).compareTo(typedOther.isSetGuid());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetGuid()) {        lastComparison = TBaseHelper.compareTo(this.guid, typedOther.guid);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public void read(TProtocol iprot) throws TException {
      TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // AUTHENTICATION_TOKEN
            if (field.type == TType.STRING) {
              this.authenticationToken = iprot.readString();
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // GUID
            if (field.type == TType.STRING) {
              this.guid = iprot.readString();
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(TProtocol oprot) throws TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      if (this.authenticationToken != null) {
        oprot.writeFieldBegin(AUTHENTICATION_TOKEN_FIELD_DESC);
        oprot.writeString(this.authenticationToken);
        oprot.writeFieldEnd();
      }
      if (this.guid != null) {
        oprot.writeFieldBegin(GUID_FIELD_DESC);
        oprot.writeString(this.guid);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    public void validate() throws TException {
      // check for required fields
    }

  }

  private static class expungeNote_result implements TBase, java.io.Serializable, Cloneable   {
    private static final TStruct STRUCT_DESC = new TStruct("expungeNote_result");

    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.I32, (short)0);
    private static final TField USER_EXCEPTION_FIELD_DESC = new TField("userException", TType.STRUCT, (short)1);
    private static final TField SYSTEM_EXCEPTION_FIELD_DESC = new TField("systemException", TType.STRUCT, (short)2);
    private static final TField NOT_FOUND_EXCEPTION_FIELD_DESC = new TField("notFoundException", TType.STRUCT, (short)3);

    private int success;
    private com.evernote.edam.error.EDAMUserException userException;
    private com.evernote.edam.error.EDAMSystemException systemException;
    private com.evernote.edam.error.EDAMNotFoundException notFoundException;


    // isset id assignments
    private static final int __SUCCESS_ISSET_ID = 0;
    private boolean[] __isset_vector = new boolean[1];

    public expungeNote_result() {
    }

    /**
     * Performs a deep copy on other.
     */
    public expungeNote_result(expungeNote_result other) {
      System.arraycopy(other.__isset_vector, 0, __isset_vector, 0, other.__isset_vector.length);
      this.success = other.success;
      if (other.isSetUserException()) {
        this.userException = new com.evernote.edam.error.EDAMUserException(other.userException);
      }
      if (other.isSetSystemException()) {
        this.systemException = new com.evernote.edam.error.EDAMSystemException(other.systemException);
      }
      if (other.isSetNotFoundException()) {
        this.notFoundException = new com.evernote.edam.error.EDAMNotFoundException(other.notFoundException);
      }
    }

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

    public void clear() {
      setSuccessIsSet(false);
      this.success = 0;
      this.userException = null;
      this.systemException = null;
      this.notFoundException = null;
    }

    /** Returns true if field success is set (has been asigned a value) and false otherwise */
    public boolean isSetSuccess() {
      return __isset_vector[__SUCCESS_ISSET_ID];
    }

    public void setSuccessIsSet(boolean value) {
      __isset_vector[__SUCCESS_ISSET_ID] = value;
    }

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

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

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

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

      int lastComparison = 0;
      expungeNote_result typedOther = (expungeNote_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {        lastComparison = TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetUserException()).compareTo(typedOther.isSetUserException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetUserException()) {        lastComparison = TBaseHelper.compareTo(this.userException, typedOther.userException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetSystemException()).compareTo(typedOther.isSetSystemException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSystemException()) {        lastComparison = TBaseHelper.compareTo(this.systemException, typedOther.systemException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetNotFoundException()).compareTo(typedOther.isSetNotFoundException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetNotFoundException()) {        lastComparison = TBaseHelper.compareTo(this.notFoundException, typedOther.notFoundException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public void read(TProtocol iprot) throws TException {
      TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == TType.I32) {
              this.success = iprot.readI32();
              setSuccessIsSet(true);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 1: // USER_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.userException = new com.evernote.edam.error.EDAMUserException();
              this.userException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // SYSTEM_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.systemException = new com.evernote.edam.error.EDAMSystemException();
              this.systemException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 3: // NOT_FOUND_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.notFoundException = new com.evernote.edam.error.EDAMNotFoundException();
              this.notFoundException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(TProtocol oprot) throws TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        oprot.writeI32(this.success);
        oprot.writeFieldEnd();
      } else if (this.isSetUserException()) {
        oprot.writeFieldBegin(USER_EXCEPTION_FIELD_DESC);
        this.userException.write(oprot);
        oprot.writeFieldEnd();
      } else if (this.isSetSystemException()) {
        oprot.writeFieldBegin(SYSTEM_EXCEPTION_FIELD_DESC);
        this.systemException.write(oprot);
        oprot.writeFieldEnd();
      } else if (this.isSetNotFoundException()) {
        oprot.writeFieldBegin(NOT_FOUND_EXCEPTION_FIELD_DESC);
        this.notFoundException.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    public void validate() throws TException {
      // check for required fields
    }

  }

  private static class expungeNotes_args implements TBase, java.io.Serializable, Cloneable   {
    private static final TStruct STRUCT_DESC = new TStruct("expungeNotes_args");

    private static final TField AUTHENTICATION_TOKEN_FIELD_DESC = new TField("authenticationToken", TType.STRING, (short)1);
    private static final TField NOTE_GUIDS_FIELD_DESC = new TField("noteGuids", TType.LIST, (short)2);

    private String authenticationToken;
    private List noteGuids;


    // isset id assignments

    public expungeNotes_args() {
    }

    /**
     * Performs a deep copy on other.
     */
    public expungeNotes_args(expungeNotes_args other) {
      if (other.isSetAuthenticationToken()) {
        this.authenticationToken = other.authenticationToken;
      }
      if (other.isSetNoteGuids()) {
        List __this__noteGuids = new ArrayList();
        for (String other_element : other.noteGuids) {
          __this__noteGuids.add(other_element);
        }
        this.noteGuids = __this__noteGuids;
      }
    }

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

    public void clear() {
      this.authenticationToken = null;
      this.noteGuids = null;
    }

    public void setAuthenticationToken(String authenticationToken) {
      this.authenticationToken = authenticationToken;
    }

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

    public void setNoteGuids(List noteGuids) {
      this.noteGuids = noteGuids;
    }

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

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

      int lastComparison = 0;
      expungeNotes_args typedOther = (expungeNotes_args)other;

      lastComparison = Boolean.valueOf(isSetAuthenticationToken()).compareTo(typedOther.isSetAuthenticationToken());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetAuthenticationToken()) {        lastComparison = TBaseHelper.compareTo(this.authenticationToken, typedOther.authenticationToken);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetNoteGuids()).compareTo(typedOther.isSetNoteGuids());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetNoteGuids()) {        lastComparison = TBaseHelper.compareTo(this.noteGuids, typedOther.noteGuids);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public void read(TProtocol iprot) throws TException {
      TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // AUTHENTICATION_TOKEN
            if (field.type == TType.STRING) {
              this.authenticationToken = iprot.readString();
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // NOTE_GUIDS
            if (field.type == TType.LIST) {
              {
                TList _list130 = iprot.readListBegin();
                this.noteGuids = new ArrayList(_list130.size);
                for (int _i131 = 0; _i131 < _list130.size; ++_i131)
                {
                  String _elem132;
                  _elem132 = iprot.readString();
                  this.noteGuids.add(_elem132);
                }
                iprot.readListEnd();
              }
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(TProtocol oprot) throws TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      if (this.authenticationToken != null) {
        oprot.writeFieldBegin(AUTHENTICATION_TOKEN_FIELD_DESC);
        oprot.writeString(this.authenticationToken);
        oprot.writeFieldEnd();
      }
      if (this.noteGuids != null) {
        oprot.writeFieldBegin(NOTE_GUIDS_FIELD_DESC);
        {
          oprot.writeListBegin(new TList(TType.STRING, this.noteGuids.size()));
          for (String _iter133 : this.noteGuids)
          {
            oprot.writeString(_iter133);
          }
          oprot.writeListEnd();
        }
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    public void validate() throws TException {
      // check for required fields
    }

  }

  private static class expungeNotes_result implements TBase, java.io.Serializable, Cloneable   {
    private static final TStruct STRUCT_DESC = new TStruct("expungeNotes_result");

    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.I32, (short)0);
    private static final TField USER_EXCEPTION_FIELD_DESC = new TField("userException", TType.STRUCT, (short)1);
    private static final TField SYSTEM_EXCEPTION_FIELD_DESC = new TField("systemException", TType.STRUCT, (short)2);
    private static final TField NOT_FOUND_EXCEPTION_FIELD_DESC = new TField("notFoundException", TType.STRUCT, (short)3);

    private int success;
    private com.evernote.edam.error.EDAMUserException userException;
    private com.evernote.edam.error.EDAMSystemException systemException;
    private com.evernote.edam.error.EDAMNotFoundException notFoundException;


    // isset id assignments
    private static final int __SUCCESS_ISSET_ID = 0;
    private boolean[] __isset_vector = new boolean[1];

    public expungeNotes_result() {
    }

    /**
     * Performs a deep copy on other.
     */
    public expungeNotes_result(expungeNotes_result other) {
      System.arraycopy(other.__isset_vector, 0, __isset_vector, 0, other.__isset_vector.length);
      this.success = other.success;
      if (other.isSetUserException()) {
        this.userException = new com.evernote.edam.error.EDAMUserException(other.userException);
      }
      if (other.isSetSystemException()) {
        this.systemException = new com.evernote.edam.error.EDAMSystemException(other.systemException);
      }
      if (other.isSetNotFoundException()) {
        this.notFoundException = new com.evernote.edam.error.EDAMNotFoundException(other.notFoundException);
      }
    }

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

    public void clear() {
      setSuccessIsSet(false);
      this.success = 0;
      this.userException = null;
      this.systemException = null;
      this.notFoundException = null;
    }

    /** Returns true if field success is set (has been asigned a value) and false otherwise */
    public boolean isSetSuccess() {
      return __isset_vector[__SUCCESS_ISSET_ID];
    }

    public void setSuccessIsSet(boolean value) {
      __isset_vector[__SUCCESS_ISSET_ID] = value;
    }

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

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

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

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

      int lastComparison = 0;
      expungeNotes_result typedOther = (expungeNotes_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {        lastComparison = TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetUserException()).compareTo(typedOther.isSetUserException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetUserException()) {        lastComparison = TBaseHelper.compareTo(this.userException, typedOther.userException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetSystemException()).compareTo(typedOther.isSetSystemException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSystemException()) {        lastComparison = TBaseHelper.compareTo(this.systemException, typedOther.systemException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetNotFoundException()).compareTo(typedOther.isSetNotFoundException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetNotFoundException()) {        lastComparison = TBaseHelper.compareTo(this.notFoundException, typedOther.notFoundException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public void read(TProtocol iprot) throws TException {
      TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == TType.I32) {
              this.success = iprot.readI32();
              setSuccessIsSet(true);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 1: // USER_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.userException = new com.evernote.edam.error.EDAMUserException();
              this.userException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // SYSTEM_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.systemException = new com.evernote.edam.error.EDAMSystemException();
              this.systemException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 3: // NOT_FOUND_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.notFoundException = new com.evernote.edam.error.EDAMNotFoundException();
              this.notFoundException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(TProtocol oprot) throws TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        oprot.writeI32(this.success);
        oprot.writeFieldEnd();
      } else if (this.isSetUserException()) {
        oprot.writeFieldBegin(USER_EXCEPTION_FIELD_DESC);
        this.userException.write(oprot);
        oprot.writeFieldEnd();
      } else if (this.isSetSystemException()) {
        oprot.writeFieldBegin(SYSTEM_EXCEPTION_FIELD_DESC);
        this.systemException.write(oprot);
        oprot.writeFieldEnd();
      } else if (this.isSetNotFoundException()) {
        oprot.writeFieldBegin(NOT_FOUND_EXCEPTION_FIELD_DESC);
        this.notFoundException.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    public void validate() throws TException {
      // check for required fields
    }

  }

  private static class expungeInactiveNotes_args implements TBase, java.io.Serializable, Cloneable   {
    private static final TStruct STRUCT_DESC = new TStruct("expungeInactiveNotes_args");

    private static final TField AUTHENTICATION_TOKEN_FIELD_DESC = new TField("authenticationToken", TType.STRING, (short)1);

    private String authenticationToken;


    // isset id assignments

    public expungeInactiveNotes_args() {
    }

    /**
     * Performs a deep copy on other.
     */
    public expungeInactiveNotes_args(expungeInactiveNotes_args other) {
      if (other.isSetAuthenticationToken()) {
        this.authenticationToken = other.authenticationToken;
      }
    }

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

    public void clear() {
      this.authenticationToken = null;
    }

    public void setAuthenticationToken(String authenticationToken) {
      this.authenticationToken = authenticationToken;
    }

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

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

      int lastComparison = 0;
      expungeInactiveNotes_args typedOther = (expungeInactiveNotes_args)other;

      lastComparison = Boolean.valueOf(isSetAuthenticationToken()).compareTo(typedOther.isSetAuthenticationToken());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetAuthenticationToken()) {        lastComparison = TBaseHelper.compareTo(this.authenticationToken, typedOther.authenticationToken);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public void read(TProtocol iprot) throws TException {
      TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // AUTHENTICATION_TOKEN
            if (field.type == TType.STRING) {
              this.authenticationToken = iprot.readString();
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(TProtocol oprot) throws TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      if (this.authenticationToken != null) {
        oprot.writeFieldBegin(AUTHENTICATION_TOKEN_FIELD_DESC);
        oprot.writeString(this.authenticationToken);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    public void validate() throws TException {
      // check for required fields
    }

  }

  private static class expungeInactiveNotes_result implements TBase, java.io.Serializable, Cloneable   {
    private static final TStruct STRUCT_DESC = new TStruct("expungeInactiveNotes_result");

    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.I32, (short)0);
    private static final TField USER_EXCEPTION_FIELD_DESC = new TField("userException", TType.STRUCT, (short)1);
    private static final TField SYSTEM_EXCEPTION_FIELD_DESC = new TField("systemException", TType.STRUCT, (short)2);

    private int success;
    private com.evernote.edam.error.EDAMUserException userException;
    private com.evernote.edam.error.EDAMSystemException systemException;


    // isset id assignments
    private static final int __SUCCESS_ISSET_ID = 0;
    private boolean[] __isset_vector = new boolean[1];

    public expungeInactiveNotes_result() {
    }

    /**
     * Performs a deep copy on other.
     */
    public expungeInactiveNotes_result(expungeInactiveNotes_result other) {
      System.arraycopy(other.__isset_vector, 0, __isset_vector, 0, other.__isset_vector.length);
      this.success = other.success;
      if (other.isSetUserException()) {
        this.userException = new com.evernote.edam.error.EDAMUserException(other.userException);
      }
      if (other.isSetSystemException()) {
        this.systemException = new com.evernote.edam.error.EDAMSystemException(other.systemException);
      }
    }

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

    public void clear() {
      setSuccessIsSet(false);
      this.success = 0;
      this.userException = null;
      this.systemException = null;
    }

    /** Returns true if field success is set (has been asigned a value) and false otherwise */
    public boolean isSetSuccess() {
      return __isset_vector[__SUCCESS_ISSET_ID];
    }

    public void setSuccessIsSet(boolean value) {
      __isset_vector[__SUCCESS_ISSET_ID] = value;
    }

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

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

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

      int lastComparison = 0;
      expungeInactiveNotes_result typedOther = (expungeInactiveNotes_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {        lastComparison = TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetUserException()).compareTo(typedOther.isSetUserException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetUserException()) {        lastComparison = TBaseHelper.compareTo(this.userException, typedOther.userException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetSystemException()).compareTo(typedOther.isSetSystemException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSystemException()) {        lastComparison = TBaseHelper.compareTo(this.systemException, typedOther.systemException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public void read(TProtocol iprot) throws TException {
      TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == TType.I32) {
              this.success = iprot.readI32();
              setSuccessIsSet(true);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 1: // USER_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.userException = new com.evernote.edam.error.EDAMUserException();
              this.userException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // SYSTEM_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.systemException = new com.evernote.edam.error.EDAMSystemException();
              this.systemException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(TProtocol oprot) throws TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        oprot.writeI32(this.success);
        oprot.writeFieldEnd();
      } else if (this.isSetUserException()) {
        oprot.writeFieldBegin(USER_EXCEPTION_FIELD_DESC);
        this.userException.write(oprot);
        oprot.writeFieldEnd();
      } else if (this.isSetSystemException()) {
        oprot.writeFieldBegin(SYSTEM_EXCEPTION_FIELD_DESC);
        this.systemException.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    public void validate() throws TException {
      // check for required fields
    }

  }

  private static class copyNote_args implements TBase, java.io.Serializable, Cloneable   {
    private static final TStruct STRUCT_DESC = new TStruct("copyNote_args");

    private static final TField AUTHENTICATION_TOKEN_FIELD_DESC = new TField("authenticationToken", TType.STRING, (short)1);
    private static final TField NOTE_GUID_FIELD_DESC = new TField("noteGuid", TType.STRING, (short)2);
    private static final TField TO_NOTEBOOK_GUID_FIELD_DESC = new TField("toNotebookGuid", TType.STRING, (short)3);

    private String authenticationToken;
    private String noteGuid;
    private String toNotebookGuid;


    // isset id assignments

    public copyNote_args() {
    }

    /**
     * Performs a deep copy on other.
     */
    public copyNote_args(copyNote_args other) {
      if (other.isSetAuthenticationToken()) {
        this.authenticationToken = other.authenticationToken;
      }
      if (other.isSetNoteGuid()) {
        this.noteGuid = other.noteGuid;
      }
      if (other.isSetToNotebookGuid()) {
        this.toNotebookGuid = other.toNotebookGuid;
      }
    }

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

    public void clear() {
      this.authenticationToken = null;
      this.noteGuid = null;
      this.toNotebookGuid = null;
    }

    public void setAuthenticationToken(String authenticationToken) {
      this.authenticationToken = authenticationToken;
    }

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

    public void setNoteGuid(String noteGuid) {
      this.noteGuid = noteGuid;
    }

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

    public void setToNotebookGuid(String toNotebookGuid) {
      this.toNotebookGuid = toNotebookGuid;
    }

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

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

      int lastComparison = 0;
      copyNote_args typedOther = (copyNote_args)other;

      lastComparison = Boolean.valueOf(isSetAuthenticationToken()).compareTo(typedOther.isSetAuthenticationToken());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetAuthenticationToken()) {        lastComparison = TBaseHelper.compareTo(this.authenticationToken, typedOther.authenticationToken);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetNoteGuid()).compareTo(typedOther.isSetNoteGuid());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetNoteGuid()) {        lastComparison = TBaseHelper.compareTo(this.noteGuid, typedOther.noteGuid);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetToNotebookGuid()).compareTo(typedOther.isSetToNotebookGuid());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetToNotebookGuid()) {        lastComparison = TBaseHelper.compareTo(this.toNotebookGuid, typedOther.toNotebookGuid);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public void read(TProtocol iprot) throws TException {
      TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // AUTHENTICATION_TOKEN
            if (field.type == TType.STRING) {
              this.authenticationToken = iprot.readString();
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // NOTE_GUID
            if (field.type == TType.STRING) {
              this.noteGuid = iprot.readString();
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 3: // TO_NOTEBOOK_GUID
            if (field.type == TType.STRING) {
              this.toNotebookGuid = iprot.readString();
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(TProtocol oprot) throws TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      if (this.authenticationToken != null) {
        oprot.writeFieldBegin(AUTHENTICATION_TOKEN_FIELD_DESC);
        oprot.writeString(this.authenticationToken);
        oprot.writeFieldEnd();
      }
      if (this.noteGuid != null) {
        oprot.writeFieldBegin(NOTE_GUID_FIELD_DESC);
        oprot.writeString(this.noteGuid);
        oprot.writeFieldEnd();
      }
      if (this.toNotebookGuid != null) {
        oprot.writeFieldBegin(TO_NOTEBOOK_GUID_FIELD_DESC);
        oprot.writeString(this.toNotebookGuid);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    public void validate() throws TException {
      // check for required fields
    }

  }

  private static class copyNote_result implements TBase, java.io.Serializable, Cloneable   {
    private static final TStruct STRUCT_DESC = new TStruct("copyNote_result");

    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
    private static final TField USER_EXCEPTION_FIELD_DESC = new TField("userException", TType.STRUCT, (short)1);
    private static final TField SYSTEM_EXCEPTION_FIELD_DESC = new TField("systemException", TType.STRUCT, (short)2);
    private static final TField NOT_FOUND_EXCEPTION_FIELD_DESC = new TField("notFoundException", TType.STRUCT, (short)3);

    private com.evernote.edam.type.Note success;
    private com.evernote.edam.error.EDAMUserException userException;
    private com.evernote.edam.error.EDAMSystemException systemException;
    private com.evernote.edam.error.EDAMNotFoundException notFoundException;


    // isset id assignments

    public copyNote_result() {
    }

    /**
     * Performs a deep copy on other.
     */
    public copyNote_result(copyNote_result other) {
      if (other.isSetSuccess()) {
        this.success = new com.evernote.edam.type.Note(other.success);
      }
      if (other.isSetUserException()) {
        this.userException = new com.evernote.edam.error.EDAMUserException(other.userException);
      }
      if (other.isSetSystemException()) {
        this.systemException = new com.evernote.edam.error.EDAMSystemException(other.systemException);
      }
      if (other.isSetNotFoundException()) {
        this.notFoundException = new com.evernote.edam.error.EDAMNotFoundException(other.notFoundException);
      }
    }

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

    public void clear() {
      this.success = null;
      this.userException = null;
      this.systemException = null;
      this.notFoundException = null;
    }

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

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

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

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

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

      int lastComparison = 0;
      copyNote_result typedOther = (copyNote_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {        lastComparison = TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetUserException()).compareTo(typedOther.isSetUserException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetUserException()) {        lastComparison = TBaseHelper.compareTo(this.userException, typedOther.userException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetSystemException()).compareTo(typedOther.isSetSystemException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSystemException()) {        lastComparison = TBaseHelper.compareTo(this.systemException, typedOther.systemException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetNotFoundException()).compareTo(typedOther.isSetNotFoundException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetNotFoundException()) {        lastComparison = TBaseHelper.compareTo(this.notFoundException, typedOther.notFoundException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public void read(TProtocol iprot) throws TException {
      TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == TType.STRUCT) {
              this.success = new com.evernote.edam.type.Note();
              this.success.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 1: // USER_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.userException = new com.evernote.edam.error.EDAMUserException();
              this.userException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // SYSTEM_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.systemException = new com.evernote.edam.error.EDAMSystemException();
              this.systemException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 3: // NOT_FOUND_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.notFoundException = new com.evernote.edam.error.EDAMNotFoundException();
              this.notFoundException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(TProtocol oprot) throws TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        this.success.write(oprot);
        oprot.writeFieldEnd();
      } else if (this.isSetUserException()) {
        oprot.writeFieldBegin(USER_EXCEPTION_FIELD_DESC);
        this.userException.write(oprot);
        oprot.writeFieldEnd();
      } else if (this.isSetSystemException()) {
        oprot.writeFieldBegin(SYSTEM_EXCEPTION_FIELD_DESC);
        this.systemException.write(oprot);
        oprot.writeFieldEnd();
      } else if (this.isSetNotFoundException()) {
        oprot.writeFieldBegin(NOT_FOUND_EXCEPTION_FIELD_DESC);
        this.notFoundException.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    public void validate() throws TException {
      // check for required fields
    }

  }

  private static class listNoteVersions_args implements TBase, java.io.Serializable, Cloneable   {
    private static final TStruct STRUCT_DESC = new TStruct("listNoteVersions_args");

    private static final TField AUTHENTICATION_TOKEN_FIELD_DESC = new TField("authenticationToken", TType.STRING, (short)1);
    private static final TField NOTE_GUID_FIELD_DESC = new TField("noteGuid", TType.STRING, (short)2);

    private String authenticationToken;
    private String noteGuid;


    // isset id assignments

    public listNoteVersions_args() {
    }

    /**
     * Performs a deep copy on other.
     */
    public listNoteVersions_args(listNoteVersions_args other) {
      if (other.isSetAuthenticationToken()) {
        this.authenticationToken = other.authenticationToken;
      }
      if (other.isSetNoteGuid()) {
        this.noteGuid = other.noteGuid;
      }
    }

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

    public void clear() {
      this.authenticationToken = null;
      this.noteGuid = null;
    }

    public void setAuthenticationToken(String authenticationToken) {
      this.authenticationToken = authenticationToken;
    }

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

    public void setNoteGuid(String noteGuid) {
      this.noteGuid = noteGuid;
    }

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

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

      int lastComparison = 0;
      listNoteVersions_args typedOther = (listNoteVersions_args)other;

      lastComparison = Boolean.valueOf(isSetAuthenticationToken()).compareTo(typedOther.isSetAuthenticationToken());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetAuthenticationToken()) {        lastComparison = TBaseHelper.compareTo(this.authenticationToken, typedOther.authenticationToken);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetNoteGuid()).compareTo(typedOther.isSetNoteGuid());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetNoteGuid()) {        lastComparison = TBaseHelper.compareTo(this.noteGuid, typedOther.noteGuid);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public void read(TProtocol iprot) throws TException {
      TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // AUTHENTICATION_TOKEN
            if (field.type == TType.STRING) {
              this.authenticationToken = iprot.readString();
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // NOTE_GUID
            if (field.type == TType.STRING) {
              this.noteGuid = iprot.readString();
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(TProtocol oprot) throws TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      if (this.authenticationToken != null) {
        oprot.writeFieldBegin(AUTHENTICATION_TOKEN_FIELD_DESC);
        oprot.writeString(this.authenticationToken);
        oprot.writeFieldEnd();
      }
      if (this.noteGuid != null) {
        oprot.writeFieldBegin(NOTE_GUID_FIELD_DESC);
        oprot.writeString(this.noteGuid);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    public void validate() throws TException {
      // check for required fields
    }

  }

  private static class listNoteVersions_result implements TBase, java.io.Serializable, Cloneable   {
    private static final TStruct STRUCT_DESC = new TStruct("listNoteVersions_result");

    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
    private static final TField USER_EXCEPTION_FIELD_DESC = new TField("userException", TType.STRUCT, (short)1);
    private static final TField SYSTEM_EXCEPTION_FIELD_DESC = new TField("systemException", TType.STRUCT, (short)2);
    private static final TField NOT_FOUND_EXCEPTION_FIELD_DESC = new TField("notFoundException", TType.STRUCT, (short)3);

    private List success;
    private com.evernote.edam.error.EDAMUserException userException;
    private com.evernote.edam.error.EDAMSystemException systemException;
    private com.evernote.edam.error.EDAMNotFoundException notFoundException;


    // isset id assignments

    public listNoteVersions_result() {
    }

    /**
     * Performs a deep copy on other.
     */
    public listNoteVersions_result(listNoteVersions_result other) {
      if (other.isSetSuccess()) {
        List __this__success = new ArrayList();
        for (NoteVersionId other_element : other.success) {
          __this__success.add(new NoteVersionId(other_element));
        }
        this.success = __this__success;
      }
      if (other.isSetUserException()) {
        this.userException = new com.evernote.edam.error.EDAMUserException(other.userException);
      }
      if (other.isSetSystemException()) {
        this.systemException = new com.evernote.edam.error.EDAMSystemException(other.systemException);
      }
      if (other.isSetNotFoundException()) {
        this.notFoundException = new com.evernote.edam.error.EDAMNotFoundException(other.notFoundException);
      }
    }

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

    public void clear() {
      this.success = null;
      this.userException = null;
      this.systemException = null;
      this.notFoundException = null;
    }

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

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

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

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

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

      int lastComparison = 0;
      listNoteVersions_result typedOther = (listNoteVersions_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {        lastComparison = TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetUserException()).compareTo(typedOther.isSetUserException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetUserException()) {        lastComparison = TBaseHelper.compareTo(this.userException, typedOther.userException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetSystemException()).compareTo(typedOther.isSetSystemException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSystemException()) {        lastComparison = TBaseHelper.compareTo(this.systemException, typedOther.systemException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetNotFoundException()).compareTo(typedOther.isSetNotFoundException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetNotFoundException()) {        lastComparison = TBaseHelper.compareTo(this.notFoundException, typedOther.notFoundException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public void read(TProtocol iprot) throws TException {
      TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == TType.LIST) {
              {
                TList _list134 = iprot.readListBegin();
                this.success = new ArrayList(_list134.size);
                for (int _i135 = 0; _i135 < _list134.size; ++_i135)
                {
                  NoteVersionId _elem136;
                  _elem136 = new NoteVersionId();
                  _elem136.read(iprot);
                  this.success.add(_elem136);
                }
                iprot.readListEnd();
              }
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 1: // USER_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.userException = new com.evernote.edam.error.EDAMUserException();
              this.userException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // SYSTEM_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.systemException = new com.evernote.edam.error.EDAMSystemException();
              this.systemException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 3: // NOT_FOUND_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.notFoundException = new com.evernote.edam.error.EDAMNotFoundException();
              this.notFoundException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(TProtocol oprot) throws TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        {
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
          for (NoteVersionId _iter137 : this.success)
          {
            _iter137.write(oprot);
          }
          oprot.writeListEnd();
        }
        oprot.writeFieldEnd();
      } else if (this.isSetUserException()) {
        oprot.writeFieldBegin(USER_EXCEPTION_FIELD_DESC);
        this.userException.write(oprot);
        oprot.writeFieldEnd();
      } else if (this.isSetSystemException()) {
        oprot.writeFieldBegin(SYSTEM_EXCEPTION_FIELD_DESC);
        this.systemException.write(oprot);
        oprot.writeFieldEnd();
      } else if (this.isSetNotFoundException()) {
        oprot.writeFieldBegin(NOT_FOUND_EXCEPTION_FIELD_DESC);
        this.notFoundException.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    public void validate() throws TException {
      // check for required fields
    }

  }

  private static class getNoteVersion_args implements TBase, java.io.Serializable, Cloneable   {
    private static final TStruct STRUCT_DESC = new TStruct("getNoteVersion_args");

    private static final TField AUTHENTICATION_TOKEN_FIELD_DESC = new TField("authenticationToken", TType.STRING, (short)1);
    private static final TField NOTE_GUID_FIELD_DESC = new TField("noteGuid", TType.STRING, (short)2);
    private static final TField UPDATE_SEQUENCE_NUM_FIELD_DESC = new TField("updateSequenceNum", TType.I32, (short)3);
    private static final TField WITH_RESOURCES_DATA_FIELD_DESC = new TField("withResourcesData", TType.BOOL, (short)4);
    private static final TField WITH_RESOURCES_RECOGNITION_FIELD_DESC = new TField("withResourcesRecognition", TType.BOOL, (short)5);
    private static final TField WITH_RESOURCES_ALTERNATE_DATA_FIELD_DESC = new TField("withResourcesAlternateData", TType.BOOL, (short)6);

    private String authenticationToken;
    private String noteGuid;
    private int updateSequenceNum;
    private boolean withResourcesData;
    private boolean withResourcesRecognition;
    private boolean withResourcesAlternateData;


    // isset id assignments
    private static final int __UPDATESEQUENCENUM_ISSET_ID = 0;
    private static final int __WITHRESOURCESDATA_ISSET_ID = 1;
    private static final int __WITHRESOURCESRECOGNITION_ISSET_ID = 2;
    private static final int __WITHRESOURCESALTERNATEDATA_ISSET_ID = 3;
    private boolean[] __isset_vector = new boolean[4];

    public getNoteVersion_args() {
    }

    /**
     * Performs a deep copy on other.
     */
    public getNoteVersion_args(getNoteVersion_args other) {
      System.arraycopy(other.__isset_vector, 0, __isset_vector, 0, other.__isset_vector.length);
      if (other.isSetAuthenticationToken()) {
        this.authenticationToken = other.authenticationToken;
      }
      if (other.isSetNoteGuid()) {
        this.noteGuid = other.noteGuid;
      }
      this.updateSequenceNum = other.updateSequenceNum;
      this.withResourcesData = other.withResourcesData;
      this.withResourcesRecognition = other.withResourcesRecognition;
      this.withResourcesAlternateData = other.withResourcesAlternateData;
    }

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

    public void clear() {
      this.authenticationToken = null;
      this.noteGuid = null;
      setUpdateSequenceNumIsSet(false);
      this.updateSequenceNum = 0;
      setWithResourcesDataIsSet(false);
      this.withResourcesData = false;
      setWithResourcesRecognitionIsSet(false);
      this.withResourcesRecognition = false;
      setWithResourcesAlternateDataIsSet(false);
      this.withResourcesAlternateData = false;
    }

    public void setAuthenticationToken(String authenticationToken) {
      this.authenticationToken = authenticationToken;
    }

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

    public void setNoteGuid(String noteGuid) {
      this.noteGuid = noteGuid;
    }

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

    public void setUpdateSequenceNum(int updateSequenceNum) {
      this.updateSequenceNum = updateSequenceNum;
      setUpdateSequenceNumIsSet(true);
    }

    /** Returns true if field updateSequenceNum is set (has been asigned a value) and false otherwise */
    public boolean isSetUpdateSequenceNum() {
      return __isset_vector[__UPDATESEQUENCENUM_ISSET_ID];
    }

    public void setUpdateSequenceNumIsSet(boolean value) {
      __isset_vector[__UPDATESEQUENCENUM_ISSET_ID] = value;
    }

    public void setWithResourcesData(boolean withResourcesData) {
      this.withResourcesData = withResourcesData;
      setWithResourcesDataIsSet(true);
    }

    /** Returns true if field withResourcesData is set (has been asigned a value) and false otherwise */
    public boolean isSetWithResourcesData() {
      return __isset_vector[__WITHRESOURCESDATA_ISSET_ID];
    }

    public void setWithResourcesDataIsSet(boolean value) {
      __isset_vector[__WITHRESOURCESDATA_ISSET_ID] = value;
    }

    public void setWithResourcesRecognition(boolean withResourcesRecognition) {
      this.withResourcesRecognition = withResourcesRecognition;
      setWithResourcesRecognitionIsSet(true);
    }

    /** Returns true if field withResourcesRecognition is set (has been asigned a value) and false otherwise */
    public boolean isSetWithResourcesRecognition() {
      return __isset_vector[__WITHRESOURCESRECOGNITION_ISSET_ID];
    }

    public void setWithResourcesRecognitionIsSet(boolean value) {
      __isset_vector[__WITHRESOURCESRECOGNITION_ISSET_ID] = value;
    }

    public void setWithResourcesAlternateData(boolean withResourcesAlternateData) {
      this.withResourcesAlternateData = withResourcesAlternateData;
      setWithResourcesAlternateDataIsSet(true);
    }

    /** Returns true if field withResourcesAlternateData is set (has been asigned a value) and false otherwise */
    public boolean isSetWithResourcesAlternateData() {
      return __isset_vector[__WITHRESOURCESALTERNATEDATA_ISSET_ID];
    }

    public void setWithResourcesAlternateDataIsSet(boolean value) {
      __isset_vector[__WITHRESOURCESALTERNATEDATA_ISSET_ID] = value;
    }

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

      int lastComparison = 0;
      getNoteVersion_args typedOther = (getNoteVersion_args)other;

      lastComparison = Boolean.valueOf(isSetAuthenticationToken()).compareTo(typedOther.isSetAuthenticationToken());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetAuthenticationToken()) {        lastComparison = TBaseHelper.compareTo(this.authenticationToken, typedOther.authenticationToken);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetNoteGuid()).compareTo(typedOther.isSetNoteGuid());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetNoteGuid()) {        lastComparison = TBaseHelper.compareTo(this.noteGuid, typedOther.noteGuid);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetUpdateSequenceNum()).compareTo(typedOther.isSetUpdateSequenceNum());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetUpdateSequenceNum()) {        lastComparison = TBaseHelper.compareTo(this.updateSequenceNum, typedOther.updateSequenceNum);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetWithResourcesData()).compareTo(typedOther.isSetWithResourcesData());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetWithResourcesData()) {        lastComparison = TBaseHelper.compareTo(this.withResourcesData, typedOther.withResourcesData);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetWithResourcesRecognition()).compareTo(typedOther.isSetWithResourcesRecognition());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetWithResourcesRecognition()) {        lastComparison = TBaseHelper.compareTo(this.withResourcesRecognition, typedOther.withResourcesRecognition);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetWithResourcesAlternateData()).compareTo(typedOther.isSetWithResourcesAlternateData());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetWithResourcesAlternateData()) {        lastComparison = TBaseHelper.compareTo(this.withResourcesAlternateData, typedOther.withResourcesAlternateData);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public void read(TProtocol iprot) throws TException {
      TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // AUTHENTICATION_TOKEN
            if (field.type == TType.STRING) {
              this.authenticationToken = iprot.readString();
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // NOTE_GUID
            if (field.type == TType.STRING) {
              this.noteGuid = iprot.readString();
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 3: // UPDATE_SEQUENCE_NUM
            if (field.type == TType.I32) {
              this.updateSequenceNum = iprot.readI32();
              setUpdateSequenceNumIsSet(true);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 4: // WITH_RESOURCES_DATA
            if (field.type == TType.BOOL) {
              this.withResourcesData = iprot.readBool();
              setWithResourcesDataIsSet(true);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 5: // WITH_RESOURCES_RECOGNITION
            if (field.type == TType.BOOL) {
              this.withResourcesRecognition = iprot.readBool();
              setWithResourcesRecognitionIsSet(true);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 6: // WITH_RESOURCES_ALTERNATE_DATA
            if (field.type == TType.BOOL) {
              this.withResourcesAlternateData = iprot.readBool();
              setWithResourcesAlternateDataIsSet(true);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(TProtocol oprot) throws TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      if (this.authenticationToken != null) {
        oprot.writeFieldBegin(AUTHENTICATION_TOKEN_FIELD_DESC);
        oprot.writeString(this.authenticationToken);
        oprot.writeFieldEnd();
      }
      if (this.noteGuid != null) {
        oprot.writeFieldBegin(NOTE_GUID_FIELD_DESC);
        oprot.writeString(this.noteGuid);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldBegin(UPDATE_SEQUENCE_NUM_FIELD_DESC);
      oprot.writeI32(this.updateSequenceNum);
      oprot.writeFieldEnd();
      oprot.writeFieldBegin(WITH_RESOURCES_DATA_FIELD_DESC);
      oprot.writeBool(this.withResourcesData);
      oprot.writeFieldEnd();
      oprot.writeFieldBegin(WITH_RESOURCES_RECOGNITION_FIELD_DESC);
      oprot.writeBool(this.withResourcesRecognition);
      oprot.writeFieldEnd();
      oprot.writeFieldBegin(WITH_RESOURCES_ALTERNATE_DATA_FIELD_DESC);
      oprot.writeBool(this.withResourcesAlternateData);
      oprot.writeFieldEnd();
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    public void validate() throws TException {
      // check for required fields
    }

  }

  private static class getNoteVersion_result implements TBase, java.io.Serializable, Cloneable   {
    private static final TStruct STRUCT_DESC = new TStruct("getNoteVersion_result");

    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
    private static final TField USER_EXCEPTION_FIELD_DESC = new TField("userException", TType.STRUCT, (short)1);
    private static final TField SYSTEM_EXCEPTION_FIELD_DESC = new TField("systemException", TType.STRUCT, (short)2);
    private static final TField NOT_FOUND_EXCEPTION_FIELD_DESC = new TField("notFoundException", TType.STRUCT, (short)3);

    private com.evernote.edam.type.Note success;
    private com.evernote.edam.error.EDAMUserException userException;
    private com.evernote.edam.error.EDAMSystemException systemException;
    private com.evernote.edam.error.EDAMNotFoundException notFoundException;


    // isset id assignments

    public getNoteVersion_result() {
    }

    /**
     * Performs a deep copy on other.
     */
    public getNoteVersion_result(getNoteVersion_result other) {
      if (other.isSetSuccess()) {
        this.success = new com.evernote.edam.type.Note(other.success);
      }
      if (other.isSetUserException()) {
        this.userException = new com.evernote.edam.error.EDAMUserException(other.userException);
      }
      if (other.isSetSystemException()) {
        this.systemException = new com.evernote.edam.error.EDAMSystemException(other.systemException);
      }
      if (other.isSetNotFoundException()) {
        this.notFoundException = new com.evernote.edam.error.EDAMNotFoundException(other.notFoundException);
      }
    }

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

    public void clear() {
      this.success = null;
      this.userException = null;
      this.systemException = null;
      this.notFoundException = null;
    }

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

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

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

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

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

      int lastComparison = 0;
      getNoteVersion_result typedOther = (getNoteVersion_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {        lastComparison = TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetUserException()).compareTo(typedOther.isSetUserException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetUserException()) {        lastComparison = TBaseHelper.compareTo(this.userException, typedOther.userException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetSystemException()).compareTo(typedOther.isSetSystemException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSystemException()) {        lastComparison = TBaseHelper.compareTo(this.systemException, typedOther.systemException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetNotFoundException()).compareTo(typedOther.isSetNotFoundException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetNotFoundException()) {        lastComparison = TBaseHelper.compareTo(this.notFoundException, typedOther.notFoundException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public void read(TProtocol iprot) throws TException {
      TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == TType.STRUCT) {
              this.success = new com.evernote.edam.type.Note();
              this.success.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 1: // USER_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.userException = new com.evernote.edam.error.EDAMUserException();
              this.userException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // SYSTEM_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.systemException = new com.evernote.edam.error.EDAMSystemException();
              this.systemException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 3: // NOT_FOUND_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.notFoundException = new com.evernote.edam.error.EDAMNotFoundException();
              this.notFoundException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(TProtocol oprot) throws TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        this.success.write(oprot);
        oprot.writeFieldEnd();
      } else if (this.isSetUserException()) {
        oprot.writeFieldBegin(USER_EXCEPTION_FIELD_DESC);
        this.userException.write(oprot);
        oprot.writeFieldEnd();
      } else if (this.isSetSystemException()) {
        oprot.writeFieldBegin(SYSTEM_EXCEPTION_FIELD_DESC);
        this.systemException.write(oprot);
        oprot.writeFieldEnd();
      } else if (this.isSetNotFoundException()) {
        oprot.writeFieldBegin(NOT_FOUND_EXCEPTION_FIELD_DESC);
        this.notFoundException.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    public void validate() throws TException {
      // check for required fields
    }

  }

  private static class getResource_args implements TBase, java.io.Serializable, Cloneable   {
    private static final TStruct STRUCT_DESC = new TStruct("getResource_args");

    private static final TField AUTHENTICATION_TOKEN_FIELD_DESC = new TField("authenticationToken", TType.STRING, (short)1);
    private static final TField GUID_FIELD_DESC = new TField("guid", TType.STRING, (short)2);
    private static final TField WITH_DATA_FIELD_DESC = new TField("withData", TType.BOOL, (short)3);
    private static final TField WITH_RECOGNITION_FIELD_DESC = new TField("withRecognition", TType.BOOL, (short)4);
    private static final TField WITH_ATTRIBUTES_FIELD_DESC = new TField("withAttributes", TType.BOOL, (short)5);
    private static final TField WITH_ALTERNATE_DATA_FIELD_DESC = new TField("withAlternateData", TType.BOOL, (short)6);

    private String authenticationToken;
    private String guid;
    private boolean withData;
    private boolean withRecognition;
    private boolean withAttributes;
    private boolean withAlternateData;


    // isset id assignments
    private static final int __WITHDATA_ISSET_ID = 0;
    private static final int __WITHRECOGNITION_ISSET_ID = 1;
    private static final int __WITHATTRIBUTES_ISSET_ID = 2;
    private static final int __WITHALTERNATEDATA_ISSET_ID = 3;
    private boolean[] __isset_vector = new boolean[4];

    public getResource_args() {
    }

    /**
     * Performs a deep copy on other.
     */
    public getResource_args(getResource_args other) {
      System.arraycopy(other.__isset_vector, 0, __isset_vector, 0, other.__isset_vector.length);
      if (other.isSetAuthenticationToken()) {
        this.authenticationToken = other.authenticationToken;
      }
      if (other.isSetGuid()) {
        this.guid = other.guid;
      }
      this.withData = other.withData;
      this.withRecognition = other.withRecognition;
      this.withAttributes = other.withAttributes;
      this.withAlternateData = other.withAlternateData;
    }

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

    public void clear() {
      this.authenticationToken = null;
      this.guid = null;
      setWithDataIsSet(false);
      this.withData = false;
      setWithRecognitionIsSet(false);
      this.withRecognition = false;
      setWithAttributesIsSet(false);
      this.withAttributes = false;
      setWithAlternateDataIsSet(false);
      this.withAlternateData = false;
    }

    public void setAuthenticationToken(String authenticationToken) {
      this.authenticationToken = authenticationToken;
    }

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

    public void setGuid(String guid) {
      this.guid = guid;
    }

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

    public void setWithData(boolean withData) {
      this.withData = withData;
      setWithDataIsSet(true);
    }

    /** Returns true if field withData is set (has been asigned a value) and false otherwise */
    public boolean isSetWithData() {
      return __isset_vector[__WITHDATA_ISSET_ID];
    }

    public void setWithDataIsSet(boolean value) {
      __isset_vector[__WITHDATA_ISSET_ID] = value;
    }

    public void setWithRecognition(boolean withRecognition) {
      this.withRecognition = withRecognition;
      setWithRecognitionIsSet(true);
    }

    /** Returns true if field withRecognition is set (has been asigned a value) and false otherwise */
    public boolean isSetWithRecognition() {
      return __isset_vector[__WITHRECOGNITION_ISSET_ID];
    }

    public void setWithRecognitionIsSet(boolean value) {
      __isset_vector[__WITHRECOGNITION_ISSET_ID] = value;
    }

    public void setWithAttributes(boolean withAttributes) {
      this.withAttributes = withAttributes;
      setWithAttributesIsSet(true);
    }

    /** Returns true if field withAttributes is set (has been asigned a value) and false otherwise */
    public boolean isSetWithAttributes() {
      return __isset_vector[__WITHATTRIBUTES_ISSET_ID];
    }

    public void setWithAttributesIsSet(boolean value) {
      __isset_vector[__WITHATTRIBUTES_ISSET_ID] = value;
    }

    public void setWithAlternateData(boolean withAlternateData) {
      this.withAlternateData = withAlternateData;
      setWithAlternateDataIsSet(true);
    }

    /** Returns true if field withAlternateData is set (has been asigned a value) and false otherwise */
    public boolean isSetWithAlternateData() {
      return __isset_vector[__WITHALTERNATEDATA_ISSET_ID];
    }

    public void setWithAlternateDataIsSet(boolean value) {
      __isset_vector[__WITHALTERNATEDATA_ISSET_ID] = value;
    }

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

      int lastComparison = 0;
      getResource_args typedOther = (getResource_args)other;

      lastComparison = Boolean.valueOf(isSetAuthenticationToken()).compareTo(typedOther.isSetAuthenticationToken());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetAuthenticationToken()) {        lastComparison = TBaseHelper.compareTo(this.authenticationToken, typedOther.authenticationToken);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetGuid()).compareTo(typedOther.isSetGuid());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetGuid()) {        lastComparison = TBaseHelper.compareTo(this.guid, typedOther.guid);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetWithData()).compareTo(typedOther.isSetWithData());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetWithData()) {        lastComparison = TBaseHelper.compareTo(this.withData, typedOther.withData);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetWithRecognition()).compareTo(typedOther.isSetWithRecognition());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetWithRecognition()) {        lastComparison = TBaseHelper.compareTo(this.withRecognition, typedOther.withRecognition);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetWithAttributes()).compareTo(typedOther.isSetWithAttributes());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetWithAttributes()) {        lastComparison = TBaseHelper.compareTo(this.withAttributes, typedOther.withAttributes);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetWithAlternateData()).compareTo(typedOther.isSetWithAlternateData());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetWithAlternateData()) {        lastComparison = TBaseHelper.compareTo(this.withAlternateData, typedOther.withAlternateData);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public void read(TProtocol iprot) throws TException {
      TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // AUTHENTICATION_TOKEN
            if (field.type == TType.STRING) {
              this.authenticationToken = iprot.readString();
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // GUID
            if (field.type == TType.STRING) {
              this.guid = iprot.readString();
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 3: // WITH_DATA
            if (field.type == TType.BOOL) {
              this.withData = iprot.readBool();
              setWithDataIsSet(true);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 4: // WITH_RECOGNITION
            if (field.type == TType.BOOL) {
              this.withRecognition = iprot.readBool();
              setWithRecognitionIsSet(true);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 5: // WITH_ATTRIBUTES
            if (field.type == TType.BOOL) {
              this.withAttributes = iprot.readBool();
              setWithAttributesIsSet(true);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 6: // WITH_ALTERNATE_DATA
            if (field.type == TType.BOOL) {
              this.withAlternateData = iprot.readBool();
              setWithAlternateDataIsSet(true);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(TProtocol oprot) throws TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      if (this.authenticationToken != null) {
        oprot.writeFieldBegin(AUTHENTICATION_TOKEN_FIELD_DESC);
        oprot.writeString(this.authenticationToken);
        oprot.writeFieldEnd();
      }
      if (this.guid != null) {
        oprot.writeFieldBegin(GUID_FIELD_DESC);
        oprot.writeString(this.guid);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldBegin(WITH_DATA_FIELD_DESC);
      oprot.writeBool(this.withData);
      oprot.writeFieldEnd();
      oprot.writeFieldBegin(WITH_RECOGNITION_FIELD_DESC);
      oprot.writeBool(this.withRecognition);
      oprot.writeFieldEnd();
      oprot.writeFieldBegin(WITH_ATTRIBUTES_FIELD_DESC);
      oprot.writeBool(this.withAttributes);
      oprot.writeFieldEnd();
      oprot.writeFieldBegin(WITH_ALTERNATE_DATA_FIELD_DESC);
      oprot.writeBool(this.withAlternateData);
      oprot.writeFieldEnd();
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    public void validate() throws TException {
      // check for required fields
    }

  }

  private static class getResource_result implements TBase, java.io.Serializable, Cloneable   {
    private static final TStruct STRUCT_DESC = new TStruct("getResource_result");

    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
    private static final TField USER_EXCEPTION_FIELD_DESC = new TField("userException", TType.STRUCT, (short)1);
    private static final TField SYSTEM_EXCEPTION_FIELD_DESC = new TField("systemException", TType.STRUCT, (short)2);
    private static final TField NOT_FOUND_EXCEPTION_FIELD_DESC = new TField("notFoundException", TType.STRUCT, (short)3);

    private com.evernote.edam.type.Resource success;
    private com.evernote.edam.error.EDAMUserException userException;
    private com.evernote.edam.error.EDAMSystemException systemException;
    private com.evernote.edam.error.EDAMNotFoundException notFoundException;


    // isset id assignments

    public getResource_result() {
    }

    /**
     * Performs a deep copy on other.
     */
    public getResource_result(getResource_result other) {
      if (other.isSetSuccess()) {
        this.success = new com.evernote.edam.type.Resource(other.success);
      }
      if (other.isSetUserException()) {
        this.userException = new com.evernote.edam.error.EDAMUserException(other.userException);
      }
      if (other.isSetSystemException()) {
        this.systemException = new com.evernote.edam.error.EDAMSystemException(other.systemException);
      }
      if (other.isSetNotFoundException()) {
        this.notFoundException = new com.evernote.edam.error.EDAMNotFoundException(other.notFoundException);
      }
    }

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

    public void clear() {
      this.success = null;
      this.userException = null;
      this.systemException = null;
      this.notFoundException = null;
    }

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

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

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

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

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

      int lastComparison = 0;
      getResource_result typedOther = (getResource_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {        lastComparison = TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetUserException()).compareTo(typedOther.isSetUserException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetUserException()) {        lastComparison = TBaseHelper.compareTo(this.userException, typedOther.userException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetSystemException()).compareTo(typedOther.isSetSystemException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSystemException()) {        lastComparison = TBaseHelper.compareTo(this.systemException, typedOther.systemException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetNotFoundException()).compareTo(typedOther.isSetNotFoundException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetNotFoundException()) {        lastComparison = TBaseHelper.compareTo(this.notFoundException, typedOther.notFoundException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public void read(TProtocol iprot) throws TException {
      TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == TType.STRUCT) {
              this.success = new com.evernote.edam.type.Resource();
              this.success.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 1: // USER_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.userException = new com.evernote.edam.error.EDAMUserException();
              this.userException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // SYSTEM_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.systemException = new com.evernote.edam.error.EDAMSystemException();
              this.systemException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 3: // NOT_FOUND_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.notFoundException = new com.evernote.edam.error.EDAMNotFoundException();
              this.notFoundException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(TProtocol oprot) throws TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        this.success.write(oprot);
        oprot.writeFieldEnd();
      } else if (this.isSetUserException()) {
        oprot.writeFieldBegin(USER_EXCEPTION_FIELD_DESC);
        this.userException.write(oprot);
        oprot.writeFieldEnd();
      } else if (this.isSetSystemException()) {
        oprot.writeFieldBegin(SYSTEM_EXCEPTION_FIELD_DESC);
        this.systemException.write(oprot);
        oprot.writeFieldEnd();
      } else if (this.isSetNotFoundException()) {
        oprot.writeFieldBegin(NOT_FOUND_EXCEPTION_FIELD_DESC);
        this.notFoundException.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    public void validate() throws TException {
      // check for required fields
    }

  }

  private static class getResourceApplicationData_args implements TBase, java.io.Serializable, Cloneable   {
    private static final TStruct STRUCT_DESC = new TStruct("getResourceApplicationData_args");

    private static final TField AUTHENTICATION_TOKEN_FIELD_DESC = new TField("authenticationToken", TType.STRING, (short)1);
    private static final TField GUID_FIELD_DESC = new TField("guid", TType.STRING, (short)2);

    private String authenticationToken;
    private String guid;


    // isset id assignments

    public getResourceApplicationData_args() {
    }

    /**
     * Performs a deep copy on other.
     */
    public getResourceApplicationData_args(getResourceApplicationData_args other) {
      if (other.isSetAuthenticationToken()) {
        this.authenticationToken = other.authenticationToken;
      }
      if (other.isSetGuid()) {
        this.guid = other.guid;
      }
    }

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

    public void clear() {
      this.authenticationToken = null;
      this.guid = null;
    }

    public void setAuthenticationToken(String authenticationToken) {
      this.authenticationToken = authenticationToken;
    }

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

    public void setGuid(String guid) {
      this.guid = guid;
    }

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

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

      int lastComparison = 0;
      getResourceApplicationData_args typedOther = (getResourceApplicationData_args)other;

      lastComparison = Boolean.valueOf(isSetAuthenticationToken()).compareTo(typedOther.isSetAuthenticationToken());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetAuthenticationToken()) {        lastComparison = TBaseHelper.compareTo(this.authenticationToken, typedOther.authenticationToken);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetGuid()).compareTo(typedOther.isSetGuid());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetGuid()) {        lastComparison = TBaseHelper.compareTo(this.guid, typedOther.guid);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public void read(TProtocol iprot) throws TException {
      TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // AUTHENTICATION_TOKEN
            if (field.type == TType.STRING) {
              this.authenticationToken = iprot.readString();
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // GUID
            if (field.type == TType.STRING) {
              this.guid = iprot.readString();
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(TProtocol oprot) throws TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      if (this.authenticationToken != null) {
        oprot.writeFieldBegin(AUTHENTICATION_TOKEN_FIELD_DESC);
        oprot.writeString(this.authenticationToken);
        oprot.writeFieldEnd();
      }
      if (this.guid != null) {
        oprot.writeFieldBegin(GUID_FIELD_DESC);
        oprot.writeString(this.guid);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    public void validate() throws TException {
      // check for required fields
    }

  }

  private static class getResourceApplicationData_result implements TBase, java.io.Serializable, Cloneable   {
    private static final TStruct STRUCT_DESC = new TStruct("getResourceApplicationData_result");

    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
    private static final TField USER_EXCEPTION_FIELD_DESC = new TField("userException", TType.STRUCT, (short)1);
    private static final TField SYSTEM_EXCEPTION_FIELD_DESC = new TField("systemException", TType.STRUCT, (short)2);
    private static final TField NOT_FOUND_EXCEPTION_FIELD_DESC = new TField("notFoundException", TType.STRUCT, (short)3);

    private com.evernote.edam.type.LazyMap success;
    private com.evernote.edam.error.EDAMUserException userException;
    private com.evernote.edam.error.EDAMSystemException systemException;
    private com.evernote.edam.error.EDAMNotFoundException notFoundException;


    // isset id assignments

    public getResourceApplicationData_result() {
    }

    /**
     * Performs a deep copy on other.
     */
    public getResourceApplicationData_result(getResourceApplicationData_result other) {
      if (other.isSetSuccess()) {
        this.success = new com.evernote.edam.type.LazyMap(other.success);
      }
      if (other.isSetUserException()) {
        this.userException = new com.evernote.edam.error.EDAMUserException(other.userException);
      }
      if (other.isSetSystemException()) {
        this.systemException = new com.evernote.edam.error.EDAMSystemException(other.systemException);
      }
      if (other.isSetNotFoundException()) {
        this.notFoundException = new com.evernote.edam.error.EDAMNotFoundException(other.notFoundException);
      }
    }

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

    public void clear() {
      this.success = null;
      this.userException = null;
      this.systemException = null;
      this.notFoundException = null;
    }

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

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

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

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

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

      int lastComparison = 0;
      getResourceApplicationData_result typedOther = (getResourceApplicationData_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {        lastComparison = TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetUserException()).compareTo(typedOther.isSetUserException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetUserException()) {        lastComparison = TBaseHelper.compareTo(this.userException, typedOther.userException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetSystemException()).compareTo(typedOther.isSetSystemException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSystemException()) {        lastComparison = TBaseHelper.compareTo(this.systemException, typedOther.systemException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetNotFoundException()).compareTo(typedOther.isSetNotFoundException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetNotFoundException()) {        lastComparison = TBaseHelper.compareTo(this.notFoundException, typedOther.notFoundException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public void read(TProtocol iprot) throws TException {
      TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == TType.STRUCT) {
              this.success = new com.evernote.edam.type.LazyMap();
              this.success.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 1: // USER_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.userException = new com.evernote.edam.error.EDAMUserException();
              this.userException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // SYSTEM_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.systemException = new com.evernote.edam.error.EDAMSystemException();
              this.systemException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 3: // NOT_FOUND_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.notFoundException = new com.evernote.edam.error.EDAMNotFoundException();
              this.notFoundException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(TProtocol oprot) throws TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        this.success.write(oprot);
        oprot.writeFieldEnd();
      } else if (this.isSetUserException()) {
        oprot.writeFieldBegin(USER_EXCEPTION_FIELD_DESC);
        this.userException.write(oprot);
        oprot.writeFieldEnd();
      } else if (this.isSetSystemException()) {
        oprot.writeFieldBegin(SYSTEM_EXCEPTION_FIELD_DESC);
        this.systemException.write(oprot);
        oprot.writeFieldEnd();
      } else if (this.isSetNotFoundException()) {
        oprot.writeFieldBegin(NOT_FOUND_EXCEPTION_FIELD_DESC);
        this.notFoundException.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    public void validate() throws TException {
      // check for required fields
    }

  }

  private static class getResourceApplicationDataEntry_args implements TBase, java.io.Serializable, Cloneable   {
    private static final TStruct STRUCT_DESC = new TStruct("getResourceApplicationDataEntry_args");

    private static final TField AUTHENTICATION_TOKEN_FIELD_DESC = new TField("authenticationToken", TType.STRING, (short)1);
    private static final TField GUID_FIELD_DESC = new TField("guid", TType.STRING, (short)2);
    private static final TField KEY_FIELD_DESC = new TField("key", TType.STRING, (short)3);

    private String authenticationToken;
    private String guid;
    private String key;


    // isset id assignments

    public getResourceApplicationDataEntry_args() {
    }

    /**
     * Performs a deep copy on other.
     */
    public getResourceApplicationDataEntry_args(getResourceApplicationDataEntry_args other) {
      if (other.isSetAuthenticationToken()) {
        this.authenticationToken = other.authenticationToken;
      }
      if (other.isSetGuid()) {
        this.guid = other.guid;
      }
      if (other.isSetKey()) {
        this.key = other.key;
      }
    }

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

    public void clear() {
      this.authenticationToken = null;
      this.guid = null;
      this.key = null;
    }

    public void setAuthenticationToken(String authenticationToken) {
      this.authenticationToken = authenticationToken;
    }

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

    public void setGuid(String guid) {
      this.guid = guid;
    }

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

    public void setKey(String key) {
      this.key = key;
    }

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

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

      int lastComparison = 0;
      getResourceApplicationDataEntry_args typedOther = (getResourceApplicationDataEntry_args)other;

      lastComparison = Boolean.valueOf(isSetAuthenticationToken()).compareTo(typedOther.isSetAuthenticationToken());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetAuthenticationToken()) {        lastComparison = TBaseHelper.compareTo(this.authenticationToken, typedOther.authenticationToken);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetGuid()).compareTo(typedOther.isSetGuid());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetGuid()) {        lastComparison = TBaseHelper.compareTo(this.guid, typedOther.guid);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetKey()).compareTo(typedOther.isSetKey());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetKey()) {        lastComparison = TBaseHelper.compareTo(this.key, typedOther.key);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public void read(TProtocol iprot) throws TException {
      TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // AUTHENTICATION_TOKEN
            if (field.type == TType.STRING) {
              this.authenticationToken = iprot.readString();
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // GUID
            if (field.type == TType.STRING) {
              this.guid = iprot.readString();
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 3: // KEY
            if (field.type == TType.STRING) {
              this.key = iprot.readString();
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(TProtocol oprot) throws TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      if (this.authenticationToken != null) {
        oprot.writeFieldBegin(AUTHENTICATION_TOKEN_FIELD_DESC);
        oprot.writeString(this.authenticationToken);
        oprot.writeFieldEnd();
      }
      if (this.guid != null) {
        oprot.writeFieldBegin(GUID_FIELD_DESC);
        oprot.writeString(this.guid);
        oprot.writeFieldEnd();
      }
      if (this.key != null) {
        oprot.writeFieldBegin(KEY_FIELD_DESC);
        oprot.writeString(this.key);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    public void validate() throws TException {
      // check for required fields
    }

  }

  private static class getResourceApplicationDataEntry_result implements TBase, java.io.Serializable, Cloneable   {
    private static final TStruct STRUCT_DESC = new TStruct("getResourceApplicationDataEntry_result");

    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRING, (short)0);
    private static final TField USER_EXCEPTION_FIELD_DESC = new TField("userException", TType.STRUCT, (short)1);
    private static final TField SYSTEM_EXCEPTION_FIELD_DESC = new TField("systemException", TType.STRUCT, (short)2);
    private static final TField NOT_FOUND_EXCEPTION_FIELD_DESC = new TField("notFoundException", TType.STRUCT, (short)3);

    private String success;
    private com.evernote.edam.error.EDAMUserException userException;
    private com.evernote.edam.error.EDAMSystemException systemException;
    private com.evernote.edam.error.EDAMNotFoundException notFoundException;


    // isset id assignments

    public getResourceApplicationDataEntry_result() {
    }

    /**
     * Performs a deep copy on other.
     */
    public getResourceApplicationDataEntry_result(getResourceApplicationDataEntry_result other) {
      if (other.isSetSuccess()) {
        this.success = other.success;
      }
      if (other.isSetUserException()) {
        this.userException = new com.evernote.edam.error.EDAMUserException(other.userException);
      }
      if (other.isSetSystemException()) {
        this.systemException = new com.evernote.edam.error.EDAMSystemException(other.systemException);
      }
      if (other.isSetNotFoundException()) {
        this.notFoundException = new com.evernote.edam.error.EDAMNotFoundException(other.notFoundException);
      }
    }

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

    public void clear() {
      this.success = null;
      this.userException = null;
      this.systemException = null;
      this.notFoundException = null;
    }

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

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

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

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

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

      int lastComparison = 0;
      getResourceApplicationDataEntry_result typedOther = (getResourceApplicationDataEntry_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {        lastComparison = TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetUserException()).compareTo(typedOther.isSetUserException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetUserException()) {        lastComparison = TBaseHelper.compareTo(this.userException, typedOther.userException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetSystemException()).compareTo(typedOther.isSetSystemException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSystemException()) {        lastComparison = TBaseHelper.compareTo(this.systemException, typedOther.systemException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetNotFoundException()).compareTo(typedOther.isSetNotFoundException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetNotFoundException()) {        lastComparison = TBaseHelper.compareTo(this.notFoundException, typedOther.notFoundException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public void read(TProtocol iprot) throws TException {
      TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == TType.STRING) {
              this.success = iprot.readString();
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 1: // USER_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.userException = new com.evernote.edam.error.EDAMUserException();
              this.userException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // SYSTEM_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.systemException = new com.evernote.edam.error.EDAMSystemException();
              this.systemException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 3: // NOT_FOUND_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.notFoundException = new com.evernote.edam.error.EDAMNotFoundException();
              this.notFoundException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(TProtocol oprot) throws TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        oprot.writeString(this.success);
        oprot.writeFieldEnd();
      } else if (this.isSetUserException()) {
        oprot.writeFieldBegin(USER_EXCEPTION_FIELD_DESC);
        this.userException.write(oprot);
        oprot.writeFieldEnd();
      } else if (this.isSetSystemException()) {
        oprot.writeFieldBegin(SYSTEM_EXCEPTION_FIELD_DESC);
        this.systemException.write(oprot);
        oprot.writeFieldEnd();
      } else if (this.isSetNotFoundException()) {
        oprot.writeFieldBegin(NOT_FOUND_EXCEPTION_FIELD_DESC);
        this.notFoundException.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    public void validate() throws TException {
      // check for required fields
    }

  }

  private static class setResourceApplicationDataEntry_args implements TBase, java.io.Serializable, Cloneable   {
    private static final TStruct STRUCT_DESC = new TStruct("setResourceApplicationDataEntry_args");

    private static final TField AUTHENTICATION_TOKEN_FIELD_DESC = new TField("authenticationToken", TType.STRING, (short)1);
    private static final TField GUID_FIELD_DESC = new TField("guid", TType.STRING, (short)2);
    private static final TField KEY_FIELD_DESC = new TField("key", TType.STRING, (short)3);
    private static final TField VALUE_FIELD_DESC = new TField("value", TType.STRING, (short)4);

    private String authenticationToken;
    private String guid;
    private String key;
    private String value;


    // isset id assignments

    public setResourceApplicationDataEntry_args() {
    }

    /**
     * Performs a deep copy on other.
     */
    public setResourceApplicationDataEntry_args(setResourceApplicationDataEntry_args other) {
      if (other.isSetAuthenticationToken()) {
        this.authenticationToken = other.authenticationToken;
      }
      if (other.isSetGuid()) {
        this.guid = other.guid;
      }
      if (other.isSetKey()) {
        this.key = other.key;
      }
      if (other.isSetValue()) {
        this.value = other.value;
      }
    }

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

    public void clear() {
      this.authenticationToken = null;
      this.guid = null;
      this.key = null;
      this.value = null;
    }

    public void setAuthenticationToken(String authenticationToken) {
      this.authenticationToken = authenticationToken;
    }

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

    public void setGuid(String guid) {
      this.guid = guid;
    }

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

    public void setKey(String key) {
      this.key = key;
    }

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

    public void setValue(String value) {
      this.value = value;
    }

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

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

      int lastComparison = 0;
      setResourceApplicationDataEntry_args typedOther = (setResourceApplicationDataEntry_args)other;

      lastComparison = Boolean.valueOf(isSetAuthenticationToken()).compareTo(typedOther.isSetAuthenticationToken());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetAuthenticationToken()) {        lastComparison = TBaseHelper.compareTo(this.authenticationToken, typedOther.authenticationToken);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetGuid()).compareTo(typedOther.isSetGuid());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetGuid()) {        lastComparison = TBaseHelper.compareTo(this.guid, typedOther.guid);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetKey()).compareTo(typedOther.isSetKey());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetKey()) {        lastComparison = TBaseHelper.compareTo(this.key, typedOther.key);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetValue()).compareTo(typedOther.isSetValue());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetValue()) {        lastComparison = TBaseHelper.compareTo(this.value, typedOther.value);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public void read(TProtocol iprot) throws TException {
      TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // AUTHENTICATION_TOKEN
            if (field.type == TType.STRING) {
              this.authenticationToken = iprot.readString();
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // GUID
            if (field.type == TType.STRING) {
              this.guid = iprot.readString();
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 3: // KEY
            if (field.type == TType.STRING) {
              this.key = iprot.readString();
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 4: // VALUE
            if (field.type == TType.STRING) {
              this.value = iprot.readString();
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(TProtocol oprot) throws TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      if (this.authenticationToken != null) {
        oprot.writeFieldBegin(AUTHENTICATION_TOKEN_FIELD_DESC);
        oprot.writeString(this.authenticationToken);
        oprot.writeFieldEnd();
      }
      if (this.guid != null) {
        oprot.writeFieldBegin(GUID_FIELD_DESC);
        oprot.writeString(this.guid);
        oprot.writeFieldEnd();
      }
      if (this.key != null) {
        oprot.writeFieldBegin(KEY_FIELD_DESC);
        oprot.writeString(this.key);
        oprot.writeFieldEnd();
      }
      if (this.value != null) {
        oprot.writeFieldBegin(VALUE_FIELD_DESC);
        oprot.writeString(this.value);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    public void validate() throws TException {
      // check for required fields
    }

  }

  private static class setResourceApplicationDataEntry_result implements TBase, java.io.Serializable, Cloneable   {
    private static final TStruct STRUCT_DESC = new TStruct("setResourceApplicationDataEntry_result");

    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.I32, (short)0);
    private static final TField USER_EXCEPTION_FIELD_DESC = new TField("userException", TType.STRUCT, (short)1);
    private static final TField SYSTEM_EXCEPTION_FIELD_DESC = new TField("systemException", TType.STRUCT, (short)2);
    private static final TField NOT_FOUND_EXCEPTION_FIELD_DESC = new TField("notFoundException", TType.STRUCT, (short)3);

    private int success;
    private com.evernote.edam.error.EDAMUserException userException;
    private com.evernote.edam.error.EDAMSystemException systemException;
    private com.evernote.edam.error.EDAMNotFoundException notFoundException;


    // isset id assignments
    private static final int __SUCCESS_ISSET_ID = 0;
    private boolean[] __isset_vector = new boolean[1];

    public setResourceApplicationDataEntry_result() {
    }

    /**
     * Performs a deep copy on other.
     */
    public setResourceApplicationDataEntry_result(setResourceApplicationDataEntry_result other) {
      System.arraycopy(other.__isset_vector, 0, __isset_vector, 0, other.__isset_vector.length);
      this.success = other.success;
      if (other.isSetUserException()) {
        this.userException = new com.evernote.edam.error.EDAMUserException(other.userException);
      }
      if (other.isSetSystemException()) {
        this.systemException = new com.evernote.edam.error.EDAMSystemException(other.systemException);
      }
      if (other.isSetNotFoundException()) {
        this.notFoundException = new com.evernote.edam.error.EDAMNotFoundException(other.notFoundException);
      }
    }

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

    public void clear() {
      setSuccessIsSet(false);
      this.success = 0;
      this.userException = null;
      this.systemException = null;
      this.notFoundException = null;
    }

    /** Returns true if field success is set (has been asigned a value) and false otherwise */
    public boolean isSetSuccess() {
      return __isset_vector[__SUCCESS_ISSET_ID];
    }

    public void setSuccessIsSet(boolean value) {
      __isset_vector[__SUCCESS_ISSET_ID] = value;
    }

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

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

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

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

      int lastComparison = 0;
      setResourceApplicationDataEntry_result typedOther = (setResourceApplicationDataEntry_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {        lastComparison = TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetUserException()).compareTo(typedOther.isSetUserException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetUserException()) {        lastComparison = TBaseHelper.compareTo(this.userException, typedOther.userException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetSystemException()).compareTo(typedOther.isSetSystemException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSystemException()) {        lastComparison = TBaseHelper.compareTo(this.systemException, typedOther.systemException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetNotFoundException()).compareTo(typedOther.isSetNotFoundException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetNotFoundException()) {        lastComparison = TBaseHelper.compareTo(this.notFoundException, typedOther.notFoundException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public void read(TProtocol iprot) throws TException {
      TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == TType.I32) {
              this.success = iprot.readI32();
              setSuccessIsSet(true);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 1: // USER_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.userException = new com.evernote.edam.error.EDAMUserException();
              this.userException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // SYSTEM_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.systemException = new com.evernote.edam.error.EDAMSystemException();
              this.systemException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 3: // NOT_FOUND_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.notFoundException = new com.evernote.edam.error.EDAMNotFoundException();
              this.notFoundException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(TProtocol oprot) throws TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        oprot.writeI32(this.success);
        oprot.writeFieldEnd();
      } else if (this.isSetUserException()) {
        oprot.writeFieldBegin(USER_EXCEPTION_FIELD_DESC);
        this.userException.write(oprot);
        oprot.writeFieldEnd();
      } else if (this.isSetSystemException()) {
        oprot.writeFieldBegin(SYSTEM_EXCEPTION_FIELD_DESC);
        this.systemException.write(oprot);
        oprot.writeFieldEnd();
      } else if (this.isSetNotFoundException()) {
        oprot.writeFieldBegin(NOT_FOUND_EXCEPTION_FIELD_DESC);
        this.notFoundException.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    public void validate() throws TException {
      // check for required fields
    }

  }

  private static class unsetResourceApplicationDataEntry_args implements TBase, java.io.Serializable, Cloneable   {
    private static final TStruct STRUCT_DESC = new TStruct("unsetResourceApplicationDataEntry_args");

    private static final TField AUTHENTICATION_TOKEN_FIELD_DESC = new TField("authenticationToken", TType.STRING, (short)1);
    private static final TField GUID_FIELD_DESC = new TField("guid", TType.STRING, (short)2);
    private static final TField KEY_FIELD_DESC = new TField("key", TType.STRING, (short)3);

    private String authenticationToken;
    private String guid;
    private String key;


    // isset id assignments

    public unsetResourceApplicationDataEntry_args() {
    }

    /**
     * Performs a deep copy on other.
     */
    public unsetResourceApplicationDataEntry_args(unsetResourceApplicationDataEntry_args other) {
      if (other.isSetAuthenticationToken()) {
        this.authenticationToken = other.authenticationToken;
      }
      if (other.isSetGuid()) {
        this.guid = other.guid;
      }
      if (other.isSetKey()) {
        this.key = other.key;
      }
    }

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

    public void clear() {
      this.authenticationToken = null;
      this.guid = null;
      this.key = null;
    }

    public void setAuthenticationToken(String authenticationToken) {
      this.authenticationToken = authenticationToken;
    }

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

    public void setGuid(String guid) {
      this.guid = guid;
    }

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

    public void setKey(String key) {
      this.key = key;
    }

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

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

      int lastComparison = 0;
      unsetResourceApplicationDataEntry_args typedOther = (unsetResourceApplicationDataEntry_args)other;

      lastComparison = Boolean.valueOf(isSetAuthenticationToken()).compareTo(typedOther.isSetAuthenticationToken());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetAuthenticationToken()) {        lastComparison = TBaseHelper.compareTo(this.authenticationToken, typedOther.authenticationToken);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetGuid()).compareTo(typedOther.isSetGuid());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetGuid()) {        lastComparison = TBaseHelper.compareTo(this.guid, typedOther.guid);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetKey()).compareTo(typedOther.isSetKey());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetKey()) {        lastComparison = TBaseHelper.compareTo(this.key, typedOther.key);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public void read(TProtocol iprot) throws TException {
      TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // AUTHENTICATION_TOKEN
            if (field.type == TType.STRING) {
              this.authenticationToken = iprot.readString();
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // GUID
            if (field.type == TType.STRING) {
              this.guid = iprot.readString();
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 3: // KEY
            if (field.type == TType.STRING) {
              this.key = iprot.readString();
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(TProtocol oprot) throws TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      if (this.authenticationToken != null) {
        oprot.writeFieldBegin(AUTHENTICATION_TOKEN_FIELD_DESC);
        oprot.writeString(this.authenticationToken);
        oprot.writeFieldEnd();
      }
      if (this.guid != null) {
        oprot.writeFieldBegin(GUID_FIELD_DESC);
        oprot.writeString(this.guid);
        oprot.writeFieldEnd();
      }
      if (this.key != null) {
        oprot.writeFieldBegin(KEY_FIELD_DESC);
        oprot.writeString(this.key);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    public void validate() throws TException {
      // check for required fields
    }

  }

  private static class unsetResourceApplicationDataEntry_result implements TBase, java.io.Serializable, Cloneable   {
    private static final TStruct STRUCT_DESC = new TStruct("unsetResourceApplicationDataEntry_result");

    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.I32, (short)0);
    private static final TField USER_EXCEPTION_FIELD_DESC = new TField("userException", TType.STRUCT, (short)1);
    private static final TField SYSTEM_EXCEPTION_FIELD_DESC = new TField("systemException", TType.STRUCT, (short)2);
    private static final TField NOT_FOUND_EXCEPTION_FIELD_DESC = new TField("notFoundException", TType.STRUCT, (short)3);

    private int success;
    private com.evernote.edam.error.EDAMUserException userException;
    private com.evernote.edam.error.EDAMSystemException systemException;
    private com.evernote.edam.error.EDAMNotFoundException notFoundException;


    // isset id assignments
    private static final int __SUCCESS_ISSET_ID = 0;
    private boolean[] __isset_vector = new boolean[1];

    public unsetResourceApplicationDataEntry_result() {
    }

    /**
     * Performs a deep copy on other.
     */
    public unsetResourceApplicationDataEntry_result(unsetResourceApplicationDataEntry_result other) {
      System.arraycopy(other.__isset_vector, 0, __isset_vector, 0, other.__isset_vector.length);
      this.success = other.success;
      if (other.isSetUserException()) {
        this.userException = new com.evernote.edam.error.EDAMUserException(other.userException);
      }
      if (other.isSetSystemException()) {
        this.systemException = new com.evernote.edam.error.EDAMSystemException(other.systemException);
      }
      if (other.isSetNotFoundException()) {
        this.notFoundException = new com.evernote.edam.error.EDAMNotFoundException(other.notFoundException);
      }
    }

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

    public void clear() {
      setSuccessIsSet(false);
      this.success = 0;
      this.userException = null;
      this.systemException = null;
      this.notFoundException = null;
    }

    /** Returns true if field success is set (has been asigned a value) and false otherwise */
    public boolean isSetSuccess() {
      return __isset_vector[__SUCCESS_ISSET_ID];
    }

    public void setSuccessIsSet(boolean value) {
      __isset_vector[__SUCCESS_ISSET_ID] = value;
    }

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

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

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

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

      int lastComparison = 0;
      unsetResourceApplicationDataEntry_result typedOther = (unsetResourceApplicationDataEntry_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {        lastComparison = TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetUserException()).compareTo(typedOther.isSetUserException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetUserException()) {        lastComparison = TBaseHelper.compareTo(this.userException, typedOther.userException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetSystemException()).compareTo(typedOther.isSetSystemException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSystemException()) {        lastComparison = TBaseHelper.compareTo(this.systemException, typedOther.systemException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetNotFoundException()).compareTo(typedOther.isSetNotFoundException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetNotFoundException()) {        lastComparison = TBaseHelper.compareTo(this.notFoundException, typedOther.notFoundException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public void read(TProtocol iprot) throws TException {
      TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == TType.I32) {
              this.success = iprot.readI32();
              setSuccessIsSet(true);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 1: // USER_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.userException = new com.evernote.edam.error.EDAMUserException();
              this.userException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // SYSTEM_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.systemException = new com.evernote.edam.error.EDAMSystemException();
              this.systemException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 3: // NOT_FOUND_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.notFoundException = new com.evernote.edam.error.EDAMNotFoundException();
              this.notFoundException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(TProtocol oprot) throws TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        oprot.writeI32(this.success);
        oprot.writeFieldEnd();
      } else if (this.isSetUserException()) {
        oprot.writeFieldBegin(USER_EXCEPTION_FIELD_DESC);
        this.userException.write(oprot);
        oprot.writeFieldEnd();
      } else if (this.isSetSystemException()) {
        oprot.writeFieldBegin(SYSTEM_EXCEPTION_FIELD_DESC);
        this.systemException.write(oprot);
        oprot.writeFieldEnd();
      } else if (this.isSetNotFoundException()) {
        oprot.writeFieldBegin(NOT_FOUND_EXCEPTION_FIELD_DESC);
        this.notFoundException.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    public void validate() throws TException {
      // check for required fields
    }

  }

  private static class updateResource_args implements TBase, java.io.Serializable, Cloneable   {
    private static final TStruct STRUCT_DESC = new TStruct("updateResource_args");

    private static final TField AUTHENTICATION_TOKEN_FIELD_DESC = new TField("authenticationToken", TType.STRING, (short)1);
    private static final TField RESOURCE_FIELD_DESC = new TField("resource", TType.STRUCT, (short)2);

    private String authenticationToken;
    private com.evernote.edam.type.Resource resource;


    // isset id assignments

    public updateResource_args() {
    }

    /**
     * Performs a deep copy on other.
     */
    public updateResource_args(updateResource_args other) {
      if (other.isSetAuthenticationToken()) {
        this.authenticationToken = other.authenticationToken;
      }
      if (other.isSetResource()) {
        this.resource = new com.evernote.edam.type.Resource(other.resource);
      }
    }

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

    public void clear() {
      this.authenticationToken = null;
      this.resource = null;
    }

    public void setAuthenticationToken(String authenticationToken) {
      this.authenticationToken = authenticationToken;
    }

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

    public void setResource(com.evernote.edam.type.Resource resource) {
      this.resource = resource;
    }

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

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

      int lastComparison = 0;
      updateResource_args typedOther = (updateResource_args)other;

      lastComparison = Boolean.valueOf(isSetAuthenticationToken()).compareTo(typedOther.isSetAuthenticationToken());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetAuthenticationToken()) {        lastComparison = TBaseHelper.compareTo(this.authenticationToken, typedOther.authenticationToken);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetResource()).compareTo(typedOther.isSetResource());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetResource()) {        lastComparison = TBaseHelper.compareTo(this.resource, typedOther.resource);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public void read(TProtocol iprot) throws TException {
      TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // AUTHENTICATION_TOKEN
            if (field.type == TType.STRING) {
              this.authenticationToken = iprot.readString();
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // RESOURCE
            if (field.type == TType.STRUCT) {
              this.resource = new com.evernote.edam.type.Resource();
              this.resource.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(TProtocol oprot) throws TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      if (this.authenticationToken != null) {
        oprot.writeFieldBegin(AUTHENTICATION_TOKEN_FIELD_DESC);
        oprot.writeString(this.authenticationToken);
        oprot.writeFieldEnd();
      }
      if (this.resource != null) {
        oprot.writeFieldBegin(RESOURCE_FIELD_DESC);
        this.resource.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    public void validate() throws TException {
      // check for required fields
    }

  }

  private static class updateResource_result implements TBase, java.io.Serializable, Cloneable   {
    private static final TStruct STRUCT_DESC = new TStruct("updateResource_result");

    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.I32, (short)0);
    private static final TField USER_EXCEPTION_FIELD_DESC = new TField("userException", TType.STRUCT, (short)1);
    private static final TField SYSTEM_EXCEPTION_FIELD_DESC = new TField("systemException", TType.STRUCT, (short)2);
    private static final TField NOT_FOUND_EXCEPTION_FIELD_DESC = new TField("notFoundException", TType.STRUCT, (short)3);

    private int success;
    private com.evernote.edam.error.EDAMUserException userException;
    private com.evernote.edam.error.EDAMSystemException systemException;
    private com.evernote.edam.error.EDAMNotFoundException notFoundException;


    // isset id assignments
    private static final int __SUCCESS_ISSET_ID = 0;
    private boolean[] __isset_vector = new boolean[1];

    public updateResource_result() {
    }

    /**
     * Performs a deep copy on other.
     */
    public updateResource_result(updateResource_result other) {
      System.arraycopy(other.__isset_vector, 0, __isset_vector, 0, other.__isset_vector.length);
      this.success = other.success;
      if (other.isSetUserException()) {
        this.userException = new com.evernote.edam.error.EDAMUserException(other.userException);
      }
      if (other.isSetSystemException()) {
        this.systemException = new com.evernote.edam.error.EDAMSystemException(other.systemException);
      }
      if (other.isSetNotFoundException()) {
        this.notFoundException = new com.evernote.edam.error.EDAMNotFoundException(other.notFoundException);
      }
    }

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

    public void clear() {
      setSuccessIsSet(false);
      this.success = 0;
      this.userException = null;
      this.systemException = null;
      this.notFoundException = null;
    }

    /** Returns true if field success is set (has been asigned a value) and false otherwise */
    public boolean isSetSuccess() {
      return __isset_vector[__SUCCESS_ISSET_ID];
    }

    public void setSuccessIsSet(boolean value) {
      __isset_vector[__SUCCESS_ISSET_ID] = value;
    }

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

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

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

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

      int lastComparison = 0;
      updateResource_result typedOther = (updateResource_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {        lastComparison = TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetUserException()).compareTo(typedOther.isSetUserException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetUserException()) {        lastComparison = TBaseHelper.compareTo(this.userException, typedOther.userException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetSystemException()).compareTo(typedOther.isSetSystemException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSystemException()) {        lastComparison = TBaseHelper.compareTo(this.systemException, typedOther.systemException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetNotFoundException()).compareTo(typedOther.isSetNotFoundException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetNotFoundException()) {        lastComparison = TBaseHelper.compareTo(this.notFoundException, typedOther.notFoundException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public void read(TProtocol iprot) throws TException {
      TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == TType.I32) {
              this.success = iprot.readI32();
              setSuccessIsSet(true);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 1: // USER_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.userException = new com.evernote.edam.error.EDAMUserException();
              this.userException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // SYSTEM_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.systemException = new com.evernote.edam.error.EDAMSystemException();
              this.systemException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 3: // NOT_FOUND_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.notFoundException = new com.evernote.edam.error.EDAMNotFoundException();
              this.notFoundException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(TProtocol oprot) throws TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        oprot.writeI32(this.success);
        oprot.writeFieldEnd();
      } else if (this.isSetUserException()) {
        oprot.writeFieldBegin(USER_EXCEPTION_FIELD_DESC);
        this.userException.write(oprot);
        oprot.writeFieldEnd();
      } else if (this.isSetSystemException()) {
        oprot.writeFieldBegin(SYSTEM_EXCEPTION_FIELD_DESC);
        this.systemException.write(oprot);
        oprot.writeFieldEnd();
      } else if (this.isSetNotFoundException()) {
        oprot.writeFieldBegin(NOT_FOUND_EXCEPTION_FIELD_DESC);
        this.notFoundException.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    public void validate() throws TException {
      // check for required fields
    }

  }

  private static class getResourceData_args implements TBase, java.io.Serializable, Cloneable   {
    private static final TStruct STRUCT_DESC = new TStruct("getResourceData_args");

    private static final TField AUTHENTICATION_TOKEN_FIELD_DESC = new TField("authenticationToken", TType.STRING, (short)1);
    private static final TField GUID_FIELD_DESC = new TField("guid", TType.STRING, (short)2);

    private String authenticationToken;
    private String guid;


    // isset id assignments

    public getResourceData_args() {
    }

    /**
     * Performs a deep copy on other.
     */
    public getResourceData_args(getResourceData_args other) {
      if (other.isSetAuthenticationToken()) {
        this.authenticationToken = other.authenticationToken;
      }
      if (other.isSetGuid()) {
        this.guid = other.guid;
      }
    }

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

    public void clear() {
      this.authenticationToken = null;
      this.guid = null;
    }

    public void setAuthenticationToken(String authenticationToken) {
      this.authenticationToken = authenticationToken;
    }

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

    public void setGuid(String guid) {
      this.guid = guid;
    }

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

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

      int lastComparison = 0;
      getResourceData_args typedOther = (getResourceData_args)other;

      lastComparison = Boolean.valueOf(isSetAuthenticationToken()).compareTo(typedOther.isSetAuthenticationToken());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetAuthenticationToken()) {        lastComparison = TBaseHelper.compareTo(this.authenticationToken, typedOther.authenticationToken);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetGuid()).compareTo(typedOther.isSetGuid());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetGuid()) {        lastComparison = TBaseHelper.compareTo(this.guid, typedOther.guid);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public void read(TProtocol iprot) throws TException {
      TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // AUTHENTICATION_TOKEN
            if (field.type == TType.STRING) {
              this.authenticationToken = iprot.readString();
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // GUID
            if (field.type == TType.STRING) {
              this.guid = iprot.readString();
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(TProtocol oprot) throws TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      if (this.authenticationToken != null) {
        oprot.writeFieldBegin(AUTHENTICATION_TOKEN_FIELD_DESC);
        oprot.writeString(this.authenticationToken);
        oprot.writeFieldEnd();
      }
      if (this.guid != null) {
        oprot.writeFieldBegin(GUID_FIELD_DESC);
        oprot.writeString(this.guid);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    public void validate() throws TException {
      // check for required fields
    }

  }

  private static class getResourceData_result implements TBase, java.io.Serializable, Cloneable   {
    private static final TStruct STRUCT_DESC = new TStruct("getResourceData_result");

    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRING, (short)0);
    private static final TField USER_EXCEPTION_FIELD_DESC = new TField("userException", TType.STRUCT, (short)1);
    private static final TField SYSTEM_EXCEPTION_FIELD_DESC = new TField("systemException", TType.STRUCT, (short)2);
    private static final TField NOT_FOUND_EXCEPTION_FIELD_DESC = new TField("notFoundException", TType.STRUCT, (short)3);

    private byte[] success;
    private com.evernote.edam.error.EDAMUserException userException;
    private com.evernote.edam.error.EDAMSystemException systemException;
    private com.evernote.edam.error.EDAMNotFoundException notFoundException;


    // isset id assignments

    public getResourceData_result() {
    }

    /**
     * Performs a deep copy on other.
     */
    public getResourceData_result(getResourceData_result other) {
      if (other.isSetSuccess()) {
        this.success = new byte[other.success.length];
        System.arraycopy(other.success, 0, success, 0, other.success.length);
      }
      if (other.isSetUserException()) {
        this.userException = new com.evernote.edam.error.EDAMUserException(other.userException);
      }
      if (other.isSetSystemException()) {
        this.systemException = new com.evernote.edam.error.EDAMSystemException(other.systemException);
      }
      if (other.isSetNotFoundException()) {
        this.notFoundException = new com.evernote.edam.error.EDAMNotFoundException(other.notFoundException);
      }
    }

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

    public void clear() {
      this.success = null;
      this.userException = null;
      this.systemException = null;
      this.notFoundException = null;
    }

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

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

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

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

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

      int lastComparison = 0;
      getResourceData_result typedOther = (getResourceData_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {        lastComparison = TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetUserException()).compareTo(typedOther.isSetUserException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetUserException()) {        lastComparison = TBaseHelper.compareTo(this.userException, typedOther.userException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetSystemException()).compareTo(typedOther.isSetSystemException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSystemException()) {        lastComparison = TBaseHelper.compareTo(this.systemException, typedOther.systemException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetNotFoundException()).compareTo(typedOther.isSetNotFoundException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetNotFoundException()) {        lastComparison = TBaseHelper.compareTo(this.notFoundException, typedOther.notFoundException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public void read(TProtocol iprot) throws TException {
      TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == TType.STRING) {
              this.success = iprot.readBytes();
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 1: // USER_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.userException = new com.evernote.edam.error.EDAMUserException();
              this.userException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // SYSTEM_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.systemException = new com.evernote.edam.error.EDAMSystemException();
              this.systemException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 3: // NOT_FOUND_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.notFoundException = new com.evernote.edam.error.EDAMNotFoundException();
              this.notFoundException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(TProtocol oprot) throws TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        oprot.writeBinary(this.success);
        oprot.writeFieldEnd();
      } else if (this.isSetUserException()) {
        oprot.writeFieldBegin(USER_EXCEPTION_FIELD_DESC);
        this.userException.write(oprot);
        oprot.writeFieldEnd();
      } else if (this.isSetSystemException()) {
        oprot.writeFieldBegin(SYSTEM_EXCEPTION_FIELD_DESC);
        this.systemException.write(oprot);
        oprot.writeFieldEnd();
      } else if (this.isSetNotFoundException()) {
        oprot.writeFieldBegin(NOT_FOUND_EXCEPTION_FIELD_DESC);
        this.notFoundException.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    public void validate() throws TException {
      // check for required fields
    }

  }

  private static class getResourceByHash_args implements TBase, java.io.Serializable, Cloneable   {
    private static final TStruct STRUCT_DESC = new TStruct("getResourceByHash_args");

    private static final TField AUTHENTICATION_TOKEN_FIELD_DESC = new TField("authenticationToken", TType.STRING, (short)1);
    private static final TField NOTE_GUID_FIELD_DESC = new TField("noteGuid", TType.STRING, (short)2);
    private static final TField CONTENT_HASH_FIELD_DESC = new TField("contentHash", TType.STRING, (short)3);
    private static final TField WITH_DATA_FIELD_DESC = new TField("withData", TType.BOOL, (short)4);
    private static final TField WITH_RECOGNITION_FIELD_DESC = new TField("withRecognition", TType.BOOL, (short)5);
    private static final TField WITH_ALTERNATE_DATA_FIELD_DESC = new TField("withAlternateData", TType.BOOL, (short)6);

    private String authenticationToken;
    private String noteGuid;
    private byte[] contentHash;
    private boolean withData;
    private boolean withRecognition;
    private boolean withAlternateData;


    // isset id assignments
    private static final int __WITHDATA_ISSET_ID = 0;
    private static final int __WITHRECOGNITION_ISSET_ID = 1;
    private static final int __WITHALTERNATEDATA_ISSET_ID = 2;
    private boolean[] __isset_vector = new boolean[3];

    public getResourceByHash_args() {
    }

    /**
     * Performs a deep copy on other.
     */
    public getResourceByHash_args(getResourceByHash_args other) {
      System.arraycopy(other.__isset_vector, 0, __isset_vector, 0, other.__isset_vector.length);
      if (other.isSetAuthenticationToken()) {
        this.authenticationToken = other.authenticationToken;
      }
      if (other.isSetNoteGuid()) {
        this.noteGuid = other.noteGuid;
      }
      if (other.isSetContentHash()) {
        this.contentHash = new byte[other.contentHash.length];
        System.arraycopy(other.contentHash, 0, contentHash, 0, other.contentHash.length);
      }
      this.withData = other.withData;
      this.withRecognition = other.withRecognition;
      this.withAlternateData = other.withAlternateData;
    }

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

    public void clear() {
      this.authenticationToken = null;
      this.noteGuid = null;
      this.contentHash = null;
      setWithDataIsSet(false);
      this.withData = false;
      setWithRecognitionIsSet(false);
      this.withRecognition = false;
      setWithAlternateDataIsSet(false);
      this.withAlternateData = false;
    }

    public void setAuthenticationToken(String authenticationToken) {
      this.authenticationToken = authenticationToken;
    }

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

    public void setNoteGuid(String noteGuid) {
      this.noteGuid = noteGuid;
    }

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

    public void setContentHash(byte[] contentHash) {
      this.contentHash = contentHash;
    }

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

    public void setWithData(boolean withData) {
      this.withData = withData;
      setWithDataIsSet(true);
    }

    /** Returns true if field withData is set (has been asigned a value) and false otherwise */
    public boolean isSetWithData() {
      return __isset_vector[__WITHDATA_ISSET_ID];
    }

    public void setWithDataIsSet(boolean value) {
      __isset_vector[__WITHDATA_ISSET_ID] = value;
    }

    public void setWithRecognition(boolean withRecognition) {
      this.withRecognition = withRecognition;
      setWithRecognitionIsSet(true);
    }

    /** Returns true if field withRecognition is set (has been asigned a value) and false otherwise */
    public boolean isSetWithRecognition() {
      return __isset_vector[__WITHRECOGNITION_ISSET_ID];
    }

    public void setWithRecognitionIsSet(boolean value) {
      __isset_vector[__WITHRECOGNITION_ISSET_ID] = value;
    }

    public void setWithAlternateData(boolean withAlternateData) {
      this.withAlternateData = withAlternateData;
      setWithAlternateDataIsSet(true);
    }

    /** Returns true if field withAlternateData is set (has been asigned a value) and false otherwise */
    public boolean isSetWithAlternateData() {
      return __isset_vector[__WITHALTERNATEDATA_ISSET_ID];
    }

    public void setWithAlternateDataIsSet(boolean value) {
      __isset_vector[__WITHALTERNATEDATA_ISSET_ID] = value;
    }

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

      int lastComparison = 0;
      getResourceByHash_args typedOther = (getResourceByHash_args)other;

      lastComparison = Boolean.valueOf(isSetAuthenticationToken()).compareTo(typedOther.isSetAuthenticationToken());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetAuthenticationToken()) {        lastComparison = TBaseHelper.compareTo(this.authenticationToken, typedOther.authenticationToken);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetNoteGuid()).compareTo(typedOther.isSetNoteGuid());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetNoteGuid()) {        lastComparison = TBaseHelper.compareTo(this.noteGuid, typedOther.noteGuid);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetContentHash()).compareTo(typedOther.isSetContentHash());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetContentHash()) {        lastComparison = TBaseHelper.compareTo(this.contentHash, typedOther.contentHash);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetWithData()).compareTo(typedOther.isSetWithData());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetWithData()) {        lastComparison = TBaseHelper.compareTo(this.withData, typedOther.withData);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetWithRecognition()).compareTo(typedOther.isSetWithRecognition());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetWithRecognition()) {        lastComparison = TBaseHelper.compareTo(this.withRecognition, typedOther.withRecognition);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetWithAlternateData()).compareTo(typedOther.isSetWithAlternateData());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetWithAlternateData()) {        lastComparison = TBaseHelper.compareTo(this.withAlternateData, typedOther.withAlternateData);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public void read(TProtocol iprot) throws TException {
      TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // AUTHENTICATION_TOKEN
            if (field.type == TType.STRING) {
              this.authenticationToken = iprot.readString();
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // NOTE_GUID
            if (field.type == TType.STRING) {
              this.noteGuid = iprot.readString();
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 3: // CONTENT_HASH
            if (field.type == TType.STRING) {
              this.contentHash = iprot.readBytes();
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 4: // WITH_DATA
            if (field.type == TType.BOOL) {
              this.withData = iprot.readBool();
              setWithDataIsSet(true);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 5: // WITH_RECOGNITION
            if (field.type == TType.BOOL) {
              this.withRecognition = iprot.readBool();
              setWithRecognitionIsSet(true);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 6: // WITH_ALTERNATE_DATA
            if (field.type == TType.BOOL) {
              this.withAlternateData = iprot.readBool();
              setWithAlternateDataIsSet(true);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(TProtocol oprot) throws TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      if (this.authenticationToken != null) {
        oprot.writeFieldBegin(AUTHENTICATION_TOKEN_FIELD_DESC);
        oprot.writeString(this.authenticationToken);
        oprot.writeFieldEnd();
      }
      if (this.noteGuid != null) {
        oprot.writeFieldBegin(NOTE_GUID_FIELD_DESC);
        oprot.writeString(this.noteGuid);
        oprot.writeFieldEnd();
      }
      if (this.contentHash != null) {
        oprot.writeFieldBegin(CONTENT_HASH_FIELD_DESC);
        oprot.writeBinary(this.contentHash);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldBegin(WITH_DATA_FIELD_DESC);
      oprot.writeBool(this.withData);
      oprot.writeFieldEnd();
      oprot.writeFieldBegin(WITH_RECOGNITION_FIELD_DESC);
      oprot.writeBool(this.withRecognition);
      oprot.writeFieldEnd();
      oprot.writeFieldBegin(WITH_ALTERNATE_DATA_FIELD_DESC);
      oprot.writeBool(this.withAlternateData);
      oprot.writeFieldEnd();
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    public void validate() throws TException {
      // check for required fields
    }

  }

  private static class getResourceByHash_result implements TBase, java.io.Serializable, Cloneable   {
    private static final TStruct STRUCT_DESC = new TStruct("getResourceByHash_result");

    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
    private static final TField USER_EXCEPTION_FIELD_DESC = new TField("userException", TType.STRUCT, (short)1);
    private static final TField SYSTEM_EXCEPTION_FIELD_DESC = new TField("systemException", TType.STRUCT, (short)2);
    private static final TField NOT_FOUND_EXCEPTION_FIELD_DESC = new TField("notFoundException", TType.STRUCT, (short)3);

    private com.evernote.edam.type.Resource success;
    private com.evernote.edam.error.EDAMUserException userException;
    private com.evernote.edam.error.EDAMSystemException systemException;
    private com.evernote.edam.error.EDAMNotFoundException notFoundException;


    // isset id assignments

    public getResourceByHash_result() {
    }

    /**
     * Performs a deep copy on other.
     */
    public getResourceByHash_result(getResourceByHash_result other) {
      if (other.isSetSuccess()) {
        this.success = new com.evernote.edam.type.Resource(other.success);
      }
      if (other.isSetUserException()) {
        this.userException = new com.evernote.edam.error.EDAMUserException(other.userException);
      }
      if (other.isSetSystemException()) {
        this.systemException = new com.evernote.edam.error.EDAMSystemException(other.systemException);
      }
      if (other.isSetNotFoundException()) {
        this.notFoundException = new com.evernote.edam.error.EDAMNotFoundException(other.notFoundException);
      }
    }

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

    public void clear() {
      this.success = null;
      this.userException = null;
      this.systemException = null;
      this.notFoundException = null;
    }

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

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

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

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

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

      int lastComparison = 0;
      getResourceByHash_result typedOther = (getResourceByHash_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {        lastComparison = TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetUserException()).compareTo(typedOther.isSetUserException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetUserException()) {        lastComparison = TBaseHelper.compareTo(this.userException, typedOther.userException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetSystemException()).compareTo(typedOther.isSetSystemException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSystemException()) {        lastComparison = TBaseHelper.compareTo(this.systemException, typedOther.systemException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetNotFoundException()).compareTo(typedOther.isSetNotFoundException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetNotFoundException()) {        lastComparison = TBaseHelper.compareTo(this.notFoundException, typedOther.notFoundException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public void read(TProtocol iprot) throws TException {
      TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == TType.STRUCT) {
              this.success = new com.evernote.edam.type.Resource();
              this.success.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 1: // USER_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.userException = new com.evernote.edam.error.EDAMUserException();
              this.userException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // SYSTEM_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.systemException = new com.evernote.edam.error.EDAMSystemException();
              this.systemException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 3: // NOT_FOUND_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.notFoundException = new com.evernote.edam.error.EDAMNotFoundException();
              this.notFoundException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(TProtocol oprot) throws TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        this.success.write(oprot);
        oprot.writeFieldEnd();
      } else if (this.isSetUserException()) {
        oprot.writeFieldBegin(USER_EXCEPTION_FIELD_DESC);
        this.userException.write(oprot);
        oprot.writeFieldEnd();
      } else if (this.isSetSystemException()) {
        oprot.writeFieldBegin(SYSTEM_EXCEPTION_FIELD_DESC);
        this.systemException.write(oprot);
        oprot.writeFieldEnd();
      } else if (this.isSetNotFoundException()) {
        oprot.writeFieldBegin(NOT_FOUND_EXCEPTION_FIELD_DESC);
        this.notFoundException.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    public void validate() throws TException {
      // check for required fields
    }

  }

  private static class getResourceRecognition_args implements TBase, java.io.Serializable, Cloneable   {
    private static final TStruct STRUCT_DESC = new TStruct("getResourceRecognition_args");

    private static final TField AUTHENTICATION_TOKEN_FIELD_DESC = new TField("authenticationToken", TType.STRING, (short)1);
    private static final TField GUID_FIELD_DESC = new TField("guid", TType.STRING, (short)2);

    private String authenticationToken;
    private String guid;


    // isset id assignments

    public getResourceRecognition_args() {
    }

    /**
     * Performs a deep copy on other.
     */
    public getResourceRecognition_args(getResourceRecognition_args other) {
      if (other.isSetAuthenticationToken()) {
        this.authenticationToken = other.authenticationToken;
      }
      if (other.isSetGuid()) {
        this.guid = other.guid;
      }
    }

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

    public void clear() {
      this.authenticationToken = null;
      this.guid = null;
    }

    public void setAuthenticationToken(String authenticationToken) {
      this.authenticationToken = authenticationToken;
    }

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

    public void setGuid(String guid) {
      this.guid = guid;
    }

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

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

      int lastComparison = 0;
      getResourceRecognition_args typedOther = (getResourceRecognition_args)other;

      lastComparison = Boolean.valueOf(isSetAuthenticationToken()).compareTo(typedOther.isSetAuthenticationToken());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetAuthenticationToken()) {        lastComparison = TBaseHelper.compareTo(this.authenticationToken, typedOther.authenticationToken);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetGuid()).compareTo(typedOther.isSetGuid());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetGuid()) {        lastComparison = TBaseHelper.compareTo(this.guid, typedOther.guid);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public void read(TProtocol iprot) throws TException {
      TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // AUTHENTICATION_TOKEN
            if (field.type == TType.STRING) {
              this.authenticationToken = iprot.readString();
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // GUID
            if (field.type == TType.STRING) {
              this.guid = iprot.readString();
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(TProtocol oprot) throws TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      if (this.authenticationToken != null) {
        oprot.writeFieldBegin(AUTHENTICATION_TOKEN_FIELD_DESC);
        oprot.writeString(this.authenticationToken);
        oprot.writeFieldEnd();
      }
      if (this.guid != null) {
        oprot.writeFieldBegin(GUID_FIELD_DESC);
        oprot.writeString(this.guid);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    public void validate() throws TException {
      // check for required fields
    }

  }

  private static class getResourceRecognition_result implements TBase, java.io.Serializable, Cloneable   {
    private static final TStruct STRUCT_DESC = new TStruct("getResourceRecognition_result");

    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRING, (short)0);
    private static final TField USER_EXCEPTION_FIELD_DESC = new TField("userException", TType.STRUCT, (short)1);
    private static final TField SYSTEM_EXCEPTION_FIELD_DESC = new TField("systemException", TType.STRUCT, (short)2);
    private static final TField NOT_FOUND_EXCEPTION_FIELD_DESC = new TField("notFoundException", TType.STRUCT, (short)3);

    private byte[] success;
    private com.evernote.edam.error.EDAMUserException userException;
    private com.evernote.edam.error.EDAMSystemException systemException;
    private com.evernote.edam.error.EDAMNotFoundException notFoundException;


    // isset id assignments

    public getResourceRecognition_result() {
    }

    /**
     * Performs a deep copy on other.
     */
    public getResourceRecognition_result(getResourceRecognition_result other) {
      if (other.isSetSuccess()) {
        this.success = new byte[other.success.length];
        System.arraycopy(other.success, 0, success, 0, other.success.length);
      }
      if (other.isSetUserException()) {
        this.userException = new com.evernote.edam.error.EDAMUserException(other.userException);
      }
      if (other.isSetSystemException()) {
        this.systemException = new com.evernote.edam.error.EDAMSystemException(other.systemException);
      }
      if (other.isSetNotFoundException()) {
        this.notFoundException = new com.evernote.edam.error.EDAMNotFoundException(other.notFoundException);
      }
    }

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

    public void clear() {
      this.success = null;
      this.userException = null;
      this.systemException = null;
      this.notFoundException = null;
    }

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

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

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

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

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

      int lastComparison = 0;
      getResourceRecognition_result typedOther = (getResourceRecognition_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {        lastComparison = TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetUserException()).compareTo(typedOther.isSetUserException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetUserException()) {        lastComparison = TBaseHelper.compareTo(this.userException, typedOther.userException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetSystemException()).compareTo(typedOther.isSetSystemException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSystemException()) {        lastComparison = TBaseHelper.compareTo(this.systemException, typedOther.systemException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetNotFoundException()).compareTo(typedOther.isSetNotFoundException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetNotFoundException()) {        lastComparison = TBaseHelper.compareTo(this.notFoundException, typedOther.notFoundException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public void read(TProtocol iprot) throws TException {
      TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == TType.STRING) {
              this.success = iprot.readBytes();
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 1: // USER_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.userException = new com.evernote.edam.error.EDAMUserException();
              this.userException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // SYSTEM_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.systemException = new com.evernote.edam.error.EDAMSystemException();
              this.systemException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 3: // NOT_FOUND_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.notFoundException = new com.evernote.edam.error.EDAMNotFoundException();
              this.notFoundException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(TProtocol oprot) throws TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        oprot.writeBinary(this.success);
        oprot.writeFieldEnd();
      } else if (this.isSetUserException()) {
        oprot.writeFieldBegin(USER_EXCEPTION_FIELD_DESC);
        this.userException.write(oprot);
        oprot.writeFieldEnd();
      } else if (this.isSetSystemException()) {
        oprot.writeFieldBegin(SYSTEM_EXCEPTION_FIELD_DESC);
        this.systemException.write(oprot);
        oprot.writeFieldEnd();
      } else if (this.isSetNotFoundException()) {
        oprot.writeFieldBegin(NOT_FOUND_EXCEPTION_FIELD_DESC);
        this.notFoundException.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    public void validate() throws TException {
      // check for required fields
    }

  }

  private static class getResourceAlternateData_args implements TBase, java.io.Serializable, Cloneable   {
    private static final TStruct STRUCT_DESC = new TStruct("getResourceAlternateData_args");

    private static final TField AUTHENTICATION_TOKEN_FIELD_DESC = new TField("authenticationToken", TType.STRING, (short)1);
    private static final TField GUID_FIELD_DESC = new TField("guid", TType.STRING, (short)2);

    private String authenticationToken;
    private String guid;


    // isset id assignments

    public getResourceAlternateData_args() {
    }

    /**
     * Performs a deep copy on other.
     */
    public getResourceAlternateData_args(getResourceAlternateData_args other) {
      if (other.isSetAuthenticationToken()) {
        this.authenticationToken = other.authenticationToken;
      }
      if (other.isSetGuid()) {
        this.guid = other.guid;
      }
    }

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

    public void clear() {
      this.authenticationToken = null;
      this.guid = null;
    }

    public void setAuthenticationToken(String authenticationToken) {
      this.authenticationToken = authenticationToken;
    }

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

    public void setGuid(String guid) {
      this.guid = guid;
    }

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

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

      int lastComparison = 0;
      getResourceAlternateData_args typedOther = (getResourceAlternateData_args)other;

      lastComparison = Boolean.valueOf(isSetAuthenticationToken()).compareTo(typedOther.isSetAuthenticationToken());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetAuthenticationToken()) {        lastComparison = TBaseHelper.compareTo(this.authenticationToken, typedOther.authenticationToken);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetGuid()).compareTo(typedOther.isSetGuid());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetGuid()) {        lastComparison = TBaseHelper.compareTo(this.guid, typedOther.guid);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public void read(TProtocol iprot) throws TException {
      TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // AUTHENTICATION_TOKEN
            if (field.type == TType.STRING) {
              this.authenticationToken = iprot.readString();
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // GUID
            if (field.type == TType.STRING) {
              this.guid = iprot.readString();
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(TProtocol oprot) throws TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      if (this.authenticationToken != null) {
        oprot.writeFieldBegin(AUTHENTICATION_TOKEN_FIELD_DESC);
        oprot.writeString(this.authenticationToken);
        oprot.writeFieldEnd();
      }
      if (this.guid != null) {
        oprot.writeFieldBegin(GUID_FIELD_DESC);
        oprot.writeString(this.guid);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    public void validate() throws TException {
      // check for required fields
    }

  }

  private static class getResourceAlternateData_result implements TBase, java.io.Serializable, Cloneable   {
    private static final TStruct STRUCT_DESC = new TStruct("getResourceAlternateData_result");

    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRING, (short)0);
    private static final TField USER_EXCEPTION_FIELD_DESC = new TField("userException", TType.STRUCT, (short)1);
    private static final TField SYSTEM_EXCEPTION_FIELD_DESC = new TField("systemException", TType.STRUCT, (short)2);
    private static final TField NOT_FOUND_EXCEPTION_FIELD_DESC = new TField("notFoundException", TType.STRUCT, (short)3);

    private byte[] success;
    private com.evernote.edam.error.EDAMUserException userException;
    private com.evernote.edam.error.EDAMSystemException systemException;
    private com.evernote.edam.error.EDAMNotFoundException notFoundException;


    // isset id assignments

    public getResourceAlternateData_result() {
    }

    /**
     * Performs a deep copy on other.
     */
    public getResourceAlternateData_result(getResourceAlternateData_result other) {
      if (other.isSetSuccess()) {
        this.success = new byte[other.success.length];
        System.arraycopy(other.success, 0, success, 0, other.success.length);
      }
      if (other.isSetUserException()) {
        this.userException = new com.evernote.edam.error.EDAMUserException(other.userException);
      }
      if (other.isSetSystemException()) {
        this.systemException = new com.evernote.edam.error.EDAMSystemException(other.systemException);
      }
      if (other.isSetNotFoundException()) {
        this.notFoundException = new com.evernote.edam.error.EDAMNotFoundException(other.notFoundException);
      }
    }

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

    public void clear() {
      this.success = null;
      this.userException = null;
      this.systemException = null;
      this.notFoundException = null;
    }

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

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

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

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

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

      int lastComparison = 0;
      getResourceAlternateData_result typedOther = (getResourceAlternateData_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {        lastComparison = TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetUserException()).compareTo(typedOther.isSetUserException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetUserException()) {        lastComparison = TBaseHelper.compareTo(this.userException, typedOther.userException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetSystemException()).compareTo(typedOther.isSetSystemException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSystemException()) {        lastComparison = TBaseHelper.compareTo(this.systemException, typedOther.systemException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetNotFoundException()).compareTo(typedOther.isSetNotFoundException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetNotFoundException()) {        lastComparison = TBaseHelper.compareTo(this.notFoundException, typedOther.notFoundException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public void read(TProtocol iprot) throws TException {
      TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == TType.STRING) {
              this.success = iprot.readBytes();
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 1: // USER_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.userException = new com.evernote.edam.error.EDAMUserException();
              this.userException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // SYSTEM_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.systemException = new com.evernote.edam.error.EDAMSystemException();
              this.systemException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 3: // NOT_FOUND_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.notFoundException = new com.evernote.edam.error.EDAMNotFoundException();
              this.notFoundException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(TProtocol oprot) throws TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        oprot.writeBinary(this.success);
        oprot.writeFieldEnd();
      } else if (this.isSetUserException()) {
        oprot.writeFieldBegin(USER_EXCEPTION_FIELD_DESC);
        this.userException.write(oprot);
        oprot.writeFieldEnd();
      } else if (this.isSetSystemException()) {
        oprot.writeFieldBegin(SYSTEM_EXCEPTION_FIELD_DESC);
        this.systemException.write(oprot);
        oprot.writeFieldEnd();
      } else if (this.isSetNotFoundException()) {
        oprot.writeFieldBegin(NOT_FOUND_EXCEPTION_FIELD_DESC);
        this.notFoundException.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    public void validate() throws TException {
      // check for required fields
    }

  }

  private static class getResourceAttributes_args implements TBase, java.io.Serializable, Cloneable   {
    private static final TStruct STRUCT_DESC = new TStruct("getResourceAttributes_args");

    private static final TField AUTHENTICATION_TOKEN_FIELD_DESC = new TField("authenticationToken", TType.STRING, (short)1);
    private static final TField GUID_FIELD_DESC = new TField("guid", TType.STRING, (short)2);

    private String authenticationToken;
    private String guid;


    // isset id assignments

    public getResourceAttributes_args() {
    }

    /**
     * Performs a deep copy on other.
     */
    public getResourceAttributes_args(getResourceAttributes_args other) {
      if (other.isSetAuthenticationToken()) {
        this.authenticationToken = other.authenticationToken;
      }
      if (other.isSetGuid()) {
        this.guid = other.guid;
      }
    }

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

    public void clear() {
      this.authenticationToken = null;
      this.guid = null;
    }

    public void setAuthenticationToken(String authenticationToken) {
      this.authenticationToken = authenticationToken;
    }

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

    public void setGuid(String guid) {
      this.guid = guid;
    }

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

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

      int lastComparison = 0;
      getResourceAttributes_args typedOther = (getResourceAttributes_args)other;

      lastComparison = Boolean.valueOf(isSetAuthenticationToken()).compareTo(typedOther.isSetAuthenticationToken());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetAuthenticationToken()) {        lastComparison = TBaseHelper.compareTo(this.authenticationToken, typedOther.authenticationToken);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetGuid()).compareTo(typedOther.isSetGuid());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetGuid()) {        lastComparison = TBaseHelper.compareTo(this.guid, typedOther.guid);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public void read(TProtocol iprot) throws TException {
      TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // AUTHENTICATION_TOKEN
            if (field.type == TType.STRING) {
              this.authenticationToken = iprot.readString();
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // GUID
            if (field.type == TType.STRING) {
              this.guid = iprot.readString();
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(TProtocol oprot) throws TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      if (this.authenticationToken != null) {
        oprot.writeFieldBegin(AUTHENTICATION_TOKEN_FIELD_DESC);
        oprot.writeString(this.authenticationToken);
        oprot.writeFieldEnd();
      }
      if (this.guid != null) {
        oprot.writeFieldBegin(GUID_FIELD_DESC);
        oprot.writeString(this.guid);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    public void validate() throws TException {
      // check for required fields
    }

  }

  private static class getResourceAttributes_result implements TBase, java.io.Serializable, Cloneable   {
    private static final TStruct STRUCT_DESC = new TStruct("getResourceAttributes_result");

    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
    private static final TField USER_EXCEPTION_FIELD_DESC = new TField("userException", TType.STRUCT, (short)1);
    private static final TField SYSTEM_EXCEPTION_FIELD_DESC = new TField("systemException", TType.STRUCT, (short)2);
    private static final TField NOT_FOUND_EXCEPTION_FIELD_DESC = new TField("notFoundException", TType.STRUCT, (short)3);

    private com.evernote.edam.type.ResourceAttributes success;
    private com.evernote.edam.error.EDAMUserException userException;
    private com.evernote.edam.error.EDAMSystemException systemException;
    private com.evernote.edam.error.EDAMNotFoundException notFoundException;


    // isset id assignments

    public getResourceAttributes_result() {
    }

    /**
     * Performs a deep copy on other.
     */
    public getResourceAttributes_result(getResourceAttributes_result other) {
      if (other.isSetSuccess()) {
        this.success = new com.evernote.edam.type.ResourceAttributes(other.success);
      }
      if (other.isSetUserException()) {
        this.userException = new com.evernote.edam.error.EDAMUserException(other.userException);
      }
      if (other.isSetSystemException()) {
        this.systemException = new com.evernote.edam.error.EDAMSystemException(other.systemException);
      }
      if (other.isSetNotFoundException()) {
        this.notFoundException = new com.evernote.edam.error.EDAMNotFoundException(other.notFoundException);
      }
    }

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

    public void clear() {
      this.success = null;
      this.userException = null;
      this.systemException = null;
      this.notFoundException = null;
    }

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

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

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

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

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

      int lastComparison = 0;
      getResourceAttributes_result typedOther = (getResourceAttributes_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {        lastComparison = TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetUserException()).compareTo(typedOther.isSetUserException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetUserException()) {        lastComparison = TBaseHelper.compareTo(this.userException, typedOther.userException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetSystemException()).compareTo(typedOther.isSetSystemException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSystemException()) {        lastComparison = TBaseHelper.compareTo(this.systemException, typedOther.systemException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetNotFoundException()).compareTo(typedOther.isSetNotFoundException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetNotFoundException()) {        lastComparison = TBaseHelper.compareTo(this.notFoundException, typedOther.notFoundException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public void read(TProtocol iprot) throws TException {
      TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == TType.STRUCT) {
              this.success = new com.evernote.edam.type.ResourceAttributes();
              this.success.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 1: // USER_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.userException = new com.evernote.edam.error.EDAMUserException();
              this.userException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // SYSTEM_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.systemException = new com.evernote.edam.error.EDAMSystemException();
              this.systemException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 3: // NOT_FOUND_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.notFoundException = new com.evernote.edam.error.EDAMNotFoundException();
              this.notFoundException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(TProtocol oprot) throws TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        this.success.write(oprot);
        oprot.writeFieldEnd();
      } else if (this.isSetUserException()) {
        oprot.writeFieldBegin(USER_EXCEPTION_FIELD_DESC);
        this.userException.write(oprot);
        oprot.writeFieldEnd();
      } else if (this.isSetSystemException()) {
        oprot.writeFieldBegin(SYSTEM_EXCEPTION_FIELD_DESC);
        this.systemException.write(oprot);
        oprot.writeFieldEnd();
      } else if (this.isSetNotFoundException()) {
        oprot.writeFieldBegin(NOT_FOUND_EXCEPTION_FIELD_DESC);
        this.notFoundException.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    public void validate() throws TException {
      // check for required fields
    }

  }

  private static class getPublicNotebook_args implements TBase, java.io.Serializable, Cloneable   {
    private static final TStruct STRUCT_DESC = new TStruct("getPublicNotebook_args");

    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I32, (short)1);
    private static final TField PUBLIC_URI_FIELD_DESC = new TField("publicUri", TType.STRING, (short)2);

    private int userId;
    private String publicUri;


    // isset id assignments
    private static final int __USERID_ISSET_ID = 0;
    private boolean[] __isset_vector = new boolean[1];

    public getPublicNotebook_args() {
    }

    /**
     * Performs a deep copy on other.
     */
    public getPublicNotebook_args(getPublicNotebook_args other) {
      System.arraycopy(other.__isset_vector, 0, __isset_vector, 0, other.__isset_vector.length);
      this.userId = other.userId;
      if (other.isSetPublicUri()) {
        this.publicUri = other.publicUri;
      }
    }

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

    public void clear() {
      setUserIdIsSet(false);
      this.userId = 0;
      this.publicUri = null;
    }

    public void setUserId(int userId) {
      this.userId = userId;
      setUserIdIsSet(true);
    }

    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
    public boolean isSetUserId() {
      return __isset_vector[__USERID_ISSET_ID];
    }

    public void setUserIdIsSet(boolean value) {
      __isset_vector[__USERID_ISSET_ID] = value;
    }

    public void setPublicUri(String publicUri) {
      this.publicUri = publicUri;
    }

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

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

      int lastComparison = 0;
      getPublicNotebook_args typedOther = (getPublicNotebook_args)other;

      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(typedOther.isSetUserId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetUserId()) {        lastComparison = TBaseHelper.compareTo(this.userId, typedOther.userId);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetPublicUri()).compareTo(typedOther.isSetPublicUri());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetPublicUri()) {        lastComparison = TBaseHelper.compareTo(this.publicUri, typedOther.publicUri);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public void read(TProtocol iprot) throws TException {
      TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // USER_ID
            if (field.type == TType.I32) {
              this.userId = iprot.readI32();
              setUserIdIsSet(true);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // PUBLIC_URI
            if (field.type == TType.STRING) {
              this.publicUri = iprot.readString();
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(TProtocol oprot) throws TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
      oprot.writeI32(this.userId);
      oprot.writeFieldEnd();
      if (this.publicUri != null) {
        oprot.writeFieldBegin(PUBLIC_URI_FIELD_DESC);
        oprot.writeString(this.publicUri);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    public void validate() throws TException {
      // check for required fields
    }

  }

  private static class getPublicNotebook_result implements TBase, java.io.Serializable, Cloneable   {
    private static final TStruct STRUCT_DESC = new TStruct("getPublicNotebook_result");

    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
    private static final TField SYSTEM_EXCEPTION_FIELD_DESC = new TField("systemException", TType.STRUCT, (short)1);
    private static final TField NOT_FOUND_EXCEPTION_FIELD_DESC = new TField("notFoundException", TType.STRUCT, (short)2);

    private com.evernote.edam.type.Notebook success;
    private com.evernote.edam.error.EDAMSystemException systemException;
    private com.evernote.edam.error.EDAMNotFoundException notFoundException;


    // isset id assignments

    public getPublicNotebook_result() {
    }

    /**
     * Performs a deep copy on other.
     */
    public getPublicNotebook_result(getPublicNotebook_result other) {
      if (other.isSetSuccess()) {
        this.success = new com.evernote.edam.type.Notebook(other.success);
      }
      if (other.isSetSystemException()) {
        this.systemException = new com.evernote.edam.error.EDAMSystemException(other.systemException);
      }
      if (other.isSetNotFoundException()) {
        this.notFoundException = new com.evernote.edam.error.EDAMNotFoundException(other.notFoundException);
      }
    }

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

    public void clear() {
      this.success = null;
      this.systemException = null;
      this.notFoundException = null;
    }

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

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

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

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

      int lastComparison = 0;
      getPublicNotebook_result typedOther = (getPublicNotebook_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {        lastComparison = TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetSystemException()).compareTo(typedOther.isSetSystemException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSystemException()) {        lastComparison = TBaseHelper.compareTo(this.systemException, typedOther.systemException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetNotFoundException()).compareTo(typedOther.isSetNotFoundException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetNotFoundException()) {        lastComparison = TBaseHelper.compareTo(this.notFoundException, typedOther.notFoundException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public void read(TProtocol iprot) throws TException {
      TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == TType.STRUCT) {
              this.success = new com.evernote.edam.type.Notebook();
              this.success.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 1: // SYSTEM_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.systemException = new com.evernote.edam.error.EDAMSystemException();
              this.systemException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // NOT_FOUND_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.notFoundException = new com.evernote.edam.error.EDAMNotFoundException();
              this.notFoundException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(TProtocol oprot) throws TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        this.success.write(oprot);
        oprot.writeFieldEnd();
      } else if (this.isSetSystemException()) {
        oprot.writeFieldBegin(SYSTEM_EXCEPTION_FIELD_DESC);
        this.systemException.write(oprot);
        oprot.writeFieldEnd();
      } else if (this.isSetNotFoundException()) {
        oprot.writeFieldBegin(NOT_FOUND_EXCEPTION_FIELD_DESC);
        this.notFoundException.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    public void validate() throws TException {
      // check for required fields
    }

  }

  private static class createSharedNotebook_args implements TBase, java.io.Serializable, Cloneable   {
    private static final TStruct STRUCT_DESC = new TStruct("createSharedNotebook_args");

    private static final TField AUTHENTICATION_TOKEN_FIELD_DESC = new TField("authenticationToken", TType.STRING, (short)1);
    private static final TField SHARED_NOTEBOOK_FIELD_DESC = new TField("sharedNotebook", TType.STRUCT, (short)2);

    private String authenticationToken;
    private com.evernote.edam.type.SharedNotebook sharedNotebook;


    // isset id assignments

    public createSharedNotebook_args() {
    }

    /**
     * Performs a deep copy on other.
     */
    public createSharedNotebook_args(createSharedNotebook_args other) {
      if (other.isSetAuthenticationToken()) {
        this.authenticationToken = other.authenticationToken;
      }
      if (other.isSetSharedNotebook()) {
        this.sharedNotebook = new com.evernote.edam.type.SharedNotebook(other.sharedNotebook);
      }
    }

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

    public void clear() {
      this.authenticationToken = null;
      this.sharedNotebook = null;
    }

    public void setAuthenticationToken(String authenticationToken) {
      this.authenticationToken = authenticationToken;
    }

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

    public void setSharedNotebook(com.evernote.edam.type.SharedNotebook sharedNotebook) {
      this.sharedNotebook = sharedNotebook;
    }

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

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

      int lastComparison = 0;
      createSharedNotebook_args typedOther = (createSharedNotebook_args)other;

      lastComparison = Boolean.valueOf(isSetAuthenticationToken()).compareTo(typedOther.isSetAuthenticationToken());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetAuthenticationToken()) {        lastComparison = TBaseHelper.compareTo(this.authenticationToken, typedOther.authenticationToken);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetSharedNotebook()).compareTo(typedOther.isSetSharedNotebook());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSharedNotebook()) {        lastComparison = TBaseHelper.compareTo(this.sharedNotebook, typedOther.sharedNotebook);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public void read(TProtocol iprot) throws TException {
      TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // AUTHENTICATION_TOKEN
            if (field.type == TType.STRING) {
              this.authenticationToken = iprot.readString();
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // SHARED_NOTEBOOK
            if (field.type == TType.STRUCT) {
              this.sharedNotebook = new com.evernote.edam.type.SharedNotebook();
              this.sharedNotebook.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(TProtocol oprot) throws TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      if (this.authenticationToken != null) {
        oprot.writeFieldBegin(AUTHENTICATION_TOKEN_FIELD_DESC);
        oprot.writeString(this.authenticationToken);
        oprot.writeFieldEnd();
      }
      if (this.sharedNotebook != null) {
        oprot.writeFieldBegin(SHARED_NOTEBOOK_FIELD_DESC);
        this.sharedNotebook.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    public void validate() throws TException {
      // check for required fields
    }

  }

  private static class createSharedNotebook_result implements TBase, java.io.Serializable, Cloneable   {
    private static final TStruct STRUCT_DESC = new TStruct("createSharedNotebook_result");

    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
    private static final TField USER_EXCEPTION_FIELD_DESC = new TField("userException", TType.STRUCT, (short)1);
    private static final TField NOT_FOUND_EXCEPTION_FIELD_DESC = new TField("notFoundException", TType.STRUCT, (short)2);
    private static final TField SYSTEM_EXCEPTION_FIELD_DESC = new TField("systemException", TType.STRUCT, (short)3);

    private com.evernote.edam.type.SharedNotebook success;
    private com.evernote.edam.error.EDAMUserException userException;
    private com.evernote.edam.error.EDAMNotFoundException notFoundException;
    private com.evernote.edam.error.EDAMSystemException systemException;


    // isset id assignments

    public createSharedNotebook_result() {
    }

    /**
     * Performs a deep copy on other.
     */
    public createSharedNotebook_result(createSharedNotebook_result other) {
      if (other.isSetSuccess()) {
        this.success = new com.evernote.edam.type.SharedNotebook(other.success);
      }
      if (other.isSetUserException()) {
        this.userException = new com.evernote.edam.error.EDAMUserException(other.userException);
      }
      if (other.isSetNotFoundException()) {
        this.notFoundException = new com.evernote.edam.error.EDAMNotFoundException(other.notFoundException);
      }
      if (other.isSetSystemException()) {
        this.systemException = new com.evernote.edam.error.EDAMSystemException(other.systemException);
      }
    }

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

    public void clear() {
      this.success = null;
      this.userException = null;
      this.notFoundException = null;
      this.systemException = null;
    }

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

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

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

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

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

      int lastComparison = 0;
      createSharedNotebook_result typedOther = (createSharedNotebook_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {        lastComparison = TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetUserException()).compareTo(typedOther.isSetUserException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetUserException()) {        lastComparison = TBaseHelper.compareTo(this.userException, typedOther.userException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetNotFoundException()).compareTo(typedOther.isSetNotFoundException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetNotFoundException()) {        lastComparison = TBaseHelper.compareTo(this.notFoundException, typedOther.notFoundException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetSystemException()).compareTo(typedOther.isSetSystemException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSystemException()) {        lastComparison = TBaseHelper.compareTo(this.systemException, typedOther.systemException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public void read(TProtocol iprot) throws TException {
      TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == TType.STRUCT) {
              this.success = new com.evernote.edam.type.SharedNotebook();
              this.success.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 1: // USER_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.userException = new com.evernote.edam.error.EDAMUserException();
              this.userException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // NOT_FOUND_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.notFoundException = new com.evernote.edam.error.EDAMNotFoundException();
              this.notFoundException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 3: // SYSTEM_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.systemException = new com.evernote.edam.error.EDAMSystemException();
              this.systemException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(TProtocol oprot) throws TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        this.success.write(oprot);
        oprot.writeFieldEnd();
      } else if (this.isSetUserException()) {
        oprot.writeFieldBegin(USER_EXCEPTION_FIELD_DESC);
        this.userException.write(oprot);
        oprot.writeFieldEnd();
      } else if (this.isSetNotFoundException()) {
        oprot.writeFieldBegin(NOT_FOUND_EXCEPTION_FIELD_DESC);
        this.notFoundException.write(oprot);
        oprot.writeFieldEnd();
      } else if (this.isSetSystemException()) {
        oprot.writeFieldBegin(SYSTEM_EXCEPTION_FIELD_DESC);
        this.systemException.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    public void validate() throws TException {
      // check for required fields
    }

  }

  private static class updateSharedNotebook_args implements TBase, java.io.Serializable, Cloneable   {
    private static final TStruct STRUCT_DESC = new TStruct("updateSharedNotebook_args");

    private static final TField AUTHENTICATION_TOKEN_FIELD_DESC = new TField("authenticationToken", TType.STRING, (short)1);
    private static final TField SHARED_NOTEBOOK_FIELD_DESC = new TField("sharedNotebook", TType.STRUCT, (short)2);

    private String authenticationToken;
    private com.evernote.edam.type.SharedNotebook sharedNotebook;


    // isset id assignments

    public updateSharedNotebook_args() {
    }

    /**
     * Performs a deep copy on other.
     */
    public updateSharedNotebook_args(updateSharedNotebook_args other) {
      if (other.isSetAuthenticationToken()) {
        this.authenticationToken = other.authenticationToken;
      }
      if (other.isSetSharedNotebook()) {
        this.sharedNotebook = new com.evernote.edam.type.SharedNotebook(other.sharedNotebook);
      }
    }

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

    public void clear() {
      this.authenticationToken = null;
      this.sharedNotebook = null;
    }

    public void setAuthenticationToken(String authenticationToken) {
      this.authenticationToken = authenticationToken;
    }

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

    public void setSharedNotebook(com.evernote.edam.type.SharedNotebook sharedNotebook) {
      this.sharedNotebook = sharedNotebook;
    }

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

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

      int lastComparison = 0;
      updateSharedNotebook_args typedOther = (updateSharedNotebook_args)other;

      lastComparison = Boolean.valueOf(isSetAuthenticationToken()).compareTo(typedOther.isSetAuthenticationToken());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetAuthenticationToken()) {        lastComparison = TBaseHelper.compareTo(this.authenticationToken, typedOther.authenticationToken);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetSharedNotebook()).compareTo(typedOther.isSetSharedNotebook());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSharedNotebook()) {        lastComparison = TBaseHelper.compareTo(this.sharedNotebook, typedOther.sharedNotebook);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public void read(TProtocol iprot) throws TException {
      TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // AUTHENTICATION_TOKEN
            if (field.type == TType.STRING) {
              this.authenticationToken = iprot.readString();
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // SHARED_NOTEBOOK
            if (field.type == TType.STRUCT) {
              this.sharedNotebook = new com.evernote.edam.type.SharedNotebook();
              this.sharedNotebook.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(TProtocol oprot) throws TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      if (this.authenticationToken != null) {
        oprot.writeFieldBegin(AUTHENTICATION_TOKEN_FIELD_DESC);
        oprot.writeString(this.authenticationToken);
        oprot.writeFieldEnd();
      }
      if (this.sharedNotebook != null) {
        oprot.writeFieldBegin(SHARED_NOTEBOOK_FIELD_DESC);
        this.sharedNotebook.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    public void validate() throws TException {
      // check for required fields
    }

  }

  private static class updateSharedNotebook_result implements TBase, java.io.Serializable, Cloneable   {
    private static final TStruct STRUCT_DESC = new TStruct("updateSharedNotebook_result");

    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.I32, (short)0);
    private static final TField USER_EXCEPTION_FIELD_DESC = new TField("userException", TType.STRUCT, (short)1);
    private static final TField NOT_FOUND_EXCEPTION_FIELD_DESC = new TField("notFoundException", TType.STRUCT, (short)2);
    private static final TField SYSTEM_EXCEPTION_FIELD_DESC = new TField("systemException", TType.STRUCT, (short)3);

    private int success;
    private com.evernote.edam.error.EDAMUserException userException;
    private com.evernote.edam.error.EDAMNotFoundException notFoundException;
    private com.evernote.edam.error.EDAMSystemException systemException;


    // isset id assignments
    private static final int __SUCCESS_ISSET_ID = 0;
    private boolean[] __isset_vector = new boolean[1];

    public updateSharedNotebook_result() {
    }

    /**
     * Performs a deep copy on other.
     */
    public updateSharedNotebook_result(updateSharedNotebook_result other) {
      System.arraycopy(other.__isset_vector, 0, __isset_vector, 0, other.__isset_vector.length);
      this.success = other.success;
      if (other.isSetUserException()) {
        this.userException = new com.evernote.edam.error.EDAMUserException(other.userException);
      }
      if (other.isSetNotFoundException()) {
        this.notFoundException = new com.evernote.edam.error.EDAMNotFoundException(other.notFoundException);
      }
      if (other.isSetSystemException()) {
        this.systemException = new com.evernote.edam.error.EDAMSystemException(other.systemException);
      }
    }

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

    public void clear() {
      setSuccessIsSet(false);
      this.success = 0;
      this.userException = null;
      this.notFoundException = null;
      this.systemException = null;
    }

    /** Returns true if field success is set (has been asigned a value) and false otherwise */
    public boolean isSetSuccess() {
      return __isset_vector[__SUCCESS_ISSET_ID];
    }

    public void setSuccessIsSet(boolean value) {
      __isset_vector[__SUCCESS_ISSET_ID] = value;
    }

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

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

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

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

      int lastComparison = 0;
      updateSharedNotebook_result typedOther = (updateSharedNotebook_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {        lastComparison = TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetUserException()).compareTo(typedOther.isSetUserException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetUserException()) {        lastComparison = TBaseHelper.compareTo(this.userException, typedOther.userException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetNotFoundException()).compareTo(typedOther.isSetNotFoundException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetNotFoundException()) {        lastComparison = TBaseHelper.compareTo(this.notFoundException, typedOther.notFoundException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetSystemException()).compareTo(typedOther.isSetSystemException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSystemException()) {        lastComparison = TBaseHelper.compareTo(this.systemException, typedOther.systemException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public void read(TProtocol iprot) throws TException {
      TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == TType.I32) {
              this.success = iprot.readI32();
              setSuccessIsSet(true);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 1: // USER_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.userException = new com.evernote.edam.error.EDAMUserException();
              this.userException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // NOT_FOUND_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.notFoundException = new com.evernote.edam.error.EDAMNotFoundException();
              this.notFoundException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 3: // SYSTEM_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.systemException = new com.evernote.edam.error.EDAMSystemException();
              this.systemException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(TProtocol oprot) throws TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        oprot.writeI32(this.success);
        oprot.writeFieldEnd();
      } else if (this.isSetUserException()) {
        oprot.writeFieldBegin(USER_EXCEPTION_FIELD_DESC);
        this.userException.write(oprot);
        oprot.writeFieldEnd();
      } else if (this.isSetNotFoundException()) {
        oprot.writeFieldBegin(NOT_FOUND_EXCEPTION_FIELD_DESC);
        this.notFoundException.write(oprot);
        oprot.writeFieldEnd();
      } else if (this.isSetSystemException()) {
        oprot.writeFieldBegin(SYSTEM_EXCEPTION_FIELD_DESC);
        this.systemException.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    public void validate() throws TException {
      // check for required fields
    }

  }

  private static class sendMessageToSharedNotebookMembers_args implements TBase, java.io.Serializable, Cloneable   {
    private static final TStruct STRUCT_DESC = new TStruct("sendMessageToSharedNotebookMembers_args");

    private static final TField AUTHENTICATION_TOKEN_FIELD_DESC = new TField("authenticationToken", TType.STRING, (short)1);
    private static final TField NOTEBOOK_GUID_FIELD_DESC = new TField("notebookGuid", TType.STRING, (short)2);
    private static final TField MESSAGE_TEXT_FIELD_DESC = new TField("messageText", TType.STRING, (short)3);
    private static final TField RECIPIENTS_FIELD_DESC = new TField("recipients", TType.LIST, (short)4);

    private String authenticationToken;
    private String notebookGuid;
    private String messageText;
    private List recipients;


    // isset id assignments

    public sendMessageToSharedNotebookMembers_args() {
    }

    /**
     * Performs a deep copy on other.
     */
    public sendMessageToSharedNotebookMembers_args(sendMessageToSharedNotebookMembers_args other) {
      if (other.isSetAuthenticationToken()) {
        this.authenticationToken = other.authenticationToken;
      }
      if (other.isSetNotebookGuid()) {
        this.notebookGuid = other.notebookGuid;
      }
      if (other.isSetMessageText()) {
        this.messageText = other.messageText;
      }
      if (other.isSetRecipients()) {
        List __this__recipients = new ArrayList();
        for (String other_element : other.recipients) {
          __this__recipients.add(other_element);
        }
        this.recipients = __this__recipients;
      }
    }

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

    public void clear() {
      this.authenticationToken = null;
      this.notebookGuid = null;
      this.messageText = null;
      this.recipients = null;
    }

    public void setAuthenticationToken(String authenticationToken) {
      this.authenticationToken = authenticationToken;
    }

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

    public void setNotebookGuid(String notebookGuid) {
      this.notebookGuid = notebookGuid;
    }

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

    public void setMessageText(String messageText) {
      this.messageText = messageText;
    }

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

    public void setRecipients(List recipients) {
      this.recipients = recipients;
    }

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

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

      int lastComparison = 0;
      sendMessageToSharedNotebookMembers_args typedOther = (sendMessageToSharedNotebookMembers_args)other;

      lastComparison = Boolean.valueOf(isSetAuthenticationToken()).compareTo(typedOther.isSetAuthenticationToken());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetAuthenticationToken()) {        lastComparison = TBaseHelper.compareTo(this.authenticationToken, typedOther.authenticationToken);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetNotebookGuid()).compareTo(typedOther.isSetNotebookGuid());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetNotebookGuid()) {        lastComparison = TBaseHelper.compareTo(this.notebookGuid, typedOther.notebookGuid);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetMessageText()).compareTo(typedOther.isSetMessageText());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetMessageText()) {        lastComparison = TBaseHelper.compareTo(this.messageText, typedOther.messageText);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetRecipients()).compareTo(typedOther.isSetRecipients());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetRecipients()) {        lastComparison = TBaseHelper.compareTo(this.recipients, typedOther.recipients);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public void read(TProtocol iprot) throws TException {
      TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // AUTHENTICATION_TOKEN
            if (field.type == TType.STRING) {
              this.authenticationToken = iprot.readString();
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // NOTEBOOK_GUID
            if (field.type == TType.STRING) {
              this.notebookGuid = iprot.readString();
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 3: // MESSAGE_TEXT
            if (field.type == TType.STRING) {
              this.messageText = iprot.readString();
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 4: // RECIPIENTS
            if (field.type == TType.LIST) {
              {
                TList _list138 = iprot.readListBegin();
                this.recipients = new ArrayList(_list138.size);
                for (int _i139 = 0; _i139 < _list138.size; ++_i139)
                {
                  String _elem140;
                  _elem140 = iprot.readString();
                  this.recipients.add(_elem140);
                }
                iprot.readListEnd();
              }
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(TProtocol oprot) throws TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      if (this.authenticationToken != null) {
        oprot.writeFieldBegin(AUTHENTICATION_TOKEN_FIELD_DESC);
        oprot.writeString(this.authenticationToken);
        oprot.writeFieldEnd();
      }
      if (this.notebookGuid != null) {
        oprot.writeFieldBegin(NOTEBOOK_GUID_FIELD_DESC);
        oprot.writeString(this.notebookGuid);
        oprot.writeFieldEnd();
      }
      if (this.messageText != null) {
        oprot.writeFieldBegin(MESSAGE_TEXT_FIELD_DESC);
        oprot.writeString(this.messageText);
        oprot.writeFieldEnd();
      }
      if (this.recipients != null) {
        oprot.writeFieldBegin(RECIPIENTS_FIELD_DESC);
        {
          oprot.writeListBegin(new TList(TType.STRING, this.recipients.size()));
          for (String _iter141 : this.recipients)
          {
            oprot.writeString(_iter141);
          }
          oprot.writeListEnd();
        }
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    public void validate() throws TException {
      // check for required fields
    }

  }

  private static class sendMessageToSharedNotebookMembers_result implements TBase, java.io.Serializable, Cloneable   {
    private static final TStruct STRUCT_DESC = new TStruct("sendMessageToSharedNotebookMembers_result");

    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.I32, (short)0);
    private static final TField USER_EXCEPTION_FIELD_DESC = new TField("userException", TType.STRUCT, (short)1);
    private static final TField NOT_FOUND_EXCEPTION_FIELD_DESC = new TField("notFoundException", TType.STRUCT, (short)2);
    private static final TField SYSTEM_EXCEPTION_FIELD_DESC = new TField("systemException", TType.STRUCT, (short)3);

    private int success;
    private com.evernote.edam.error.EDAMUserException userException;
    private com.evernote.edam.error.EDAMNotFoundException notFoundException;
    private com.evernote.edam.error.EDAMSystemException systemException;


    // isset id assignments
    private static final int __SUCCESS_ISSET_ID = 0;
    private boolean[] __isset_vector = new boolean[1];

    public sendMessageToSharedNotebookMembers_result() {
    }

    /**
     * Performs a deep copy on other.
     */
    public sendMessageToSharedNotebookMembers_result(sendMessageToSharedNotebookMembers_result other) {
      System.arraycopy(other.__isset_vector, 0, __isset_vector, 0, other.__isset_vector.length);
      this.success = other.success;
      if (other.isSetUserException()) {
        this.userException = new com.evernote.edam.error.EDAMUserException(other.userException);
      }
      if (other.isSetNotFoundException()) {
        this.notFoundException = new com.evernote.edam.error.EDAMNotFoundException(other.notFoundException);
      }
      if (other.isSetSystemException()) {
        this.systemException = new com.evernote.edam.error.EDAMSystemException(other.systemException);
      }
    }

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

    public void clear() {
      setSuccessIsSet(false);
      this.success = 0;
      this.userException = null;
      this.notFoundException = null;
      this.systemException = null;
    }

    /** Returns true if field success is set (has been asigned a value) and false otherwise */
    public boolean isSetSuccess() {
      return __isset_vector[__SUCCESS_ISSET_ID];
    }

    public void setSuccessIsSet(boolean value) {
      __isset_vector[__SUCCESS_ISSET_ID] = value;
    }

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

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

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

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

      int lastComparison = 0;
      sendMessageToSharedNotebookMembers_result typedOther = (sendMessageToSharedNotebookMembers_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {        lastComparison = TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetUserException()).compareTo(typedOther.isSetUserException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetUserException()) {        lastComparison = TBaseHelper.compareTo(this.userException, typedOther.userException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetNotFoundException()).compareTo(typedOther.isSetNotFoundException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetNotFoundException()) {        lastComparison = TBaseHelper.compareTo(this.notFoundException, typedOther.notFoundException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetSystemException()).compareTo(typedOther.isSetSystemException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSystemException()) {        lastComparison = TBaseHelper.compareTo(this.systemException, typedOther.systemException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public void read(TProtocol iprot) throws TException {
      TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == TType.I32) {
              this.success = iprot.readI32();
              setSuccessIsSet(true);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 1: // USER_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.userException = new com.evernote.edam.error.EDAMUserException();
              this.userException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // NOT_FOUND_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.notFoundException = new com.evernote.edam.error.EDAMNotFoundException();
              this.notFoundException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 3: // SYSTEM_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.systemException = new com.evernote.edam.error.EDAMSystemException();
              this.systemException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(TProtocol oprot) throws TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        oprot.writeI32(this.success);
        oprot.writeFieldEnd();
      } else if (this.isSetUserException()) {
        oprot.writeFieldBegin(USER_EXCEPTION_FIELD_DESC);
        this.userException.write(oprot);
        oprot.writeFieldEnd();
      } else if (this.isSetNotFoundException()) {
        oprot.writeFieldBegin(NOT_FOUND_EXCEPTION_FIELD_DESC);
        this.notFoundException.write(oprot);
        oprot.writeFieldEnd();
      } else if (this.isSetSystemException()) {
        oprot.writeFieldBegin(SYSTEM_EXCEPTION_FIELD_DESC);
        this.systemException.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    public void validate() throws TException {
      // check for required fields
    }

  }

  private static class listSharedNotebooks_args implements TBase, java.io.Serializable, Cloneable   {
    private static final TStruct STRUCT_DESC = new TStruct("listSharedNotebooks_args");

    private static final TField AUTHENTICATION_TOKEN_FIELD_DESC = new TField("authenticationToken", TType.STRING, (short)1);

    private String authenticationToken;


    // isset id assignments

    public listSharedNotebooks_args() {
    }

    /**
     * Performs a deep copy on other.
     */
    public listSharedNotebooks_args(listSharedNotebooks_args other) {
      if (other.isSetAuthenticationToken()) {
        this.authenticationToken = other.authenticationToken;
      }
    }

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

    public void clear() {
      this.authenticationToken = null;
    }

    public void setAuthenticationToken(String authenticationToken) {
      this.authenticationToken = authenticationToken;
    }

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

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

      int lastComparison = 0;
      listSharedNotebooks_args typedOther = (listSharedNotebooks_args)other;

      lastComparison = Boolean.valueOf(isSetAuthenticationToken()).compareTo(typedOther.isSetAuthenticationToken());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetAuthenticationToken()) {        lastComparison = TBaseHelper.compareTo(this.authenticationToken, typedOther.authenticationToken);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public void read(TProtocol iprot) throws TException {
      TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // AUTHENTICATION_TOKEN
            if (field.type == TType.STRING) {
              this.authenticationToken = iprot.readString();
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(TProtocol oprot) throws TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      if (this.authenticationToken != null) {
        oprot.writeFieldBegin(AUTHENTICATION_TOKEN_FIELD_DESC);
        oprot.writeString(this.authenticationToken);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    public void validate() throws TException {
      // check for required fields
    }

  }

  private static class listSharedNotebooks_result implements TBase, java.io.Serializable, Cloneable   {
    private static final TStruct STRUCT_DESC = new TStruct("listSharedNotebooks_result");

    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
    private static final TField USER_EXCEPTION_FIELD_DESC = new TField("userException", TType.STRUCT, (short)1);
    private static final TField NOT_FOUND_EXCEPTION_FIELD_DESC = new TField("notFoundException", TType.STRUCT, (short)2);
    private static final TField SYSTEM_EXCEPTION_FIELD_DESC = new TField("systemException", TType.STRUCT, (short)3);

    private List success;
    private com.evernote.edam.error.EDAMUserException userException;
    private com.evernote.edam.error.EDAMNotFoundException notFoundException;
    private com.evernote.edam.error.EDAMSystemException systemException;


    // isset id assignments

    public listSharedNotebooks_result() {
    }

    /**
     * Performs a deep copy on other.
     */
    public listSharedNotebooks_result(listSharedNotebooks_result other) {
      if (other.isSetSuccess()) {
        List __this__success = new ArrayList();
        for (com.evernote.edam.type.SharedNotebook other_element : other.success) {
          __this__success.add(new com.evernote.edam.type.SharedNotebook(other_element));
        }
        this.success = __this__success;
      }
      if (other.isSetUserException()) {
        this.userException = new com.evernote.edam.error.EDAMUserException(other.userException);
      }
      if (other.isSetNotFoundException()) {
        this.notFoundException = new com.evernote.edam.error.EDAMNotFoundException(other.notFoundException);
      }
      if (other.isSetSystemException()) {
        this.systemException = new com.evernote.edam.error.EDAMSystemException(other.systemException);
      }
    }

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

    public void clear() {
      this.success = null;
      this.userException = null;
      this.notFoundException = null;
      this.systemException = null;
    }

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

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

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

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

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

      int lastComparison = 0;
      listSharedNotebooks_result typedOther = (listSharedNotebooks_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {        lastComparison = TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetUserException()).compareTo(typedOther.isSetUserException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetUserException()) {        lastComparison = TBaseHelper.compareTo(this.userException, typedOther.userException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetNotFoundException()).compareTo(typedOther.isSetNotFoundException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetNotFoundException()) {        lastComparison = TBaseHelper.compareTo(this.notFoundException, typedOther.notFoundException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetSystemException()).compareTo(typedOther.isSetSystemException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSystemException()) {        lastComparison = TBaseHelper.compareTo(this.systemException, typedOther.systemException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public void read(TProtocol iprot) throws TException {
      TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == TType.LIST) {
              {
                TList _list142 = iprot.readListBegin();
                this.success = new ArrayList(_list142.size);
                for (int _i143 = 0; _i143 < _list142.size; ++_i143)
                {
                  com.evernote.edam.type.SharedNotebook _elem144;
                  _elem144 = new com.evernote.edam.type.SharedNotebook();
                  _elem144.read(iprot);
                  this.success.add(_elem144);
                }
                iprot.readListEnd();
              }
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 1: // USER_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.userException = new com.evernote.edam.error.EDAMUserException();
              this.userException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // NOT_FOUND_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.notFoundException = new com.evernote.edam.error.EDAMNotFoundException();
              this.notFoundException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 3: // SYSTEM_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.systemException = new com.evernote.edam.error.EDAMSystemException();
              this.systemException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(TProtocol oprot) throws TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        {
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
          for (com.evernote.edam.type.SharedNotebook _iter145 : this.success)
          {
            _iter145.write(oprot);
          }
          oprot.writeListEnd();
        }
        oprot.writeFieldEnd();
      } else if (this.isSetUserException()) {
        oprot.writeFieldBegin(USER_EXCEPTION_FIELD_DESC);
        this.userException.write(oprot);
        oprot.writeFieldEnd();
      } else if (this.isSetNotFoundException()) {
        oprot.writeFieldBegin(NOT_FOUND_EXCEPTION_FIELD_DESC);
        this.notFoundException.write(oprot);
        oprot.writeFieldEnd();
      } else if (this.isSetSystemException()) {
        oprot.writeFieldBegin(SYSTEM_EXCEPTION_FIELD_DESC);
        this.systemException.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    public void validate() throws TException {
      // check for required fields
    }

  }

  private static class expungeSharedNotebooks_args implements TBase, java.io.Serializable, Cloneable   {
    private static final TStruct STRUCT_DESC = new TStruct("expungeSharedNotebooks_args");

    private static final TField AUTHENTICATION_TOKEN_FIELD_DESC = new TField("authenticationToken", TType.STRING, (short)1);
    private static final TField SHARED_NOTEBOOK_IDS_FIELD_DESC = new TField("sharedNotebookIds", TType.LIST, (short)2);

    private String authenticationToken;
    private List sharedNotebookIds;


    // isset id assignments

    public expungeSharedNotebooks_args() {
    }

    /**
     * Performs a deep copy on other.
     */
    public expungeSharedNotebooks_args(expungeSharedNotebooks_args other) {
      if (other.isSetAuthenticationToken()) {
        this.authenticationToken = other.authenticationToken;
      }
      if (other.isSetSharedNotebookIds()) {
        List __this__sharedNotebookIds = new ArrayList();
        for (Long other_element : other.sharedNotebookIds) {
          __this__sharedNotebookIds.add(other_element);
        }
        this.sharedNotebookIds = __this__sharedNotebookIds;
      }
    }

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

    public void clear() {
      this.authenticationToken = null;
      this.sharedNotebookIds = null;
    }

    public void setAuthenticationToken(String authenticationToken) {
      this.authenticationToken = authenticationToken;
    }

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

    public void setSharedNotebookIds(List sharedNotebookIds) {
      this.sharedNotebookIds = sharedNotebookIds;
    }

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

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

      int lastComparison = 0;
      expungeSharedNotebooks_args typedOther = (expungeSharedNotebooks_args)other;

      lastComparison = Boolean.valueOf(isSetAuthenticationToken()).compareTo(typedOther.isSetAuthenticationToken());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetAuthenticationToken()) {        lastComparison = TBaseHelper.compareTo(this.authenticationToken, typedOther.authenticationToken);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetSharedNotebookIds()).compareTo(typedOther.isSetSharedNotebookIds());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSharedNotebookIds()) {        lastComparison = TBaseHelper.compareTo(this.sharedNotebookIds, typedOther.sharedNotebookIds);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public void read(TProtocol iprot) throws TException {
      TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // AUTHENTICATION_TOKEN
            if (field.type == TType.STRING) {
              this.authenticationToken = iprot.readString();
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // SHARED_NOTEBOOK_IDS
            if (field.type == TType.LIST) {
              {
                TList _list146 = iprot.readListBegin();
                this.sharedNotebookIds = new ArrayList(_list146.size);
                for (int _i147 = 0; _i147 < _list146.size; ++_i147)
                {
                  long _elem148;
                  _elem148 = iprot.readI64();
                  this.sharedNotebookIds.add(_elem148);
                }
                iprot.readListEnd();
              }
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(TProtocol oprot) throws TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      if (this.authenticationToken != null) {
        oprot.writeFieldBegin(AUTHENTICATION_TOKEN_FIELD_DESC);
        oprot.writeString(this.authenticationToken);
        oprot.writeFieldEnd();
      }
      if (this.sharedNotebookIds != null) {
        oprot.writeFieldBegin(SHARED_NOTEBOOK_IDS_FIELD_DESC);
        {
          oprot.writeListBegin(new TList(TType.I64, this.sharedNotebookIds.size()));
          for (long _iter149 : this.sharedNotebookIds)
          {
            oprot.writeI64(_iter149);
          }
          oprot.writeListEnd();
        }
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    public void validate() throws TException {
      // check for required fields
    }

  }

  private static class expungeSharedNotebooks_result implements TBase, java.io.Serializable, Cloneable   {
    private static final TStruct STRUCT_DESC = new TStruct("expungeSharedNotebooks_result");

    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.I32, (short)0);
    private static final TField USER_EXCEPTION_FIELD_DESC = new TField("userException", TType.STRUCT, (short)1);
    private static final TField NOT_FOUND_EXCEPTION_FIELD_DESC = new TField("notFoundException", TType.STRUCT, (short)2);
    private static final TField SYSTEM_EXCEPTION_FIELD_DESC = new TField("systemException", TType.STRUCT, (short)3);

    private int success;
    private com.evernote.edam.error.EDAMUserException userException;
    private com.evernote.edam.error.EDAMNotFoundException notFoundException;
    private com.evernote.edam.error.EDAMSystemException systemException;


    // isset id assignments
    private static final int __SUCCESS_ISSET_ID = 0;
    private boolean[] __isset_vector = new boolean[1];

    public expungeSharedNotebooks_result() {
    }

    /**
     * Performs a deep copy on other.
     */
    public expungeSharedNotebooks_result(expungeSharedNotebooks_result other) {
      System.arraycopy(other.__isset_vector, 0, __isset_vector, 0, other.__isset_vector.length);
      this.success = other.success;
      if (other.isSetUserException()) {
        this.userException = new com.evernote.edam.error.EDAMUserException(other.userException);
      }
      if (other.isSetNotFoundException()) {
        this.notFoundException = new com.evernote.edam.error.EDAMNotFoundException(other.notFoundException);
      }
      if (other.isSetSystemException()) {
        this.systemException = new com.evernote.edam.error.EDAMSystemException(other.systemException);
      }
    }

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

    public void clear() {
      setSuccessIsSet(false);
      this.success = 0;
      this.userException = null;
      this.notFoundException = null;
      this.systemException = null;
    }

    /** Returns true if field success is set (has been asigned a value) and false otherwise */
    public boolean isSetSuccess() {
      return __isset_vector[__SUCCESS_ISSET_ID];
    }

    public void setSuccessIsSet(boolean value) {
      __isset_vector[__SUCCESS_ISSET_ID] = value;
    }

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

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

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

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

      int lastComparison = 0;
      expungeSharedNotebooks_result typedOther = (expungeSharedNotebooks_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {        lastComparison = TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetUserException()).compareTo(typedOther.isSetUserException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetUserException()) {        lastComparison = TBaseHelper.compareTo(this.userException, typedOther.userException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetNotFoundException()).compareTo(typedOther.isSetNotFoundException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetNotFoundException()) {        lastComparison = TBaseHelper.compareTo(this.notFoundException, typedOther.notFoundException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetSystemException()).compareTo(typedOther.isSetSystemException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSystemException()) {        lastComparison = TBaseHelper.compareTo(this.systemException, typedOther.systemException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public void read(TProtocol iprot) throws TException {
      TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == TType.I32) {
              this.success = iprot.readI32();
              setSuccessIsSet(true);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 1: // USER_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.userException = new com.evernote.edam.error.EDAMUserException();
              this.userException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // NOT_FOUND_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.notFoundException = new com.evernote.edam.error.EDAMNotFoundException();
              this.notFoundException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 3: // SYSTEM_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.systemException = new com.evernote.edam.error.EDAMSystemException();
              this.systemException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(TProtocol oprot) throws TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        oprot.writeI32(this.success);
        oprot.writeFieldEnd();
      } else if (this.isSetUserException()) {
        oprot.writeFieldBegin(USER_EXCEPTION_FIELD_DESC);
        this.userException.write(oprot);
        oprot.writeFieldEnd();
      } else if (this.isSetNotFoundException()) {
        oprot.writeFieldBegin(NOT_FOUND_EXCEPTION_FIELD_DESC);
        this.notFoundException.write(oprot);
        oprot.writeFieldEnd();
      } else if (this.isSetSystemException()) {
        oprot.writeFieldBegin(SYSTEM_EXCEPTION_FIELD_DESC);
        this.systemException.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    public void validate() throws TException {
      // check for required fields
    }

  }

  private static class createLinkedNotebook_args implements TBase, java.io.Serializable, Cloneable   {
    private static final TStruct STRUCT_DESC = new TStruct("createLinkedNotebook_args");

    private static final TField AUTHENTICATION_TOKEN_FIELD_DESC = new TField("authenticationToken", TType.STRING, (short)1);
    private static final TField LINKED_NOTEBOOK_FIELD_DESC = new TField("linkedNotebook", TType.STRUCT, (short)2);

    private String authenticationToken;
    private com.evernote.edam.type.LinkedNotebook linkedNotebook;


    // isset id assignments

    public createLinkedNotebook_args() {
    }

    /**
     * Performs a deep copy on other.
     */
    public createLinkedNotebook_args(createLinkedNotebook_args other) {
      if (other.isSetAuthenticationToken()) {
        this.authenticationToken = other.authenticationToken;
      }
      if (other.isSetLinkedNotebook()) {
        this.linkedNotebook = new com.evernote.edam.type.LinkedNotebook(other.linkedNotebook);
      }
    }

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

    public void clear() {
      this.authenticationToken = null;
      this.linkedNotebook = null;
    }

    public void setAuthenticationToken(String authenticationToken) {
      this.authenticationToken = authenticationToken;
    }

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

    public void setLinkedNotebook(com.evernote.edam.type.LinkedNotebook linkedNotebook) {
      this.linkedNotebook = linkedNotebook;
    }

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

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

      int lastComparison = 0;
      createLinkedNotebook_args typedOther = (createLinkedNotebook_args)other;

      lastComparison = Boolean.valueOf(isSetAuthenticationToken()).compareTo(typedOther.isSetAuthenticationToken());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetAuthenticationToken()) {        lastComparison = TBaseHelper.compareTo(this.authenticationToken, typedOther.authenticationToken);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetLinkedNotebook()).compareTo(typedOther.isSetLinkedNotebook());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetLinkedNotebook()) {        lastComparison = TBaseHelper.compareTo(this.linkedNotebook, typedOther.linkedNotebook);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public void read(TProtocol iprot) throws TException {
      TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // AUTHENTICATION_TOKEN
            if (field.type == TType.STRING) {
              this.authenticationToken = iprot.readString();
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // LINKED_NOTEBOOK
            if (field.type == TType.STRUCT) {
              this.linkedNotebook = new com.evernote.edam.type.LinkedNotebook();
              this.linkedNotebook.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(TProtocol oprot) throws TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      if (this.authenticationToken != null) {
        oprot.writeFieldBegin(AUTHENTICATION_TOKEN_FIELD_DESC);
        oprot.writeString(this.authenticationToken);
        oprot.writeFieldEnd();
      }
      if (this.linkedNotebook != null) {
        oprot.writeFieldBegin(LINKED_NOTEBOOK_FIELD_DESC);
        this.linkedNotebook.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    public void validate() throws TException {
      // check for required fields
    }

  }

  private static class createLinkedNotebook_result implements TBase, java.io.Serializable, Cloneable   {
    private static final TStruct STRUCT_DESC = new TStruct("createLinkedNotebook_result");

    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
    private static final TField USER_EXCEPTION_FIELD_DESC = new TField("userException", TType.STRUCT, (short)1);
    private static final TField NOT_FOUND_EXCEPTION_FIELD_DESC = new TField("notFoundException", TType.STRUCT, (short)2);
    private static final TField SYSTEM_EXCEPTION_FIELD_DESC = new TField("systemException", TType.STRUCT, (short)3);

    private com.evernote.edam.type.LinkedNotebook success;
    private com.evernote.edam.error.EDAMUserException userException;
    private com.evernote.edam.error.EDAMNotFoundException notFoundException;
    private com.evernote.edam.error.EDAMSystemException systemException;


    // isset id assignments

    public createLinkedNotebook_result() {
    }

    /**
     * Performs a deep copy on other.
     */
    public createLinkedNotebook_result(createLinkedNotebook_result other) {
      if (other.isSetSuccess()) {
        this.success = new com.evernote.edam.type.LinkedNotebook(other.success);
      }
      if (other.isSetUserException()) {
        this.userException = new com.evernote.edam.error.EDAMUserException(other.userException);
      }
      if (other.isSetNotFoundException()) {
        this.notFoundException = new com.evernote.edam.error.EDAMNotFoundException(other.notFoundException);
      }
      if (other.isSetSystemException()) {
        this.systemException = new com.evernote.edam.error.EDAMSystemException(other.systemException);
      }
    }

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

    public void clear() {
      this.success = null;
      this.userException = null;
      this.notFoundException = null;
      this.systemException = null;
    }

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

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

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

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

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

      int lastComparison = 0;
      createLinkedNotebook_result typedOther = (createLinkedNotebook_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {        lastComparison = TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetUserException()).compareTo(typedOther.isSetUserException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetUserException()) {        lastComparison = TBaseHelper.compareTo(this.userException, typedOther.userException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetNotFoundException()).compareTo(typedOther.isSetNotFoundException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetNotFoundException()) {        lastComparison = TBaseHelper.compareTo(this.notFoundException, typedOther.notFoundException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetSystemException()).compareTo(typedOther.isSetSystemException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSystemException()) {        lastComparison = TBaseHelper.compareTo(this.systemException, typedOther.systemException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public void read(TProtocol iprot) throws TException {
      TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == TType.STRUCT) {
              this.success = new com.evernote.edam.type.LinkedNotebook();
              this.success.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 1: // USER_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.userException = new com.evernote.edam.error.EDAMUserException();
              this.userException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // NOT_FOUND_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.notFoundException = new com.evernote.edam.error.EDAMNotFoundException();
              this.notFoundException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 3: // SYSTEM_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.systemException = new com.evernote.edam.error.EDAMSystemException();
              this.systemException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(TProtocol oprot) throws TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        this.success.write(oprot);
        oprot.writeFieldEnd();
      } else if (this.isSetUserException()) {
        oprot.writeFieldBegin(USER_EXCEPTION_FIELD_DESC);
        this.userException.write(oprot);
        oprot.writeFieldEnd();
      } else if (this.isSetNotFoundException()) {
        oprot.writeFieldBegin(NOT_FOUND_EXCEPTION_FIELD_DESC);
        this.notFoundException.write(oprot);
        oprot.writeFieldEnd();
      } else if (this.isSetSystemException()) {
        oprot.writeFieldBegin(SYSTEM_EXCEPTION_FIELD_DESC);
        this.systemException.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    public void validate() throws TException {
      // check for required fields
    }

  }

  private static class updateLinkedNotebook_args implements TBase, java.io.Serializable, Cloneable   {
    private static final TStruct STRUCT_DESC = new TStruct("updateLinkedNotebook_args");

    private static final TField AUTHENTICATION_TOKEN_FIELD_DESC = new TField("authenticationToken", TType.STRING, (short)1);
    private static final TField LINKED_NOTEBOOK_FIELD_DESC = new TField("linkedNotebook", TType.STRUCT, (short)2);

    private String authenticationToken;
    private com.evernote.edam.type.LinkedNotebook linkedNotebook;


    // isset id assignments

    public updateLinkedNotebook_args() {
    }

    /**
     * Performs a deep copy on other.
     */
    public updateLinkedNotebook_args(updateLinkedNotebook_args other) {
      if (other.isSetAuthenticationToken()) {
        this.authenticationToken = other.authenticationToken;
      }
      if (other.isSetLinkedNotebook()) {
        this.linkedNotebook = new com.evernote.edam.type.LinkedNotebook(other.linkedNotebook);
      }
    }

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

    public void clear() {
      this.authenticationToken = null;
      this.linkedNotebook = null;
    }

    public void setAuthenticationToken(String authenticationToken) {
      this.authenticationToken = authenticationToken;
    }

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

    public void setLinkedNotebook(com.evernote.edam.type.LinkedNotebook linkedNotebook) {
      this.linkedNotebook = linkedNotebook;
    }

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

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

      int lastComparison = 0;
      updateLinkedNotebook_args typedOther = (updateLinkedNotebook_args)other;

      lastComparison = Boolean.valueOf(isSetAuthenticationToken()).compareTo(typedOther.isSetAuthenticationToken());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetAuthenticationToken()) {        lastComparison = TBaseHelper.compareTo(this.authenticationToken, typedOther.authenticationToken);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetLinkedNotebook()).compareTo(typedOther.isSetLinkedNotebook());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetLinkedNotebook()) {        lastComparison = TBaseHelper.compareTo(this.linkedNotebook, typedOther.linkedNotebook);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public void read(TProtocol iprot) throws TException {
      TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // AUTHENTICATION_TOKEN
            if (field.type == TType.STRING) {
              this.authenticationToken = iprot.readString();
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // LINKED_NOTEBOOK
            if (field.type == TType.STRUCT) {
              this.linkedNotebook = new com.evernote.edam.type.LinkedNotebook();
              this.linkedNotebook.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(TProtocol oprot) throws TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      if (this.authenticationToken != null) {
        oprot.writeFieldBegin(AUTHENTICATION_TOKEN_FIELD_DESC);
        oprot.writeString(this.authenticationToken);
        oprot.writeFieldEnd();
      }
      if (this.linkedNotebook != null) {
        oprot.writeFieldBegin(LINKED_NOTEBOOK_FIELD_DESC);
        this.linkedNotebook.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    public void validate() throws TException {
      // check for required fields
    }

  }

  private static class updateLinkedNotebook_result implements TBase, java.io.Serializable, Cloneable   {
    private static final TStruct STRUCT_DESC = new TStruct("updateLinkedNotebook_result");

    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.I32, (short)0);
    private static final TField USER_EXCEPTION_FIELD_DESC = new TField("userException", TType.STRUCT, (short)1);
    private static final TField NOT_FOUND_EXCEPTION_FIELD_DESC = new TField("notFoundException", TType.STRUCT, (short)2);
    private static final TField SYSTEM_EXCEPTION_FIELD_DESC = new TField("systemException", TType.STRUCT, (short)3);

    private int success;
    private com.evernote.edam.error.EDAMUserException userException;
    private com.evernote.edam.error.EDAMNotFoundException notFoundException;
    private com.evernote.edam.error.EDAMSystemException systemException;


    // isset id assignments
    private static final int __SUCCESS_ISSET_ID = 0;
    private boolean[] __isset_vector = new boolean[1];

    public updateLinkedNotebook_result() {
    }

    /**
     * Performs a deep copy on other.
     */
    public updateLinkedNotebook_result(updateLinkedNotebook_result other) {
      System.arraycopy(other.__isset_vector, 0, __isset_vector, 0, other.__isset_vector.length);
      this.success = other.success;
      if (other.isSetUserException()) {
        this.userException = new com.evernote.edam.error.EDAMUserException(other.userException);
      }
      if (other.isSetNotFoundException()) {
        this.notFoundException = new com.evernote.edam.error.EDAMNotFoundException(other.notFoundException);
      }
      if (other.isSetSystemException()) {
        this.systemException = new com.evernote.edam.error.EDAMSystemException(other.systemException);
      }
    }

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

    public void clear() {
      setSuccessIsSet(false);
      this.success = 0;
      this.userException = null;
      this.notFoundException = null;
      this.systemException = null;
    }

    /** Returns true if field success is set (has been asigned a value) and false otherwise */
    public boolean isSetSuccess() {
      return __isset_vector[__SUCCESS_ISSET_ID];
    }

    public void setSuccessIsSet(boolean value) {
      __isset_vector[__SUCCESS_ISSET_ID] = value;
    }

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

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

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

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

      int lastComparison = 0;
      updateLinkedNotebook_result typedOther = (updateLinkedNotebook_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {        lastComparison = TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetUserException()).compareTo(typedOther.isSetUserException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetUserException()) {        lastComparison = TBaseHelper.compareTo(this.userException, typedOther.userException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetNotFoundException()).compareTo(typedOther.isSetNotFoundException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetNotFoundException()) {        lastComparison = TBaseHelper.compareTo(this.notFoundException, typedOther.notFoundException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetSystemException()).compareTo(typedOther.isSetSystemException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSystemException()) {        lastComparison = TBaseHelper.compareTo(this.systemException, typedOther.systemException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public void read(TProtocol iprot) throws TException {
      TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == TType.I32) {
              this.success = iprot.readI32();
              setSuccessIsSet(true);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 1: // USER_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.userException = new com.evernote.edam.error.EDAMUserException();
              this.userException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // NOT_FOUND_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.notFoundException = new com.evernote.edam.error.EDAMNotFoundException();
              this.notFoundException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 3: // SYSTEM_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.systemException = new com.evernote.edam.error.EDAMSystemException();
              this.systemException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(TProtocol oprot) throws TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        oprot.writeI32(this.success);
        oprot.writeFieldEnd();
      } else if (this.isSetUserException()) {
        oprot.writeFieldBegin(USER_EXCEPTION_FIELD_DESC);
        this.userException.write(oprot);
        oprot.writeFieldEnd();
      } else if (this.isSetNotFoundException()) {
        oprot.writeFieldBegin(NOT_FOUND_EXCEPTION_FIELD_DESC);
        this.notFoundException.write(oprot);
        oprot.writeFieldEnd();
      } else if (this.isSetSystemException()) {
        oprot.writeFieldBegin(SYSTEM_EXCEPTION_FIELD_DESC);
        this.systemException.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    public void validate() throws TException {
      // check for required fields
    }

  }

  private static class listLinkedNotebooks_args implements TBase, java.io.Serializable, Cloneable   {
    private static final TStruct STRUCT_DESC = new TStruct("listLinkedNotebooks_args");

    private static final TField AUTHENTICATION_TOKEN_FIELD_DESC = new TField("authenticationToken", TType.STRING, (short)1);

    private String authenticationToken;


    // isset id assignments

    public listLinkedNotebooks_args() {
    }

    /**
     * Performs a deep copy on other.
     */
    public listLinkedNotebooks_args(listLinkedNotebooks_args other) {
      if (other.isSetAuthenticationToken()) {
        this.authenticationToken = other.authenticationToken;
      }
    }

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

    public void clear() {
      this.authenticationToken = null;
    }

    public void setAuthenticationToken(String authenticationToken) {
      this.authenticationToken = authenticationToken;
    }

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

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

      int lastComparison = 0;
      listLinkedNotebooks_args typedOther = (listLinkedNotebooks_args)other;

      lastComparison = Boolean.valueOf(isSetAuthenticationToken()).compareTo(typedOther.isSetAuthenticationToken());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetAuthenticationToken()) {        lastComparison = TBaseHelper.compareTo(this.authenticationToken, typedOther.authenticationToken);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public void read(TProtocol iprot) throws TException {
      TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // AUTHENTICATION_TOKEN
            if (field.type == TType.STRING) {
              this.authenticationToken = iprot.readString();
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(TProtocol oprot) throws TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      if (this.authenticationToken != null) {
        oprot.writeFieldBegin(AUTHENTICATION_TOKEN_FIELD_DESC);
        oprot.writeString(this.authenticationToken);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    public void validate() throws TException {
      // check for required fields
    }

  }

  private static class listLinkedNotebooks_result implements TBase, java.io.Serializable, Cloneable   {
    private static final TStruct STRUCT_DESC = new TStruct("listLinkedNotebooks_result");

    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
    private static final TField USER_EXCEPTION_FIELD_DESC = new TField("userException", TType.STRUCT, (short)1);
    private static final TField NOT_FOUND_EXCEPTION_FIELD_DESC = new TField("notFoundException", TType.STRUCT, (short)2);
    private static final TField SYSTEM_EXCEPTION_FIELD_DESC = new TField("systemException", TType.STRUCT, (short)3);

    private List success;
    private com.evernote.edam.error.EDAMUserException userException;
    private com.evernote.edam.error.EDAMNotFoundException notFoundException;
    private com.evernote.edam.error.EDAMSystemException systemException;


    // isset id assignments

    public listLinkedNotebooks_result() {
    }

    /**
     * Performs a deep copy on other.
     */
    public listLinkedNotebooks_result(listLinkedNotebooks_result other) {
      if (other.isSetSuccess()) {
        List __this__success = new ArrayList();
        for (com.evernote.edam.type.LinkedNotebook other_element : other.success) {
          __this__success.add(new com.evernote.edam.type.LinkedNotebook(other_element));
        }
        this.success = __this__success;
      }
      if (other.isSetUserException()) {
        this.userException = new com.evernote.edam.error.EDAMUserException(other.userException);
      }
      if (other.isSetNotFoundException()) {
        this.notFoundException = new com.evernote.edam.error.EDAMNotFoundException(other.notFoundException);
      }
      if (other.isSetSystemException()) {
        this.systemException = new com.evernote.edam.error.EDAMSystemException(other.systemException);
      }
    }

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

    public void clear() {
      this.success = null;
      this.userException = null;
      this.notFoundException = null;
      this.systemException = null;
    }

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

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

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

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

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

      int lastComparison = 0;
      listLinkedNotebooks_result typedOther = (listLinkedNotebooks_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {        lastComparison = TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetUserException()).compareTo(typedOther.isSetUserException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetUserException()) {        lastComparison = TBaseHelper.compareTo(this.userException, typedOther.userException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetNotFoundException()).compareTo(typedOther.isSetNotFoundException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetNotFoundException()) {        lastComparison = TBaseHelper.compareTo(this.notFoundException, typedOther.notFoundException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetSystemException()).compareTo(typedOther.isSetSystemException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSystemException()) {        lastComparison = TBaseHelper.compareTo(this.systemException, typedOther.systemException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public void read(TProtocol iprot) throws TException {
      TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == TType.LIST) {
              {
                TList _list150 = iprot.readListBegin();
                this.success = new ArrayList(_list150.size);
                for (int _i151 = 0; _i151 < _list150.size; ++_i151)
                {
                  com.evernote.edam.type.LinkedNotebook _elem152;
                  _elem152 = new com.evernote.edam.type.LinkedNotebook();
                  _elem152.read(iprot);
                  this.success.add(_elem152);
                }
                iprot.readListEnd();
              }
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 1: // USER_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.userException = new com.evernote.edam.error.EDAMUserException();
              this.userException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // NOT_FOUND_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.notFoundException = new com.evernote.edam.error.EDAMNotFoundException();
              this.notFoundException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 3: // SYSTEM_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.systemException = new com.evernote.edam.error.EDAMSystemException();
              this.systemException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(TProtocol oprot) throws TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        {
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
          for (com.evernote.edam.type.LinkedNotebook _iter153 : this.success)
          {
            _iter153.write(oprot);
          }
          oprot.writeListEnd();
        }
        oprot.writeFieldEnd();
      } else if (this.isSetUserException()) {
        oprot.writeFieldBegin(USER_EXCEPTION_FIELD_DESC);
        this.userException.write(oprot);
        oprot.writeFieldEnd();
      } else if (this.isSetNotFoundException()) {
        oprot.writeFieldBegin(NOT_FOUND_EXCEPTION_FIELD_DESC);
        this.notFoundException.write(oprot);
        oprot.writeFieldEnd();
      } else if (this.isSetSystemException()) {
        oprot.writeFieldBegin(SYSTEM_EXCEPTION_FIELD_DESC);
        this.systemException.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    public void validate() throws TException {
      // check for required fields
    }

  }

  private static class expungeLinkedNotebook_args implements TBase, java.io.Serializable, Cloneable   {
    private static final TStruct STRUCT_DESC = new TStruct("expungeLinkedNotebook_args");

    private static final TField AUTHENTICATION_TOKEN_FIELD_DESC = new TField("authenticationToken", TType.STRING, (short)1);
    private static final TField GUID_FIELD_DESC = new TField("guid", TType.STRING, (short)2);

    private String authenticationToken;
    private String guid;


    // isset id assignments

    public expungeLinkedNotebook_args() {
    }

    /**
     * Performs a deep copy on other.
     */
    public expungeLinkedNotebook_args(expungeLinkedNotebook_args other) {
      if (other.isSetAuthenticationToken()) {
        this.authenticationToken = other.authenticationToken;
      }
      if (other.isSetGuid()) {
        this.guid = other.guid;
      }
    }

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

    public void clear() {
      this.authenticationToken = null;
      this.guid = null;
    }

    public void setAuthenticationToken(String authenticationToken) {
      this.authenticationToken = authenticationToken;
    }

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

    public void setGuid(String guid) {
      this.guid = guid;
    }

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

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

      int lastComparison = 0;
      expungeLinkedNotebook_args typedOther = (expungeLinkedNotebook_args)other;

      lastComparison = Boolean.valueOf(isSetAuthenticationToken()).compareTo(typedOther.isSetAuthenticationToken());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetAuthenticationToken()) {        lastComparison = TBaseHelper.compareTo(this.authenticationToken, typedOther.authenticationToken);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetGuid()).compareTo(typedOther.isSetGuid());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetGuid()) {        lastComparison = TBaseHelper.compareTo(this.guid, typedOther.guid);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public void read(TProtocol iprot) throws TException {
      TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // AUTHENTICATION_TOKEN
            if (field.type == TType.STRING) {
              this.authenticationToken = iprot.readString();
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // GUID
            if (field.type == TType.STRING) {
              this.guid = iprot.readString();
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(TProtocol oprot) throws TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      if (this.authenticationToken != null) {
        oprot.writeFieldBegin(AUTHENTICATION_TOKEN_FIELD_DESC);
        oprot.writeString(this.authenticationToken);
        oprot.writeFieldEnd();
      }
      if (this.guid != null) {
        oprot.writeFieldBegin(GUID_FIELD_DESC);
        oprot.writeString(this.guid);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    public void validate() throws TException {
      // check for required fields
    }

  }

  private static class expungeLinkedNotebook_result implements TBase, java.io.Serializable, Cloneable   {
    private static final TStruct STRUCT_DESC = new TStruct("expungeLinkedNotebook_result");

    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.I32, (short)0);
    private static final TField USER_EXCEPTION_FIELD_DESC = new TField("userException", TType.STRUCT, (short)1);
    private static final TField NOT_FOUND_EXCEPTION_FIELD_DESC = new TField("notFoundException", TType.STRUCT, (short)2);
    private static final TField SYSTEM_EXCEPTION_FIELD_DESC = new TField("systemException", TType.STRUCT, (short)3);

    private int success;
    private com.evernote.edam.error.EDAMUserException userException;
    private com.evernote.edam.error.EDAMNotFoundException notFoundException;
    private com.evernote.edam.error.EDAMSystemException systemException;


    // isset id assignments
    private static final int __SUCCESS_ISSET_ID = 0;
    private boolean[] __isset_vector = new boolean[1];

    public expungeLinkedNotebook_result() {
    }

    /**
     * Performs a deep copy on other.
     */
    public expungeLinkedNotebook_result(expungeLinkedNotebook_result other) {
      System.arraycopy(other.__isset_vector, 0, __isset_vector, 0, other.__isset_vector.length);
      this.success = other.success;
      if (other.isSetUserException()) {
        this.userException = new com.evernote.edam.error.EDAMUserException(other.userException);
      }
      if (other.isSetNotFoundException()) {
        this.notFoundException = new com.evernote.edam.error.EDAMNotFoundException(other.notFoundException);
      }
      if (other.isSetSystemException()) {
        this.systemException = new com.evernote.edam.error.EDAMSystemException(other.systemException);
      }
    }

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

    public void clear() {
      setSuccessIsSet(false);
      this.success = 0;
      this.userException = null;
      this.notFoundException = null;
      this.systemException = null;
    }

    /** Returns true if field success is set (has been asigned a value) and false otherwise */
    public boolean isSetSuccess() {
      return __isset_vector[__SUCCESS_ISSET_ID];
    }

    public void setSuccessIsSet(boolean value) {
      __isset_vector[__SUCCESS_ISSET_ID] = value;
    }

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

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

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

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

      int lastComparison = 0;
      expungeLinkedNotebook_result typedOther = (expungeLinkedNotebook_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {        lastComparison = TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetUserException()).compareTo(typedOther.isSetUserException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetUserException()) {        lastComparison = TBaseHelper.compareTo(this.userException, typedOther.userException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetNotFoundException()).compareTo(typedOther.isSetNotFoundException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetNotFoundException()) {        lastComparison = TBaseHelper.compareTo(this.notFoundException, typedOther.notFoundException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetSystemException()).compareTo(typedOther.isSetSystemException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSystemException()) {        lastComparison = TBaseHelper.compareTo(this.systemException, typedOther.systemException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public void read(TProtocol iprot) throws TException {
      TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == TType.I32) {
              this.success = iprot.readI32();
              setSuccessIsSet(true);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 1: // USER_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.userException = new com.evernote.edam.error.EDAMUserException();
              this.userException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // NOT_FOUND_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.notFoundException = new com.evernote.edam.error.EDAMNotFoundException();
              this.notFoundException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 3: // SYSTEM_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.systemException = new com.evernote.edam.error.EDAMSystemException();
              this.systemException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(TProtocol oprot) throws TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        oprot.writeI32(this.success);
        oprot.writeFieldEnd();
      } else if (this.isSetUserException()) {
        oprot.writeFieldBegin(USER_EXCEPTION_FIELD_DESC);
        this.userException.write(oprot);
        oprot.writeFieldEnd();
      } else if (this.isSetNotFoundException()) {
        oprot.writeFieldBegin(NOT_FOUND_EXCEPTION_FIELD_DESC);
        this.notFoundException.write(oprot);
        oprot.writeFieldEnd();
      } else if (this.isSetSystemException()) {
        oprot.writeFieldBegin(SYSTEM_EXCEPTION_FIELD_DESC);
        this.systemException.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    public void validate() throws TException {
      // check for required fields
    }

  }

  private static class authenticateToSharedNotebook_args implements TBase, java.io.Serializable, Cloneable   {
    private static final TStruct STRUCT_DESC = new TStruct("authenticateToSharedNotebook_args");

    private static final TField SHARE_KEY_FIELD_DESC = new TField("shareKey", TType.STRING, (short)1);
    private static final TField AUTHENTICATION_TOKEN_FIELD_DESC = new TField("authenticationToken", TType.STRING, (short)2);

    private String shareKey;
    private String authenticationToken;


    // isset id assignments

    public authenticateToSharedNotebook_args() {
    }

    /**
     * Performs a deep copy on other.
     */
    public authenticateToSharedNotebook_args(authenticateToSharedNotebook_args other) {
      if (other.isSetShareKey()) {
        this.shareKey = other.shareKey;
      }
      if (other.isSetAuthenticationToken()) {
        this.authenticationToken = other.authenticationToken;
      }
    }

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

    public void clear() {
      this.shareKey = null;
      this.authenticationToken = null;
    }

    public void setShareKey(String shareKey) {
      this.shareKey = shareKey;
    }

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

    public void setAuthenticationToken(String authenticationToken) {
      this.authenticationToken = authenticationToken;
    }

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

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

      int lastComparison = 0;
      authenticateToSharedNotebook_args typedOther = (authenticateToSharedNotebook_args)other;

      lastComparison = Boolean.valueOf(isSetShareKey()).compareTo(typedOther.isSetShareKey());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetShareKey()) {        lastComparison = TBaseHelper.compareTo(this.shareKey, typedOther.shareKey);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetAuthenticationToken()).compareTo(typedOther.isSetAuthenticationToken());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetAuthenticationToken()) {        lastComparison = TBaseHelper.compareTo(this.authenticationToken, typedOther.authenticationToken);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public void read(TProtocol iprot) throws TException {
      TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // SHARE_KEY
            if (field.type == TType.STRING) {
              this.shareKey = iprot.readString();
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // AUTHENTICATION_TOKEN
            if (field.type == TType.STRING) {
              this.authenticationToken = iprot.readString();
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(TProtocol oprot) throws TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      if (this.shareKey != null) {
        oprot.writeFieldBegin(SHARE_KEY_FIELD_DESC);
        oprot.writeString(this.shareKey);
        oprot.writeFieldEnd();
      }
      if (this.authenticationToken != null) {
        oprot.writeFieldBegin(AUTHENTICATION_TOKEN_FIELD_DESC);
        oprot.writeString(this.authenticationToken);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    public void validate() throws TException {
      // check for required fields
    }

  }

  private static class authenticateToSharedNotebook_result implements TBase, java.io.Serializable, Cloneable   {
    private static final TStruct STRUCT_DESC = new TStruct("authenticateToSharedNotebook_result");

    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
    private static final TField USER_EXCEPTION_FIELD_DESC = new TField("userException", TType.STRUCT, (short)1);
    private static final TField NOT_FOUND_EXCEPTION_FIELD_DESC = new TField("notFoundException", TType.STRUCT, (short)2);
    private static final TField SYSTEM_EXCEPTION_FIELD_DESC = new TField("systemException", TType.STRUCT, (short)3);

    private com.evernote.edam.userstore.AuthenticationResult success;
    private com.evernote.edam.error.EDAMUserException userException;
    private com.evernote.edam.error.EDAMNotFoundException notFoundException;
    private com.evernote.edam.error.EDAMSystemException systemException;


    // isset id assignments

    public authenticateToSharedNotebook_result() {
    }

    /**
     * Performs a deep copy on other.
     */
    public authenticateToSharedNotebook_result(authenticateToSharedNotebook_result other) {
      if (other.isSetSuccess()) {
        this.success = new com.evernote.edam.userstore.AuthenticationResult(other.success);
      }
      if (other.isSetUserException()) {
        this.userException = new com.evernote.edam.error.EDAMUserException(other.userException);
      }
      if (other.isSetNotFoundException()) {
        this.notFoundException = new com.evernote.edam.error.EDAMNotFoundException(other.notFoundException);
      }
      if (other.isSetSystemException()) {
        this.systemException = new com.evernote.edam.error.EDAMSystemException(other.systemException);
      }
    }

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

    public void clear() {
      this.success = null;
      this.userException = null;
      this.notFoundException = null;
      this.systemException = null;
    }

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

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

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

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

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

      int lastComparison = 0;
      authenticateToSharedNotebook_result typedOther = (authenticateToSharedNotebook_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {        lastComparison = TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetUserException()).compareTo(typedOther.isSetUserException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetUserException()) {        lastComparison = TBaseHelper.compareTo(this.userException, typedOther.userException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetNotFoundException()).compareTo(typedOther.isSetNotFoundException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetNotFoundException()) {        lastComparison = TBaseHelper.compareTo(this.notFoundException, typedOther.notFoundException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetSystemException()).compareTo(typedOther.isSetSystemException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSystemException()) {        lastComparison = TBaseHelper.compareTo(this.systemException, typedOther.systemException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public void read(TProtocol iprot) throws TException {
      TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == TType.STRUCT) {
              this.success = new com.evernote.edam.userstore.AuthenticationResult();
              this.success.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 1: // USER_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.userException = new com.evernote.edam.error.EDAMUserException();
              this.userException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // NOT_FOUND_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.notFoundException = new com.evernote.edam.error.EDAMNotFoundException();
              this.notFoundException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 3: // SYSTEM_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.systemException = new com.evernote.edam.error.EDAMSystemException();
              this.systemException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(TProtocol oprot) throws TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        this.success.write(oprot);
        oprot.writeFieldEnd();
      } else if (this.isSetUserException()) {
        oprot.writeFieldBegin(USER_EXCEPTION_FIELD_DESC);
        this.userException.write(oprot);
        oprot.writeFieldEnd();
      } else if (this.isSetNotFoundException()) {
        oprot.writeFieldBegin(NOT_FOUND_EXCEPTION_FIELD_DESC);
        this.notFoundException.write(oprot);
        oprot.writeFieldEnd();
      } else if (this.isSetSystemException()) {
        oprot.writeFieldBegin(SYSTEM_EXCEPTION_FIELD_DESC);
        this.systemException.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    public void validate() throws TException {
      // check for required fields
    }

  }

  private static class getSharedNotebookByAuth_args implements TBase, java.io.Serializable, Cloneable   {
    private static final TStruct STRUCT_DESC = new TStruct("getSharedNotebookByAuth_args");

    private static final TField AUTHENTICATION_TOKEN_FIELD_DESC = new TField("authenticationToken", TType.STRING, (short)1);

    private String authenticationToken;


    // isset id assignments

    public getSharedNotebookByAuth_args() {
    }

    /**
     * Performs a deep copy on other.
     */
    public getSharedNotebookByAuth_args(getSharedNotebookByAuth_args other) {
      if (other.isSetAuthenticationToken()) {
        this.authenticationToken = other.authenticationToken;
      }
    }

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

    public void clear() {
      this.authenticationToken = null;
    }

    public void setAuthenticationToken(String authenticationToken) {
      this.authenticationToken = authenticationToken;
    }

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

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

      int lastComparison = 0;
      getSharedNotebookByAuth_args typedOther = (getSharedNotebookByAuth_args)other;

      lastComparison = Boolean.valueOf(isSetAuthenticationToken()).compareTo(typedOther.isSetAuthenticationToken());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetAuthenticationToken()) {        lastComparison = TBaseHelper.compareTo(this.authenticationToken, typedOther.authenticationToken);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public void read(TProtocol iprot) throws TException {
      TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // AUTHENTICATION_TOKEN
            if (field.type == TType.STRING) {
              this.authenticationToken = iprot.readString();
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(TProtocol oprot) throws TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      if (this.authenticationToken != null) {
        oprot.writeFieldBegin(AUTHENTICATION_TOKEN_FIELD_DESC);
        oprot.writeString(this.authenticationToken);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    public void validate() throws TException {
      // check for required fields
    }

  }

  private static class getSharedNotebookByAuth_result implements TBase, java.io.Serializable, Cloneable   {
    private static final TStruct STRUCT_DESC = new TStruct("getSharedNotebookByAuth_result");

    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
    private static final TField USER_EXCEPTION_FIELD_DESC = new TField("userException", TType.STRUCT, (short)1);
    private static final TField NOT_FOUND_EXCEPTION_FIELD_DESC = new TField("notFoundException", TType.STRUCT, (short)2);
    private static final TField SYSTEM_EXCEPTION_FIELD_DESC = new TField("systemException", TType.STRUCT, (short)3);

    private com.evernote.edam.type.SharedNotebook success;
    private com.evernote.edam.error.EDAMUserException userException;
    private com.evernote.edam.error.EDAMNotFoundException notFoundException;
    private com.evernote.edam.error.EDAMSystemException systemException;


    // isset id assignments

    public getSharedNotebookByAuth_result() {
    }

    /**
     * Performs a deep copy on other.
     */
    public getSharedNotebookByAuth_result(getSharedNotebookByAuth_result other) {
      if (other.isSetSuccess()) {
        this.success = new com.evernote.edam.type.SharedNotebook(other.success);
      }
      if (other.isSetUserException()) {
        this.userException = new com.evernote.edam.error.EDAMUserException(other.userException);
      }
      if (other.isSetNotFoundException()) {
        this.notFoundException = new com.evernote.edam.error.EDAMNotFoundException(other.notFoundException);
      }
      if (other.isSetSystemException()) {
        this.systemException = new com.evernote.edam.error.EDAMSystemException(other.systemException);
      }
    }

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

    public void clear() {
      this.success = null;
      this.userException = null;
      this.notFoundException = null;
      this.systemException = null;
    }

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

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

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

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

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

      int lastComparison = 0;
      getSharedNotebookByAuth_result typedOther = (getSharedNotebookByAuth_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {        lastComparison = TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetUserException()).compareTo(typedOther.isSetUserException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetUserException()) {        lastComparison = TBaseHelper.compareTo(this.userException, typedOther.userException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetNotFoundException()).compareTo(typedOther.isSetNotFoundException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetNotFoundException()) {        lastComparison = TBaseHelper.compareTo(this.notFoundException, typedOther.notFoundException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetSystemException()).compareTo(typedOther.isSetSystemException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSystemException()) {        lastComparison = TBaseHelper.compareTo(this.systemException, typedOther.systemException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public void read(TProtocol iprot) throws TException {
      TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == TType.STRUCT) {
              this.success = new com.evernote.edam.type.SharedNotebook();
              this.success.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 1: // USER_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.userException = new com.evernote.edam.error.EDAMUserException();
              this.userException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // NOT_FOUND_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.notFoundException = new com.evernote.edam.error.EDAMNotFoundException();
              this.notFoundException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 3: // SYSTEM_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.systemException = new com.evernote.edam.error.EDAMSystemException();
              this.systemException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(TProtocol oprot) throws TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        this.success.write(oprot);
        oprot.writeFieldEnd();
      } else if (this.isSetUserException()) {
        oprot.writeFieldBegin(USER_EXCEPTION_FIELD_DESC);
        this.userException.write(oprot);
        oprot.writeFieldEnd();
      } else if (this.isSetNotFoundException()) {
        oprot.writeFieldBegin(NOT_FOUND_EXCEPTION_FIELD_DESC);
        this.notFoundException.write(oprot);
        oprot.writeFieldEnd();
      } else if (this.isSetSystemException()) {
        oprot.writeFieldBegin(SYSTEM_EXCEPTION_FIELD_DESC);
        this.systemException.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    public void validate() throws TException {
      // check for required fields
    }

  }

  private static class emailNote_args implements TBase, java.io.Serializable, Cloneable   {
    private static final TStruct STRUCT_DESC = new TStruct("emailNote_args");

    private static final TField AUTHENTICATION_TOKEN_FIELD_DESC = new TField("authenticationToken", TType.STRING, (short)1);
    private static final TField PARAMETERS_FIELD_DESC = new TField("parameters", TType.STRUCT, (short)2);

    private String authenticationToken;
    private NoteEmailParameters parameters;


    // isset id assignments

    public emailNote_args() {
    }

    /**
     * Performs a deep copy on other.
     */
    public emailNote_args(emailNote_args other) {
      if (other.isSetAuthenticationToken()) {
        this.authenticationToken = other.authenticationToken;
      }
      if (other.isSetParameters()) {
        this.parameters = new NoteEmailParameters(other.parameters);
      }
    }

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

    public void clear() {
      this.authenticationToken = null;
      this.parameters = null;
    }

    public void setAuthenticationToken(String authenticationToken) {
      this.authenticationToken = authenticationToken;
    }

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

    public void setParameters(NoteEmailParameters parameters) {
      this.parameters = parameters;
    }

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

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

      int lastComparison = 0;
      emailNote_args typedOther = (emailNote_args)other;

      lastComparison = Boolean.valueOf(isSetAuthenticationToken()).compareTo(typedOther.isSetAuthenticationToken());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetAuthenticationToken()) {        lastComparison = TBaseHelper.compareTo(this.authenticationToken, typedOther.authenticationToken);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetParameters()).compareTo(typedOther.isSetParameters());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetParameters()) {        lastComparison = TBaseHelper.compareTo(this.parameters, typedOther.parameters);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public void read(TProtocol iprot) throws TException {
      TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // AUTHENTICATION_TOKEN
            if (field.type == TType.STRING) {
              this.authenticationToken = iprot.readString();
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // PARAMETERS
            if (field.type == TType.STRUCT) {
              this.parameters = new NoteEmailParameters();
              this.parameters.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(TProtocol oprot) throws TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      if (this.authenticationToken != null) {
        oprot.writeFieldBegin(AUTHENTICATION_TOKEN_FIELD_DESC);
        oprot.writeString(this.authenticationToken);
        oprot.writeFieldEnd();
      }
      if (this.parameters != null) {
        oprot.writeFieldBegin(PARAMETERS_FIELD_DESC);
        this.parameters.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    public void validate() throws TException {
      // check for required fields
    }

  }

  private static class emailNote_result implements TBase, java.io.Serializable, Cloneable   {
    private static final TStruct STRUCT_DESC = new TStruct("emailNote_result");

    private static final TField USER_EXCEPTION_FIELD_DESC = new TField("userException", TType.STRUCT, (short)1);
    private static final TField NOT_FOUND_EXCEPTION_FIELD_DESC = new TField("notFoundException", TType.STRUCT, (short)2);
    private static final TField SYSTEM_EXCEPTION_FIELD_DESC = new TField("systemException", TType.STRUCT, (short)3);

    private com.evernote.edam.error.EDAMUserException userException;
    private com.evernote.edam.error.EDAMNotFoundException notFoundException;
    private com.evernote.edam.error.EDAMSystemException systemException;


    // isset id assignments

    public emailNote_result() {
    }

    /**
     * Performs a deep copy on other.
     */
    public emailNote_result(emailNote_result other) {
      if (other.isSetUserException()) {
        this.userException = new com.evernote.edam.error.EDAMUserException(other.userException);
      }
      if (other.isSetNotFoundException()) {
        this.notFoundException = new com.evernote.edam.error.EDAMNotFoundException(other.notFoundException);
      }
      if (other.isSetSystemException()) {
        this.systemException = new com.evernote.edam.error.EDAMSystemException(other.systemException);
      }
    }

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

    public void clear() {
      this.userException = null;
      this.notFoundException = null;
      this.systemException = null;
    }

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

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

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

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

      int lastComparison = 0;
      emailNote_result typedOther = (emailNote_result)other;

      lastComparison = Boolean.valueOf(isSetUserException()).compareTo(typedOther.isSetUserException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetUserException()) {        lastComparison = TBaseHelper.compareTo(this.userException, typedOther.userException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetNotFoundException()).compareTo(typedOther.isSetNotFoundException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetNotFoundException()) {        lastComparison = TBaseHelper.compareTo(this.notFoundException, typedOther.notFoundException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetSystemException()).compareTo(typedOther.isSetSystemException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSystemException()) {        lastComparison = TBaseHelper.compareTo(this.systemException, typedOther.systemException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public void read(TProtocol iprot) throws TException {
      TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // USER_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.userException = new com.evernote.edam.error.EDAMUserException();
              this.userException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // NOT_FOUND_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.notFoundException = new com.evernote.edam.error.EDAMNotFoundException();
              this.notFoundException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 3: // SYSTEM_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.systemException = new com.evernote.edam.error.EDAMSystemException();
              this.systemException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(TProtocol oprot) throws TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetUserException()) {
        oprot.writeFieldBegin(USER_EXCEPTION_FIELD_DESC);
        this.userException.write(oprot);
        oprot.writeFieldEnd();
      } else if (this.isSetNotFoundException()) {
        oprot.writeFieldBegin(NOT_FOUND_EXCEPTION_FIELD_DESC);
        this.notFoundException.write(oprot);
        oprot.writeFieldEnd();
      } else if (this.isSetSystemException()) {
        oprot.writeFieldBegin(SYSTEM_EXCEPTION_FIELD_DESC);
        this.systemException.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    public void validate() throws TException {
      // check for required fields
    }

  }

  private static class shareNote_args implements TBase, java.io.Serializable, Cloneable   {
    private static final TStruct STRUCT_DESC = new TStruct("shareNote_args");

    private static final TField AUTHENTICATION_TOKEN_FIELD_DESC = new TField("authenticationToken", TType.STRING, (short)1);
    private static final TField GUID_FIELD_DESC = new TField("guid", TType.STRING, (short)2);

    private String authenticationToken;
    private String guid;


    // isset id assignments

    public shareNote_args() {
    }

    /**
     * Performs a deep copy on other.
     */
    public shareNote_args(shareNote_args other) {
      if (other.isSetAuthenticationToken()) {
        this.authenticationToken = other.authenticationToken;
      }
      if (other.isSetGuid()) {
        this.guid = other.guid;
      }
    }

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

    public void clear() {
      this.authenticationToken = null;
      this.guid = null;
    }

    public void setAuthenticationToken(String authenticationToken) {
      this.authenticationToken = authenticationToken;
    }

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

    public void setGuid(String guid) {
      this.guid = guid;
    }

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

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

      int lastComparison = 0;
      shareNote_args typedOther = (shareNote_args)other;

      lastComparison = Boolean.valueOf(isSetAuthenticationToken()).compareTo(typedOther.isSetAuthenticationToken());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetAuthenticationToken()) {        lastComparison = TBaseHelper.compareTo(this.authenticationToken, typedOther.authenticationToken);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetGuid()).compareTo(typedOther.isSetGuid());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetGuid()) {        lastComparison = TBaseHelper.compareTo(this.guid, typedOther.guid);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public void read(TProtocol iprot) throws TException {
      TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // AUTHENTICATION_TOKEN
            if (field.type == TType.STRING) {
              this.authenticationToken = iprot.readString();
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // GUID
            if (field.type == TType.STRING) {
              this.guid = iprot.readString();
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(TProtocol oprot) throws TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      if (this.authenticationToken != null) {
        oprot.writeFieldBegin(AUTHENTICATION_TOKEN_FIELD_DESC);
        oprot.writeString(this.authenticationToken);
        oprot.writeFieldEnd();
      }
      if (this.guid != null) {
        oprot.writeFieldBegin(GUID_FIELD_DESC);
        oprot.writeString(this.guid);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    public void validate() throws TException {
      // check for required fields
    }

  }

  private static class shareNote_result implements TBase, java.io.Serializable, Cloneable   {
    private static final TStruct STRUCT_DESC = new TStruct("shareNote_result");

    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRING, (short)0);
    private static final TField USER_EXCEPTION_FIELD_DESC = new TField("userException", TType.STRUCT, (short)1);
    private static final TField NOT_FOUND_EXCEPTION_FIELD_DESC = new TField("notFoundException", TType.STRUCT, (short)2);
    private static final TField SYSTEM_EXCEPTION_FIELD_DESC = new TField("systemException", TType.STRUCT, (short)3);

    private String success;
    private com.evernote.edam.error.EDAMUserException userException;
    private com.evernote.edam.error.EDAMNotFoundException notFoundException;
    private com.evernote.edam.error.EDAMSystemException systemException;


    // isset id assignments

    public shareNote_result() {
    }

    /**
     * Performs a deep copy on other.
     */
    public shareNote_result(shareNote_result other) {
      if (other.isSetSuccess()) {
        this.success = other.success;
      }
      if (other.isSetUserException()) {
        this.userException = new com.evernote.edam.error.EDAMUserException(other.userException);
      }
      if (other.isSetNotFoundException()) {
        this.notFoundException = new com.evernote.edam.error.EDAMNotFoundException(other.notFoundException);
      }
      if (other.isSetSystemException()) {
        this.systemException = new com.evernote.edam.error.EDAMSystemException(other.systemException);
      }
    }

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

    public void clear() {
      this.success = null;
      this.userException = null;
      this.notFoundException = null;
      this.systemException = null;
    }

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

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

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

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

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

      int lastComparison = 0;
      shareNote_result typedOther = (shareNote_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {        lastComparison = TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetUserException()).compareTo(typedOther.isSetUserException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetUserException()) {        lastComparison = TBaseHelper.compareTo(this.userException, typedOther.userException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetNotFoundException()).compareTo(typedOther.isSetNotFoundException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetNotFoundException()) {        lastComparison = TBaseHelper.compareTo(this.notFoundException, typedOther.notFoundException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetSystemException()).compareTo(typedOther.isSetSystemException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSystemException()) {        lastComparison = TBaseHelper.compareTo(this.systemException, typedOther.systemException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public void read(TProtocol iprot) throws TException {
      TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == TType.STRING) {
              this.success = iprot.readString();
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 1: // USER_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.userException = new com.evernote.edam.error.EDAMUserException();
              this.userException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // NOT_FOUND_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.notFoundException = new com.evernote.edam.error.EDAMNotFoundException();
              this.notFoundException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 3: // SYSTEM_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.systemException = new com.evernote.edam.error.EDAMSystemException();
              this.systemException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(TProtocol oprot) throws TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        oprot.writeString(this.success);
        oprot.writeFieldEnd();
      } else if (this.isSetUserException()) {
        oprot.writeFieldBegin(USER_EXCEPTION_FIELD_DESC);
        this.userException.write(oprot);
        oprot.writeFieldEnd();
      } else if (this.isSetNotFoundException()) {
        oprot.writeFieldBegin(NOT_FOUND_EXCEPTION_FIELD_DESC);
        this.notFoundException.write(oprot);
        oprot.writeFieldEnd();
      } else if (this.isSetSystemException()) {
        oprot.writeFieldBegin(SYSTEM_EXCEPTION_FIELD_DESC);
        this.systemException.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    public void validate() throws TException {
      // check for required fields
    }

  }

  private static class stopSharingNote_args implements TBase, java.io.Serializable, Cloneable   {
    private static final TStruct STRUCT_DESC = new TStruct("stopSharingNote_args");

    private static final TField AUTHENTICATION_TOKEN_FIELD_DESC = new TField("authenticationToken", TType.STRING, (short)1);
    private static final TField GUID_FIELD_DESC = new TField("guid", TType.STRING, (short)2);

    private String authenticationToken;
    private String guid;


    // isset id assignments

    public stopSharingNote_args() {
    }

    /**
     * Performs a deep copy on other.
     */
    public stopSharingNote_args(stopSharingNote_args other) {
      if (other.isSetAuthenticationToken()) {
        this.authenticationToken = other.authenticationToken;
      }
      if (other.isSetGuid()) {
        this.guid = other.guid;
      }
    }

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

    public void clear() {
      this.authenticationToken = null;
      this.guid = null;
    }

    public void setAuthenticationToken(String authenticationToken) {
      this.authenticationToken = authenticationToken;
    }

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

    public void setGuid(String guid) {
      this.guid = guid;
    }

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

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

      int lastComparison = 0;
      stopSharingNote_args typedOther = (stopSharingNote_args)other;

      lastComparison = Boolean.valueOf(isSetAuthenticationToken()).compareTo(typedOther.isSetAuthenticationToken());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetAuthenticationToken()) {        lastComparison = TBaseHelper.compareTo(this.authenticationToken, typedOther.authenticationToken);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetGuid()).compareTo(typedOther.isSetGuid());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetGuid()) {        lastComparison = TBaseHelper.compareTo(this.guid, typedOther.guid);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public void read(TProtocol iprot) throws TException {
      TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // AUTHENTICATION_TOKEN
            if (field.type == TType.STRING) {
              this.authenticationToken = iprot.readString();
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // GUID
            if (field.type == TType.STRING) {
              this.guid = iprot.readString();
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(TProtocol oprot) throws TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      if (this.authenticationToken != null) {
        oprot.writeFieldBegin(AUTHENTICATION_TOKEN_FIELD_DESC);
        oprot.writeString(this.authenticationToken);
        oprot.writeFieldEnd();
      }
      if (this.guid != null) {
        oprot.writeFieldBegin(GUID_FIELD_DESC);
        oprot.writeString(this.guid);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    public void validate() throws TException {
      // check for required fields
    }

  }

  private static class stopSharingNote_result implements TBase, java.io.Serializable, Cloneable   {
    private static final TStruct STRUCT_DESC = new TStruct("stopSharingNote_result");

    private static final TField USER_EXCEPTION_FIELD_DESC = new TField("userException", TType.STRUCT, (short)1);
    private static final TField NOT_FOUND_EXCEPTION_FIELD_DESC = new TField("notFoundException", TType.STRUCT, (short)2);
    private static final TField SYSTEM_EXCEPTION_FIELD_DESC = new TField("systemException", TType.STRUCT, (short)3);

    private com.evernote.edam.error.EDAMUserException userException;
    private com.evernote.edam.error.EDAMNotFoundException notFoundException;
    private com.evernote.edam.error.EDAMSystemException systemException;


    // isset id assignments

    public stopSharingNote_result() {
    }

    /**
     * Performs a deep copy on other.
     */
    public stopSharingNote_result(stopSharingNote_result other) {
      if (other.isSetUserException()) {
        this.userException = new com.evernote.edam.error.EDAMUserException(other.userException);
      }
      if (other.isSetNotFoundException()) {
        this.notFoundException = new com.evernote.edam.error.EDAMNotFoundException(other.notFoundException);
      }
      if (other.isSetSystemException()) {
        this.systemException = new com.evernote.edam.error.EDAMSystemException(other.systemException);
      }
    }

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

    public void clear() {
      this.userException = null;
      this.notFoundException = null;
      this.systemException = null;
    }

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

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

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

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

      int lastComparison = 0;
      stopSharingNote_result typedOther = (stopSharingNote_result)other;

      lastComparison = Boolean.valueOf(isSetUserException()).compareTo(typedOther.isSetUserException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetUserException()) {        lastComparison = TBaseHelper.compareTo(this.userException, typedOther.userException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetNotFoundException()).compareTo(typedOther.isSetNotFoundException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetNotFoundException()) {        lastComparison = TBaseHelper.compareTo(this.notFoundException, typedOther.notFoundException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetSystemException()).compareTo(typedOther.isSetSystemException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSystemException()) {        lastComparison = TBaseHelper.compareTo(this.systemException, typedOther.systemException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public void read(TProtocol iprot) throws TException {
      TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // USER_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.userException = new com.evernote.edam.error.EDAMUserException();
              this.userException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // NOT_FOUND_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.notFoundException = new com.evernote.edam.error.EDAMNotFoundException();
              this.notFoundException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 3: // SYSTEM_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.systemException = new com.evernote.edam.error.EDAMSystemException();
              this.systemException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(TProtocol oprot) throws TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetUserException()) {
        oprot.writeFieldBegin(USER_EXCEPTION_FIELD_DESC);
        this.userException.write(oprot);
        oprot.writeFieldEnd();
      } else if (this.isSetNotFoundException()) {
        oprot.writeFieldBegin(NOT_FOUND_EXCEPTION_FIELD_DESC);
        this.notFoundException.write(oprot);
        oprot.writeFieldEnd();
      } else if (this.isSetSystemException()) {
        oprot.writeFieldBegin(SYSTEM_EXCEPTION_FIELD_DESC);
        this.systemException.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    public void validate() throws TException {
      // check for required fields
    }

  }

  private static class authenticateToSharedNote_args implements TBase, java.io.Serializable, Cloneable   {
    private static final TStruct STRUCT_DESC = new TStruct("authenticateToSharedNote_args");

    private static final TField GUID_FIELD_DESC = new TField("guid", TType.STRING, (short)1);
    private static final TField NOTE_KEY_FIELD_DESC = new TField("noteKey", TType.STRING, (short)2);

    private String guid;
    private String noteKey;


    // isset id assignments

    public authenticateToSharedNote_args() {
    }

    /**
     * Performs a deep copy on other.
     */
    public authenticateToSharedNote_args(authenticateToSharedNote_args other) {
      if (other.isSetGuid()) {
        this.guid = other.guid;
      }
      if (other.isSetNoteKey()) {
        this.noteKey = other.noteKey;
      }
    }

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

    public void clear() {
      this.guid = null;
      this.noteKey = null;
    }

    public void setGuid(String guid) {
      this.guid = guid;
    }

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

    public void setNoteKey(String noteKey) {
      this.noteKey = noteKey;
    }

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

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

      int lastComparison = 0;
      authenticateToSharedNote_args typedOther = (authenticateToSharedNote_args)other;

      lastComparison = Boolean.valueOf(isSetGuid()).compareTo(typedOther.isSetGuid());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetGuid()) {        lastComparison = TBaseHelper.compareTo(this.guid, typedOther.guid);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetNoteKey()).compareTo(typedOther.isSetNoteKey());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetNoteKey()) {        lastComparison = TBaseHelper.compareTo(this.noteKey, typedOther.noteKey);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public void read(TProtocol iprot) throws TException {
      TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // GUID
            if (field.type == TType.STRING) {
              this.guid = iprot.readString();
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // NOTE_KEY
            if (field.type == TType.STRING) {
              this.noteKey = iprot.readString();
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(TProtocol oprot) throws TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      if (this.guid != null) {
        oprot.writeFieldBegin(GUID_FIELD_DESC);
        oprot.writeString(this.guid);
        oprot.writeFieldEnd();
      }
      if (this.noteKey != null) {
        oprot.writeFieldBegin(NOTE_KEY_FIELD_DESC);
        oprot.writeString(this.noteKey);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    public void validate() throws TException {
      // check for required fields
    }

  }

  private static class authenticateToSharedNote_result implements TBase, java.io.Serializable, Cloneable   {
    private static final TStruct STRUCT_DESC = new TStruct("authenticateToSharedNote_result");

    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
    private static final TField USER_EXCEPTION_FIELD_DESC = new TField("userException", TType.STRUCT, (short)1);
    private static final TField NOT_FOUND_EXCEPTION_FIELD_DESC = new TField("notFoundException", TType.STRUCT, (short)2);
    private static final TField SYSTEM_EXCEPTION_FIELD_DESC = new TField("systemException", TType.STRUCT, (short)3);

    private com.evernote.edam.userstore.AuthenticationResult success;
    private com.evernote.edam.error.EDAMUserException userException;
    private com.evernote.edam.error.EDAMNotFoundException notFoundException;
    private com.evernote.edam.error.EDAMSystemException systemException;


    // isset id assignments

    public authenticateToSharedNote_result() {
    }

    /**
     * Performs a deep copy on other.
     */
    public authenticateToSharedNote_result(authenticateToSharedNote_result other) {
      if (other.isSetSuccess()) {
        this.success = new com.evernote.edam.userstore.AuthenticationResult(other.success);
      }
      if (other.isSetUserException()) {
        this.userException = new com.evernote.edam.error.EDAMUserException(other.userException);
      }
      if (other.isSetNotFoundException()) {
        this.notFoundException = new com.evernote.edam.error.EDAMNotFoundException(other.notFoundException);
      }
      if (other.isSetSystemException()) {
        this.systemException = new com.evernote.edam.error.EDAMSystemException(other.systemException);
      }
    }

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

    public void clear() {
      this.success = null;
      this.userException = null;
      this.notFoundException = null;
      this.systemException = null;
    }

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

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

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

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

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

      int lastComparison = 0;
      authenticateToSharedNote_result typedOther = (authenticateToSharedNote_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {        lastComparison = TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetUserException()).compareTo(typedOther.isSetUserException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetUserException()) {        lastComparison = TBaseHelper.compareTo(this.userException, typedOther.userException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetNotFoundException()).compareTo(typedOther.isSetNotFoundException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetNotFoundException()) {        lastComparison = TBaseHelper.compareTo(this.notFoundException, typedOther.notFoundException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetSystemException()).compareTo(typedOther.isSetSystemException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSystemException()) {        lastComparison = TBaseHelper.compareTo(this.systemException, typedOther.systemException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public void read(TProtocol iprot) throws TException {
      TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == TType.STRUCT) {
              this.success = new com.evernote.edam.userstore.AuthenticationResult();
              this.success.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 1: // USER_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.userException = new com.evernote.edam.error.EDAMUserException();
              this.userException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // NOT_FOUND_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.notFoundException = new com.evernote.edam.error.EDAMNotFoundException();
              this.notFoundException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 3: // SYSTEM_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.systemException = new com.evernote.edam.error.EDAMSystemException();
              this.systemException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(TProtocol oprot) throws TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        this.success.write(oprot);
        oprot.writeFieldEnd();
      } else if (this.isSetUserException()) {
        oprot.writeFieldBegin(USER_EXCEPTION_FIELD_DESC);
        this.userException.write(oprot);
        oprot.writeFieldEnd();
      } else if (this.isSetNotFoundException()) {
        oprot.writeFieldBegin(NOT_FOUND_EXCEPTION_FIELD_DESC);
        this.notFoundException.write(oprot);
        oprot.writeFieldEnd();
      } else if (this.isSetSystemException()) {
        oprot.writeFieldBegin(SYSTEM_EXCEPTION_FIELD_DESC);
        this.systemException.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    public void validate() throws TException {
      // check for required fields
    }

  }

  private static class findRelated_args implements TBase, java.io.Serializable, Cloneable   {
    private static final TStruct STRUCT_DESC = new TStruct("findRelated_args");

    private static final TField AUTHENTICATION_TOKEN_FIELD_DESC = new TField("authenticationToken", TType.STRING, (short)1);
    private static final TField QUERY_FIELD_DESC = new TField("query", TType.STRUCT, (short)2);
    private static final TField RESULT_SPEC_FIELD_DESC = new TField("resultSpec", TType.STRUCT, (short)3);

    private String authenticationToken;
    private RelatedQuery query;
    private RelatedResultSpec resultSpec;


    // isset id assignments

    public findRelated_args() {
    }

    /**
     * Performs a deep copy on other.
     */
    public findRelated_args(findRelated_args other) {
      if (other.isSetAuthenticationToken()) {
        this.authenticationToken = other.authenticationToken;
      }
      if (other.isSetQuery()) {
        this.query = new RelatedQuery(other.query);
      }
      if (other.isSetResultSpec()) {
        this.resultSpec = new RelatedResultSpec(other.resultSpec);
      }
    }

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

    public void clear() {
      this.authenticationToken = null;
      this.query = null;
      this.resultSpec = null;
    }

    public void setAuthenticationToken(String authenticationToken) {
      this.authenticationToken = authenticationToken;
    }

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

    public void setQuery(RelatedQuery query) {
      this.query = query;
    }

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

    public void setResultSpec(RelatedResultSpec resultSpec) {
      this.resultSpec = resultSpec;
    }

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

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

      int lastComparison = 0;
      findRelated_args typedOther = (findRelated_args)other;

      lastComparison = Boolean.valueOf(isSetAuthenticationToken()).compareTo(typedOther.isSetAuthenticationToken());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetAuthenticationToken()) {        lastComparison = TBaseHelper.compareTo(this.authenticationToken, typedOther.authenticationToken);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetQuery()).compareTo(typedOther.isSetQuery());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetQuery()) {        lastComparison = TBaseHelper.compareTo(this.query, typedOther.query);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetResultSpec()).compareTo(typedOther.isSetResultSpec());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetResultSpec()) {        lastComparison = TBaseHelper.compareTo(this.resultSpec, typedOther.resultSpec);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public void read(TProtocol iprot) throws TException {
      TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // AUTHENTICATION_TOKEN
            if (field.type == TType.STRING) {
              this.authenticationToken = iprot.readString();
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // QUERY
            if (field.type == TType.STRUCT) {
              this.query = new RelatedQuery();
              this.query.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 3: // RESULT_SPEC
            if (field.type == TType.STRUCT) {
              this.resultSpec = new RelatedResultSpec();
              this.resultSpec.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(TProtocol oprot) throws TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      if (this.authenticationToken != null) {
        oprot.writeFieldBegin(AUTHENTICATION_TOKEN_FIELD_DESC);
        oprot.writeString(this.authenticationToken);
        oprot.writeFieldEnd();
      }
      if (this.query != null) {
        oprot.writeFieldBegin(QUERY_FIELD_DESC);
        this.query.write(oprot);
        oprot.writeFieldEnd();
      }
      if (this.resultSpec != null) {
        oprot.writeFieldBegin(RESULT_SPEC_FIELD_DESC);
        this.resultSpec.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    public void validate() throws TException {
      // check for required fields
    }

  }

  private static class findRelated_result implements TBase, java.io.Serializable, Cloneable   {
    private static final TStruct STRUCT_DESC = new TStruct("findRelated_result");

    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
    private static final TField USER_EXCEPTION_FIELD_DESC = new TField("userException", TType.STRUCT, (short)1);
    private static final TField SYSTEM_EXCEPTION_FIELD_DESC = new TField("systemException", TType.STRUCT, (short)2);
    private static final TField NOT_FOUND_EXCEPTION_FIELD_DESC = new TField("notFoundException", TType.STRUCT, (short)3);

    private RelatedResult success;
    private com.evernote.edam.error.EDAMUserException userException;
    private com.evernote.edam.error.EDAMSystemException systemException;
    private com.evernote.edam.error.EDAMNotFoundException notFoundException;


    // isset id assignments

    public findRelated_result() {
    }

    /**
     * Performs a deep copy on other.
     */
    public findRelated_result(findRelated_result other) {
      if (other.isSetSuccess()) {
        this.success = new RelatedResult(other.success);
      }
      if (other.isSetUserException()) {
        this.userException = new com.evernote.edam.error.EDAMUserException(other.userException);
      }
      if (other.isSetSystemException()) {
        this.systemException = new com.evernote.edam.error.EDAMSystemException(other.systemException);
      }
      if (other.isSetNotFoundException()) {
        this.notFoundException = new com.evernote.edam.error.EDAMNotFoundException(other.notFoundException);
      }
    }

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

    public void clear() {
      this.success = null;
      this.userException = null;
      this.systemException = null;
      this.notFoundException = null;
    }

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

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

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

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

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

      int lastComparison = 0;
      findRelated_result typedOther = (findRelated_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {        lastComparison = TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetUserException()).compareTo(typedOther.isSetUserException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetUserException()) {        lastComparison = TBaseHelper.compareTo(this.userException, typedOther.userException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetSystemException()).compareTo(typedOther.isSetSystemException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSystemException()) {        lastComparison = TBaseHelper.compareTo(this.systemException, typedOther.systemException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetNotFoundException()).compareTo(typedOther.isSetNotFoundException());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetNotFoundException()) {        lastComparison = TBaseHelper.compareTo(this.notFoundException, typedOther.notFoundException);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public void read(TProtocol iprot) throws TException {
      TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == TType.STRUCT) {
              this.success = new RelatedResult();
              this.success.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 1: // USER_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.userException = new com.evernote.edam.error.EDAMUserException();
              this.userException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // SYSTEM_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.systemException = new com.evernote.edam.error.EDAMSystemException();
              this.systemException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 3: // NOT_FOUND_EXCEPTION
            if (field.type == TType.STRUCT) {
              this.notFoundException = new com.evernote.edam.error.EDAMNotFoundException();
              this.notFoundException.read(iprot);
            } else { 
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(TProtocol oprot) throws TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        this.success.write(oprot);
        oprot.writeFieldEnd();
      } else if (this.isSetUserException()) {
        oprot.writeFieldBegin(USER_EXCEPTION_FIELD_DESC);
        this.userException.write(oprot);
        oprot.writeFieldEnd();
      } else if (this.isSetSystemException()) {
        oprot.writeFieldBegin(SYSTEM_EXCEPTION_FIELD_DESC);
        this.systemException.write(oprot);
        oprot.writeFieldEnd();
      } else if (this.isSetNotFoundException()) {
        oprot.writeFieldBegin(NOT_FOUND_EXCEPTION_FIELD_DESC);
        this.notFoundException.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    public void validate() throws TException {
      // check for required fields
    }

  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy