/**
 * Autogenerated by Thrift
 *
 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
 */
using System;
using System.Collections;
using System.Collections.Generic;
using System.Text;
using System.IO;
using Thrift;
using Thrift.Collections;
using Thrift.Protocol;
using Thrift.Transport;
namespace Evernote.EDAM.UserStore
{
  public class UserStore {
    public interface Iface {
      bool checkVersion(string clientName, short edamVersionMajor, short edamVersionMinor);
      #if SILVERLIGHT || NETFX_CORE
      IAsyncResult Begin_checkVersion(AsyncCallback callback, object state, string clientName, short edamVersionMajor, short edamVersionMinor);
      bool End_checkVersion(IAsyncResult asyncResult);
      #endif
      BootstrapInfo getBootstrapInfo(string locale);
      #if SILVERLIGHT || NETFX_CORE
      IAsyncResult Begin_getBootstrapInfo(AsyncCallback callback, object state, string locale);
      BootstrapInfo End_getBootstrapInfo(IAsyncResult asyncResult);
      #endif
      AuthenticationResult authenticate(string username, string password, string consumerKey, string consumerSecret, bool supportsTwoFactor);
      #if SILVERLIGHT || NETFX_CORE
      IAsyncResult Begin_authenticate(AsyncCallback callback, object state, string username, string password, string consumerKey, string consumerSecret, bool supportsTwoFactor);
      AuthenticationResult End_authenticate(IAsyncResult asyncResult);
      #endif
      AuthenticationResult authenticateLongSession(string username, string password, string consumerKey, string consumerSecret, string deviceIdentifier, string deviceDescription, bool supportsTwoFactor);
      #if SILVERLIGHT || NETFX_CORE
      IAsyncResult Begin_authenticateLongSession(AsyncCallback callback, object state, string username, string password, string consumerKey, string consumerSecret, string deviceIdentifier, string deviceDescription, bool supportsTwoFactor);
      AuthenticationResult End_authenticateLongSession(IAsyncResult asyncResult);
      #endif
      AuthenticationResult completeTwoFactorAuthentication(string authenticationToken, string oneTimeCode, string deviceIdentifier, string deviceDescription);
      #if SILVERLIGHT || NETFX_CORE
      IAsyncResult Begin_completeTwoFactorAuthentication(AsyncCallback callback, object state, string authenticationToken, string oneTimeCode, string deviceIdentifier, string deviceDescription);
      AuthenticationResult End_completeTwoFactorAuthentication(IAsyncResult asyncResult);
      #endif
      void revokeLongSession(string authenticationToken);
      #if SILVERLIGHT || NETFX_CORE
      IAsyncResult Begin_revokeLongSession(AsyncCallback callback, object state, string authenticationToken);
      void End_revokeLongSession(IAsyncResult asyncResult);
      #endif
      AuthenticationResult authenticateToBusiness(string authenticationToken);
      #if SILVERLIGHT || NETFX_CORE
      IAsyncResult Begin_authenticateToBusiness(AsyncCallback callback, object state, string authenticationToken);
      AuthenticationResult End_authenticateToBusiness(IAsyncResult asyncResult);
      #endif
      AuthenticationResult refreshAuthentication(string authenticationToken);
      #if SILVERLIGHT || NETFX_CORE
      IAsyncResult Begin_refreshAuthentication(AsyncCallback callback, object state, string authenticationToken);
      AuthenticationResult End_refreshAuthentication(IAsyncResult asyncResult);
      #endif
      Evernote.EDAM.Type.User getUser(string authenticationToken);
      #if SILVERLIGHT || NETFX_CORE
      IAsyncResult Begin_getUser(AsyncCallback callback, object state, string authenticationToken);
      Evernote.EDAM.Type.User End_getUser(IAsyncResult asyncResult);
      #endif
      PublicUserInfo getPublicUserInfo(string username);
      #if SILVERLIGHT || NETFX_CORE
      IAsyncResult Begin_getPublicUserInfo(AsyncCallback callback, object state, string username);
      PublicUserInfo End_getPublicUserInfo(IAsyncResult asyncResult);
      #endif
      Evernote.EDAM.Type.PremiumInfo getPremiumInfo(string authenticationToken);
      #if SILVERLIGHT || NETFX_CORE
      IAsyncResult Begin_getPremiumInfo(AsyncCallback callback, object state, string authenticationToken);
      Evernote.EDAM.Type.PremiumInfo End_getPremiumInfo(IAsyncResult asyncResult);
      #endif
      string getNoteStoreUrl(string authenticationToken);
      #if SILVERLIGHT || NETFX_CORE
      IAsyncResult Begin_getNoteStoreUrl(AsyncCallback callback, object state, string authenticationToken);
      string End_getNoteStoreUrl(IAsyncResult asyncResult);
      #endif
    }

    public class Client : 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 InputProtocol
      {
        get { return iprot_; }
      }
      public TProtocol OutputProtocol
      {
        get { return oprot_; }
      }


      #if SILVERLIGHT || NETFX_CORE
      public IAsyncResult Begin_checkVersion(AsyncCallback callback, object state, string clientName, short edamVersionMajor, short edamVersionMinor)
      {
        return send_checkVersion(callback, state, clientName, edamVersionMajor, edamVersionMinor);
      }

      public bool End_checkVersion(IAsyncResult asyncResult)
      {
        oprot_.Transport.EndFlush(asyncResult);
        return recv_checkVersion();
      }

      #endif
      public bool checkVersion(string clientName, short edamVersionMajor, short edamVersionMinor)
      {
        #if !SILVERLIGHT && !NETFX_CORE
        send_checkVersion(clientName, edamVersionMajor, edamVersionMinor);
        return recv_checkVersion();

        #else
        var asyncResult = Begin_checkVersion(null, null, clientName, edamVersionMajor, edamVersionMinor);
        return End_checkVersion(asyncResult);

        #endif
      }
      #if SILVERLIGHT || NETFX_CORE
      public IAsyncResult send_checkVersion(AsyncCallback callback, object state, string clientName, short edamVersionMajor, short edamVersionMinor)
      #else
      public void send_checkVersion(string clientName, short edamVersionMajor, short edamVersionMinor)
      #endif
      {
        oprot_.WriteMessageBegin(new TMessage("checkVersion", TMessageType.Call, seqid_));
        checkVersion_args args = new checkVersion_args();
        args.ClientName = clientName;
        args.EdamVersionMajor = edamVersionMajor;
        args.EdamVersionMinor = edamVersionMinor;
        args.Write(oprot_);
        oprot_.WriteMessageEnd();
        #if SILVERLIGHT || NETFX_CORE
        return oprot_.Transport.BeginFlush(callback, state);
        #else
        oprot_.Transport.Flush();
        #endif
      }

      public bool recv_checkVersion()
      {
        TMessage msg = iprot_.ReadMessageBegin();
        if (msg.Type == TMessageType.Exception) {
          TApplicationException x = TApplicationException.Read(iprot_);
          iprot_.ReadMessageEnd();
          throw x;
        }
        checkVersion_result result = new checkVersion_result();
        result.Read(iprot_);
        iprot_.ReadMessageEnd();
        if (result.__isset.success) {
          return result.Success;
        }
        throw new TApplicationException(TApplicationException.ExceptionType.MissingResult, "checkVersion failed: unknown result");
      }

      #if SILVERLIGHT || NETFX_CORE
      public IAsyncResult Begin_getBootstrapInfo(AsyncCallback callback, object state, string locale)
      {
        return send_getBootstrapInfo(callback, state, locale);
      }

      public BootstrapInfo End_getBootstrapInfo(IAsyncResult asyncResult)
      {
        oprot_.Transport.EndFlush(asyncResult);
        return recv_getBootstrapInfo();
      }

      #endif
      public BootstrapInfo getBootstrapInfo(string locale)
      {
        #if !SILVERLIGHT && !NETFX_CORE
        send_getBootstrapInfo(locale);
        return recv_getBootstrapInfo();

        #else
        var asyncResult = Begin_getBootstrapInfo(null, null, locale);
        return End_getBootstrapInfo(asyncResult);

        #endif
      }
      #if SILVERLIGHT || NETFX_CORE
      public IAsyncResult send_getBootstrapInfo(AsyncCallback callback, object state, string locale)
      #else
      public void send_getBootstrapInfo(string locale)
      #endif
      {
        oprot_.WriteMessageBegin(new TMessage("getBootstrapInfo", TMessageType.Call, seqid_));
        getBootstrapInfo_args args = new getBootstrapInfo_args();
        args.Locale = locale;
        args.Write(oprot_);
        oprot_.WriteMessageEnd();
        #if SILVERLIGHT || NETFX_CORE
        return oprot_.Transport.BeginFlush(callback, state);
        #else
        oprot_.Transport.Flush();
        #endif
      }

      public BootstrapInfo recv_getBootstrapInfo()
      {
        TMessage msg = iprot_.ReadMessageBegin();
        if (msg.Type == TMessageType.Exception) {
          TApplicationException x = TApplicationException.Read(iprot_);
          iprot_.ReadMessageEnd();
          throw x;
        }
        getBootstrapInfo_result result = new getBootstrapInfo_result();
        result.Read(iprot_);
        iprot_.ReadMessageEnd();
        if (result.__isset.success) {
          return result.Success;
        }
        throw new TApplicationException(TApplicationException.ExceptionType.MissingResult, "getBootstrapInfo failed: unknown result");
      }

      #if SILVERLIGHT || NETFX_CORE
      public IAsyncResult Begin_authenticate(AsyncCallback callback, object state, string username, string password, string consumerKey, string consumerSecret, bool supportsTwoFactor)
      {
        return send_authenticate(callback, state, username, password, consumerKey, consumerSecret, supportsTwoFactor);
      }

      public AuthenticationResult End_authenticate(IAsyncResult asyncResult)
      {
        oprot_.Transport.EndFlush(asyncResult);
        return recv_authenticate();
      }

      #endif
      public AuthenticationResult authenticate(string username, string password, string consumerKey, string consumerSecret, bool supportsTwoFactor)
      {
        #if !SILVERLIGHT && !NETFX_CORE
        send_authenticate(username, password, consumerKey, consumerSecret, supportsTwoFactor);
        return recv_authenticate();

        #else
        var asyncResult = Begin_authenticate(null, null, username, password, consumerKey, consumerSecret, supportsTwoFactor);
        return End_authenticate(asyncResult);

        #endif
      }
      #if SILVERLIGHT || NETFX_CORE
      public IAsyncResult send_authenticate(AsyncCallback callback, object state, string username, string password, string consumerKey, string consumerSecret, bool supportsTwoFactor)
      #else
      public void send_authenticate(string username, string password, string consumerKey, string consumerSecret, bool supportsTwoFactor)
      #endif
      {
        oprot_.WriteMessageBegin(new TMessage("authenticate", TMessageType.Call, seqid_));
        authenticate_args args = new authenticate_args();
        args.Username = username;
        args.Password = password;
        args.ConsumerKey = consumerKey;
        args.ConsumerSecret = consumerSecret;
        args.SupportsTwoFactor = supportsTwoFactor;
        args.Write(oprot_);
        oprot_.WriteMessageEnd();
        #if SILVERLIGHT || NETFX_CORE
        return oprot_.Transport.BeginFlush(callback, state);
        #else
        oprot_.Transport.Flush();
        #endif
      }

      public AuthenticationResult recv_authenticate()
      {
        TMessage msg = iprot_.ReadMessageBegin();
        if (msg.Type == TMessageType.Exception) {
          TApplicationException x = TApplicationException.Read(iprot_);
          iprot_.ReadMessageEnd();
          throw x;
        }
        authenticate_result result = new authenticate_result();
        result.Read(iprot_);
        iprot_.ReadMessageEnd();
        if (result.__isset.success) {
          return result.Success;
        }
        if (result.__isset.userException) {
          throw result.UserException;
        }
        if (result.__isset.systemException) {
          throw result.SystemException;
        }
        throw new TApplicationException(TApplicationException.ExceptionType.MissingResult, "authenticate failed: unknown result");
      }

      #if SILVERLIGHT || NETFX_CORE
      public IAsyncResult Begin_authenticateLongSession(AsyncCallback callback, object state, string username, string password, string consumerKey, string consumerSecret, string deviceIdentifier, string deviceDescription, bool supportsTwoFactor)
      {
        return send_authenticateLongSession(callback, state, username, password, consumerKey, consumerSecret, deviceIdentifier, deviceDescription, supportsTwoFactor);
      }

      public AuthenticationResult End_authenticateLongSession(IAsyncResult asyncResult)
      {
        oprot_.Transport.EndFlush(asyncResult);
        return recv_authenticateLongSession();
      }

      #endif
      public AuthenticationResult authenticateLongSession(string username, string password, string consumerKey, string consumerSecret, string deviceIdentifier, string deviceDescription, bool supportsTwoFactor)
      {
        #if !SILVERLIGHT && !NETFX_CORE
        send_authenticateLongSession(username, password, consumerKey, consumerSecret, deviceIdentifier, deviceDescription, supportsTwoFactor);
        return recv_authenticateLongSession();

        #else
        var asyncResult = Begin_authenticateLongSession(null, null, username, password, consumerKey, consumerSecret, deviceIdentifier, deviceDescription, supportsTwoFactor);
        return End_authenticateLongSession(asyncResult);

        #endif
      }
      #if SILVERLIGHT || NETFX_CORE
      public IAsyncResult send_authenticateLongSession(AsyncCallback callback, object state, string username, string password, string consumerKey, string consumerSecret, string deviceIdentifier, string deviceDescription, bool supportsTwoFactor)
      #else
      public void send_authenticateLongSession(string username, string password, string consumerKey, string consumerSecret, string deviceIdentifier, string deviceDescription, bool supportsTwoFactor)
      #endif
      {
        oprot_.WriteMessageBegin(new TMessage("authenticateLongSession", TMessageType.Call, seqid_));
        authenticateLongSession_args args = new authenticateLongSession_args();
        args.Username = username;
        args.Password = password;
        args.ConsumerKey = consumerKey;
        args.ConsumerSecret = consumerSecret;
        args.DeviceIdentifier = deviceIdentifier;
        args.DeviceDescription = deviceDescription;
        args.SupportsTwoFactor = supportsTwoFactor;
        args.Write(oprot_);
        oprot_.WriteMessageEnd();
        #if SILVERLIGHT || NETFX_CORE
        return oprot_.Transport.BeginFlush(callback, state);
        #else
        oprot_.Transport.Flush();
        #endif
      }

      public AuthenticationResult recv_authenticateLongSession()
      {
        TMessage msg = iprot_.ReadMessageBegin();
        if (msg.Type == TMessageType.Exception) {
          TApplicationException x = TApplicationException.Read(iprot_);
          iprot_.ReadMessageEnd();
          throw x;
        }
        authenticateLongSession_result result = new authenticateLongSession_result();
        result.Read(iprot_);
        iprot_.ReadMessageEnd();
        if (result.__isset.success) {
          return result.Success;
        }
        if (result.__isset.userException) {
          throw result.UserException;
        }
        if (result.__isset.systemException) {
          throw result.SystemException;
        }
        throw new TApplicationException(TApplicationException.ExceptionType.MissingResult, "authenticateLongSession failed: unknown result");
      }

      #if SILVERLIGHT || NETFX_CORE
      public IAsyncResult Begin_completeTwoFactorAuthentication(AsyncCallback callback, object state, string authenticationToken, string oneTimeCode, string deviceIdentifier, string deviceDescription)
      {
        return send_completeTwoFactorAuthentication(callback, state, authenticationToken, oneTimeCode, deviceIdentifier, deviceDescription);
      }

      public AuthenticationResult End_completeTwoFactorAuthentication(IAsyncResult asyncResult)
      {
        oprot_.Transport.EndFlush(asyncResult);
        return recv_completeTwoFactorAuthentication();
      }

      #endif
      public AuthenticationResult completeTwoFactorAuthentication(string authenticationToken, string oneTimeCode, string deviceIdentifier, string deviceDescription)
      {
        #if !SILVERLIGHT && !NETFX_CORE
        send_completeTwoFactorAuthentication(authenticationToken, oneTimeCode, deviceIdentifier, deviceDescription);
        return recv_completeTwoFactorAuthentication();

        #else
        var asyncResult = Begin_completeTwoFactorAuthentication(null, null, authenticationToken, oneTimeCode, deviceIdentifier, deviceDescription);
        return End_completeTwoFactorAuthentication(asyncResult);

        #endif
      }
      #if SILVERLIGHT || NETFX_CORE
      public IAsyncResult send_completeTwoFactorAuthentication(AsyncCallback callback, object state, string authenticationToken, string oneTimeCode, string deviceIdentifier, string deviceDescription)
      #else
      public void send_completeTwoFactorAuthentication(string authenticationToken, string oneTimeCode, string deviceIdentifier, string deviceDescription)
      #endif
      {
        oprot_.WriteMessageBegin(new TMessage("completeTwoFactorAuthentication", TMessageType.Call, seqid_));
        completeTwoFactorAuthentication_args args = new completeTwoFactorAuthentication_args();
        args.AuthenticationToken = authenticationToken;
        args.OneTimeCode = oneTimeCode;
        args.DeviceIdentifier = deviceIdentifier;
        args.DeviceDescription = deviceDescription;
        args.Write(oprot_);
        oprot_.WriteMessageEnd();
        #if SILVERLIGHT || NETFX_CORE
        return oprot_.Transport.BeginFlush(callback, state);
        #else
        oprot_.Transport.Flush();
        #endif
      }

      public AuthenticationResult recv_completeTwoFactorAuthentication()
      {
        TMessage msg = iprot_.ReadMessageBegin();
        if (msg.Type == TMessageType.Exception) {
          TApplicationException x = TApplicationException.Read(iprot_);
          iprot_.ReadMessageEnd();
          throw x;
        }
        completeTwoFactorAuthentication_result result = new completeTwoFactorAuthentication_result();
        result.Read(iprot_);
        iprot_.ReadMessageEnd();
        if (result.__isset.success) {
          return result.Success;
        }
        if (result.__isset.userException) {
          throw result.UserException;
        }
        if (result.__isset.systemException) {
          throw result.SystemException;
        }
        throw new TApplicationException(TApplicationException.ExceptionType.MissingResult, "completeTwoFactorAuthentication failed: unknown result");
      }

      #if SILVERLIGHT || NETFX_CORE
      public IAsyncResult Begin_revokeLongSession(AsyncCallback callback, object state, string authenticationToken)
      {
        return send_revokeLongSession(callback, state, authenticationToken);
      }

      public void End_revokeLongSession(IAsyncResult asyncResult)
      {
        oprot_.Transport.EndFlush(asyncResult);
        recv_revokeLongSession();
      }

      #endif
      public void revokeLongSession(string authenticationToken)
      {
        #if !SILVERLIGHT && !NETFX_CORE
        send_revokeLongSession(authenticationToken);
        recv_revokeLongSession();

        #else
        var asyncResult = Begin_revokeLongSession(null, null, authenticationToken);
        End_revokeLongSession(asyncResult);

        #endif
      }
      #if SILVERLIGHT || NETFX_CORE
      public IAsyncResult send_revokeLongSession(AsyncCallback callback, object state, string authenticationToken)
      #else
      public void send_revokeLongSession(string authenticationToken)
      #endif
      {
        oprot_.WriteMessageBegin(new TMessage("revokeLongSession", TMessageType.Call, seqid_));
        revokeLongSession_args args = new revokeLongSession_args();
        args.AuthenticationToken = authenticationToken;
        args.Write(oprot_);
        oprot_.WriteMessageEnd();
        #if SILVERLIGHT || NETFX_CORE
        return oprot_.Transport.BeginFlush(callback, state);
        #else
        oprot_.Transport.Flush();
        #endif
      }

      public void recv_revokeLongSession()
      {
        TMessage msg = iprot_.ReadMessageBegin();
        if (msg.Type == TMessageType.Exception) {
          TApplicationException x = TApplicationException.Read(iprot_);
          iprot_.ReadMessageEnd();
          throw x;
        }
        revokeLongSession_result result = new revokeLongSession_result();
        result.Read(iprot_);
        iprot_.ReadMessageEnd();
        if (result.__isset.userException) {
          throw result.UserException;
        }
        if (result.__isset.systemException) {
          throw result.SystemException;
        }
        return;
      }

      #if SILVERLIGHT || NETFX_CORE
      public IAsyncResult Begin_authenticateToBusiness(AsyncCallback callback, object state, string authenticationToken)
      {
        return send_authenticateToBusiness(callback, state, authenticationToken);
      }

      public AuthenticationResult End_authenticateToBusiness(IAsyncResult asyncResult)
      {
        oprot_.Transport.EndFlush(asyncResult);
        return recv_authenticateToBusiness();
      }

      #endif
      public AuthenticationResult authenticateToBusiness(string authenticationToken)
      {
        #if !SILVERLIGHT && !NETFX_CORE
        send_authenticateToBusiness(authenticationToken);
        return recv_authenticateToBusiness();

        #else
        var asyncResult = Begin_authenticateToBusiness(null, null, authenticationToken);
        return End_authenticateToBusiness(asyncResult);

        #endif
      }
      #if SILVERLIGHT || NETFX_CORE
      public IAsyncResult send_authenticateToBusiness(AsyncCallback callback, object state, string authenticationToken)
      #else
      public void send_authenticateToBusiness(string authenticationToken)
      #endif
      {
        oprot_.WriteMessageBegin(new TMessage("authenticateToBusiness", TMessageType.Call, seqid_));
        authenticateToBusiness_args args = new authenticateToBusiness_args();
        args.AuthenticationToken = authenticationToken;
        args.Write(oprot_);
        oprot_.WriteMessageEnd();
        #if SILVERLIGHT || NETFX_CORE
        return oprot_.Transport.BeginFlush(callback, state);
        #else
        oprot_.Transport.Flush();
        #endif
      }

      public AuthenticationResult recv_authenticateToBusiness()
      {
        TMessage msg = iprot_.ReadMessageBegin();
        if (msg.Type == TMessageType.Exception) {
          TApplicationException x = TApplicationException.Read(iprot_);
          iprot_.ReadMessageEnd();
          throw x;
        }
        authenticateToBusiness_result result = new authenticateToBusiness_result();
        result.Read(iprot_);
        iprot_.ReadMessageEnd();
        if (result.__isset.success) {
          return result.Success;
        }
        if (result.__isset.userException) {
          throw result.UserException;
        }
        if (result.__isset.systemException) {
          throw result.SystemException;
        }
        throw new TApplicationException(TApplicationException.ExceptionType.MissingResult, "authenticateToBusiness failed: unknown result");
      }

      #if SILVERLIGHT || NETFX_CORE
      public IAsyncResult Begin_refreshAuthentication(AsyncCallback callback, object state, string authenticationToken)
      {
        return send_refreshAuthentication(callback, state, authenticationToken);
      }

      public AuthenticationResult End_refreshAuthentication(IAsyncResult asyncResult)
      {
        oprot_.Transport.EndFlush(asyncResult);
        return recv_refreshAuthentication();
      }

      #endif
      public AuthenticationResult refreshAuthentication(string authenticationToken)
      {
        #if !SILVERLIGHT && !NETFX_CORE
        send_refreshAuthentication(authenticationToken);
        return recv_refreshAuthentication();

        #else
        var asyncResult = Begin_refreshAuthentication(null, null, authenticationToken);
        return End_refreshAuthentication(asyncResult);

        #endif
      }
      #if SILVERLIGHT || NETFX_CORE
      public IAsyncResult send_refreshAuthentication(AsyncCallback callback, object state, string authenticationToken)
      #else
      public void send_refreshAuthentication(string authenticationToken)
      #endif
      {
        oprot_.WriteMessageBegin(new TMessage("refreshAuthentication", TMessageType.Call, seqid_));
        refreshAuthentication_args args = new refreshAuthentication_args();
        args.AuthenticationToken = authenticationToken;
        args.Write(oprot_);
        oprot_.WriteMessageEnd();
        #if SILVERLIGHT || NETFX_CORE
        return oprot_.Transport.BeginFlush(callback, state);
        #else
        oprot_.Transport.Flush();
        #endif
      }

      public AuthenticationResult recv_refreshAuthentication()
      {
        TMessage msg = iprot_.ReadMessageBegin();
        if (msg.Type == TMessageType.Exception) {
          TApplicationException x = TApplicationException.Read(iprot_);
          iprot_.ReadMessageEnd();
          throw x;
        }
        refreshAuthentication_result result = new refreshAuthentication_result();
        result.Read(iprot_);
        iprot_.ReadMessageEnd();
        if (result.__isset.success) {
          return result.Success;
        }
        if (result.__isset.userException) {
          throw result.UserException;
        }
        if (result.__isset.systemException) {
          throw result.SystemException;
        }
        throw new TApplicationException(TApplicationException.ExceptionType.MissingResult, "refreshAuthentication failed: unknown result");
      }

      #if SILVERLIGHT || NETFX_CORE
      public IAsyncResult Begin_getUser(AsyncCallback callback, object state, string authenticationToken)
      {
        return send_getUser(callback, state, authenticationToken);
      }

      public Evernote.EDAM.Type.User End_getUser(IAsyncResult asyncResult)
      {
        oprot_.Transport.EndFlush(asyncResult);
        return recv_getUser();
      }

      #endif
      public Evernote.EDAM.Type.User getUser(string authenticationToken)
      {
        #if !SILVERLIGHT && !NETFX_CORE
        send_getUser(authenticationToken);
        return recv_getUser();

        #else
        var asyncResult = Begin_getUser(null, null, authenticationToken);
        return End_getUser(asyncResult);

        #endif
      }
      #if SILVERLIGHT || NETFX_CORE
      public IAsyncResult send_getUser(AsyncCallback callback, object state, string authenticationToken)
      #else
      public void send_getUser(string authenticationToken)
      #endif
      {
        oprot_.WriteMessageBegin(new TMessage("getUser", TMessageType.Call, seqid_));
        getUser_args args = new getUser_args();
        args.AuthenticationToken = authenticationToken;
        args.Write(oprot_);
        oprot_.WriteMessageEnd();
        #if SILVERLIGHT || NETFX_CORE
        return oprot_.Transport.BeginFlush(callback, state);
        #else
        oprot_.Transport.Flush();
        #endif
      }

      public Evernote.EDAM.Type.User recv_getUser()
      {
        TMessage msg = iprot_.ReadMessageBegin();
        if (msg.Type == TMessageType.Exception) {
          TApplicationException x = TApplicationException.Read(iprot_);
          iprot_.ReadMessageEnd();
          throw x;
        }
        getUser_result result = new getUser_result();
        result.Read(iprot_);
        iprot_.ReadMessageEnd();
        if (result.__isset.success) {
          return result.Success;
        }
        if (result.__isset.userException) {
          throw result.UserException;
        }
        if (result.__isset.systemException) {
          throw result.SystemException;
        }
        throw new TApplicationException(TApplicationException.ExceptionType.MissingResult, "getUser failed: unknown result");
      }

      #if SILVERLIGHT || NETFX_CORE
      public IAsyncResult Begin_getPublicUserInfo(AsyncCallback callback, object state, string username)
      {
        return send_getPublicUserInfo(callback, state, username);
      }

      public PublicUserInfo End_getPublicUserInfo(IAsyncResult asyncResult)
      {
        oprot_.Transport.EndFlush(asyncResult);
        return recv_getPublicUserInfo();
      }

      #endif
      public PublicUserInfo getPublicUserInfo(string username)
      {
        #if !SILVERLIGHT && !NETFX_CORE
        send_getPublicUserInfo(username);
        return recv_getPublicUserInfo();

        #else
        var asyncResult = Begin_getPublicUserInfo(null, null, username);
        return End_getPublicUserInfo(asyncResult);

        #endif
      }
      #if SILVERLIGHT || NETFX_CORE
      public IAsyncResult send_getPublicUserInfo(AsyncCallback callback, object state, string username)
      #else
      public void send_getPublicUserInfo(string username)
      #endif
      {
        oprot_.WriteMessageBegin(new TMessage("getPublicUserInfo", TMessageType.Call, seqid_));
        getPublicUserInfo_args args = new getPublicUserInfo_args();
        args.Username = username;
        args.Write(oprot_);
        oprot_.WriteMessageEnd();
        #if SILVERLIGHT || NETFX_CORE
        return oprot_.Transport.BeginFlush(callback, state);
        #else
        oprot_.Transport.Flush();
        #endif
      }

      public PublicUserInfo recv_getPublicUserInfo()
      {
        TMessage msg = iprot_.ReadMessageBegin();
        if (msg.Type == TMessageType.Exception) {
          TApplicationException x = TApplicationException.Read(iprot_);
          iprot_.ReadMessageEnd();
          throw x;
        }
        getPublicUserInfo_result result = new getPublicUserInfo_result();
        result.Read(iprot_);
        iprot_.ReadMessageEnd();
        if (result.__isset.success) {
          return result.Success;
        }
        if (result.__isset.notFoundException) {
          throw result.NotFoundException;
        }
        if (result.__isset.systemException) {
          throw result.SystemException;
        }
        if (result.__isset.userException) {
          throw result.UserException;
        }
        throw new TApplicationException(TApplicationException.ExceptionType.MissingResult, "getPublicUserInfo failed: unknown result");
      }

      #if SILVERLIGHT || NETFX_CORE
      public IAsyncResult Begin_getPremiumInfo(AsyncCallback callback, object state, string authenticationToken)
      {
        return send_getPremiumInfo(callback, state, authenticationToken);
      }

      public Evernote.EDAM.Type.PremiumInfo End_getPremiumInfo(IAsyncResult asyncResult)
      {
        oprot_.Transport.EndFlush(asyncResult);
        return recv_getPremiumInfo();
      }

      #endif
      public Evernote.EDAM.Type.PremiumInfo getPremiumInfo(string authenticationToken)
      {
        #if !SILVERLIGHT && !NETFX_CORE
        send_getPremiumInfo(authenticationToken);
        return recv_getPremiumInfo();

        #else
        var asyncResult = Begin_getPremiumInfo(null, null, authenticationToken);
        return End_getPremiumInfo(asyncResult);

        #endif
      }
      #if SILVERLIGHT || NETFX_CORE
      public IAsyncResult send_getPremiumInfo(AsyncCallback callback, object state, string authenticationToken)
      #else
      public void send_getPremiumInfo(string authenticationToken)
      #endif
      {
        oprot_.WriteMessageBegin(new TMessage("getPremiumInfo", TMessageType.Call, seqid_));
        getPremiumInfo_args args = new getPremiumInfo_args();
        args.AuthenticationToken = authenticationToken;
        args.Write(oprot_);
        oprot_.WriteMessageEnd();
        #if SILVERLIGHT || NETFX_CORE
        return oprot_.Transport.BeginFlush(callback, state);
        #else
        oprot_.Transport.Flush();
        #endif
      }

      public Evernote.EDAM.Type.PremiumInfo recv_getPremiumInfo()
      {
        TMessage msg = iprot_.ReadMessageBegin();
        if (msg.Type == TMessageType.Exception) {
          TApplicationException x = TApplicationException.Read(iprot_);
          iprot_.ReadMessageEnd();
          throw x;
        }
        getPremiumInfo_result result = new getPremiumInfo_result();
        result.Read(iprot_);
        iprot_.ReadMessageEnd();
        if (result.__isset.success) {
          return result.Success;
        }
        if (result.__isset.userException) {
          throw result.UserException;
        }
        if (result.__isset.systemException) {
          throw result.SystemException;
        }
        throw new TApplicationException(TApplicationException.ExceptionType.MissingResult, "getPremiumInfo failed: unknown result");
      }

      #if SILVERLIGHT || NETFX_CORE
      public IAsyncResult Begin_getNoteStoreUrl(AsyncCallback callback, object state, string authenticationToken)
      {
        return send_getNoteStoreUrl(callback, state, authenticationToken);
      }

      public string End_getNoteStoreUrl(IAsyncResult asyncResult)
      {
        oprot_.Transport.EndFlush(asyncResult);
        return recv_getNoteStoreUrl();
      }

      #endif
      public string getNoteStoreUrl(string authenticationToken)
      {
        #if !SILVERLIGHT && !NETFX_CORE
        send_getNoteStoreUrl(authenticationToken);
        return recv_getNoteStoreUrl();

        #else
        var asyncResult = Begin_getNoteStoreUrl(null, null, authenticationToken);
        return End_getNoteStoreUrl(asyncResult);

        #endif
      }
      #if SILVERLIGHT || NETFX_CORE
      public IAsyncResult send_getNoteStoreUrl(AsyncCallback callback, object state, string authenticationToken)
      #else
      public void send_getNoteStoreUrl(string authenticationToken)
      #endif
      {
        oprot_.WriteMessageBegin(new TMessage("getNoteStoreUrl", TMessageType.Call, seqid_));
        getNoteStoreUrl_args args = new getNoteStoreUrl_args();
        args.AuthenticationToken = authenticationToken;
        args.Write(oprot_);
        oprot_.WriteMessageEnd();
        #if SILVERLIGHT || NETFX_CORE
        return oprot_.Transport.BeginFlush(callback, state);
        #else
        oprot_.Transport.Flush();
        #endif
      }

      public string recv_getNoteStoreUrl()
      {
        TMessage msg = iprot_.ReadMessageBegin();
        if (msg.Type == TMessageType.Exception) {
          TApplicationException x = TApplicationException.Read(iprot_);
          iprot_.ReadMessageEnd();
          throw x;
        }
        getNoteStoreUrl_result result = new getNoteStoreUrl_result();
        result.Read(iprot_);
        iprot_.ReadMessageEnd();
        if (result.__isset.success) {
          return result.Success;
        }
        if (result.__isset.userException) {
          throw result.UserException;
        }
        if (result.__isset.systemException) {
          throw result.SystemException;
        }
        throw new TApplicationException(TApplicationException.ExceptionType.MissingResult, "getNoteStoreUrl failed: unknown result");
      }

    }
    public class Processor : TProcessor {
      public Processor(Iface iface)
      {
        iface_ = iface;
        processMap_["checkVersion"] = checkVersion_Process;
        processMap_["getBootstrapInfo"] = getBootstrapInfo_Process;
        processMap_["authenticate"] = authenticate_Process;
        processMap_["authenticateLongSession"] = authenticateLongSession_Process;
        processMap_["completeTwoFactorAuthentication"] = completeTwoFactorAuthentication_Process;
        processMap_["revokeLongSession"] = revokeLongSession_Process;
        processMap_["authenticateToBusiness"] = authenticateToBusiness_Process;
        processMap_["refreshAuthentication"] = refreshAuthentication_Process;
        processMap_["getUser"] = getUser_Process;
        processMap_["getPublicUserInfo"] = getPublicUserInfo_Process;
        processMap_["getPremiumInfo"] = getPremiumInfo_Process;
        processMap_["getNoteStoreUrl"] = getNoteStoreUrl_Process;
      }

      protected delegate void ProcessFunction(int seqid, TProtocol iprot, TProtocol oprot);
      private Iface iface_;
      protected Dictionary<string, ProcessFunction> processMap_ = new Dictionary<string, ProcessFunction>();

      public bool Process(TProtocol iprot, TProtocol oprot)
      {
        try
        {
          TMessage msg = iprot.ReadMessageBegin();
          ProcessFunction fn;
          processMap_.TryGetValue(msg.Name, out fn);
          if (fn == null) {
            TProtocolUtil.Skip(iprot, TType.Struct);
            iprot.ReadMessageEnd();
            TApplicationException x = new TApplicationException (TApplicationException.ExceptionType.UnknownMethod, "Invalid method name: '" + msg.Name + "'");
            oprot.WriteMessageBegin(new TMessage(msg.Name, TMessageType.Exception, msg.SeqID));
            x.Write(oprot);
            oprot.WriteMessageEnd();
            oprot.Transport.Flush();
            return true;
          }
          fn(msg.SeqID, iprot, oprot);
        }
        catch (IOException)
        {
          return false;
        }
        return true;
      }

      public void checkVersion_Process(int seqid, TProtocol iprot, TProtocol oprot)
      {
        checkVersion_args args = new checkVersion_args();
        args.Read(iprot);
        iprot.ReadMessageEnd();
        checkVersion_result result = new checkVersion_result();
        result.Success = iface_.checkVersion(args.ClientName, args.EdamVersionMajor, args.EdamVersionMinor);
        oprot.WriteMessageBegin(new TMessage("checkVersion", TMessageType.Reply, seqid)); 
        result.Write(oprot);
        oprot.WriteMessageEnd();
        oprot.Transport.Flush();
      }

      public void getBootstrapInfo_Process(int seqid, TProtocol iprot, TProtocol oprot)
      {
        getBootstrapInfo_args args = new getBootstrapInfo_args();
        args.Read(iprot);
        iprot.ReadMessageEnd();
        getBootstrapInfo_result result = new getBootstrapInfo_result();
        result.Success = iface_.getBootstrapInfo(args.Locale);
        oprot.WriteMessageBegin(new TMessage("getBootstrapInfo", TMessageType.Reply, seqid)); 
        result.Write(oprot);
        oprot.WriteMessageEnd();
        oprot.Transport.Flush();
      }

      public void authenticate_Process(int seqid, TProtocol iprot, TProtocol oprot)
      {
        authenticate_args args = new authenticate_args();
        args.Read(iprot);
        iprot.ReadMessageEnd();
        authenticate_result result = new authenticate_result();
        try {
          result.Success = iface_.authenticate(args.Username, args.Password, args.ConsumerKey, args.ConsumerSecret, args.SupportsTwoFactor);
        } catch (Evernote.EDAM.Error.EDAMUserException userException) {
          result.UserException = userException;
        } catch (Evernote.EDAM.Error.EDAMSystemException systemException) {
          result.SystemException = systemException;
        }
        oprot.WriteMessageBegin(new TMessage("authenticate", TMessageType.Reply, seqid)); 
        result.Write(oprot);
        oprot.WriteMessageEnd();
        oprot.Transport.Flush();
      }

      public void authenticateLongSession_Process(int seqid, TProtocol iprot, TProtocol oprot)
      {
        authenticateLongSession_args args = new authenticateLongSession_args();
        args.Read(iprot);
        iprot.ReadMessageEnd();
        authenticateLongSession_result result = new authenticateLongSession_result();
        try {
          result.Success = iface_.authenticateLongSession(args.Username, args.Password, args.ConsumerKey, args.ConsumerSecret, args.DeviceIdentifier, args.DeviceDescription, args.SupportsTwoFactor);
        } catch (Evernote.EDAM.Error.EDAMUserException userException) {
          result.UserException = userException;
        } catch (Evernote.EDAM.Error.EDAMSystemException systemException) {
          result.SystemException = systemException;
        }
        oprot.WriteMessageBegin(new TMessage("authenticateLongSession", TMessageType.Reply, seqid)); 
        result.Write(oprot);
        oprot.WriteMessageEnd();
        oprot.Transport.Flush();
      }

      public void completeTwoFactorAuthentication_Process(int seqid, TProtocol iprot, TProtocol oprot)
      {
        completeTwoFactorAuthentication_args args = new completeTwoFactorAuthentication_args();
        args.Read(iprot);
        iprot.ReadMessageEnd();
        completeTwoFactorAuthentication_result result = new completeTwoFactorAuthentication_result();
        try {
          result.Success = iface_.completeTwoFactorAuthentication(args.AuthenticationToken, args.OneTimeCode, args.DeviceIdentifier, args.DeviceDescription);
        } catch (Evernote.EDAM.Error.EDAMUserException userException) {
          result.UserException = userException;
        } catch (Evernote.EDAM.Error.EDAMSystemException systemException) {
          result.SystemException = systemException;
        }
        oprot.WriteMessageBegin(new TMessage("completeTwoFactorAuthentication", TMessageType.Reply, seqid)); 
        result.Write(oprot);
        oprot.WriteMessageEnd();
        oprot.Transport.Flush();
      }

      public void revokeLongSession_Process(int seqid, TProtocol iprot, TProtocol oprot)
      {
        revokeLongSession_args args = new revokeLongSession_args();
        args.Read(iprot);
        iprot.ReadMessageEnd();
        revokeLongSession_result result = new revokeLongSession_result();
        try {
          iface_.revokeLongSession(args.AuthenticationToken);
        } catch (Evernote.EDAM.Error.EDAMUserException userException) {
          result.UserException = userException;
        } catch (Evernote.EDAM.Error.EDAMSystemException systemException) {
          result.SystemException = systemException;
        }
        oprot.WriteMessageBegin(new TMessage("revokeLongSession", TMessageType.Reply, seqid)); 
        result.Write(oprot);
        oprot.WriteMessageEnd();
        oprot.Transport.Flush();
      }

      public void authenticateToBusiness_Process(int seqid, TProtocol iprot, TProtocol oprot)
      {
        authenticateToBusiness_args args = new authenticateToBusiness_args();
        args.Read(iprot);
        iprot.ReadMessageEnd();
        authenticateToBusiness_result result = new authenticateToBusiness_result();
        try {
          result.Success = iface_.authenticateToBusiness(args.AuthenticationToken);
        } catch (Evernote.EDAM.Error.EDAMUserException userException) {
          result.UserException = userException;
        } catch (Evernote.EDAM.Error.EDAMSystemException systemException) {
          result.SystemException = systemException;
        }
        oprot.WriteMessageBegin(new TMessage("authenticateToBusiness", TMessageType.Reply, seqid)); 
        result.Write(oprot);
        oprot.WriteMessageEnd();
        oprot.Transport.Flush();
      }

      public void refreshAuthentication_Process(int seqid, TProtocol iprot, TProtocol oprot)
      {
        refreshAuthentication_args args = new refreshAuthentication_args();
        args.Read(iprot);
        iprot.ReadMessageEnd();
        refreshAuthentication_result result = new refreshAuthentication_result();
        try {
          result.Success = iface_.refreshAuthentication(args.AuthenticationToken);
        } catch (Evernote.EDAM.Error.EDAMUserException userException) {
          result.UserException = userException;
        } catch (Evernote.EDAM.Error.EDAMSystemException systemException) {
          result.SystemException = systemException;
        }
        oprot.WriteMessageBegin(new TMessage("refreshAuthentication", TMessageType.Reply, seqid)); 
        result.Write(oprot);
        oprot.WriteMessageEnd();
        oprot.Transport.Flush();
      }

      public void getUser_Process(int seqid, TProtocol iprot, TProtocol oprot)
      {
        getUser_args args = new getUser_args();
        args.Read(iprot);
        iprot.ReadMessageEnd();
        getUser_result result = new getUser_result();
        try {
          result.Success = iface_.getUser(args.AuthenticationToken);
        } catch (Evernote.EDAM.Error.EDAMUserException userException) {
          result.UserException = userException;
        } catch (Evernote.EDAM.Error.EDAMSystemException systemException) {
          result.SystemException = systemException;
        }
        oprot.WriteMessageBegin(new TMessage("getUser", TMessageType.Reply, seqid)); 
        result.Write(oprot);
        oprot.WriteMessageEnd();
        oprot.Transport.Flush();
      }

      public void getPublicUserInfo_Process(int seqid, TProtocol iprot, TProtocol oprot)
      {
        getPublicUserInfo_args args = new getPublicUserInfo_args();
        args.Read(iprot);
        iprot.ReadMessageEnd();
        getPublicUserInfo_result result = new getPublicUserInfo_result();
        try {
          result.Success = iface_.getPublicUserInfo(args.Username);
        } catch (Evernote.EDAM.Error.EDAMNotFoundException notFoundException) {
          result.NotFoundException = notFoundException;
        } catch (Evernote.EDAM.Error.EDAMSystemException systemException) {
          result.SystemException = systemException;
        } catch (Evernote.EDAM.Error.EDAMUserException userException) {
          result.UserException = userException;
        }
        oprot.WriteMessageBegin(new TMessage("getPublicUserInfo", TMessageType.Reply, seqid)); 
        result.Write(oprot);
        oprot.WriteMessageEnd();
        oprot.Transport.Flush();
      }

      public void getPremiumInfo_Process(int seqid, TProtocol iprot, TProtocol oprot)
      {
        getPremiumInfo_args args = new getPremiumInfo_args();
        args.Read(iprot);
        iprot.ReadMessageEnd();
        getPremiumInfo_result result = new getPremiumInfo_result();
        try {
          result.Success = iface_.getPremiumInfo(args.AuthenticationToken);
        } catch (Evernote.EDAM.Error.EDAMUserException userException) {
          result.UserException = userException;
        } catch (Evernote.EDAM.Error.EDAMSystemException systemException) {
          result.SystemException = systemException;
        }
        oprot.WriteMessageBegin(new TMessage("getPremiumInfo", TMessageType.Reply, seqid)); 
        result.Write(oprot);
        oprot.WriteMessageEnd();
        oprot.Transport.Flush();
      }

      public void getNoteStoreUrl_Process(int seqid, TProtocol iprot, TProtocol oprot)
      {
        getNoteStoreUrl_args args = new getNoteStoreUrl_args();
        args.Read(iprot);
        iprot.ReadMessageEnd();
        getNoteStoreUrl_result result = new getNoteStoreUrl_result();
        try {
          result.Success = iface_.getNoteStoreUrl(args.AuthenticationToken);
        } catch (Evernote.EDAM.Error.EDAMUserException userException) {
          result.UserException = userException;
        } catch (Evernote.EDAM.Error.EDAMSystemException systemException) {
          result.SystemException = systemException;
        }
        oprot.WriteMessageBegin(new TMessage("getNoteStoreUrl", TMessageType.Reply, seqid)); 
        result.Write(oprot);
        oprot.WriteMessageEnd();
        oprot.Transport.Flush();
      }

    }


    #if !SILVERLIGHT && !NETFX_CORE
    [Serializable]
    #endif
    public partial class checkVersion_args : TBase
    {
      private string _clientName;
      private short _edamVersionMajor;
      private short _edamVersionMinor;

      public string ClientName
      {
        get
        {
          return _clientName;
        }
        set
        {
          __isset.clientName = true;
          this._clientName = value;
        }
      }

      public short EdamVersionMajor
      {
        get
        {
          return _edamVersionMajor;
        }
        set
        {
          __isset.edamVersionMajor = true;
          this._edamVersionMajor = value;
        }
      }

      public short EdamVersionMinor
      {
        get
        {
          return _edamVersionMinor;
        }
        set
        {
          __isset.edamVersionMinor = true;
          this._edamVersionMinor = value;
        }
      }


      public Isset __isset;
      #if !SILVERLIGHT && !NETFX_CORE
      [Serializable]
      #endif
      public struct Isset {
        public bool clientName;
        public bool edamVersionMajor;
        public bool edamVersionMinor;
      }

      public checkVersion_args() {
        this._edamVersionMajor = 1;
        this._edamVersionMinor = 25;
      }

      public void Read (TProtocol iprot)
      {
        TField field;
        iprot.ReadStructBegin();
        while (true)
        {
          field = iprot.ReadFieldBegin();
          if (field.Type == TType.Stop) { 
            break;
          }
          switch (field.ID)
          {
            case 1:
              if (field.Type == TType.String) {
                ClientName = iprot.ReadString();
              } else { 
                TProtocolUtil.Skip(iprot, field.Type);
              }
              break;
            case 2:
              if (field.Type == TType.I16) {
                EdamVersionMajor = iprot.ReadI16();
              } else { 
                TProtocolUtil.Skip(iprot, field.Type);
              }
              break;
            case 3:
              if (field.Type == TType.I16) {
                EdamVersionMinor = iprot.ReadI16();
              } else { 
                TProtocolUtil.Skip(iprot, field.Type);
              }
              break;
            default: 
              TProtocolUtil.Skip(iprot, field.Type);
              break;
          }
          iprot.ReadFieldEnd();
        }
        iprot.ReadStructEnd();
      }

      public void Write(TProtocol oprot) {
        TStruct struc = new TStruct("checkVersion_args");
        oprot.WriteStructBegin(struc);
        TField field = new TField();
        if (ClientName != null && __isset.clientName) {
          field.Name = "clientName";
          field.Type = TType.String;
          field.ID = 1;
          oprot.WriteFieldBegin(field);
          oprot.WriteString(ClientName);
          oprot.WriteFieldEnd();
        }
        if (__isset.edamVersionMajor) {
          field.Name = "edamVersionMajor";
          field.Type = TType.I16;
          field.ID = 2;
          oprot.WriteFieldBegin(field);
          oprot.WriteI16(EdamVersionMajor);
          oprot.WriteFieldEnd();
        }
        if (__isset.edamVersionMinor) {
          field.Name = "edamVersionMinor";
          field.Type = TType.I16;
          field.ID = 3;
          oprot.WriteFieldBegin(field);
          oprot.WriteI16(EdamVersionMinor);
          oprot.WriteFieldEnd();
        }
        oprot.WriteFieldStop();
        oprot.WriteStructEnd();
      }

      public override string ToString() {
        StringBuilder sb = new StringBuilder("checkVersion_args(");
        sb.Append("ClientName: ");
        sb.Append(ClientName);
        sb.Append(",EdamVersionMajor: ");
        sb.Append(EdamVersionMajor);
        sb.Append(",EdamVersionMinor: ");
        sb.Append(EdamVersionMinor);
        sb.Append(")");
        return sb.ToString();
      }

    }


    #if !SILVERLIGHT && !NETFX_CORE
    [Serializable]
    #endif
    public partial class checkVersion_result : TBase
    {
      private bool _success;

      public bool Success
      {
        get
        {
          return _success;
        }
        set
        {
          __isset.success = true;
          this._success = value;
        }
      }


      public Isset __isset;
      #if !SILVERLIGHT && !NETFX_CORE
      [Serializable]
      #endif
      public struct Isset {
        public bool success;
      }

      public checkVersion_result() {
      }

      public void Read (TProtocol iprot)
      {
        TField field;
        iprot.ReadStructBegin();
        while (true)
        {
          field = iprot.ReadFieldBegin();
          if (field.Type == TType.Stop) { 
            break;
          }
          switch (field.ID)
          {
            case 0:
              if (field.Type == TType.Bool) {
                Success = iprot.ReadBool();
              } else { 
                TProtocolUtil.Skip(iprot, field.Type);
              }
              break;
            default: 
              TProtocolUtil.Skip(iprot, field.Type);
              break;
          }
          iprot.ReadFieldEnd();
        }
        iprot.ReadStructEnd();
      }

      public void Write(TProtocol oprot) {
        TStruct struc = new TStruct("checkVersion_result");
        oprot.WriteStructBegin(struc);
        TField field = new TField();

        if (this.__isset.success) {
          field.Name = "Success";
          field.Type = TType.Bool;
          field.ID = 0;
          oprot.WriteFieldBegin(field);
          oprot.WriteBool(Success);
          oprot.WriteFieldEnd();
        }
        oprot.WriteFieldStop();
        oprot.WriteStructEnd();
      }

      public override string ToString() {
        StringBuilder sb = new StringBuilder("checkVersion_result(");
        sb.Append("Success: ");
        sb.Append(Success);
        sb.Append(")");
        return sb.ToString();
      }

    }


    #if !SILVERLIGHT && !NETFX_CORE
    [Serializable]
    #endif
    public partial class getBootstrapInfo_args : TBase
    {
      private string _locale;

      public string Locale
      {
        get
        {
          return _locale;
        }
        set
        {
          __isset.locale = true;
          this._locale = value;
        }
      }


      public Isset __isset;
      #if !SILVERLIGHT && !NETFX_CORE
      [Serializable]
      #endif
      public struct Isset {
        public bool locale;
      }

      public getBootstrapInfo_args() {
      }

      public void Read (TProtocol iprot)
      {
        TField field;
        iprot.ReadStructBegin();
        while (true)
        {
          field = iprot.ReadFieldBegin();
          if (field.Type == TType.Stop) { 
            break;
          }
          switch (field.ID)
          {
            case 1:
              if (field.Type == TType.String) {
                Locale = iprot.ReadString();
              } else { 
                TProtocolUtil.Skip(iprot, field.Type);
              }
              break;
            default: 
              TProtocolUtil.Skip(iprot, field.Type);
              break;
          }
          iprot.ReadFieldEnd();
        }
        iprot.ReadStructEnd();
      }

      public void Write(TProtocol oprot) {
        TStruct struc = new TStruct("getBootstrapInfo_args");
        oprot.WriteStructBegin(struc);
        TField field = new TField();
        if (Locale != null && __isset.locale) {
          field.Name = "locale";
          field.Type = TType.String;
          field.ID = 1;
          oprot.WriteFieldBegin(field);
          oprot.WriteString(Locale);
          oprot.WriteFieldEnd();
        }
        oprot.WriteFieldStop();
        oprot.WriteStructEnd();
      }

      public override string ToString() {
        StringBuilder sb = new StringBuilder("getBootstrapInfo_args(");
        sb.Append("Locale: ");
        sb.Append(Locale);
        sb.Append(")");
        return sb.ToString();
      }

    }


    #if !SILVERLIGHT && !NETFX_CORE
    [Serializable]
    #endif
    public partial class getBootstrapInfo_result : TBase
    {
      private BootstrapInfo _success;

      public BootstrapInfo Success
      {
        get
        {
          return _success;
        }
        set
        {
          __isset.success = true;
          this._success = value;
        }
      }


      public Isset __isset;
      #if !SILVERLIGHT && !NETFX_CORE
      [Serializable]
      #endif
      public struct Isset {
        public bool success;
      }

      public getBootstrapInfo_result() {
      }

      public void Read (TProtocol iprot)
      {
        TField field;
        iprot.ReadStructBegin();
        while (true)
        {
          field = iprot.ReadFieldBegin();
          if (field.Type == TType.Stop) { 
            break;
          }
          switch (field.ID)
          {
            case 0:
              if (field.Type == TType.Struct) {
                Success = new BootstrapInfo();
                Success.Read(iprot);
              } else { 
                TProtocolUtil.Skip(iprot, field.Type);
              }
              break;
            default: 
              TProtocolUtil.Skip(iprot, field.Type);
              break;
          }
          iprot.ReadFieldEnd();
        }
        iprot.ReadStructEnd();
      }

      public void Write(TProtocol oprot) {
        TStruct struc = new TStruct("getBootstrapInfo_result");
        oprot.WriteStructBegin(struc);
        TField field = new TField();

        if (this.__isset.success) {
          if (Success != null) {
            field.Name = "Success";
            field.Type = TType.Struct;
            field.ID = 0;
            oprot.WriteFieldBegin(field);
            Success.Write(oprot);
            oprot.WriteFieldEnd();
          }
        }
        oprot.WriteFieldStop();
        oprot.WriteStructEnd();
      }

      public override string ToString() {
        StringBuilder sb = new StringBuilder("getBootstrapInfo_result(");
        sb.Append("Success: ");
        sb.Append(Success== null ? "<null>" : Success.ToString());
        sb.Append(")");
        return sb.ToString();
      }

    }


    #if !SILVERLIGHT && !NETFX_CORE
    [Serializable]
    #endif
    public partial class authenticate_args : TBase
    {
      private string _username;
      private string _password;
      private string _consumerKey;
      private string _consumerSecret;
      private bool _supportsTwoFactor;

      public string Username
      {
        get
        {
          return _username;
        }
        set
        {
          __isset.username = true;
          this._username = value;
        }
      }

      public string Password
      {
        get
        {
          return _password;
        }
        set
        {
          __isset.password = true;
          this._password = value;
        }
      }

      public string ConsumerKey
      {
        get
        {
          return _consumerKey;
        }
        set
        {
          __isset.consumerKey = true;
          this._consumerKey = value;
        }
      }

      public string ConsumerSecret
      {
        get
        {
          return _consumerSecret;
        }
        set
        {
          __isset.consumerSecret = true;
          this._consumerSecret = value;
        }
      }

      public bool SupportsTwoFactor
      {
        get
        {
          return _supportsTwoFactor;
        }
        set
        {
          __isset.supportsTwoFactor = true;
          this._supportsTwoFactor = value;
        }
      }


      public Isset __isset;
      #if !SILVERLIGHT && !NETFX_CORE
      [Serializable]
      #endif
      public struct Isset {
        public bool username;
        public bool password;
        public bool consumerKey;
        public bool consumerSecret;
        public bool supportsTwoFactor;
      }

      public authenticate_args() {
      }

      public void Read (TProtocol iprot)
      {
        TField field;
        iprot.ReadStructBegin();
        while (true)
        {
          field = iprot.ReadFieldBegin();
          if (field.Type == TType.Stop) { 
            break;
          }
          switch (field.ID)
          {
            case 1:
              if (field.Type == TType.String) {
                Username = iprot.ReadString();
              } else { 
                TProtocolUtil.Skip(iprot, field.Type);
              }
              break;
            case 2:
              if (field.Type == TType.String) {
                Password = iprot.ReadString();
              } else { 
                TProtocolUtil.Skip(iprot, field.Type);
              }
              break;
            case 3:
              if (field.Type == TType.String) {
                ConsumerKey = iprot.ReadString();
              } else { 
                TProtocolUtil.Skip(iprot, field.Type);
              }
              break;
            case 4:
              if (field.Type == TType.String) {
                ConsumerSecret = iprot.ReadString();
              } else { 
                TProtocolUtil.Skip(iprot, field.Type);
              }
              break;
            case 5:
              if (field.Type == TType.Bool) {
                SupportsTwoFactor = iprot.ReadBool();
              } else { 
                TProtocolUtil.Skip(iprot, field.Type);
              }
              break;
            default: 
              TProtocolUtil.Skip(iprot, field.Type);
              break;
          }
          iprot.ReadFieldEnd();
        }
        iprot.ReadStructEnd();
      }

      public void Write(TProtocol oprot) {
        TStruct struc = new TStruct("authenticate_args");
        oprot.WriteStructBegin(struc);
        TField field = new TField();
        if (Username != null && __isset.username) {
          field.Name = "username";
          field.Type = TType.String;
          field.ID = 1;
          oprot.WriteFieldBegin(field);
          oprot.WriteString(Username);
          oprot.WriteFieldEnd();
        }
        if (Password != null && __isset.password) {
          field.Name = "password";
          field.Type = TType.String;
          field.ID = 2;
          oprot.WriteFieldBegin(field);
          oprot.WriteString(Password);
          oprot.WriteFieldEnd();
        }
        if (ConsumerKey != null && __isset.consumerKey) {
          field.Name = "consumerKey";
          field.Type = TType.String;
          field.ID = 3;
          oprot.WriteFieldBegin(field);
          oprot.WriteString(ConsumerKey);
          oprot.WriteFieldEnd();
        }
        if (ConsumerSecret != null && __isset.consumerSecret) {
          field.Name = "consumerSecret";
          field.Type = TType.String;
          field.ID = 4;
          oprot.WriteFieldBegin(field);
          oprot.WriteString(ConsumerSecret);
          oprot.WriteFieldEnd();
        }
        if (__isset.supportsTwoFactor) {
          field.Name = "supportsTwoFactor";
          field.Type = TType.Bool;
          field.ID = 5;
          oprot.WriteFieldBegin(field);
          oprot.WriteBool(SupportsTwoFactor);
          oprot.WriteFieldEnd();
        }
        oprot.WriteFieldStop();
        oprot.WriteStructEnd();
      }

      public override string ToString() {
        StringBuilder sb = new StringBuilder("authenticate_args(");
        sb.Append("Username: ");
        sb.Append(Username);
        sb.Append(",Password: ");
        sb.Append(Password);
        sb.Append(",ConsumerKey: ");
        sb.Append(ConsumerKey);
        sb.Append(",ConsumerSecret: ");
        sb.Append(ConsumerSecret);
        sb.Append(",SupportsTwoFactor: ");
        sb.Append(SupportsTwoFactor);
        sb.Append(")");
        return sb.ToString();
      }

    }


    #if !SILVERLIGHT && !NETFX_CORE
    [Serializable]
    #endif
    public partial class authenticate_result : TBase
    {
      private AuthenticationResult _success;
      private Evernote.EDAM.Error.EDAMUserException _userException;
      private Evernote.EDAM.Error.EDAMSystemException _systemException;

      public AuthenticationResult Success
      {
        get
        {
          return _success;
        }
        set
        {
          __isset.success = true;
          this._success = value;
        }
      }

      public Evernote.EDAM.Error.EDAMUserException UserException
      {
        get
        {
          return _userException;
        }
        set
        {
          __isset.userException = true;
          this._userException = value;
        }
      }

      public Evernote.EDAM.Error.EDAMSystemException SystemException
      {
        get
        {
          return _systemException;
        }
        set
        {
          __isset.systemException = true;
          this._systemException = value;
        }
      }


      public Isset __isset;
      #if !SILVERLIGHT && !NETFX_CORE
      [Serializable]
      #endif
      public struct Isset {
        public bool success;
        public bool userException;
        public bool systemException;
      }

      public authenticate_result() {
      }

      public void Read (TProtocol iprot)
      {
        TField field;
        iprot.ReadStructBegin();
        while (true)
        {
          field = iprot.ReadFieldBegin();
          if (field.Type == TType.Stop) { 
            break;
          }
          switch (field.ID)
          {
            case 0:
              if (field.Type == TType.Struct) {
                Success = new AuthenticationResult();
                Success.Read(iprot);
              } else { 
                TProtocolUtil.Skip(iprot, field.Type);
              }
              break;
            case 1:
              if (field.Type == TType.Struct) {
                UserException = new Evernote.EDAM.Error.EDAMUserException();
                UserException.Read(iprot);
              } else { 
                TProtocolUtil.Skip(iprot, field.Type);
              }
              break;
            case 2:
              if (field.Type == TType.Struct) {
                SystemException = new Evernote.EDAM.Error.EDAMSystemException();
                SystemException.Read(iprot);
              } else { 
                TProtocolUtil.Skip(iprot, field.Type);
              }
              break;
            default: 
              TProtocolUtil.Skip(iprot, field.Type);
              break;
          }
          iprot.ReadFieldEnd();
        }
        iprot.ReadStructEnd();
      }

      public void Write(TProtocol oprot) {
        TStruct struc = new TStruct("authenticate_result");
        oprot.WriteStructBegin(struc);
        TField field = new TField();

        if (this.__isset.success) {
          if (Success != null) {
            field.Name = "Success";
            field.Type = TType.Struct;
            field.ID = 0;
            oprot.WriteFieldBegin(field);
            Success.Write(oprot);
            oprot.WriteFieldEnd();
          }
        } else if (this.__isset.userException) {
          if (UserException != null) {
            field.Name = "UserException";
            field.Type = TType.Struct;
            field.ID = 1;
            oprot.WriteFieldBegin(field);
            UserException.Write(oprot);
            oprot.WriteFieldEnd();
          }
        } else if (this.__isset.systemException) {
          if (SystemException != null) {
            field.Name = "SystemException";
            field.Type = TType.Struct;
            field.ID = 2;
            oprot.WriteFieldBegin(field);
            SystemException.Write(oprot);
            oprot.WriteFieldEnd();
          }
        }
        oprot.WriteFieldStop();
        oprot.WriteStructEnd();
      }

      public override string ToString() {
        StringBuilder sb = new StringBuilder("authenticate_result(");
        sb.Append("Success: ");
        sb.Append(Success== null ? "<null>" : Success.ToString());
        sb.Append(",UserException: ");
        sb.Append(UserException== null ? "<null>" : UserException.ToString());
        sb.Append(",SystemException: ");
        sb.Append(SystemException== null ? "<null>" : SystemException.ToString());
        sb.Append(")");
        return sb.ToString();
      }

    }


    #if !SILVERLIGHT && !NETFX_CORE
    [Serializable]
    #endif
    public partial class authenticateLongSession_args : TBase
    {
      private string _username;
      private string _password;
      private string _consumerKey;
      private string _consumerSecret;
      private string _deviceIdentifier;
      private string _deviceDescription;
      private bool _supportsTwoFactor;

      public string Username
      {
        get
        {
          return _username;
        }
        set
        {
          __isset.username = true;
          this._username = value;
        }
      }

      public string Password
      {
        get
        {
          return _password;
        }
        set
        {
          __isset.password = true;
          this._password = value;
        }
      }

      public string ConsumerKey
      {
        get
        {
          return _consumerKey;
        }
        set
        {
          __isset.consumerKey = true;
          this._consumerKey = value;
        }
      }

      public string ConsumerSecret
      {
        get
        {
          return _consumerSecret;
        }
        set
        {
          __isset.consumerSecret = true;
          this._consumerSecret = value;
        }
      }

      public string DeviceIdentifier
      {
        get
        {
          return _deviceIdentifier;
        }
        set
        {
          __isset.deviceIdentifier = true;
          this._deviceIdentifier = value;
        }
      }

      public string DeviceDescription
      {
        get
        {
          return _deviceDescription;
        }
        set
        {
          __isset.deviceDescription = true;
          this._deviceDescription = value;
        }
      }

      public bool SupportsTwoFactor
      {
        get
        {
          return _supportsTwoFactor;
        }
        set
        {
          __isset.supportsTwoFactor = true;
          this._supportsTwoFactor = value;
        }
      }


      public Isset __isset;
      #if !SILVERLIGHT && !NETFX_CORE
      [Serializable]
      #endif
      public struct Isset {
        public bool username;
        public bool password;
        public bool consumerKey;
        public bool consumerSecret;
        public bool deviceIdentifier;
        public bool deviceDescription;
        public bool supportsTwoFactor;
      }

      public authenticateLongSession_args() {
      }

      public void Read (TProtocol iprot)
      {
        TField field;
        iprot.ReadStructBegin();
        while (true)
        {
          field = iprot.ReadFieldBegin();
          if (field.Type == TType.Stop) { 
            break;
          }
          switch (field.ID)
          {
            case 1:
              if (field.Type == TType.String) {
                Username = iprot.ReadString();
              } else { 
                TProtocolUtil.Skip(iprot, field.Type);
              }
              break;
            case 2:
              if (field.Type == TType.String) {
                Password = iprot.ReadString();
              } else { 
                TProtocolUtil.Skip(iprot, field.Type);
              }
              break;
            case 3:
              if (field.Type == TType.String) {
                ConsumerKey = iprot.ReadString();
              } else { 
                TProtocolUtil.Skip(iprot, field.Type);
              }
              break;
            case 4:
              if (field.Type == TType.String) {
                ConsumerSecret = iprot.ReadString();
              } else { 
                TProtocolUtil.Skip(iprot, field.Type);
              }
              break;
            case 5:
              if (field.Type == TType.String) {
                DeviceIdentifier = iprot.ReadString();
              } else { 
                TProtocolUtil.Skip(iprot, field.Type);
              }
              break;
            case 6:
              if (field.Type == TType.String) {
                DeviceDescription = iprot.ReadString();
              } else { 
                TProtocolUtil.Skip(iprot, field.Type);
              }
              break;
            case 7:
              if (field.Type == TType.Bool) {
                SupportsTwoFactor = iprot.ReadBool();
              } else { 
                TProtocolUtil.Skip(iprot, field.Type);
              }
              break;
            default: 
              TProtocolUtil.Skip(iprot, field.Type);
              break;
          }
          iprot.ReadFieldEnd();
        }
        iprot.ReadStructEnd();
      }

      public void Write(TProtocol oprot) {
        TStruct struc = new TStruct("authenticateLongSession_args");
        oprot.WriteStructBegin(struc);
        TField field = new TField();
        if (Username != null && __isset.username) {
          field.Name = "username";
          field.Type = TType.String;
          field.ID = 1;
          oprot.WriteFieldBegin(field);
          oprot.WriteString(Username);
          oprot.WriteFieldEnd();
        }
        if (Password != null && __isset.password) {
          field.Name = "password";
          field.Type = TType.String;
          field.ID = 2;
          oprot.WriteFieldBegin(field);
          oprot.WriteString(Password);
          oprot.WriteFieldEnd();
        }
        if (ConsumerKey != null && __isset.consumerKey) {
          field.Name = "consumerKey";
          field.Type = TType.String;
          field.ID = 3;
          oprot.WriteFieldBegin(field);
          oprot.WriteString(ConsumerKey);
          oprot.WriteFieldEnd();
        }
        if (ConsumerSecret != null && __isset.consumerSecret) {
          field.Name = "consumerSecret";
          field.Type = TType.String;
          field.ID = 4;
          oprot.WriteFieldBegin(field);
          oprot.WriteString(ConsumerSecret);
          oprot.WriteFieldEnd();
        }
        if (DeviceIdentifier != null && __isset.deviceIdentifier) {
          field.Name = "deviceIdentifier";
          field.Type = TType.String;
          field.ID = 5;
          oprot.WriteFieldBegin(field);
          oprot.WriteString(DeviceIdentifier);
          oprot.WriteFieldEnd();
        }
        if (DeviceDescription != null && __isset.deviceDescription) {
          field.Name = "deviceDescription";
          field.Type = TType.String;
          field.ID = 6;
          oprot.WriteFieldBegin(field);
          oprot.WriteString(DeviceDescription);
          oprot.WriteFieldEnd();
        }
        if (__isset.supportsTwoFactor) {
          field.Name = "supportsTwoFactor";
          field.Type = TType.Bool;
          field.ID = 7;
          oprot.WriteFieldBegin(field);
          oprot.WriteBool(SupportsTwoFactor);
          oprot.WriteFieldEnd();
        }
        oprot.WriteFieldStop();
        oprot.WriteStructEnd();
      }

      public override string ToString() {
        StringBuilder sb = new StringBuilder("authenticateLongSession_args(");
        sb.Append("Username: ");
        sb.Append(Username);
        sb.Append(",Password: ");
        sb.Append(Password);
        sb.Append(",ConsumerKey: ");
        sb.Append(ConsumerKey);
        sb.Append(",ConsumerSecret: ");
        sb.Append(ConsumerSecret);
        sb.Append(",DeviceIdentifier: ");
        sb.Append(DeviceIdentifier);
        sb.Append(",DeviceDescription: ");
        sb.Append(DeviceDescription);
        sb.Append(",SupportsTwoFactor: ");
        sb.Append(SupportsTwoFactor);
        sb.Append(")");
        return sb.ToString();
      }

    }


    #if !SILVERLIGHT && !NETFX_CORE
    [Serializable]
    #endif
    public partial class authenticateLongSession_result : TBase
    {
      private AuthenticationResult _success;
      private Evernote.EDAM.Error.EDAMUserException _userException;
      private Evernote.EDAM.Error.EDAMSystemException _systemException;

      public AuthenticationResult Success
      {
        get
        {
          return _success;
        }
        set
        {
          __isset.success = true;
          this._success = value;
        }
      }

      public Evernote.EDAM.Error.EDAMUserException UserException
      {
        get
        {
          return _userException;
        }
        set
        {
          __isset.userException = true;
          this._userException = value;
        }
      }

      public Evernote.EDAM.Error.EDAMSystemException SystemException
      {
        get
        {
          return _systemException;
        }
        set
        {
          __isset.systemException = true;
          this._systemException = value;
        }
      }


      public Isset __isset;
      #if !SILVERLIGHT && !NETFX_CORE
      [Serializable]
      #endif
      public struct Isset {
        public bool success;
        public bool userException;
        public bool systemException;
      }

      public authenticateLongSession_result() {
      }

      public void Read (TProtocol iprot)
      {
        TField field;
        iprot.ReadStructBegin();
        while (true)
        {
          field = iprot.ReadFieldBegin();
          if (field.Type == TType.Stop) { 
            break;
          }
          switch (field.ID)
          {
            case 0:
              if (field.Type == TType.Struct) {
                Success = new AuthenticationResult();
                Success.Read(iprot);
              } else { 
                TProtocolUtil.Skip(iprot, field.Type);
              }
              break;
            case 1:
              if (field.Type == TType.Struct) {
                UserException = new Evernote.EDAM.Error.EDAMUserException();
                UserException.Read(iprot);
              } else { 
                TProtocolUtil.Skip(iprot, field.Type);
              }
              break;
            case 2:
              if (field.Type == TType.Struct) {
                SystemException = new Evernote.EDAM.Error.EDAMSystemException();
                SystemException.Read(iprot);
              } else { 
                TProtocolUtil.Skip(iprot, field.Type);
              }
              break;
            default: 
              TProtocolUtil.Skip(iprot, field.Type);
              break;
          }
          iprot.ReadFieldEnd();
        }
        iprot.ReadStructEnd();
      }

      public void Write(TProtocol oprot) {
        TStruct struc = new TStruct("authenticateLongSession_result");
        oprot.WriteStructBegin(struc);
        TField field = new TField();

        if (this.__isset.success) {
          if (Success != null) {
            field.Name = "Success";
            field.Type = TType.Struct;
            field.ID = 0;
            oprot.WriteFieldBegin(field);
            Success.Write(oprot);
            oprot.WriteFieldEnd();
          }
        } else if (this.__isset.userException) {
          if (UserException != null) {
            field.Name = "UserException";
            field.Type = TType.Struct;
            field.ID = 1;
            oprot.WriteFieldBegin(field);
            UserException.Write(oprot);
            oprot.WriteFieldEnd();
          }
        } else if (this.__isset.systemException) {
          if (SystemException != null) {
            field.Name = "SystemException";
            field.Type = TType.Struct;
            field.ID = 2;
            oprot.WriteFieldBegin(field);
            SystemException.Write(oprot);
            oprot.WriteFieldEnd();
          }
        }
        oprot.WriteFieldStop();
        oprot.WriteStructEnd();
      }

      public override string ToString() {
        StringBuilder sb = new StringBuilder("authenticateLongSession_result(");
        sb.Append("Success: ");
        sb.Append(Success== null ? "<null>" : Success.ToString());
        sb.Append(",UserException: ");
        sb.Append(UserException== null ? "<null>" : UserException.ToString());
        sb.Append(",SystemException: ");
        sb.Append(SystemException== null ? "<null>" : SystemException.ToString());
        sb.Append(")");
        return sb.ToString();
      }

    }


    #if !SILVERLIGHT && !NETFX_CORE
    [Serializable]
    #endif
    public partial class completeTwoFactorAuthentication_args : TBase
    {
      private string _authenticationToken;
      private string _oneTimeCode;
      private string _deviceIdentifier;
      private string _deviceDescription;

      public string AuthenticationToken
      {
        get
        {
          return _authenticationToken;
        }
        set
        {
          __isset.authenticationToken = true;
          this._authenticationToken = value;
        }
      }

      public string OneTimeCode
      {
        get
        {
          return _oneTimeCode;
        }
        set
        {
          __isset.oneTimeCode = true;
          this._oneTimeCode = value;
        }
      }

      public string DeviceIdentifier
      {
        get
        {
          return _deviceIdentifier;
        }
        set
        {
          __isset.deviceIdentifier = true;
          this._deviceIdentifier = value;
        }
      }

      public string DeviceDescription
      {
        get
        {
          return _deviceDescription;
        }
        set
        {
          __isset.deviceDescription = true;
          this._deviceDescription = value;
        }
      }


      public Isset __isset;
      #if !SILVERLIGHT && !NETFX_CORE
      [Serializable]
      #endif
      public struct Isset {
        public bool authenticationToken;
        public bool oneTimeCode;
        public bool deviceIdentifier;
        public bool deviceDescription;
      }

      public completeTwoFactorAuthentication_args() {
      }

      public void Read (TProtocol iprot)
      {
        TField field;
        iprot.ReadStructBegin();
        while (true)
        {
          field = iprot.ReadFieldBegin();
          if (field.Type == TType.Stop) { 
            break;
          }
          switch (field.ID)
          {
            case 1:
              if (field.Type == TType.String) {
                AuthenticationToken = iprot.ReadString();
              } else { 
                TProtocolUtil.Skip(iprot, field.Type);
              }
              break;
            case 2:
              if (field.Type == TType.String) {
                OneTimeCode = iprot.ReadString();
              } else { 
                TProtocolUtil.Skip(iprot, field.Type);
              }
              break;
            case 3:
              if (field.Type == TType.String) {
                DeviceIdentifier = iprot.ReadString();
              } else { 
                TProtocolUtil.Skip(iprot, field.Type);
              }
              break;
            case 4:
              if (field.Type == TType.String) {
                DeviceDescription = iprot.ReadString();
              } else { 
                TProtocolUtil.Skip(iprot, field.Type);
              }
              break;
            default: 
              TProtocolUtil.Skip(iprot, field.Type);
              break;
          }
          iprot.ReadFieldEnd();
        }
        iprot.ReadStructEnd();
      }

      public void Write(TProtocol oprot) {
        TStruct struc = new TStruct("completeTwoFactorAuthentication_args");
        oprot.WriteStructBegin(struc);
        TField field = new TField();
        if (AuthenticationToken != null && __isset.authenticationToken) {
          field.Name = "authenticationToken";
          field.Type = TType.String;
          field.ID = 1;
          oprot.WriteFieldBegin(field);
          oprot.WriteString(AuthenticationToken);
          oprot.WriteFieldEnd();
        }
        if (OneTimeCode != null && __isset.oneTimeCode) {
          field.Name = "oneTimeCode";
          field.Type = TType.String;
          field.ID = 2;
          oprot.WriteFieldBegin(field);
          oprot.WriteString(OneTimeCode);
          oprot.WriteFieldEnd();
        }
        if (DeviceIdentifier != null && __isset.deviceIdentifier) {
          field.Name = "deviceIdentifier";
          field.Type = TType.String;
          field.ID = 3;
          oprot.WriteFieldBegin(field);
          oprot.WriteString(DeviceIdentifier);
          oprot.WriteFieldEnd();
        }
        if (DeviceDescription != null && __isset.deviceDescription) {
          field.Name = "deviceDescription";
          field.Type = TType.String;
          field.ID = 4;
          oprot.WriteFieldBegin(field);
          oprot.WriteString(DeviceDescription);
          oprot.WriteFieldEnd();
        }
        oprot.WriteFieldStop();
        oprot.WriteStructEnd();
      }

      public override string ToString() {
        StringBuilder sb = new StringBuilder("completeTwoFactorAuthentication_args(");
        sb.Append("AuthenticationToken: ");
        sb.Append(AuthenticationToken);
        sb.Append(",OneTimeCode: ");
        sb.Append(OneTimeCode);
        sb.Append(",DeviceIdentifier: ");
        sb.Append(DeviceIdentifier);
        sb.Append(",DeviceDescription: ");
        sb.Append(DeviceDescription);
        sb.Append(")");
        return sb.ToString();
      }

    }


    #if !SILVERLIGHT && !NETFX_CORE
    [Serializable]
    #endif
    public partial class completeTwoFactorAuthentication_result : TBase
    {
      private AuthenticationResult _success;
      private Evernote.EDAM.Error.EDAMUserException _userException;
      private Evernote.EDAM.Error.EDAMSystemException _systemException;

      public AuthenticationResult Success
      {
        get
        {
          return _success;
        }
        set
        {
          __isset.success = true;
          this._success = value;
        }
      }

      public Evernote.EDAM.Error.EDAMUserException UserException
      {
        get
        {
          return _userException;
        }
        set
        {
          __isset.userException = true;
          this._userException = value;
        }
      }

      public Evernote.EDAM.Error.EDAMSystemException SystemException
      {
        get
        {
          return _systemException;
        }
        set
        {
          __isset.systemException = true;
          this._systemException = value;
        }
      }


      public Isset __isset;
      #if !SILVERLIGHT && !NETFX_CORE
      [Serializable]
      #endif
      public struct Isset {
        public bool success;
        public bool userException;
        public bool systemException;
      }

      public completeTwoFactorAuthentication_result() {
      }

      public void Read (TProtocol iprot)
      {
        TField field;
        iprot.ReadStructBegin();
        while (true)
        {
          field = iprot.ReadFieldBegin();
          if (field.Type == TType.Stop) { 
            break;
          }
          switch (field.ID)
          {
            case 0:
              if (field.Type == TType.Struct) {
                Success = new AuthenticationResult();
                Success.Read(iprot);
              } else { 
                TProtocolUtil.Skip(iprot, field.Type);
              }
              break;
            case 1:
              if (field.Type == TType.Struct) {
                UserException = new Evernote.EDAM.Error.EDAMUserException();
                UserException.Read(iprot);
              } else { 
                TProtocolUtil.Skip(iprot, field.Type);
              }
              break;
            case 2:
              if (field.Type == TType.Struct) {
                SystemException = new Evernote.EDAM.Error.EDAMSystemException();
                SystemException.Read(iprot);
              } else { 
                TProtocolUtil.Skip(iprot, field.Type);
              }
              break;
            default: 
              TProtocolUtil.Skip(iprot, field.Type);
              break;
          }
          iprot.ReadFieldEnd();
        }
        iprot.ReadStructEnd();
      }

      public void Write(TProtocol oprot) {
        TStruct struc = new TStruct("completeTwoFactorAuthentication_result");
        oprot.WriteStructBegin(struc);
        TField field = new TField();

        if (this.__isset.success) {
          if (Success != null) {
            field.Name = "Success";
            field.Type = TType.Struct;
            field.ID = 0;
            oprot.WriteFieldBegin(field);
            Success.Write(oprot);
            oprot.WriteFieldEnd();
          }
        } else if (this.__isset.userException) {
          if (UserException != null) {
            field.Name = "UserException";
            field.Type = TType.Struct;
            field.ID = 1;
            oprot.WriteFieldBegin(field);
            UserException.Write(oprot);
            oprot.WriteFieldEnd();
          }
        } else if (this.__isset.systemException) {
          if (SystemException != null) {
            field.Name = "SystemException";
            field.Type = TType.Struct;
            field.ID = 2;
            oprot.WriteFieldBegin(field);
            SystemException.Write(oprot);
            oprot.WriteFieldEnd();
          }
        }
        oprot.WriteFieldStop();
        oprot.WriteStructEnd();
      }

      public override string ToString() {
        StringBuilder sb = new StringBuilder("completeTwoFactorAuthentication_result(");
        sb.Append("Success: ");
        sb.Append(Success== null ? "<null>" : Success.ToString());
        sb.Append(",UserException: ");
        sb.Append(UserException== null ? "<null>" : UserException.ToString());
        sb.Append(",SystemException: ");
        sb.Append(SystemException== null ? "<null>" : SystemException.ToString());
        sb.Append(")");
        return sb.ToString();
      }

    }


    #if !SILVERLIGHT && !NETFX_CORE
    [Serializable]
    #endif
    public partial class revokeLongSession_args : TBase
    {
      private string _authenticationToken;

      public string AuthenticationToken
      {
        get
        {
          return _authenticationToken;
        }
        set
        {
          __isset.authenticationToken = true;
          this._authenticationToken = value;
        }
      }


      public Isset __isset;
      #if !SILVERLIGHT && !NETFX_CORE
      [Serializable]
      #endif
      public struct Isset {
        public bool authenticationToken;
      }

      public revokeLongSession_args() {
      }

      public void Read (TProtocol iprot)
      {
        TField field;
        iprot.ReadStructBegin();
        while (true)
        {
          field = iprot.ReadFieldBegin();
          if (field.Type == TType.Stop) { 
            break;
          }
          switch (field.ID)
          {
            case 1:
              if (field.Type == TType.String) {
                AuthenticationToken = iprot.ReadString();
              } else { 
                TProtocolUtil.Skip(iprot, field.Type);
              }
              break;
            default: 
              TProtocolUtil.Skip(iprot, field.Type);
              break;
          }
          iprot.ReadFieldEnd();
        }
        iprot.ReadStructEnd();
      }

      public void Write(TProtocol oprot) {
        TStruct struc = new TStruct("revokeLongSession_args");
        oprot.WriteStructBegin(struc);
        TField field = new TField();
        if (AuthenticationToken != null && __isset.authenticationToken) {
          field.Name = "authenticationToken";
          field.Type = TType.String;
          field.ID = 1;
          oprot.WriteFieldBegin(field);
          oprot.WriteString(AuthenticationToken);
          oprot.WriteFieldEnd();
        }
        oprot.WriteFieldStop();
        oprot.WriteStructEnd();
      }

      public override string ToString() {
        StringBuilder sb = new StringBuilder("revokeLongSession_args(");
        sb.Append("AuthenticationToken: ");
        sb.Append(AuthenticationToken);
        sb.Append(")");
        return sb.ToString();
      }

    }


    #if !SILVERLIGHT && !NETFX_CORE
    [Serializable]
    #endif
    public partial class revokeLongSession_result : TBase
    {
      private Evernote.EDAM.Error.EDAMUserException _userException;
      private Evernote.EDAM.Error.EDAMSystemException _systemException;

      public Evernote.EDAM.Error.EDAMUserException UserException
      {
        get
        {
          return _userException;
        }
        set
        {
          __isset.userException = true;
          this._userException = value;
        }
      }

      public Evernote.EDAM.Error.EDAMSystemException SystemException
      {
        get
        {
          return _systemException;
        }
        set
        {
          __isset.systemException = true;
          this._systemException = value;
        }
      }


      public Isset __isset;
      #if !SILVERLIGHT && !NETFX_CORE
      [Serializable]
      #endif
      public struct Isset {
        public bool userException;
        public bool systemException;
      }

      public revokeLongSession_result() {
      }

      public void Read (TProtocol iprot)
      {
        TField field;
        iprot.ReadStructBegin();
        while (true)
        {
          field = iprot.ReadFieldBegin();
          if (field.Type == TType.Stop) { 
            break;
          }
          switch (field.ID)
          {
            case 1:
              if (field.Type == TType.Struct) {
                UserException = new Evernote.EDAM.Error.EDAMUserException();
                UserException.Read(iprot);
              } else { 
                TProtocolUtil.Skip(iprot, field.Type);
              }
              break;
            case 2:
              if (field.Type == TType.Struct) {
                SystemException = new Evernote.EDAM.Error.EDAMSystemException();
                SystemException.Read(iprot);
              } else { 
                TProtocolUtil.Skip(iprot, field.Type);
              }
              break;
            default: 
              TProtocolUtil.Skip(iprot, field.Type);
              break;
          }
          iprot.ReadFieldEnd();
        }
        iprot.ReadStructEnd();
      }

      public void Write(TProtocol oprot) {
        TStruct struc = new TStruct("revokeLongSession_result");
        oprot.WriteStructBegin(struc);
        TField field = new TField();

        if (this.__isset.userException) {
          if (UserException != null) {
            field.Name = "UserException";
            field.Type = TType.Struct;
            field.ID = 1;
            oprot.WriteFieldBegin(field);
            UserException.Write(oprot);
            oprot.WriteFieldEnd();
          }
        } else if (this.__isset.systemException) {
          if (SystemException != null) {
            field.Name = "SystemException";
            field.Type = TType.Struct;
            field.ID = 2;
            oprot.WriteFieldBegin(field);
            SystemException.Write(oprot);
            oprot.WriteFieldEnd();
          }
        }
        oprot.WriteFieldStop();
        oprot.WriteStructEnd();
      }

      public override string ToString() {
        StringBuilder sb = new StringBuilder("revokeLongSession_result(");
        sb.Append("UserException: ");
        sb.Append(UserException== null ? "<null>" : UserException.ToString());
        sb.Append(",SystemException: ");
        sb.Append(SystemException== null ? "<null>" : SystemException.ToString());
        sb.Append(")");
        return sb.ToString();
      }

    }


    #if !SILVERLIGHT && !NETFX_CORE
    [Serializable]
    #endif
    public partial class authenticateToBusiness_args : TBase
    {
      private string _authenticationToken;

      public string AuthenticationToken
      {
        get
        {
          return _authenticationToken;
        }
        set
        {
          __isset.authenticationToken = true;
          this._authenticationToken = value;
        }
      }


      public Isset __isset;
      #if !SILVERLIGHT && !NETFX_CORE
      [Serializable]
      #endif
      public struct Isset {
        public bool authenticationToken;
      }

      public authenticateToBusiness_args() {
      }

      public void Read (TProtocol iprot)
      {
        TField field;
        iprot.ReadStructBegin();
        while (true)
        {
          field = iprot.ReadFieldBegin();
          if (field.Type == TType.Stop) { 
            break;
          }
          switch (field.ID)
          {
            case 1:
              if (field.Type == TType.String) {
                AuthenticationToken = iprot.ReadString();
              } else { 
                TProtocolUtil.Skip(iprot, field.Type);
              }
              break;
            default: 
              TProtocolUtil.Skip(iprot, field.Type);
              break;
          }
          iprot.ReadFieldEnd();
        }
        iprot.ReadStructEnd();
      }

      public void Write(TProtocol oprot) {
        TStruct struc = new TStruct("authenticateToBusiness_args");
        oprot.WriteStructBegin(struc);
        TField field = new TField();
        if (AuthenticationToken != null && __isset.authenticationToken) {
          field.Name = "authenticationToken";
          field.Type = TType.String;
          field.ID = 1;
          oprot.WriteFieldBegin(field);
          oprot.WriteString(AuthenticationToken);
          oprot.WriteFieldEnd();
        }
        oprot.WriteFieldStop();
        oprot.WriteStructEnd();
      }

      public override string ToString() {
        StringBuilder sb = new StringBuilder("authenticateToBusiness_args(");
        sb.Append("AuthenticationToken: ");
        sb.Append(AuthenticationToken);
        sb.Append(")");
        return sb.ToString();
      }

    }


    #if !SILVERLIGHT && !NETFX_CORE
    [Serializable]
    #endif
    public partial class authenticateToBusiness_result : TBase
    {
      private AuthenticationResult _success;
      private Evernote.EDAM.Error.EDAMUserException _userException;
      private Evernote.EDAM.Error.EDAMSystemException _systemException;

      public AuthenticationResult Success
      {
        get
        {
          return _success;
        }
        set
        {
          __isset.success = true;
          this._success = value;
        }
      }

      public Evernote.EDAM.Error.EDAMUserException UserException
      {
        get
        {
          return _userException;
        }
        set
        {
          __isset.userException = true;
          this._userException = value;
        }
      }

      public Evernote.EDAM.Error.EDAMSystemException SystemException
      {
        get
        {
          return _systemException;
        }
        set
        {
          __isset.systemException = true;
          this._systemException = value;
        }
      }


      public Isset __isset;
      #if !SILVERLIGHT && !NETFX_CORE
      [Serializable]
      #endif
      public struct Isset {
        public bool success;
        public bool userException;
        public bool systemException;
      }

      public authenticateToBusiness_result() {
      }

      public void Read (TProtocol iprot)
      {
        TField field;
        iprot.ReadStructBegin();
        while (true)
        {
          field = iprot.ReadFieldBegin();
          if (field.Type == TType.Stop) { 
            break;
          }
          switch (field.ID)
          {
            case 0:
              if (field.Type == TType.Struct) {
                Success = new AuthenticationResult();
                Success.Read(iprot);
              } else { 
                TProtocolUtil.Skip(iprot, field.Type);
              }
              break;
            case 1:
              if (field.Type == TType.Struct) {
                UserException = new Evernote.EDAM.Error.EDAMUserException();
                UserException.Read(iprot);
              } else { 
                TProtocolUtil.Skip(iprot, field.Type);
              }
              break;
            case 2:
              if (field.Type == TType.Struct) {
                SystemException = new Evernote.EDAM.Error.EDAMSystemException();
                SystemException.Read(iprot);
              } else { 
                TProtocolUtil.Skip(iprot, field.Type);
              }
              break;
            default: 
              TProtocolUtil.Skip(iprot, field.Type);
              break;
          }
          iprot.ReadFieldEnd();
        }
        iprot.ReadStructEnd();
      }

      public void Write(TProtocol oprot) {
        TStruct struc = new TStruct("authenticateToBusiness_result");
        oprot.WriteStructBegin(struc);
        TField field = new TField();

        if (this.__isset.success) {
          if (Success != null) {
            field.Name = "Success";
            field.Type = TType.Struct;
            field.ID = 0;
            oprot.WriteFieldBegin(field);
            Success.Write(oprot);
            oprot.WriteFieldEnd();
          }
        } else if (this.__isset.userException) {
          if (UserException != null) {
            field.Name = "UserException";
            field.Type = TType.Struct;
            field.ID = 1;
            oprot.WriteFieldBegin(field);
            UserException.Write(oprot);
            oprot.WriteFieldEnd();
          }
        } else if (this.__isset.systemException) {
          if (SystemException != null) {
            field.Name = "SystemException";
            field.Type = TType.Struct;
            field.ID = 2;
            oprot.WriteFieldBegin(field);
            SystemException.Write(oprot);
            oprot.WriteFieldEnd();
          }
        }
        oprot.WriteFieldStop();
        oprot.WriteStructEnd();
      }

      public override string ToString() {
        StringBuilder sb = new StringBuilder("authenticateToBusiness_result(");
        sb.Append("Success: ");
        sb.Append(Success== null ? "<null>" : Success.ToString());
        sb.Append(",UserException: ");
        sb.Append(UserException== null ? "<null>" : UserException.ToString());
        sb.Append(",SystemException: ");
        sb.Append(SystemException== null ? "<null>" : SystemException.ToString());
        sb.Append(")");
        return sb.ToString();
      }

    }


    #if !SILVERLIGHT && !NETFX_CORE
    [Serializable]
    #endif
    public partial class refreshAuthentication_args : TBase
    {
      private string _authenticationToken;

      public string AuthenticationToken
      {
        get
        {
          return _authenticationToken;
        }
        set
        {
          __isset.authenticationToken = true;
          this._authenticationToken = value;
        }
      }


      public Isset __isset;
      #if !SILVERLIGHT && !NETFX_CORE
      [Serializable]
      #endif
      public struct Isset {
        public bool authenticationToken;
      }

      public refreshAuthentication_args() {
      }

      public void Read (TProtocol iprot)
      {
        TField field;
        iprot.ReadStructBegin();
        while (true)
        {
          field = iprot.ReadFieldBegin();
          if (field.Type == TType.Stop) { 
            break;
          }
          switch (field.ID)
          {
            case 1:
              if (field.Type == TType.String) {
                AuthenticationToken = iprot.ReadString();
              } else { 
                TProtocolUtil.Skip(iprot, field.Type);
              }
              break;
            default: 
              TProtocolUtil.Skip(iprot, field.Type);
              break;
          }
          iprot.ReadFieldEnd();
        }
        iprot.ReadStructEnd();
      }

      public void Write(TProtocol oprot) {
        TStruct struc = new TStruct("refreshAuthentication_args");
        oprot.WriteStructBegin(struc);
        TField field = new TField();
        if (AuthenticationToken != null && __isset.authenticationToken) {
          field.Name = "authenticationToken";
          field.Type = TType.String;
          field.ID = 1;
          oprot.WriteFieldBegin(field);
          oprot.WriteString(AuthenticationToken);
          oprot.WriteFieldEnd();
        }
        oprot.WriteFieldStop();
        oprot.WriteStructEnd();
      }

      public override string ToString() {
        StringBuilder sb = new StringBuilder("refreshAuthentication_args(");
        sb.Append("AuthenticationToken: ");
        sb.Append(AuthenticationToken);
        sb.Append(")");
        return sb.ToString();
      }

    }


    #if !SILVERLIGHT && !NETFX_CORE
    [Serializable]
    #endif
    public partial class refreshAuthentication_result : TBase
    {
      private AuthenticationResult _success;
      private Evernote.EDAM.Error.EDAMUserException _userException;
      private Evernote.EDAM.Error.EDAMSystemException _systemException;

      public AuthenticationResult Success
      {
        get
        {
          return _success;
        }
        set
        {
          __isset.success = true;
          this._success = value;
        }
      }

      public Evernote.EDAM.Error.EDAMUserException UserException
      {
        get
        {
          return _userException;
        }
        set
        {
          __isset.userException = true;
          this._userException = value;
        }
      }

      public Evernote.EDAM.Error.EDAMSystemException SystemException
      {
        get
        {
          return _systemException;
        }
        set
        {
          __isset.systemException = true;
          this._systemException = value;
        }
      }


      public Isset __isset;
      #if !SILVERLIGHT && !NETFX_CORE
      [Serializable]
      #endif
      public struct Isset {
        public bool success;
        public bool userException;
        public bool systemException;
      }

      public refreshAuthentication_result() {
      }

      public void Read (TProtocol iprot)
      {
        TField field;
        iprot.ReadStructBegin();
        while (true)
        {
          field = iprot.ReadFieldBegin();
          if (field.Type == TType.Stop) { 
            break;
          }
          switch (field.ID)
          {
            case 0:
              if (field.Type == TType.Struct) {
                Success = new AuthenticationResult();
                Success.Read(iprot);
              } else { 
                TProtocolUtil.Skip(iprot, field.Type);
              }
              break;
            case 1:
              if (field.Type == TType.Struct) {
                UserException = new Evernote.EDAM.Error.EDAMUserException();
                UserException.Read(iprot);
              } else { 
                TProtocolUtil.Skip(iprot, field.Type);
              }
              break;
            case 2:
              if (field.Type == TType.Struct) {
                SystemException = new Evernote.EDAM.Error.EDAMSystemException();
                SystemException.Read(iprot);
              } else { 
                TProtocolUtil.Skip(iprot, field.Type);
              }
              break;
            default: 
              TProtocolUtil.Skip(iprot, field.Type);
              break;
          }
          iprot.ReadFieldEnd();
        }
        iprot.ReadStructEnd();
      }

      public void Write(TProtocol oprot) {
        TStruct struc = new TStruct("refreshAuthentication_result");
        oprot.WriteStructBegin(struc);
        TField field = new TField();

        if (this.__isset.success) {
          if (Success != null) {
            field.Name = "Success";
            field.Type = TType.Struct;
            field.ID = 0;
            oprot.WriteFieldBegin(field);
            Success.Write(oprot);
            oprot.WriteFieldEnd();
          }
        } else if (this.__isset.userException) {
          if (UserException != null) {
            field.Name = "UserException";
            field.Type = TType.Struct;
            field.ID = 1;
            oprot.WriteFieldBegin(field);
            UserException.Write(oprot);
            oprot.WriteFieldEnd();
          }
        } else if (this.__isset.systemException) {
          if (SystemException != null) {
            field.Name = "SystemException";
            field.Type = TType.Struct;
            field.ID = 2;
            oprot.WriteFieldBegin(field);
            SystemException.Write(oprot);
            oprot.WriteFieldEnd();
          }
        }
        oprot.WriteFieldStop();
        oprot.WriteStructEnd();
      }

      public override string ToString() {
        StringBuilder sb = new StringBuilder("refreshAuthentication_result(");
        sb.Append("Success: ");
        sb.Append(Success== null ? "<null>" : Success.ToString());
        sb.Append(",UserException: ");
        sb.Append(UserException== null ? "<null>" : UserException.ToString());
        sb.Append(",SystemException: ");
        sb.Append(SystemException== null ? "<null>" : SystemException.ToString());
        sb.Append(")");
        return sb.ToString();
      }

    }


    #if !SILVERLIGHT && !NETFX_CORE
    [Serializable]
    #endif
    public partial class getUser_args : TBase
    {
      private string _authenticationToken;

      public string AuthenticationToken
      {
        get
        {
          return _authenticationToken;
        }
        set
        {
          __isset.authenticationToken = true;
          this._authenticationToken = value;
        }
      }


      public Isset __isset;
      #if !SILVERLIGHT && !NETFX_CORE
      [Serializable]
      #endif
      public struct Isset {
        public bool authenticationToken;
      }

      public getUser_args() {
      }

      public void Read (TProtocol iprot)
      {
        TField field;
        iprot.ReadStructBegin();
        while (true)
        {
          field = iprot.ReadFieldBegin();
          if (field.Type == TType.Stop) { 
            break;
          }
          switch (field.ID)
          {
            case 1:
              if (field.Type == TType.String) {
                AuthenticationToken = iprot.ReadString();
              } else { 
                TProtocolUtil.Skip(iprot, field.Type);
              }
              break;
            default: 
              TProtocolUtil.Skip(iprot, field.Type);
              break;
          }
          iprot.ReadFieldEnd();
        }
        iprot.ReadStructEnd();
      }

      public void Write(TProtocol oprot) {
        TStruct struc = new TStruct("getUser_args");
        oprot.WriteStructBegin(struc);
        TField field = new TField();
        if (AuthenticationToken != null && __isset.authenticationToken) {
          field.Name = "authenticationToken";
          field.Type = TType.String;
          field.ID = 1;
          oprot.WriteFieldBegin(field);
          oprot.WriteString(AuthenticationToken);
          oprot.WriteFieldEnd();
        }
        oprot.WriteFieldStop();
        oprot.WriteStructEnd();
      }

      public override string ToString() {
        StringBuilder sb = new StringBuilder("getUser_args(");
        sb.Append("AuthenticationToken: ");
        sb.Append(AuthenticationToken);
        sb.Append(")");
        return sb.ToString();
      }

    }


    #if !SILVERLIGHT && !NETFX_CORE
    [Serializable]
    #endif
    public partial class getUser_result : TBase
    {
      private Evernote.EDAM.Type.User _success;
      private Evernote.EDAM.Error.EDAMUserException _userException;
      private Evernote.EDAM.Error.EDAMSystemException _systemException;

      public Evernote.EDAM.Type.User Success
      {
        get
        {
          return _success;
        }
        set
        {
          __isset.success = true;
          this._success = value;
        }
      }

      public Evernote.EDAM.Error.EDAMUserException UserException
      {
        get
        {
          return _userException;
        }
        set
        {
          __isset.userException = true;
          this._userException = value;
        }
      }

      public Evernote.EDAM.Error.EDAMSystemException SystemException
      {
        get
        {
          return _systemException;
        }
        set
        {
          __isset.systemException = true;
          this._systemException = value;
        }
      }


      public Isset __isset;
      #if !SILVERLIGHT && !NETFX_CORE
      [Serializable]
      #endif
      public struct Isset {
        public bool success;
        public bool userException;
        public bool systemException;
      }

      public getUser_result() {
      }

      public void Read (TProtocol iprot)
      {
        TField field;
        iprot.ReadStructBegin();
        while (true)
        {
          field = iprot.ReadFieldBegin();
          if (field.Type == TType.Stop) { 
            break;
          }
          switch (field.ID)
          {
            case 0:
              if (field.Type == TType.Struct) {
                Success = new Evernote.EDAM.Type.User();
                Success.Read(iprot);
              } else { 
                TProtocolUtil.Skip(iprot, field.Type);
              }
              break;
            case 1:
              if (field.Type == TType.Struct) {
                UserException = new Evernote.EDAM.Error.EDAMUserException();
                UserException.Read(iprot);
              } else { 
                TProtocolUtil.Skip(iprot, field.Type);
              }
              break;
            case 2:
              if (field.Type == TType.Struct) {
                SystemException = new Evernote.EDAM.Error.EDAMSystemException();
                SystemException.Read(iprot);
              } else { 
                TProtocolUtil.Skip(iprot, field.Type);
              }
              break;
            default: 
              TProtocolUtil.Skip(iprot, field.Type);
              break;
          }
          iprot.ReadFieldEnd();
        }
        iprot.ReadStructEnd();
      }

      public void Write(TProtocol oprot) {
        TStruct struc = new TStruct("getUser_result");
        oprot.WriteStructBegin(struc);
        TField field = new TField();

        if (this.__isset.success) {
          if (Success != null) {
            field.Name = "Success";
            field.Type = TType.Struct;
            field.ID = 0;
            oprot.WriteFieldBegin(field);
            Success.Write(oprot);
            oprot.WriteFieldEnd();
          }
        } else if (this.__isset.userException) {
          if (UserException != null) {
            field.Name = "UserException";
            field.Type = TType.Struct;
            field.ID = 1;
            oprot.WriteFieldBegin(field);
            UserException.Write(oprot);
            oprot.WriteFieldEnd();
          }
        } else if (this.__isset.systemException) {
          if (SystemException != null) {
            field.Name = "SystemException";
            field.Type = TType.Struct;
            field.ID = 2;
            oprot.WriteFieldBegin(field);
            SystemException.Write(oprot);
            oprot.WriteFieldEnd();
          }
        }
        oprot.WriteFieldStop();
        oprot.WriteStructEnd();
      }

      public override string ToString() {
        StringBuilder sb = new StringBuilder("getUser_result(");
        sb.Append("Success: ");
        sb.Append(Success== null ? "<null>" : Success.ToString());
        sb.Append(",UserException: ");
        sb.Append(UserException== null ? "<null>" : UserException.ToString());
        sb.Append(",SystemException: ");
        sb.Append(SystemException== null ? "<null>" : SystemException.ToString());
        sb.Append(")");
        return sb.ToString();
      }

    }


    #if !SILVERLIGHT && !NETFX_CORE
    [Serializable]
    #endif
    public partial class getPublicUserInfo_args : TBase
    {
      private string _username;

      public string Username
      {
        get
        {
          return _username;
        }
        set
        {
          __isset.username = true;
          this._username = value;
        }
      }


      public Isset __isset;
      #if !SILVERLIGHT && !NETFX_CORE
      [Serializable]
      #endif
      public struct Isset {
        public bool username;
      }

      public getPublicUserInfo_args() {
      }

      public void Read (TProtocol iprot)
      {
        TField field;
        iprot.ReadStructBegin();
        while (true)
        {
          field = iprot.ReadFieldBegin();
          if (field.Type == TType.Stop) { 
            break;
          }
          switch (field.ID)
          {
            case 1:
              if (field.Type == TType.String) {
                Username = iprot.ReadString();
              } else { 
                TProtocolUtil.Skip(iprot, field.Type);
              }
              break;
            default: 
              TProtocolUtil.Skip(iprot, field.Type);
              break;
          }
          iprot.ReadFieldEnd();
        }
        iprot.ReadStructEnd();
      }

      public void Write(TProtocol oprot) {
        TStruct struc = new TStruct("getPublicUserInfo_args");
        oprot.WriteStructBegin(struc);
        TField field = new TField();
        if (Username != null && __isset.username) {
          field.Name = "username";
          field.Type = TType.String;
          field.ID = 1;
          oprot.WriteFieldBegin(field);
          oprot.WriteString(Username);
          oprot.WriteFieldEnd();
        }
        oprot.WriteFieldStop();
        oprot.WriteStructEnd();
      }

      public override string ToString() {
        StringBuilder sb = new StringBuilder("getPublicUserInfo_args(");
        sb.Append("Username: ");
        sb.Append(Username);
        sb.Append(")");
        return sb.ToString();
      }

    }


    #if !SILVERLIGHT && !NETFX_CORE
    [Serializable]
    #endif
    public partial class getPublicUserInfo_result : TBase
    {
      private PublicUserInfo _success;
      private Evernote.EDAM.Error.EDAMNotFoundException _notFoundException;
      private Evernote.EDAM.Error.EDAMSystemException _systemException;
      private Evernote.EDAM.Error.EDAMUserException _userException;

      public PublicUserInfo Success
      {
        get
        {
          return _success;
        }
        set
        {
          __isset.success = true;
          this._success = value;
        }
      }

      public Evernote.EDAM.Error.EDAMNotFoundException NotFoundException
      {
        get
        {
          return _notFoundException;
        }
        set
        {
          __isset.notFoundException = true;
          this._notFoundException = value;
        }
      }

      public Evernote.EDAM.Error.EDAMSystemException SystemException
      {
        get
        {
          return _systemException;
        }
        set
        {
          __isset.systemException = true;
          this._systemException = value;
        }
      }

      public Evernote.EDAM.Error.EDAMUserException UserException
      {
        get
        {
          return _userException;
        }
        set
        {
          __isset.userException = true;
          this._userException = value;
        }
      }


      public Isset __isset;
      #if !SILVERLIGHT && !NETFX_CORE
      [Serializable]
      #endif
      public struct Isset {
        public bool success;
        public bool notFoundException;
        public bool systemException;
        public bool userException;
      }

      public getPublicUserInfo_result() {
      }

      public void Read (TProtocol iprot)
      {
        TField field;
        iprot.ReadStructBegin();
        while (true)
        {
          field = iprot.ReadFieldBegin();
          if (field.Type == TType.Stop) { 
            break;
          }
          switch (field.ID)
          {
            case 0:
              if (field.Type == TType.Struct) {
                Success = new PublicUserInfo();
                Success.Read(iprot);
              } else { 
                TProtocolUtil.Skip(iprot, field.Type);
              }
              break;
            case 1:
              if (field.Type == TType.Struct) {
                NotFoundException = new Evernote.EDAM.Error.EDAMNotFoundException();
                NotFoundException.Read(iprot);
              } else { 
                TProtocolUtil.Skip(iprot, field.Type);
              }
              break;
            case 2:
              if (field.Type == TType.Struct) {
                SystemException = new Evernote.EDAM.Error.EDAMSystemException();
                SystemException.Read(iprot);
              } else { 
                TProtocolUtil.Skip(iprot, field.Type);
              }
              break;
            case 3:
              if (field.Type == TType.Struct) {
                UserException = new Evernote.EDAM.Error.EDAMUserException();
                UserException.Read(iprot);
              } else { 
                TProtocolUtil.Skip(iprot, field.Type);
              }
              break;
            default: 
              TProtocolUtil.Skip(iprot, field.Type);
              break;
          }
          iprot.ReadFieldEnd();
        }
        iprot.ReadStructEnd();
      }

      public void Write(TProtocol oprot) {
        TStruct struc = new TStruct("getPublicUserInfo_result");
        oprot.WriteStructBegin(struc);
        TField field = new TField();

        if (this.__isset.success) {
          if (Success != null) {
            field.Name = "Success";
            field.Type = TType.Struct;
            field.ID = 0;
            oprot.WriteFieldBegin(field);
            Success.Write(oprot);
            oprot.WriteFieldEnd();
          }
        } else if (this.__isset.notFoundException) {
          if (NotFoundException != null) {
            field.Name = "NotFoundException";
            field.Type = TType.Struct;
            field.ID = 1;
            oprot.WriteFieldBegin(field);
            NotFoundException.Write(oprot);
            oprot.WriteFieldEnd();
          }
        } else if (this.__isset.systemException) {
          if (SystemException != null) {
            field.Name = "SystemException";
            field.Type = TType.Struct;
            field.ID = 2;
            oprot.WriteFieldBegin(field);
            SystemException.Write(oprot);
            oprot.WriteFieldEnd();
          }
        } else if (this.__isset.userException) {
          if (UserException != null) {
            field.Name = "UserException";
            field.Type = TType.Struct;
            field.ID = 3;
            oprot.WriteFieldBegin(field);
            UserException.Write(oprot);
            oprot.WriteFieldEnd();
          }
        }
        oprot.WriteFieldStop();
        oprot.WriteStructEnd();
      }

      public override string ToString() {
        StringBuilder sb = new StringBuilder("getPublicUserInfo_result(");
        sb.Append("Success: ");
        sb.Append(Success== null ? "<null>" : Success.ToString());
        sb.Append(",NotFoundException: ");
        sb.Append(NotFoundException== null ? "<null>" : NotFoundException.ToString());
        sb.Append(",SystemException: ");
        sb.Append(SystemException== null ? "<null>" : SystemException.ToString());
        sb.Append(",UserException: ");
        sb.Append(UserException== null ? "<null>" : UserException.ToString());
        sb.Append(")");
        return sb.ToString();
      }

    }


    #if !SILVERLIGHT && !NETFX_CORE
    [Serializable]
    #endif
    public partial class getPremiumInfo_args : TBase
    {
      private string _authenticationToken;

      public string AuthenticationToken
      {
        get
        {
          return _authenticationToken;
        }
        set
        {
          __isset.authenticationToken = true;
          this._authenticationToken = value;
        }
      }


      public Isset __isset;
      #if !SILVERLIGHT && !NETFX_CORE
      [Serializable]
      #endif
      public struct Isset {
        public bool authenticationToken;
      }

      public getPremiumInfo_args() {
      }

      public void Read (TProtocol iprot)
      {
        TField field;
        iprot.ReadStructBegin();
        while (true)
        {
          field = iprot.ReadFieldBegin();
          if (field.Type == TType.Stop) { 
            break;
          }
          switch (field.ID)
          {
            case 1:
              if (field.Type == TType.String) {
                AuthenticationToken = iprot.ReadString();
              } else { 
                TProtocolUtil.Skip(iprot, field.Type);
              }
              break;
            default: 
              TProtocolUtil.Skip(iprot, field.Type);
              break;
          }
          iprot.ReadFieldEnd();
        }
        iprot.ReadStructEnd();
      }

      public void Write(TProtocol oprot) {
        TStruct struc = new TStruct("getPremiumInfo_args");
        oprot.WriteStructBegin(struc);
        TField field = new TField();
        if (AuthenticationToken != null && __isset.authenticationToken) {
          field.Name = "authenticationToken";
          field.Type = TType.String;
          field.ID = 1;
          oprot.WriteFieldBegin(field);
          oprot.WriteString(AuthenticationToken);
          oprot.WriteFieldEnd();
        }
        oprot.WriteFieldStop();
        oprot.WriteStructEnd();
      }

      public override string ToString() {
        StringBuilder sb = new StringBuilder("getPremiumInfo_args(");
        sb.Append("AuthenticationToken: ");
        sb.Append(AuthenticationToken);
        sb.Append(")");
        return sb.ToString();
      }

    }


    #if !SILVERLIGHT && !NETFX_CORE
    [Serializable]
    #endif
    public partial class getPremiumInfo_result : TBase
    {
      private Evernote.EDAM.Type.PremiumInfo _success;
      private Evernote.EDAM.Error.EDAMUserException _userException;
      private Evernote.EDAM.Error.EDAMSystemException _systemException;

      public Evernote.EDAM.Type.PremiumInfo Success
      {
        get
        {
          return _success;
        }
        set
        {
          __isset.success = true;
          this._success = value;
        }
      }

      public Evernote.EDAM.Error.EDAMUserException UserException
      {
        get
        {
          return _userException;
        }
        set
        {
          __isset.userException = true;
          this._userException = value;
        }
      }

      public Evernote.EDAM.Error.EDAMSystemException SystemException
      {
        get
        {
          return _systemException;
        }
        set
        {
          __isset.systemException = true;
          this._systemException = value;
        }
      }


      public Isset __isset;
      #if !SILVERLIGHT && !NETFX_CORE
      [Serializable]
      #endif
      public struct Isset {
        public bool success;
        public bool userException;
        public bool systemException;
      }

      public getPremiumInfo_result() {
      }

      public void Read (TProtocol iprot)
      {
        TField field;
        iprot.ReadStructBegin();
        while (true)
        {
          field = iprot.ReadFieldBegin();
          if (field.Type == TType.Stop) { 
            break;
          }
          switch (field.ID)
          {
            case 0:
              if (field.Type == TType.Struct) {
                Success = new Evernote.EDAM.Type.PremiumInfo();
                Success.Read(iprot);
              } else { 
                TProtocolUtil.Skip(iprot, field.Type);
              }
              break;
            case 1:
              if (field.Type == TType.Struct) {
                UserException = new Evernote.EDAM.Error.EDAMUserException();
                UserException.Read(iprot);
              } else { 
                TProtocolUtil.Skip(iprot, field.Type);
              }
              break;
            case 2:
              if (field.Type == TType.Struct) {
                SystemException = new Evernote.EDAM.Error.EDAMSystemException();
                SystemException.Read(iprot);
              } else { 
                TProtocolUtil.Skip(iprot, field.Type);
              }
              break;
            default: 
              TProtocolUtil.Skip(iprot, field.Type);
              break;
          }
          iprot.ReadFieldEnd();
        }
        iprot.ReadStructEnd();
      }

      public void Write(TProtocol oprot) {
        TStruct struc = new TStruct("getPremiumInfo_result");
        oprot.WriteStructBegin(struc);
        TField field = new TField();

        if (this.__isset.success) {
          if (Success != null) {
            field.Name = "Success";
            field.Type = TType.Struct;
            field.ID = 0;
            oprot.WriteFieldBegin(field);
            Success.Write(oprot);
            oprot.WriteFieldEnd();
          }
        } else if (this.__isset.userException) {
          if (UserException != null) {
            field.Name = "UserException";
            field.Type = TType.Struct;
            field.ID = 1;
            oprot.WriteFieldBegin(field);
            UserException.Write(oprot);
            oprot.WriteFieldEnd();
          }
        } else if (this.__isset.systemException) {
          if (SystemException != null) {
            field.Name = "SystemException";
            field.Type = TType.Struct;
            field.ID = 2;
            oprot.WriteFieldBegin(field);
            SystemException.Write(oprot);
            oprot.WriteFieldEnd();
          }
        }
        oprot.WriteFieldStop();
        oprot.WriteStructEnd();
      }

      public override string ToString() {
        StringBuilder sb = new StringBuilder("getPremiumInfo_result(");
        sb.Append("Success: ");
        sb.Append(Success== null ? "<null>" : Success.ToString());
        sb.Append(",UserException: ");
        sb.Append(UserException== null ? "<null>" : UserException.ToString());
        sb.Append(",SystemException: ");
        sb.Append(SystemException== null ? "<null>" : SystemException.ToString());
        sb.Append(")");
        return sb.ToString();
      }

    }


    #if !SILVERLIGHT && !NETFX_CORE
    [Serializable]
    #endif
    public partial class getNoteStoreUrl_args : TBase
    {
      private string _authenticationToken;

      public string AuthenticationToken
      {
        get
        {
          return _authenticationToken;
        }
        set
        {
          __isset.authenticationToken = true;
          this._authenticationToken = value;
        }
      }


      public Isset __isset;
      #if !SILVERLIGHT && !NETFX_CORE
      [Serializable]
      #endif
      public struct Isset {
        public bool authenticationToken;
      }

      public getNoteStoreUrl_args() {
      }

      public void Read (TProtocol iprot)
      {
        TField field;
        iprot.ReadStructBegin();
        while (true)
        {
          field = iprot.ReadFieldBegin();
          if (field.Type == TType.Stop) { 
            break;
          }
          switch (field.ID)
          {
            case 1:
              if (field.Type == TType.String) {
                AuthenticationToken = iprot.ReadString();
              } else { 
                TProtocolUtil.Skip(iprot, field.Type);
              }
              break;
            default: 
              TProtocolUtil.Skip(iprot, field.Type);
              break;
          }
          iprot.ReadFieldEnd();
        }
        iprot.ReadStructEnd();
      }

      public void Write(TProtocol oprot) {
        TStruct struc = new TStruct("getNoteStoreUrl_args");
        oprot.WriteStructBegin(struc);
        TField field = new TField();
        if (AuthenticationToken != null && __isset.authenticationToken) {
          field.Name = "authenticationToken";
          field.Type = TType.String;
          field.ID = 1;
          oprot.WriteFieldBegin(field);
          oprot.WriteString(AuthenticationToken);
          oprot.WriteFieldEnd();
        }
        oprot.WriteFieldStop();
        oprot.WriteStructEnd();
      }

      public override string ToString() {
        StringBuilder sb = new StringBuilder("getNoteStoreUrl_args(");
        sb.Append("AuthenticationToken: ");
        sb.Append(AuthenticationToken);
        sb.Append(")");
        return sb.ToString();
      }

    }


    #if !SILVERLIGHT && !NETFX_CORE
    [Serializable]
    #endif
    public partial class getNoteStoreUrl_result : TBase
    {
      private string _success;
      private Evernote.EDAM.Error.EDAMUserException _userException;
      private Evernote.EDAM.Error.EDAMSystemException _systemException;

      public string Success
      {
        get
        {
          return _success;
        }
        set
        {
          __isset.success = true;
          this._success = value;
        }
      }

      public Evernote.EDAM.Error.EDAMUserException UserException
      {
        get
        {
          return _userException;
        }
        set
        {
          __isset.userException = true;
          this._userException = value;
        }
      }

      public Evernote.EDAM.Error.EDAMSystemException SystemException
      {
        get
        {
          return _systemException;
        }
        set
        {
          __isset.systemException = true;
          this._systemException = value;
        }
      }


      public Isset __isset;
      #if !SILVERLIGHT && !NETFX_CORE
      [Serializable]
      #endif
      public struct Isset {
        public bool success;
        public bool userException;
        public bool systemException;
      }

      public getNoteStoreUrl_result() {
      }

      public void Read (TProtocol iprot)
      {
        TField field;
        iprot.ReadStructBegin();
        while (true)
        {
          field = iprot.ReadFieldBegin();
          if (field.Type == TType.Stop) { 
            break;
          }
          switch (field.ID)
          {
            case 0:
              if (field.Type == TType.String) {
                Success = iprot.ReadString();
              } else { 
                TProtocolUtil.Skip(iprot, field.Type);
              }
              break;
            case 1:
              if (field.Type == TType.Struct) {
                UserException = new Evernote.EDAM.Error.EDAMUserException();
                UserException.Read(iprot);
              } else { 
                TProtocolUtil.Skip(iprot, field.Type);
              }
              break;
            case 2:
              if (field.Type == TType.Struct) {
                SystemException = new Evernote.EDAM.Error.EDAMSystemException();
                SystemException.Read(iprot);
              } else { 
                TProtocolUtil.Skip(iprot, field.Type);
              }
              break;
            default: 
              TProtocolUtil.Skip(iprot, field.Type);
              break;
          }
          iprot.ReadFieldEnd();
        }
        iprot.ReadStructEnd();
      }

      public void Write(TProtocol oprot) {
        TStruct struc = new TStruct("getNoteStoreUrl_result");
        oprot.WriteStructBegin(struc);
        TField field = new TField();

        if (this.__isset.success) {
          if (Success != null) {
            field.Name = "Success";
            field.Type = TType.String;
            field.ID = 0;
            oprot.WriteFieldBegin(field);
            oprot.WriteString(Success);
            oprot.WriteFieldEnd();
          }
        } else if (this.__isset.userException) {
          if (UserException != null) {
            field.Name = "UserException";
            field.Type = TType.Struct;
            field.ID = 1;
            oprot.WriteFieldBegin(field);
            UserException.Write(oprot);
            oprot.WriteFieldEnd();
          }
        } else if (this.__isset.systemException) {
          if (SystemException != null) {
            field.Name = "SystemException";
            field.Type = TType.Struct;
            field.ID = 2;
            oprot.WriteFieldBegin(field);
            SystemException.Write(oprot);
            oprot.WriteFieldEnd();
          }
        }
        oprot.WriteFieldStop();
        oprot.WriteStructEnd();
      }

      public override string ToString() {
        StringBuilder sb = new StringBuilder("getNoteStoreUrl_result(");
        sb.Append("Success: ");
        sb.Append(Success);
        sb.Append(",UserException: ");
        sb.Append(UserException== null ? "<null>" : UserException.ToString());
        sb.Append(",SystemException: ");
        sb.Append(SystemException== null ? "<null>" : SystemException.ToString());
        sb.Append(")");
        return sb.ToString();
      }

    }

  }
}
