#
# Autogenerated by Thrift Compiler (0.5.0-en-exported)
#
# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
#

require 'thrift'
require 'user_store_types'

module Evernote
  module EDAM
    module UserStore
      module UserStore
        class Client
          include ::Thrift::Client

          def checkVersion(clientName, edamVersionMajor, edamVersionMinor)
            send_checkVersion(clientName, edamVersionMajor, edamVersionMinor)
            return recv_checkVersion()
          end

          def send_checkVersion(clientName, edamVersionMajor, edamVersionMinor)
            send_message('checkVersion', CheckVersion_args, :clientName => clientName, :edamVersionMajor => edamVersionMajor, :edamVersionMinor => edamVersionMinor)
          end

          def recv_checkVersion()
            result = receive_message(CheckVersion_result)
            return result.success unless result.success.nil?
            raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'checkVersion failed: unknown result')
          end

          def getBootstrapInfo(locale)
            send_getBootstrapInfo(locale)
            return recv_getBootstrapInfo()
          end

          def send_getBootstrapInfo(locale)
            send_message('getBootstrapInfo', GetBootstrapInfo_args, :locale => locale)
          end

          def recv_getBootstrapInfo()
            result = receive_message(GetBootstrapInfo_result)
            return result.success unless result.success.nil?
            raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'getBootstrapInfo failed: unknown result')
          end

          def authenticate(username, password, consumerKey, consumerSecret, supportsTwoFactor)
            send_authenticate(username, password, consumerKey, consumerSecret, supportsTwoFactor)
            return recv_authenticate()
          end

          def send_authenticate(username, password, consumerKey, consumerSecret, supportsTwoFactor)
            send_message('authenticate', Authenticate_args, :username => username, :password => password, :consumerKey => consumerKey, :consumerSecret => consumerSecret, :supportsTwoFactor => supportsTwoFactor)
          end

          def recv_authenticate()
            result = receive_message(Authenticate_result)
            return result.success unless result.success.nil?
            raise result.userException unless result.userException.nil?
            raise result.systemException unless result.systemException.nil?
            raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'authenticate failed: unknown result')
          end

          def authenticateLongSession(username, password, consumerKey, consumerSecret, deviceIdentifier, deviceDescription, supportsTwoFactor)
            send_authenticateLongSession(username, password, consumerKey, consumerSecret, deviceIdentifier, deviceDescription, supportsTwoFactor)
            return recv_authenticateLongSession()
          end

          def send_authenticateLongSession(username, password, consumerKey, consumerSecret, deviceIdentifier, deviceDescription, supportsTwoFactor)
            send_message('authenticateLongSession', AuthenticateLongSession_args, :username => username, :password => password, :consumerKey => consumerKey, :consumerSecret => consumerSecret, :deviceIdentifier => deviceIdentifier, :deviceDescription => deviceDescription, :supportsTwoFactor => supportsTwoFactor)
          end

          def recv_authenticateLongSession()
            result = receive_message(AuthenticateLongSession_result)
            return result.success unless result.success.nil?
            raise result.userException unless result.userException.nil?
            raise result.systemException unless result.systemException.nil?
            raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'authenticateLongSession failed: unknown result')
          end

          def completeTwoFactorAuthentication(authenticationToken, oneTimeCode, deviceIdentifier, deviceDescription)
            send_completeTwoFactorAuthentication(authenticationToken, oneTimeCode, deviceIdentifier, deviceDescription)
            return recv_completeTwoFactorAuthentication()
          end

          def send_completeTwoFactorAuthentication(authenticationToken, oneTimeCode, deviceIdentifier, deviceDescription)
            send_message('completeTwoFactorAuthentication', CompleteTwoFactorAuthentication_args, :authenticationToken => authenticationToken, :oneTimeCode => oneTimeCode, :deviceIdentifier => deviceIdentifier, :deviceDescription => deviceDescription)
          end

          def recv_completeTwoFactorAuthentication()
            result = receive_message(CompleteTwoFactorAuthentication_result)
            return result.success unless result.success.nil?
            raise result.userException unless result.userException.nil?
            raise result.systemException unless result.systemException.nil?
            raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'completeTwoFactorAuthentication failed: unknown result')
          end

          def revokeLongSession(authenticationToken)
            send_revokeLongSession(authenticationToken)
            recv_revokeLongSession()
          end

          def send_revokeLongSession(authenticationToken)
            send_message('revokeLongSession', RevokeLongSession_args, :authenticationToken => authenticationToken)
          end

          def recv_revokeLongSession()
            result = receive_message(RevokeLongSession_result)
            raise result.userException unless result.userException.nil?
            raise result.systemException unless result.systemException.nil?
            return
          end

          def authenticateToBusiness(authenticationToken)
            send_authenticateToBusiness(authenticationToken)
            return recv_authenticateToBusiness()
          end

          def send_authenticateToBusiness(authenticationToken)
            send_message('authenticateToBusiness', AuthenticateToBusiness_args, :authenticationToken => authenticationToken)
          end

          def recv_authenticateToBusiness()
            result = receive_message(AuthenticateToBusiness_result)
            return result.success unless result.success.nil?
            raise result.userException unless result.userException.nil?
            raise result.systemException unless result.systemException.nil?
            raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'authenticateToBusiness failed: unknown result')
          end

          def refreshAuthentication(authenticationToken)
            send_refreshAuthentication(authenticationToken)
            return recv_refreshAuthentication()
          end

          def send_refreshAuthentication(authenticationToken)
            send_message('refreshAuthentication', RefreshAuthentication_args, :authenticationToken => authenticationToken)
          end

          def recv_refreshAuthentication()
            result = receive_message(RefreshAuthentication_result)
            return result.success unless result.success.nil?
            raise result.userException unless result.userException.nil?
            raise result.systemException unless result.systemException.nil?
            raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'refreshAuthentication failed: unknown result')
          end

          def getUser(authenticationToken)
            send_getUser(authenticationToken)
            return recv_getUser()
          end

          def send_getUser(authenticationToken)
            send_message('getUser', GetUser_args, :authenticationToken => authenticationToken)
          end

          def recv_getUser()
            result = receive_message(GetUser_result)
            return result.success unless result.success.nil?
            raise result.userException unless result.userException.nil?
            raise result.systemException unless result.systemException.nil?
            raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'getUser failed: unknown result')
          end

          def getPublicUserInfo(username)
            send_getPublicUserInfo(username)
            return recv_getPublicUserInfo()
          end

          def send_getPublicUserInfo(username)
            send_message('getPublicUserInfo', GetPublicUserInfo_args, :username => username)
          end

          def recv_getPublicUserInfo()
            result = receive_message(GetPublicUserInfo_result)
            return result.success unless result.success.nil?
            raise result.notFoundException unless result.notFoundException.nil?
            raise result.systemException unless result.systemException.nil?
            raise result.userException unless result.userException.nil?
            raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'getPublicUserInfo failed: unknown result')
          end

          def getPremiumInfo(authenticationToken)
            send_getPremiumInfo(authenticationToken)
            return recv_getPremiumInfo()
          end

          def send_getPremiumInfo(authenticationToken)
            send_message('getPremiumInfo', GetPremiumInfo_args, :authenticationToken => authenticationToken)
          end

          def recv_getPremiumInfo()
            result = receive_message(GetPremiumInfo_result)
            return result.success unless result.success.nil?
            raise result.userException unless result.userException.nil?
            raise result.systemException unless result.systemException.nil?
            raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'getPremiumInfo failed: unknown result')
          end

          def getNoteStoreUrl(authenticationToken)
            send_getNoteStoreUrl(authenticationToken)
            return recv_getNoteStoreUrl()
          end

          def send_getNoteStoreUrl(authenticationToken)
            send_message('getNoteStoreUrl', GetNoteStoreUrl_args, :authenticationToken => authenticationToken)
          end

          def recv_getNoteStoreUrl()
            result = receive_message(GetNoteStoreUrl_result)
            return result.success unless result.success.nil?
            raise result.userException unless result.userException.nil?
            raise result.systemException unless result.systemException.nil?
            raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'getNoteStoreUrl failed: unknown result')
          end

        end

        class Processor
          include ::Thrift::Processor

          def process_checkVersion(seqid, iprot, oprot)
            args = read_args(iprot, CheckVersion_args)
            result = CheckVersion_result.new()
            result.success = @handler.checkVersion(args.clientName, args.edamVersionMajor, args.edamVersionMinor)
            write_result(result, oprot, 'checkVersion', seqid)
          end

          def process_getBootstrapInfo(seqid, iprot, oprot)
            args = read_args(iprot, GetBootstrapInfo_args)
            result = GetBootstrapInfo_result.new()
            result.success = @handler.getBootstrapInfo(args.locale)
            write_result(result, oprot, 'getBootstrapInfo', seqid)
          end

          def process_authenticate(seqid, iprot, oprot)
            args = read_args(iprot, Authenticate_args)
            result = Authenticate_result.new()
            begin
              result.success = @handler.authenticate(args.username, args.password, args.consumerKey, args.consumerSecret, args.supportsTwoFactor)
            rescue ::Evernote::EDAM::Error::EDAMUserException => userException
              result.userException = userException
            rescue ::Evernote::EDAM::Error::EDAMSystemException => systemException
              result.systemException = systemException
            end
            write_result(result, oprot, 'authenticate', seqid)
          end

          def process_authenticateLongSession(seqid, iprot, oprot)
            args = read_args(iprot, AuthenticateLongSession_args)
            result = AuthenticateLongSession_result.new()
            begin
              result.success = @handler.authenticateLongSession(args.username, args.password, args.consumerKey, args.consumerSecret, args.deviceIdentifier, args.deviceDescription, args.supportsTwoFactor)
            rescue ::Evernote::EDAM::Error::EDAMUserException => userException
              result.userException = userException
            rescue ::Evernote::EDAM::Error::EDAMSystemException => systemException
              result.systemException = systemException
            end
            write_result(result, oprot, 'authenticateLongSession', seqid)
          end

          def process_completeTwoFactorAuthentication(seqid, iprot, oprot)
            args = read_args(iprot, CompleteTwoFactorAuthentication_args)
            result = CompleteTwoFactorAuthentication_result.new()
            begin
              result.success = @handler.completeTwoFactorAuthentication(args.authenticationToken, args.oneTimeCode, args.deviceIdentifier, args.deviceDescription)
            rescue ::Evernote::EDAM::Error::EDAMUserException => userException
              result.userException = userException
            rescue ::Evernote::EDAM::Error::EDAMSystemException => systemException
              result.systemException = systemException
            end
            write_result(result, oprot, 'completeTwoFactorAuthentication', seqid)
          end

          def process_revokeLongSession(seqid, iprot, oprot)
            args = read_args(iprot, RevokeLongSession_args)
            result = RevokeLongSession_result.new()
            begin
              @handler.revokeLongSession(args.authenticationToken)
            rescue ::Evernote::EDAM::Error::EDAMUserException => userException
              result.userException = userException
            rescue ::Evernote::EDAM::Error::EDAMSystemException => systemException
              result.systemException = systemException
            end
            write_result(result, oprot, 'revokeLongSession', seqid)
          end

          def process_authenticateToBusiness(seqid, iprot, oprot)
            args = read_args(iprot, AuthenticateToBusiness_args)
            result = AuthenticateToBusiness_result.new()
            begin
              result.success = @handler.authenticateToBusiness(args.authenticationToken)
            rescue ::Evernote::EDAM::Error::EDAMUserException => userException
              result.userException = userException
            rescue ::Evernote::EDAM::Error::EDAMSystemException => systemException
              result.systemException = systemException
            end
            write_result(result, oprot, 'authenticateToBusiness', seqid)
          end

          def process_refreshAuthentication(seqid, iprot, oprot)
            args = read_args(iprot, RefreshAuthentication_args)
            result = RefreshAuthentication_result.new()
            begin
              result.success = @handler.refreshAuthentication(args.authenticationToken)
            rescue ::Evernote::EDAM::Error::EDAMUserException => userException
              result.userException = userException
            rescue ::Evernote::EDAM::Error::EDAMSystemException => systemException
              result.systemException = systemException
            end
            write_result(result, oprot, 'refreshAuthentication', seqid)
          end

          def process_getUser(seqid, iprot, oprot)
            args = read_args(iprot, GetUser_args)
            result = GetUser_result.new()
            begin
              result.success = @handler.getUser(args.authenticationToken)
            rescue ::Evernote::EDAM::Error::EDAMUserException => userException
              result.userException = userException
            rescue ::Evernote::EDAM::Error::EDAMSystemException => systemException
              result.systemException = systemException
            end
            write_result(result, oprot, 'getUser', seqid)
          end

          def process_getPublicUserInfo(seqid, iprot, oprot)
            args = read_args(iprot, GetPublicUserInfo_args)
            result = GetPublicUserInfo_result.new()
            begin
              result.success = @handler.getPublicUserInfo(args.username)
            rescue ::Evernote::EDAM::Error::EDAMNotFoundException => notFoundException
              result.notFoundException = notFoundException
            rescue ::Evernote::EDAM::Error::EDAMSystemException => systemException
              result.systemException = systemException
            rescue ::Evernote::EDAM::Error::EDAMUserException => userException
              result.userException = userException
            end
            write_result(result, oprot, 'getPublicUserInfo', seqid)
          end

          def process_getPremiumInfo(seqid, iprot, oprot)
            args = read_args(iprot, GetPremiumInfo_args)
            result = GetPremiumInfo_result.new()
            begin
              result.success = @handler.getPremiumInfo(args.authenticationToken)
            rescue ::Evernote::EDAM::Error::EDAMUserException => userException
              result.userException = userException
            rescue ::Evernote::EDAM::Error::EDAMSystemException => systemException
              result.systemException = systemException
            end
            write_result(result, oprot, 'getPremiumInfo', seqid)
          end

          def process_getNoteStoreUrl(seqid, iprot, oprot)
            args = read_args(iprot, GetNoteStoreUrl_args)
            result = GetNoteStoreUrl_result.new()
            begin
              result.success = @handler.getNoteStoreUrl(args.authenticationToken)
            rescue ::Evernote::EDAM::Error::EDAMUserException => userException
              result.userException = userException
            rescue ::Evernote::EDAM::Error::EDAMSystemException => systemException
              result.systemException = systemException
            end
            write_result(result, oprot, 'getNoteStoreUrl', seqid)
          end

        end

        # HELPER FUNCTIONS AND STRUCTURES

        class CheckVersion_args
          include ::Thrift::Struct, ::Thrift::Struct_Union
          CLIENTNAME = 1
          EDAMVERSIONMAJOR = 2
          EDAMVERSIONMINOR = 3

          FIELDS = {
            CLIENTNAME => {:type => ::Thrift::Types::STRING, :name => 'clientName'},
            EDAMVERSIONMAJOR => {:type => ::Thrift::Types::I16, :name => 'edamVersionMajor', :default => 1},
            EDAMVERSIONMINOR => {:type => ::Thrift::Types::I16, :name => 'edamVersionMinor', :default => 25}
          }

          def struct_fields; FIELDS; end

          def validate
          end

          ::Thrift::Struct.generate_accessors self
        end

        class CheckVersion_result
          include ::Thrift::Struct, ::Thrift::Struct_Union
          SUCCESS = 0

          FIELDS = {
            SUCCESS => {:type => ::Thrift::Types::BOOL, :name => 'success'}
          }

          def struct_fields; FIELDS; end

          def validate
          end

          ::Thrift::Struct.generate_accessors self
        end

        class GetBootstrapInfo_args
          include ::Thrift::Struct, ::Thrift::Struct_Union
          LOCALE = 1

          FIELDS = {
            LOCALE => {:type => ::Thrift::Types::STRING, :name => 'locale'}
          }

          def struct_fields; FIELDS; end

          def validate
          end

          ::Thrift::Struct.generate_accessors self
        end

        class GetBootstrapInfo_result
          include ::Thrift::Struct, ::Thrift::Struct_Union
          SUCCESS = 0

          FIELDS = {
            SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::Evernote::EDAM::UserStore::BootstrapInfo}
          }

          def struct_fields; FIELDS; end

          def validate
          end

          ::Thrift::Struct.generate_accessors self
        end

        class Authenticate_args
          include ::Thrift::Struct, ::Thrift::Struct_Union
          USERNAME = 1
          PASSWORD = 2
          CONSUMERKEY = 3
          CONSUMERSECRET = 4
          SUPPORTSTWOFACTOR = 5

          FIELDS = {
            USERNAME => {:type => ::Thrift::Types::STRING, :name => 'username'},
            PASSWORD => {:type => ::Thrift::Types::STRING, :name => 'password'},
            CONSUMERKEY => {:type => ::Thrift::Types::STRING, :name => 'consumerKey'},
            CONSUMERSECRET => {:type => ::Thrift::Types::STRING, :name => 'consumerSecret'},
            SUPPORTSTWOFACTOR => {:type => ::Thrift::Types::BOOL, :name => 'supportsTwoFactor'}
          }

          def struct_fields; FIELDS; end

          def validate
          end

          ::Thrift::Struct.generate_accessors self
        end

        class Authenticate_result
          include ::Thrift::Struct, ::Thrift::Struct_Union
          SUCCESS = 0
          USEREXCEPTION = 1
          SYSTEMEXCEPTION = 2

          FIELDS = {
            SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::Evernote::EDAM::UserStore::AuthenticationResult},
            USEREXCEPTION => {:type => ::Thrift::Types::STRUCT, :name => 'userException', :class => ::Evernote::EDAM::Error::EDAMUserException},
            SYSTEMEXCEPTION => {:type => ::Thrift::Types::STRUCT, :name => 'systemException', :class => ::Evernote::EDAM::Error::EDAMSystemException}
          }

          def struct_fields; FIELDS; end

          def validate
          end

          ::Thrift::Struct.generate_accessors self
        end

        class AuthenticateLongSession_args
          include ::Thrift::Struct, ::Thrift::Struct_Union
          USERNAME = 1
          PASSWORD = 2
          CONSUMERKEY = 3
          CONSUMERSECRET = 4
          DEVICEIDENTIFIER = 5
          DEVICEDESCRIPTION = 6
          SUPPORTSTWOFACTOR = 7

          FIELDS = {
            USERNAME => {:type => ::Thrift::Types::STRING, :name => 'username'},
            PASSWORD => {:type => ::Thrift::Types::STRING, :name => 'password'},
            CONSUMERKEY => {:type => ::Thrift::Types::STRING, :name => 'consumerKey'},
            CONSUMERSECRET => {:type => ::Thrift::Types::STRING, :name => 'consumerSecret'},
            DEVICEIDENTIFIER => {:type => ::Thrift::Types::STRING, :name => 'deviceIdentifier'},
            DEVICEDESCRIPTION => {:type => ::Thrift::Types::STRING, :name => 'deviceDescription'},
            SUPPORTSTWOFACTOR => {:type => ::Thrift::Types::BOOL, :name => 'supportsTwoFactor'}
          }

          def struct_fields; FIELDS; end

          def validate
          end

          ::Thrift::Struct.generate_accessors self
        end

        class AuthenticateLongSession_result
          include ::Thrift::Struct, ::Thrift::Struct_Union
          SUCCESS = 0
          USEREXCEPTION = 1
          SYSTEMEXCEPTION = 2

          FIELDS = {
            SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::Evernote::EDAM::UserStore::AuthenticationResult},
            USEREXCEPTION => {:type => ::Thrift::Types::STRUCT, :name => 'userException', :class => ::Evernote::EDAM::Error::EDAMUserException},
            SYSTEMEXCEPTION => {:type => ::Thrift::Types::STRUCT, :name => 'systemException', :class => ::Evernote::EDAM::Error::EDAMSystemException}
          }

          def struct_fields; FIELDS; end

          def validate
          end

          ::Thrift::Struct.generate_accessors self
        end

        class CompleteTwoFactorAuthentication_args
          include ::Thrift::Struct, ::Thrift::Struct_Union
          AUTHENTICATIONTOKEN = 1
          ONETIMECODE = 2
          DEVICEIDENTIFIER = 3
          DEVICEDESCRIPTION = 4

          FIELDS = {
            AUTHENTICATIONTOKEN => {:type => ::Thrift::Types::STRING, :name => 'authenticationToken'},
            ONETIMECODE => {:type => ::Thrift::Types::STRING, :name => 'oneTimeCode'},
            DEVICEIDENTIFIER => {:type => ::Thrift::Types::STRING, :name => 'deviceIdentifier'},
            DEVICEDESCRIPTION => {:type => ::Thrift::Types::STRING, :name => 'deviceDescription'}
          }

          def struct_fields; FIELDS; end

          def validate
          end

          ::Thrift::Struct.generate_accessors self
        end

        class CompleteTwoFactorAuthentication_result
          include ::Thrift::Struct, ::Thrift::Struct_Union
          SUCCESS = 0
          USEREXCEPTION = 1
          SYSTEMEXCEPTION = 2

          FIELDS = {
            SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::Evernote::EDAM::UserStore::AuthenticationResult},
            USEREXCEPTION => {:type => ::Thrift::Types::STRUCT, :name => 'userException', :class => ::Evernote::EDAM::Error::EDAMUserException},
            SYSTEMEXCEPTION => {:type => ::Thrift::Types::STRUCT, :name => 'systemException', :class => ::Evernote::EDAM::Error::EDAMSystemException}
          }

          def struct_fields; FIELDS; end

          def validate
          end

          ::Thrift::Struct.generate_accessors self
        end

        class RevokeLongSession_args
          include ::Thrift::Struct, ::Thrift::Struct_Union
          AUTHENTICATIONTOKEN = 1

          FIELDS = {
            AUTHENTICATIONTOKEN => {:type => ::Thrift::Types::STRING, :name => 'authenticationToken'}
          }

          def struct_fields; FIELDS; end

          def validate
          end

          ::Thrift::Struct.generate_accessors self
        end

        class RevokeLongSession_result
          include ::Thrift::Struct, ::Thrift::Struct_Union
          USEREXCEPTION = 1
          SYSTEMEXCEPTION = 2

          FIELDS = {
            USEREXCEPTION => {:type => ::Thrift::Types::STRUCT, :name => 'userException', :class => ::Evernote::EDAM::Error::EDAMUserException},
            SYSTEMEXCEPTION => {:type => ::Thrift::Types::STRUCT, :name => 'systemException', :class => ::Evernote::EDAM::Error::EDAMSystemException}
          }

          def struct_fields; FIELDS; end

          def validate
          end

          ::Thrift::Struct.generate_accessors self
        end

        class AuthenticateToBusiness_args
          include ::Thrift::Struct, ::Thrift::Struct_Union
          AUTHENTICATIONTOKEN = 1

          FIELDS = {
            AUTHENTICATIONTOKEN => {:type => ::Thrift::Types::STRING, :name => 'authenticationToken'}
          }

          def struct_fields; FIELDS; end

          def validate
          end

          ::Thrift::Struct.generate_accessors self
        end

        class AuthenticateToBusiness_result
          include ::Thrift::Struct, ::Thrift::Struct_Union
          SUCCESS = 0
          USEREXCEPTION = 1
          SYSTEMEXCEPTION = 2

          FIELDS = {
            SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::Evernote::EDAM::UserStore::AuthenticationResult},
            USEREXCEPTION => {:type => ::Thrift::Types::STRUCT, :name => 'userException', :class => ::Evernote::EDAM::Error::EDAMUserException},
            SYSTEMEXCEPTION => {:type => ::Thrift::Types::STRUCT, :name => 'systemException', :class => ::Evernote::EDAM::Error::EDAMSystemException}
          }

          def struct_fields; FIELDS; end

          def validate
          end

          ::Thrift::Struct.generate_accessors self
        end

        class RefreshAuthentication_args
          include ::Thrift::Struct, ::Thrift::Struct_Union
          AUTHENTICATIONTOKEN = 1

          FIELDS = {
            AUTHENTICATIONTOKEN => {:type => ::Thrift::Types::STRING, :name => 'authenticationToken'}
          }

          def struct_fields; FIELDS; end

          def validate
          end

          ::Thrift::Struct.generate_accessors self
        end

        class RefreshAuthentication_result
          include ::Thrift::Struct, ::Thrift::Struct_Union
          SUCCESS = 0
          USEREXCEPTION = 1
          SYSTEMEXCEPTION = 2

          FIELDS = {
            SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::Evernote::EDAM::UserStore::AuthenticationResult},
            USEREXCEPTION => {:type => ::Thrift::Types::STRUCT, :name => 'userException', :class => ::Evernote::EDAM::Error::EDAMUserException},
            SYSTEMEXCEPTION => {:type => ::Thrift::Types::STRUCT, :name => 'systemException', :class => ::Evernote::EDAM::Error::EDAMSystemException}
          }

          def struct_fields; FIELDS; end

          def validate
          end

          ::Thrift::Struct.generate_accessors self
        end

        class GetUser_args
          include ::Thrift::Struct, ::Thrift::Struct_Union
          AUTHENTICATIONTOKEN = 1

          FIELDS = {
            AUTHENTICATIONTOKEN => {:type => ::Thrift::Types::STRING, :name => 'authenticationToken'}
          }

          def struct_fields; FIELDS; end

          def validate
          end

          ::Thrift::Struct.generate_accessors self
        end

        class GetUser_result
          include ::Thrift::Struct, ::Thrift::Struct_Union
          SUCCESS = 0
          USEREXCEPTION = 1
          SYSTEMEXCEPTION = 2

          FIELDS = {
            SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::Evernote::EDAM::Type::User},
            USEREXCEPTION => {:type => ::Thrift::Types::STRUCT, :name => 'userException', :class => ::Evernote::EDAM::Error::EDAMUserException},
            SYSTEMEXCEPTION => {:type => ::Thrift::Types::STRUCT, :name => 'systemException', :class => ::Evernote::EDAM::Error::EDAMSystemException}
          }

          def struct_fields; FIELDS; end

          def validate
          end

          ::Thrift::Struct.generate_accessors self
        end

        class GetPublicUserInfo_args
          include ::Thrift::Struct, ::Thrift::Struct_Union
          USERNAME = 1

          FIELDS = {
            USERNAME => {:type => ::Thrift::Types::STRING, :name => 'username'}
          }

          def struct_fields; FIELDS; end

          def validate
          end

          ::Thrift::Struct.generate_accessors self
        end

        class GetPublicUserInfo_result
          include ::Thrift::Struct, ::Thrift::Struct_Union
          SUCCESS = 0
          NOTFOUNDEXCEPTION = 1
          SYSTEMEXCEPTION = 2
          USEREXCEPTION = 3

          FIELDS = {
            SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::Evernote::EDAM::UserStore::PublicUserInfo},
            NOTFOUNDEXCEPTION => {:type => ::Thrift::Types::STRUCT, :name => 'notFoundException', :class => ::Evernote::EDAM::Error::EDAMNotFoundException},
            SYSTEMEXCEPTION => {:type => ::Thrift::Types::STRUCT, :name => 'systemException', :class => ::Evernote::EDAM::Error::EDAMSystemException},
            USEREXCEPTION => {:type => ::Thrift::Types::STRUCT, :name => 'userException', :class => ::Evernote::EDAM::Error::EDAMUserException}
          }

          def struct_fields; FIELDS; end

          def validate
          end

          ::Thrift::Struct.generate_accessors self
        end

        class GetPremiumInfo_args
          include ::Thrift::Struct, ::Thrift::Struct_Union
          AUTHENTICATIONTOKEN = 1

          FIELDS = {
            AUTHENTICATIONTOKEN => {:type => ::Thrift::Types::STRING, :name => 'authenticationToken'}
          }

          def struct_fields; FIELDS; end

          def validate
          end

          ::Thrift::Struct.generate_accessors self
        end

        class GetPremiumInfo_result
          include ::Thrift::Struct, ::Thrift::Struct_Union
          SUCCESS = 0
          USEREXCEPTION = 1
          SYSTEMEXCEPTION = 2

          FIELDS = {
            SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => ::Evernote::EDAM::Type::PremiumInfo},
            USEREXCEPTION => {:type => ::Thrift::Types::STRUCT, :name => 'userException', :class => ::Evernote::EDAM::Error::EDAMUserException},
            SYSTEMEXCEPTION => {:type => ::Thrift::Types::STRUCT, :name => 'systemException', :class => ::Evernote::EDAM::Error::EDAMSystemException}
          }

          def struct_fields; FIELDS; end

          def validate
          end

          ::Thrift::Struct.generate_accessors self
        end

        class GetNoteStoreUrl_args
          include ::Thrift::Struct, ::Thrift::Struct_Union
          AUTHENTICATIONTOKEN = 1

          FIELDS = {
            AUTHENTICATIONTOKEN => {:type => ::Thrift::Types::STRING, :name => 'authenticationToken'}
          }

          def struct_fields; FIELDS; end

          def validate
          end

          ::Thrift::Struct.generate_accessors self
        end

        class GetNoteStoreUrl_result
          include ::Thrift::Struct, ::Thrift::Struct_Union
          SUCCESS = 0
          USEREXCEPTION = 1
          SYSTEMEXCEPTION = 2

          FIELDS = {
            SUCCESS => {:type => ::Thrift::Types::STRING, :name => 'success'},
            USEREXCEPTION => {:type => ::Thrift::Types::STRUCT, :name => 'userException', :class => ::Evernote::EDAM::Error::EDAMUserException},
            SYSTEMEXCEPTION => {:type => ::Thrift::Types::STRUCT, :name => 'systemException', :class => ::Evernote::EDAM::Error::EDAMSystemException}
          }

          def struct_fields; FIELDS; end

          def validate
          end

          ::Thrift::Struct.generate_accessors self
        end

      end

    end
  end
end
