#
# Autogenerated by Thrift Compiler (0.11.0)
#
# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
#
#  options string: py
#

from thrift.Thrift import TType, TMessageType, TFrozenDict, TException, TApplicationException
from thrift.protocol.TProtocol import TProtocolException
from thrift.TRecursive import fix_spec

import sys
import logging
from .ttypes import *
from thrift.Thrift import TProcessor
from thrift.transport import TTransport
all_structs = []


class Iface(object):
    def checkAPIVersion(self):
        pass

    def getAuthParameters(self):
        pass

    def getAcceptedAuthMethods(self):
        pass

    def getAccessControl(self):
        pass

    def performLogin(self, authMethod, authString):
        """
        Parameters:
         - authMethod
         - authString
        """
        pass

    def destroySession(self):
        pass

    def getLoggedInUser(self):
        pass

    def getPermissions(self, scope):
        """
        Parameters:
         - scope
        """
        pass

    def getPermissionsForUser(self, scope, extraParams, filter):
        """
        Parameters:
         - scope
         - extraParams
         - filter
        """
        pass

    def getAuthorisedNames(self, permission, extraParams):
        """
        Parameters:
         - permission
         - extraParams
        """
        pass

    def addPermission(self, permission, authName, isGroup, extraParams):
        """
        Parameters:
         - permission
         - authName
         - isGroup
         - extraParams
        """
        pass

    def removePermission(self, permission, authName, isGroup, extraParams):
        """
        Parameters:
         - permission
         - authName
         - isGroup
         - extraParams
        """
        pass

    def hasPermission(self, permission, extraParams):
        """
        Parameters:
         - permission
         - extraParams
        """
        pass

    def getTokens(self):
        pass

    def newToken(self, description):
        """
        Parameters:
         - description
        """
        pass

    def removeToken(self, token):
        """
        Parameters:
         - token
        """
        pass


class Client(Iface):
    def __init__(self, iprot, oprot=None):
        self._iprot = self._oprot = iprot
        if oprot is not None:
            self._oprot = oprot
        self._seqid = 0

    def checkAPIVersion(self):
        self.send_checkAPIVersion()
        self.recv_checkAPIVersion()

    def send_checkAPIVersion(self):
        self._oprot.writeMessageBegin('checkAPIVersion', TMessageType.CALL, self._seqid)
        args = checkAPIVersion_args()
        args.write(self._oprot)
        self._oprot.writeMessageEnd()
        self._oprot.trans.flush()

    def recv_checkAPIVersion(self):
        iprot = self._iprot
        (fname, mtype, rseqid) = iprot.readMessageBegin()
        if mtype == TMessageType.EXCEPTION:
            x = TApplicationException()
            x.read(iprot)
            iprot.readMessageEnd()
            raise x
        result = checkAPIVersion_result()
        result.read(iprot)
        iprot.readMessageEnd()
        if result.requestError is not None:
            raise result.requestError
        return

    def getAuthParameters(self):
        self.send_getAuthParameters()
        return self.recv_getAuthParameters()

    def send_getAuthParameters(self):
        self._oprot.writeMessageBegin('getAuthParameters', TMessageType.CALL, self._seqid)
        args = getAuthParameters_args()
        args.write(self._oprot)
        self._oprot.writeMessageEnd()
        self._oprot.trans.flush()

    def recv_getAuthParameters(self):
        iprot = self._iprot
        (fname, mtype, rseqid) = iprot.readMessageBegin()
        if mtype == TMessageType.EXCEPTION:
            x = TApplicationException()
            x.read(iprot)
            iprot.readMessageEnd()
            raise x
        result = getAuthParameters_result()
        result.read(iprot)
        iprot.readMessageEnd()
        if result.success is not None:
            return result.success
        raise TApplicationException(TApplicationException.MISSING_RESULT, "getAuthParameters failed: unknown result")

    def getAcceptedAuthMethods(self):
        self.send_getAcceptedAuthMethods()
        return self.recv_getAcceptedAuthMethods()

    def send_getAcceptedAuthMethods(self):
        self._oprot.writeMessageBegin('getAcceptedAuthMethods', TMessageType.CALL, self._seqid)
        args = getAcceptedAuthMethods_args()
        args.write(self._oprot)
        self._oprot.writeMessageEnd()
        self._oprot.trans.flush()

    def recv_getAcceptedAuthMethods(self):
        iprot = self._iprot
        (fname, mtype, rseqid) = iprot.readMessageBegin()
        if mtype == TMessageType.EXCEPTION:
            x = TApplicationException()
            x.read(iprot)
            iprot.readMessageEnd()
            raise x
        result = getAcceptedAuthMethods_result()
        result.read(iprot)
        iprot.readMessageEnd()
        if result.success is not None:
            return result.success
        raise TApplicationException(TApplicationException.MISSING_RESULT, "getAcceptedAuthMethods failed: unknown result")

    def getAccessControl(self):
        self.send_getAccessControl()
        return self.recv_getAccessControl()

    def send_getAccessControl(self):
        self._oprot.writeMessageBegin('getAccessControl', TMessageType.CALL, self._seqid)
        args = getAccessControl_args()
        args.write(self._oprot)
        self._oprot.writeMessageEnd()
        self._oprot.trans.flush()

    def recv_getAccessControl(self):
        iprot = self._iprot
        (fname, mtype, rseqid) = iprot.readMessageBegin()
        if mtype == TMessageType.EXCEPTION:
            x = TApplicationException()
            x.read(iprot)
            iprot.readMessageEnd()
            raise x
        result = getAccessControl_result()
        result.read(iprot)
        iprot.readMessageEnd()
        if result.success is not None:
            return result.success
        if result.requestError is not None:
            raise result.requestError
        raise TApplicationException(TApplicationException.MISSING_RESULT, "getAccessControl failed: unknown result")

    def performLogin(self, authMethod, authString):
        """
        Parameters:
         - authMethod
         - authString
        """
        self.send_performLogin(authMethod, authString)
        return self.recv_performLogin()

    def send_performLogin(self, authMethod, authString):
        self._oprot.writeMessageBegin('performLogin', TMessageType.CALL, self._seqid)
        args = performLogin_args()
        args.authMethod = authMethod
        args.authString = authString
        args.write(self._oprot)
        self._oprot.writeMessageEnd()
        self._oprot.trans.flush()

    def recv_performLogin(self):
        iprot = self._iprot
        (fname, mtype, rseqid) = iprot.readMessageBegin()
        if mtype == TMessageType.EXCEPTION:
            x = TApplicationException()
            x.read(iprot)
            iprot.readMessageEnd()
            raise x
        result = performLogin_result()
        result.read(iprot)
        iprot.readMessageEnd()
        if result.success is not None:
            return result.success
        if result.requestError is not None:
            raise result.requestError
        raise TApplicationException(TApplicationException.MISSING_RESULT, "performLogin failed: unknown result")

    def destroySession(self):
        self.send_destroySession()
        return self.recv_destroySession()

    def send_destroySession(self):
        self._oprot.writeMessageBegin('destroySession', TMessageType.CALL, self._seqid)
        args = destroySession_args()
        args.write(self._oprot)
        self._oprot.writeMessageEnd()
        self._oprot.trans.flush()

    def recv_destroySession(self):
        iprot = self._iprot
        (fname, mtype, rseqid) = iprot.readMessageBegin()
        if mtype == TMessageType.EXCEPTION:
            x = TApplicationException()
            x.read(iprot)
            iprot.readMessageEnd()
            raise x
        result = destroySession_result()
        result.read(iprot)
        iprot.readMessageEnd()
        if result.success is not None:
            return result.success
        if result.requestError is not None:
            raise result.requestError
        raise TApplicationException(TApplicationException.MISSING_RESULT, "destroySession failed: unknown result")

    def getLoggedInUser(self):
        self.send_getLoggedInUser()
        return self.recv_getLoggedInUser()

    def send_getLoggedInUser(self):
        self._oprot.writeMessageBegin('getLoggedInUser', TMessageType.CALL, self._seqid)
        args = getLoggedInUser_args()
        args.write(self._oprot)
        self._oprot.writeMessageEnd()
        self._oprot.trans.flush()

    def recv_getLoggedInUser(self):
        iprot = self._iprot
        (fname, mtype, rseqid) = iprot.readMessageBegin()
        if mtype == TMessageType.EXCEPTION:
            x = TApplicationException()
            x.read(iprot)
            iprot.readMessageEnd()
            raise x
        result = getLoggedInUser_result()
        result.read(iprot)
        iprot.readMessageEnd()
        if result.success is not None:
            return result.success
        if result.requestError is not None:
            raise result.requestError
        raise TApplicationException(TApplicationException.MISSING_RESULT, "getLoggedInUser failed: unknown result")

    def getPermissions(self, scope):
        """
        Parameters:
         - scope
        """
        self.send_getPermissions(scope)
        return self.recv_getPermissions()

    def send_getPermissions(self, scope):
        self._oprot.writeMessageBegin('getPermissions', TMessageType.CALL, self._seqid)
        args = getPermissions_args()
        args.scope = scope
        args.write(self._oprot)
        self._oprot.writeMessageEnd()
        self._oprot.trans.flush()

    def recv_getPermissions(self):
        iprot = self._iprot
        (fname, mtype, rseqid) = iprot.readMessageBegin()
        if mtype == TMessageType.EXCEPTION:
            x = TApplicationException()
            x.read(iprot)
            iprot.readMessageEnd()
            raise x
        result = getPermissions_result()
        result.read(iprot)
        iprot.readMessageEnd()
        if result.success is not None:
            return result.success
        raise TApplicationException(TApplicationException.MISSING_RESULT, "getPermissions failed: unknown result")

    def getPermissionsForUser(self, scope, extraParams, filter):
        """
        Parameters:
         - scope
         - extraParams
         - filter
        """
        self.send_getPermissionsForUser(scope, extraParams, filter)
        return self.recv_getPermissionsForUser()

    def send_getPermissionsForUser(self, scope, extraParams, filter):
        self._oprot.writeMessageBegin('getPermissionsForUser', TMessageType.CALL, self._seqid)
        args = getPermissionsForUser_args()
        args.scope = scope
        args.extraParams = extraParams
        args.filter = filter
        args.write(self._oprot)
        self._oprot.writeMessageEnd()
        self._oprot.trans.flush()

    def recv_getPermissionsForUser(self):
        iprot = self._iprot
        (fname, mtype, rseqid) = iprot.readMessageBegin()
        if mtype == TMessageType.EXCEPTION:
            x = TApplicationException()
            x.read(iprot)
            iprot.readMessageEnd()
            raise x
        result = getPermissionsForUser_result()
        result.read(iprot)
        iprot.readMessageEnd()
        if result.success is not None:
            return result.success
        if result.requestError is not None:
            raise result.requestError
        raise TApplicationException(TApplicationException.MISSING_RESULT, "getPermissionsForUser failed: unknown result")

    def getAuthorisedNames(self, permission, extraParams):
        """
        Parameters:
         - permission
         - extraParams
        """
        self.send_getAuthorisedNames(permission, extraParams)
        return self.recv_getAuthorisedNames()

    def send_getAuthorisedNames(self, permission, extraParams):
        self._oprot.writeMessageBegin('getAuthorisedNames', TMessageType.CALL, self._seqid)
        args = getAuthorisedNames_args()
        args.permission = permission
        args.extraParams = extraParams
        args.write(self._oprot)
        self._oprot.writeMessageEnd()
        self._oprot.trans.flush()

    def recv_getAuthorisedNames(self):
        iprot = self._iprot
        (fname, mtype, rseqid) = iprot.readMessageBegin()
        if mtype == TMessageType.EXCEPTION:
            x = TApplicationException()
            x.read(iprot)
            iprot.readMessageEnd()
            raise x
        result = getAuthorisedNames_result()
        result.read(iprot)
        iprot.readMessageEnd()
        if result.success is not None:
            return result.success
        if result.requestError is not None:
            raise result.requestError
        raise TApplicationException(TApplicationException.MISSING_RESULT, "getAuthorisedNames failed: unknown result")

    def addPermission(self, permission, authName, isGroup, extraParams):
        """
        Parameters:
         - permission
         - authName
         - isGroup
         - extraParams
        """
        self.send_addPermission(permission, authName, isGroup, extraParams)
        return self.recv_addPermission()

    def send_addPermission(self, permission, authName, isGroup, extraParams):
        self._oprot.writeMessageBegin('addPermission', TMessageType.CALL, self._seqid)
        args = addPermission_args()
        args.permission = permission
        args.authName = authName
        args.isGroup = isGroup
        args.extraParams = extraParams
        args.write(self._oprot)
        self._oprot.writeMessageEnd()
        self._oprot.trans.flush()

    def recv_addPermission(self):
        iprot = self._iprot
        (fname, mtype, rseqid) = iprot.readMessageBegin()
        if mtype == TMessageType.EXCEPTION:
            x = TApplicationException()
            x.read(iprot)
            iprot.readMessageEnd()
            raise x
        result = addPermission_result()
        result.read(iprot)
        iprot.readMessageEnd()
        if result.success is not None:
            return result.success
        if result.requestError is not None:
            raise result.requestError
        raise TApplicationException(TApplicationException.MISSING_RESULT, "addPermission failed: unknown result")

    def removePermission(self, permission, authName, isGroup, extraParams):
        """
        Parameters:
         - permission
         - authName
         - isGroup
         - extraParams
        """
        self.send_removePermission(permission, authName, isGroup, extraParams)
        return self.recv_removePermission()

    def send_removePermission(self, permission, authName, isGroup, extraParams):
        self._oprot.writeMessageBegin('removePermission', TMessageType.CALL, self._seqid)
        args = removePermission_args()
        args.permission = permission
        args.authName = authName
        args.isGroup = isGroup
        args.extraParams = extraParams
        args.write(self._oprot)
        self._oprot.writeMessageEnd()
        self._oprot.trans.flush()

    def recv_removePermission(self):
        iprot = self._iprot
        (fname, mtype, rseqid) = iprot.readMessageBegin()
        if mtype == TMessageType.EXCEPTION:
            x = TApplicationException()
            x.read(iprot)
            iprot.readMessageEnd()
            raise x
        result = removePermission_result()
        result.read(iprot)
        iprot.readMessageEnd()
        if result.success is not None:
            return result.success
        if result.requestError is not None:
            raise result.requestError
        raise TApplicationException(TApplicationException.MISSING_RESULT, "removePermission failed: unknown result")

    def hasPermission(self, permission, extraParams):
        """
        Parameters:
         - permission
         - extraParams
        """
        self.send_hasPermission(permission, extraParams)
        return self.recv_hasPermission()

    def send_hasPermission(self, permission, extraParams):
        self._oprot.writeMessageBegin('hasPermission', TMessageType.CALL, self._seqid)
        args = hasPermission_args()
        args.permission = permission
        args.extraParams = extraParams
        args.write(self._oprot)
        self._oprot.writeMessageEnd()
        self._oprot.trans.flush()

    def recv_hasPermission(self):
        iprot = self._iprot
        (fname, mtype, rseqid) = iprot.readMessageBegin()
        if mtype == TMessageType.EXCEPTION:
            x = TApplicationException()
            x.read(iprot)
            iprot.readMessageEnd()
            raise x
        result = hasPermission_result()
        result.read(iprot)
        iprot.readMessageEnd()
        if result.success is not None:
            return result.success
        if result.requestError is not None:
            raise result.requestError
        raise TApplicationException(TApplicationException.MISSING_RESULT, "hasPermission failed: unknown result")

    def getTokens(self):
        self.send_getTokens()
        return self.recv_getTokens()

    def send_getTokens(self):
        self._oprot.writeMessageBegin('getTokens', TMessageType.CALL, self._seqid)
        args = getTokens_args()
        args.write(self._oprot)
        self._oprot.writeMessageEnd()
        self._oprot.trans.flush()

    def recv_getTokens(self):
        iprot = self._iprot
        (fname, mtype, rseqid) = iprot.readMessageBegin()
        if mtype == TMessageType.EXCEPTION:
            x = TApplicationException()
            x.read(iprot)
            iprot.readMessageEnd()
            raise x
        result = getTokens_result()
        result.read(iprot)
        iprot.readMessageEnd()
        if result.success is not None:
            return result.success
        if result.requestError is not None:
            raise result.requestError
        raise TApplicationException(TApplicationException.MISSING_RESULT, "getTokens failed: unknown result")

    def newToken(self, description):
        """
        Parameters:
         - description
        """
        self.send_newToken(description)
        return self.recv_newToken()

    def send_newToken(self, description):
        self._oprot.writeMessageBegin('newToken', TMessageType.CALL, self._seqid)
        args = newToken_args()
        args.description = description
        args.write(self._oprot)
        self._oprot.writeMessageEnd()
        self._oprot.trans.flush()

    def recv_newToken(self):
        iprot = self._iprot
        (fname, mtype, rseqid) = iprot.readMessageBegin()
        if mtype == TMessageType.EXCEPTION:
            x = TApplicationException()
            x.read(iprot)
            iprot.readMessageEnd()
            raise x
        result = newToken_result()
        result.read(iprot)
        iprot.readMessageEnd()
        if result.success is not None:
            return result.success
        if result.requestError is not None:
            raise result.requestError
        raise TApplicationException(TApplicationException.MISSING_RESULT, "newToken failed: unknown result")

    def removeToken(self, token):
        """
        Parameters:
         - token
        """
        self.send_removeToken(token)
        return self.recv_removeToken()

    def send_removeToken(self, token):
        self._oprot.writeMessageBegin('removeToken', TMessageType.CALL, self._seqid)
        args = removeToken_args()
        args.token = token
        args.write(self._oprot)
        self._oprot.writeMessageEnd()
        self._oprot.trans.flush()

    def recv_removeToken(self):
        iprot = self._iprot
        (fname, mtype, rseqid) = iprot.readMessageBegin()
        if mtype == TMessageType.EXCEPTION:
            x = TApplicationException()
            x.read(iprot)
            iprot.readMessageEnd()
            raise x
        result = removeToken_result()
        result.read(iprot)
        iprot.readMessageEnd()
        if result.success is not None:
            return result.success
        if result.requestError is not None:
            raise result.requestError
        raise TApplicationException(TApplicationException.MISSING_RESULT, "removeToken failed: unknown result")


class Processor(Iface, TProcessor):
    def __init__(self, handler):
        self._handler = handler
        self._processMap = {}
        self._processMap["checkAPIVersion"] = Processor.process_checkAPIVersion
        self._processMap["getAuthParameters"] = Processor.process_getAuthParameters
        self._processMap["getAcceptedAuthMethods"] = Processor.process_getAcceptedAuthMethods
        self._processMap["getAccessControl"] = Processor.process_getAccessControl
        self._processMap["performLogin"] = Processor.process_performLogin
        self._processMap["destroySession"] = Processor.process_destroySession
        self._processMap["getLoggedInUser"] = Processor.process_getLoggedInUser
        self._processMap["getPermissions"] = Processor.process_getPermissions
        self._processMap["getPermissionsForUser"] = Processor.process_getPermissionsForUser
        self._processMap["getAuthorisedNames"] = Processor.process_getAuthorisedNames
        self._processMap["addPermission"] = Processor.process_addPermission
        self._processMap["removePermission"] = Processor.process_removePermission
        self._processMap["hasPermission"] = Processor.process_hasPermission
        self._processMap["getTokens"] = Processor.process_getTokens
        self._processMap["newToken"] = Processor.process_newToken
        self._processMap["removeToken"] = Processor.process_removeToken

    def process(self, iprot, oprot):
        (name, type, seqid) = iprot.readMessageBegin()
        if name not in self._processMap:
            iprot.skip(TType.STRUCT)
            iprot.readMessageEnd()
            x = TApplicationException(TApplicationException.UNKNOWN_METHOD, 'Unknown function %s' % (name))
            oprot.writeMessageBegin(name, TMessageType.EXCEPTION, seqid)
            x.write(oprot)
            oprot.writeMessageEnd()
            oprot.trans.flush()
            return
        else:
            self._processMap[name](self, seqid, iprot, oprot)
        return True

    def process_checkAPIVersion(self, seqid, iprot, oprot):
        args = checkAPIVersion_args()
        args.read(iprot)
        iprot.readMessageEnd()
        result = checkAPIVersion_result()
        try:
            self._handler.checkAPIVersion()
            msg_type = TMessageType.REPLY
        except TTransport.TTransportException:
            raise
        except codechecker_api_shared.ttypes.RequestFailed as requestError:
            msg_type = TMessageType.REPLY
            result.requestError = requestError
        except TApplicationException as ex:
            logging.exception('TApplication exception in handler')
            msg_type = TMessageType.EXCEPTION
            result = ex
        except Exception:
            logging.exception('Unexpected exception in handler')
            msg_type = TMessageType.EXCEPTION
            result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
        oprot.writeMessageBegin("checkAPIVersion", msg_type, seqid)
        result.write(oprot)
        oprot.writeMessageEnd()
        oprot.trans.flush()

    def process_getAuthParameters(self, seqid, iprot, oprot):
        args = getAuthParameters_args()
        args.read(iprot)
        iprot.readMessageEnd()
        result = getAuthParameters_result()
        try:
            result.success = self._handler.getAuthParameters()
            msg_type = TMessageType.REPLY
        except TTransport.TTransportException:
            raise
        except TApplicationException as ex:
            logging.exception('TApplication exception in handler')
            msg_type = TMessageType.EXCEPTION
            result = ex
        except Exception:
            logging.exception('Unexpected exception in handler')
            msg_type = TMessageType.EXCEPTION
            result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
        oprot.writeMessageBegin("getAuthParameters", msg_type, seqid)
        result.write(oprot)
        oprot.writeMessageEnd()
        oprot.trans.flush()

    def process_getAcceptedAuthMethods(self, seqid, iprot, oprot):
        args = getAcceptedAuthMethods_args()
        args.read(iprot)
        iprot.readMessageEnd()
        result = getAcceptedAuthMethods_result()
        try:
            result.success = self._handler.getAcceptedAuthMethods()
            msg_type = TMessageType.REPLY
        except TTransport.TTransportException:
            raise
        except TApplicationException as ex:
            logging.exception('TApplication exception in handler')
            msg_type = TMessageType.EXCEPTION
            result = ex
        except Exception:
            logging.exception('Unexpected exception in handler')
            msg_type = TMessageType.EXCEPTION
            result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
        oprot.writeMessageBegin("getAcceptedAuthMethods", msg_type, seqid)
        result.write(oprot)
        oprot.writeMessageEnd()
        oprot.trans.flush()

    def process_getAccessControl(self, seqid, iprot, oprot):
        args = getAccessControl_args()
        args.read(iprot)
        iprot.readMessageEnd()
        result = getAccessControl_result()
        try:
            result.success = self._handler.getAccessControl()
            msg_type = TMessageType.REPLY
        except TTransport.TTransportException:
            raise
        except codechecker_api_shared.ttypes.RequestFailed as requestError:
            msg_type = TMessageType.REPLY
            result.requestError = requestError
        except TApplicationException as ex:
            logging.exception('TApplication exception in handler')
            msg_type = TMessageType.EXCEPTION
            result = ex
        except Exception:
            logging.exception('Unexpected exception in handler')
            msg_type = TMessageType.EXCEPTION
            result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
        oprot.writeMessageBegin("getAccessControl", msg_type, seqid)
        result.write(oprot)
        oprot.writeMessageEnd()
        oprot.trans.flush()

    def process_performLogin(self, seqid, iprot, oprot):
        args = performLogin_args()
        args.read(iprot)
        iprot.readMessageEnd()
        result = performLogin_result()
        try:
            result.success = self._handler.performLogin(args.authMethod, args.authString)
            msg_type = TMessageType.REPLY
        except TTransport.TTransportException:
            raise
        except codechecker_api_shared.ttypes.RequestFailed as requestError:
            msg_type = TMessageType.REPLY
            result.requestError = requestError
        except TApplicationException as ex:
            logging.exception('TApplication exception in handler')
            msg_type = TMessageType.EXCEPTION
            result = ex
        except Exception:
            logging.exception('Unexpected exception in handler')
            msg_type = TMessageType.EXCEPTION
            result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
        oprot.writeMessageBegin("performLogin", msg_type, seqid)
        result.write(oprot)
        oprot.writeMessageEnd()
        oprot.trans.flush()

    def process_destroySession(self, seqid, iprot, oprot):
        args = destroySession_args()
        args.read(iprot)
        iprot.readMessageEnd()
        result = destroySession_result()
        try:
            result.success = self._handler.destroySession()
            msg_type = TMessageType.REPLY
        except TTransport.TTransportException:
            raise
        except codechecker_api_shared.ttypes.RequestFailed as requestError:
            msg_type = TMessageType.REPLY
            result.requestError = requestError
        except TApplicationException as ex:
            logging.exception('TApplication exception in handler')
            msg_type = TMessageType.EXCEPTION
            result = ex
        except Exception:
            logging.exception('Unexpected exception in handler')
            msg_type = TMessageType.EXCEPTION
            result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
        oprot.writeMessageBegin("destroySession", msg_type, seqid)
        result.write(oprot)
        oprot.writeMessageEnd()
        oprot.trans.flush()

    def process_getLoggedInUser(self, seqid, iprot, oprot):
        args = getLoggedInUser_args()
        args.read(iprot)
        iprot.readMessageEnd()
        result = getLoggedInUser_result()
        try:
            result.success = self._handler.getLoggedInUser()
            msg_type = TMessageType.REPLY
        except TTransport.TTransportException:
            raise
        except codechecker_api_shared.ttypes.RequestFailed as requestError:
            msg_type = TMessageType.REPLY
            result.requestError = requestError
        except TApplicationException as ex:
            logging.exception('TApplication exception in handler')
            msg_type = TMessageType.EXCEPTION
            result = ex
        except Exception:
            logging.exception('Unexpected exception in handler')
            msg_type = TMessageType.EXCEPTION
            result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
        oprot.writeMessageBegin("getLoggedInUser", msg_type, seqid)
        result.write(oprot)
        oprot.writeMessageEnd()
        oprot.trans.flush()

    def process_getPermissions(self, seqid, iprot, oprot):
        args = getPermissions_args()
        args.read(iprot)
        iprot.readMessageEnd()
        result = getPermissions_result()
        try:
            result.success = self._handler.getPermissions(args.scope)
            msg_type = TMessageType.REPLY
        except TTransport.TTransportException:
            raise
        except TApplicationException as ex:
            logging.exception('TApplication exception in handler')
            msg_type = TMessageType.EXCEPTION
            result = ex
        except Exception:
            logging.exception('Unexpected exception in handler')
            msg_type = TMessageType.EXCEPTION
            result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
        oprot.writeMessageBegin("getPermissions", msg_type, seqid)
        result.write(oprot)
        oprot.writeMessageEnd()
        oprot.trans.flush()

    def process_getPermissionsForUser(self, seqid, iprot, oprot):
        args = getPermissionsForUser_args()
        args.read(iprot)
        iprot.readMessageEnd()
        result = getPermissionsForUser_result()
        try:
            result.success = self._handler.getPermissionsForUser(args.scope, args.extraParams, args.filter)
            msg_type = TMessageType.REPLY
        except TTransport.TTransportException:
            raise
        except codechecker_api_shared.ttypes.RequestFailed as requestError:
            msg_type = TMessageType.REPLY
            result.requestError = requestError
        except TApplicationException as ex:
            logging.exception('TApplication exception in handler')
            msg_type = TMessageType.EXCEPTION
            result = ex
        except Exception:
            logging.exception('Unexpected exception in handler')
            msg_type = TMessageType.EXCEPTION
            result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
        oprot.writeMessageBegin("getPermissionsForUser", msg_type, seqid)
        result.write(oprot)
        oprot.writeMessageEnd()
        oprot.trans.flush()

    def process_getAuthorisedNames(self, seqid, iprot, oprot):
        args = getAuthorisedNames_args()
        args.read(iprot)
        iprot.readMessageEnd()
        result = getAuthorisedNames_result()
        try:
            result.success = self._handler.getAuthorisedNames(args.permission, args.extraParams)
            msg_type = TMessageType.REPLY
        except TTransport.TTransportException:
            raise
        except codechecker_api_shared.ttypes.RequestFailed as requestError:
            msg_type = TMessageType.REPLY
            result.requestError = requestError
        except TApplicationException as ex:
            logging.exception('TApplication exception in handler')
            msg_type = TMessageType.EXCEPTION
            result = ex
        except Exception:
            logging.exception('Unexpected exception in handler')
            msg_type = TMessageType.EXCEPTION
            result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
        oprot.writeMessageBegin("getAuthorisedNames", msg_type, seqid)
        result.write(oprot)
        oprot.writeMessageEnd()
        oprot.trans.flush()

    def process_addPermission(self, seqid, iprot, oprot):
        args = addPermission_args()
        args.read(iprot)
        iprot.readMessageEnd()
        result = addPermission_result()
        try:
            result.success = self._handler.addPermission(args.permission, args.authName, args.isGroup, args.extraParams)
            msg_type = TMessageType.REPLY
        except TTransport.TTransportException:
            raise
        except codechecker_api_shared.ttypes.RequestFailed as requestError:
            msg_type = TMessageType.REPLY
            result.requestError = requestError
        except TApplicationException as ex:
            logging.exception('TApplication exception in handler')
            msg_type = TMessageType.EXCEPTION
            result = ex
        except Exception:
            logging.exception('Unexpected exception in handler')
            msg_type = TMessageType.EXCEPTION
            result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
        oprot.writeMessageBegin("addPermission", msg_type, seqid)
        result.write(oprot)
        oprot.writeMessageEnd()
        oprot.trans.flush()

    def process_removePermission(self, seqid, iprot, oprot):
        args = removePermission_args()
        args.read(iprot)
        iprot.readMessageEnd()
        result = removePermission_result()
        try:
            result.success = self._handler.removePermission(args.permission, args.authName, args.isGroup, args.extraParams)
            msg_type = TMessageType.REPLY
        except TTransport.TTransportException:
            raise
        except codechecker_api_shared.ttypes.RequestFailed as requestError:
            msg_type = TMessageType.REPLY
            result.requestError = requestError
        except TApplicationException as ex:
            logging.exception('TApplication exception in handler')
            msg_type = TMessageType.EXCEPTION
            result = ex
        except Exception:
            logging.exception('Unexpected exception in handler')
            msg_type = TMessageType.EXCEPTION
            result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
        oprot.writeMessageBegin("removePermission", msg_type, seqid)
        result.write(oprot)
        oprot.writeMessageEnd()
        oprot.trans.flush()

    def process_hasPermission(self, seqid, iprot, oprot):
        args = hasPermission_args()
        args.read(iprot)
        iprot.readMessageEnd()
        result = hasPermission_result()
        try:
            result.success = self._handler.hasPermission(args.permission, args.extraParams)
            msg_type = TMessageType.REPLY
        except TTransport.TTransportException:
            raise
        except codechecker_api_shared.ttypes.RequestFailed as requestError:
            msg_type = TMessageType.REPLY
            result.requestError = requestError
        except TApplicationException as ex:
            logging.exception('TApplication exception in handler')
            msg_type = TMessageType.EXCEPTION
            result = ex
        except Exception:
            logging.exception('Unexpected exception in handler')
            msg_type = TMessageType.EXCEPTION
            result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
        oprot.writeMessageBegin("hasPermission", msg_type, seqid)
        result.write(oprot)
        oprot.writeMessageEnd()
        oprot.trans.flush()

    def process_getTokens(self, seqid, iprot, oprot):
        args = getTokens_args()
        args.read(iprot)
        iprot.readMessageEnd()
        result = getTokens_result()
        try:
            result.success = self._handler.getTokens()
            msg_type = TMessageType.REPLY
        except TTransport.TTransportException:
            raise
        except codechecker_api_shared.ttypes.RequestFailed as requestError:
            msg_type = TMessageType.REPLY
            result.requestError = requestError
        except TApplicationException as ex:
            logging.exception('TApplication exception in handler')
            msg_type = TMessageType.EXCEPTION
            result = ex
        except Exception:
            logging.exception('Unexpected exception in handler')
            msg_type = TMessageType.EXCEPTION
            result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
        oprot.writeMessageBegin("getTokens", msg_type, seqid)
        result.write(oprot)
        oprot.writeMessageEnd()
        oprot.trans.flush()

    def process_newToken(self, seqid, iprot, oprot):
        args = newToken_args()
        args.read(iprot)
        iprot.readMessageEnd()
        result = newToken_result()
        try:
            result.success = self._handler.newToken(args.description)
            msg_type = TMessageType.REPLY
        except TTransport.TTransportException:
            raise
        except codechecker_api_shared.ttypes.RequestFailed as requestError:
            msg_type = TMessageType.REPLY
            result.requestError = requestError
        except TApplicationException as ex:
            logging.exception('TApplication exception in handler')
            msg_type = TMessageType.EXCEPTION
            result = ex
        except Exception:
            logging.exception('Unexpected exception in handler')
            msg_type = TMessageType.EXCEPTION
            result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
        oprot.writeMessageBegin("newToken", msg_type, seqid)
        result.write(oprot)
        oprot.writeMessageEnd()
        oprot.trans.flush()

    def process_removeToken(self, seqid, iprot, oprot):
        args = removeToken_args()
        args.read(iprot)
        iprot.readMessageEnd()
        result = removeToken_result()
        try:
            result.success = self._handler.removeToken(args.token)
            msg_type = TMessageType.REPLY
        except TTransport.TTransportException:
            raise
        except codechecker_api_shared.ttypes.RequestFailed as requestError:
            msg_type = TMessageType.REPLY
            result.requestError = requestError
        except TApplicationException as ex:
            logging.exception('TApplication exception in handler')
            msg_type = TMessageType.EXCEPTION
            result = ex
        except Exception:
            logging.exception('Unexpected exception in handler')
            msg_type = TMessageType.EXCEPTION
            result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
        oprot.writeMessageBegin("removeToken", msg_type, seqid)
        result.write(oprot)
        oprot.writeMessageEnd()
        oprot.trans.flush()

# HELPER FUNCTIONS AND STRUCTURES


class checkAPIVersion_args(object):


    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('checkAPIVersion_args')
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)
all_structs.append(checkAPIVersion_args)
checkAPIVersion_args.thrift_spec = (
)


class checkAPIVersion_result(object):
    """
    Attributes:
     - requestError
    """


    def __init__(self, requestError=None,):
        self.requestError = requestError

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRUCT:
                    self.requestError = codechecker_api_shared.ttypes.RequestFailed()
                    self.requestError.read(iprot)
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('checkAPIVersion_result')
        if self.requestError is not None:
            oprot.writeFieldBegin('requestError', TType.STRUCT, 1)
            self.requestError.write(oprot)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)
all_structs.append(checkAPIVersion_result)
checkAPIVersion_result.thrift_spec = (
    None,  # 0
    (1, TType.STRUCT, 'requestError', [codechecker_api_shared.ttypes.RequestFailed, None], None, ),  # 1
)


class getAuthParameters_args(object):


    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('getAuthParameters_args')
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)
all_structs.append(getAuthParameters_args)
getAuthParameters_args.thrift_spec = (
)


class getAuthParameters_result(object):
    """
    Attributes:
     - success
    """


    def __init__(self, success=None,):
        self.success = success

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 0:
                if ftype == TType.STRUCT:
                    self.success = HandshakeInformation()
                    self.success.read(iprot)
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('getAuthParameters_result')
        if self.success is not None:
            oprot.writeFieldBegin('success', TType.STRUCT, 0)
            self.success.write(oprot)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)
all_structs.append(getAuthParameters_result)
getAuthParameters_result.thrift_spec = (
    (0, TType.STRUCT, 'success', [HandshakeInformation, None], None, ),  # 0
)


class getAcceptedAuthMethods_args(object):


    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('getAcceptedAuthMethods_args')
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)
all_structs.append(getAcceptedAuthMethods_args)
getAcceptedAuthMethods_args.thrift_spec = (
)


class getAcceptedAuthMethods_result(object):
    """
    Attributes:
     - success
    """


    def __init__(self, success=None,):
        self.success = success

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 0:
                if ftype == TType.LIST:
                    self.success = []
                    (_etype58, _size55) = iprot.readListBegin()
                    for _i59 in range(_size55):
                        _elem60 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                        self.success.append(_elem60)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('getAcceptedAuthMethods_result')
        if self.success is not None:
            oprot.writeFieldBegin('success', TType.LIST, 0)
            oprot.writeListBegin(TType.STRING, len(self.success))
            for iter61 in self.success:
                oprot.writeString(iter61.encode('utf-8') if sys.version_info[0] == 2 else iter61)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)
all_structs.append(getAcceptedAuthMethods_result)
getAcceptedAuthMethods_result.thrift_spec = (
    (0, TType.LIST, 'success', (TType.STRING, 'UTF8', False), None, ),  # 0
)


class getAccessControl_args(object):


    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('getAccessControl_args')
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)
all_structs.append(getAccessControl_args)
getAccessControl_args.thrift_spec = (
)


class getAccessControl_result(object):
    """
    Attributes:
     - success
     - requestError
    """


    def __init__(self, success=None, requestError=None,):
        self.success = success
        self.requestError = requestError

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 0:
                if ftype == TType.STRUCT:
                    self.success = AccessControl()
                    self.success.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 1:
                if ftype == TType.STRUCT:
                    self.requestError = codechecker_api_shared.ttypes.RequestFailed()
                    self.requestError.read(iprot)
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('getAccessControl_result')
        if self.success is not None:
            oprot.writeFieldBegin('success', TType.STRUCT, 0)
            self.success.write(oprot)
            oprot.writeFieldEnd()
        if self.requestError is not None:
            oprot.writeFieldBegin('requestError', TType.STRUCT, 1)
            self.requestError.write(oprot)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)
all_structs.append(getAccessControl_result)
getAccessControl_result.thrift_spec = (
    (0, TType.STRUCT, 'success', [AccessControl, None], None, ),  # 0
    (1, TType.STRUCT, 'requestError', [codechecker_api_shared.ttypes.RequestFailed, None], None, ),  # 1
)


class performLogin_args(object):
    """
    Attributes:
     - authMethod
     - authString
    """


    def __init__(self, authMethod=None, authString=None,):
        self.authMethod = authMethod
        self.authString = authString

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRING:
                    self.authMethod = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.authString = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('performLogin_args')
        if self.authMethod is not None:
            oprot.writeFieldBegin('authMethod', TType.STRING, 1)
            oprot.writeString(self.authMethod.encode('utf-8') if sys.version_info[0] == 2 else self.authMethod)
            oprot.writeFieldEnd()
        if self.authString is not None:
            oprot.writeFieldBegin('authString', TType.STRING, 2)
            oprot.writeString(self.authString.encode('utf-8') if sys.version_info[0] == 2 else self.authString)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)
all_structs.append(performLogin_args)
performLogin_args.thrift_spec = (
    None,  # 0
    (1, TType.STRING, 'authMethod', 'UTF8', None, ),  # 1
    (2, TType.STRING, 'authString', 'UTF8', None, ),  # 2
)


class performLogin_result(object):
    """
    Attributes:
     - success
     - requestError
    """


    def __init__(self, success=None, requestError=None,):
        self.success = success
        self.requestError = requestError

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 0:
                if ftype == TType.STRING:
                    self.success = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 1:
                if ftype == TType.STRUCT:
                    self.requestError = codechecker_api_shared.ttypes.RequestFailed()
                    self.requestError.read(iprot)
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('performLogin_result')
        if self.success is not None:
            oprot.writeFieldBegin('success', TType.STRING, 0)
            oprot.writeString(self.success.encode('utf-8') if sys.version_info[0] == 2 else self.success)
            oprot.writeFieldEnd()
        if self.requestError is not None:
            oprot.writeFieldBegin('requestError', TType.STRUCT, 1)
            self.requestError.write(oprot)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)
all_structs.append(performLogin_result)
performLogin_result.thrift_spec = (
    (0, TType.STRING, 'success', 'UTF8', None, ),  # 0
    (1, TType.STRUCT, 'requestError', [codechecker_api_shared.ttypes.RequestFailed, None], None, ),  # 1
)


class destroySession_args(object):


    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('destroySession_args')
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)
all_structs.append(destroySession_args)
destroySession_args.thrift_spec = (
)


class destroySession_result(object):
    """
    Attributes:
     - success
     - requestError
    """


    def __init__(self, success=None, requestError=None,):
        self.success = success
        self.requestError = requestError

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 0:
                if ftype == TType.BOOL:
                    self.success = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 1:
                if ftype == TType.STRUCT:
                    self.requestError = codechecker_api_shared.ttypes.RequestFailed()
                    self.requestError.read(iprot)
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('destroySession_result')
        if self.success is not None:
            oprot.writeFieldBegin('success', TType.BOOL, 0)
            oprot.writeBool(self.success)
            oprot.writeFieldEnd()
        if self.requestError is not None:
            oprot.writeFieldBegin('requestError', TType.STRUCT, 1)
            self.requestError.write(oprot)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)
all_structs.append(destroySession_result)
destroySession_result.thrift_spec = (
    (0, TType.BOOL, 'success', None, None, ),  # 0
    (1, TType.STRUCT, 'requestError', [codechecker_api_shared.ttypes.RequestFailed, None], None, ),  # 1
)


class getLoggedInUser_args(object):


    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('getLoggedInUser_args')
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)
all_structs.append(getLoggedInUser_args)
getLoggedInUser_args.thrift_spec = (
)


class getLoggedInUser_result(object):
    """
    Attributes:
     - success
     - requestError
    """


    def __init__(self, success=None, requestError=None,):
        self.success = success
        self.requestError = requestError

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 0:
                if ftype == TType.STRING:
                    self.success = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 1:
                if ftype == TType.STRUCT:
                    self.requestError = codechecker_api_shared.ttypes.RequestFailed()
                    self.requestError.read(iprot)
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('getLoggedInUser_result')
        if self.success is not None:
            oprot.writeFieldBegin('success', TType.STRING, 0)
            oprot.writeString(self.success.encode('utf-8') if sys.version_info[0] == 2 else self.success)
            oprot.writeFieldEnd()
        if self.requestError is not None:
            oprot.writeFieldBegin('requestError', TType.STRUCT, 1)
            self.requestError.write(oprot)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)
all_structs.append(getLoggedInUser_result)
getLoggedInUser_result.thrift_spec = (
    (0, TType.STRING, 'success', 'UTF8', None, ),  # 0
    (1, TType.STRUCT, 'requestError', [codechecker_api_shared.ttypes.RequestFailed, None], None, ),  # 1
)


class getPermissions_args(object):
    """
    Attributes:
     - scope
    """


    def __init__(self, scope=None,):
        self.scope = scope

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRING:
                    self.scope = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('getPermissions_args')
        if self.scope is not None:
            oprot.writeFieldBegin('scope', TType.STRING, 1)
            oprot.writeString(self.scope.encode('utf-8') if sys.version_info[0] == 2 else self.scope)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)
all_structs.append(getPermissions_args)
getPermissions_args.thrift_spec = (
    None,  # 0
    (1, TType.STRING, 'scope', 'UTF8', None, ),  # 1
)


class getPermissions_result(object):
    """
    Attributes:
     - success
    """


    def __init__(self, success=None,):
        self.success = success

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 0:
                if ftype == TType.LIST:
                    self.success = []
                    (_etype65, _size62) = iprot.readListBegin()
                    for _i66 in range(_size62):
                        _elem67 = iprot.readI32()
                        self.success.append(_elem67)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('getPermissions_result')
        if self.success is not None:
            oprot.writeFieldBegin('success', TType.LIST, 0)
            oprot.writeListBegin(TType.I32, len(self.success))
            for iter68 in self.success:
                oprot.writeI32(iter68)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)
all_structs.append(getPermissions_result)
getPermissions_result.thrift_spec = (
    (0, TType.LIST, 'success', (TType.I32, None, False), None, ),  # 0
)


class getPermissionsForUser_args(object):
    """
    Attributes:
     - scope
     - extraParams
     - filter
    """


    def __init__(self, scope=None, extraParams=None, filter=None,):
        self.scope = scope
        self.extraParams = extraParams
        self.filter = filter

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRING:
                    self.scope = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.extraParams = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRUCT:
                    self.filter = PermissionFilter()
                    self.filter.read(iprot)
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('getPermissionsForUser_args')
        if self.scope is not None:
            oprot.writeFieldBegin('scope', TType.STRING, 1)
            oprot.writeString(self.scope.encode('utf-8') if sys.version_info[0] == 2 else self.scope)
            oprot.writeFieldEnd()
        if self.extraParams is not None:
            oprot.writeFieldBegin('extraParams', TType.STRING, 2)
            oprot.writeString(self.extraParams.encode('utf-8') if sys.version_info[0] == 2 else self.extraParams)
            oprot.writeFieldEnd()
        if self.filter is not None:
            oprot.writeFieldBegin('filter', TType.STRUCT, 3)
            self.filter.write(oprot)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)
all_structs.append(getPermissionsForUser_args)
getPermissionsForUser_args.thrift_spec = (
    None,  # 0
    (1, TType.STRING, 'scope', 'UTF8', None, ),  # 1
    (2, TType.STRING, 'extraParams', 'UTF8', None, ),  # 2
    (3, TType.STRUCT, 'filter', [PermissionFilter, None], None, ),  # 3
)


class getPermissionsForUser_result(object):
    """
    Attributes:
     - success
     - requestError
    """


    def __init__(self, success=None, requestError=None,):
        self.success = success
        self.requestError = requestError

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 0:
                if ftype == TType.LIST:
                    self.success = []
                    (_etype72, _size69) = iprot.readListBegin()
                    for _i73 in range(_size69):
                        _elem74 = iprot.readI32()
                        self.success.append(_elem74)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 1:
                if ftype == TType.STRUCT:
                    self.requestError = codechecker_api_shared.ttypes.RequestFailed()
                    self.requestError.read(iprot)
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('getPermissionsForUser_result')
        if self.success is not None:
            oprot.writeFieldBegin('success', TType.LIST, 0)
            oprot.writeListBegin(TType.I32, len(self.success))
            for iter75 in self.success:
                oprot.writeI32(iter75)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        if self.requestError is not None:
            oprot.writeFieldBegin('requestError', TType.STRUCT, 1)
            self.requestError.write(oprot)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)
all_structs.append(getPermissionsForUser_result)
getPermissionsForUser_result.thrift_spec = (
    (0, TType.LIST, 'success', (TType.I32, None, False), None, ),  # 0
    (1, TType.STRUCT, 'requestError', [codechecker_api_shared.ttypes.RequestFailed, None], None, ),  # 1
)


class getAuthorisedNames_args(object):
    """
    Attributes:
     - permission
     - extraParams
    """


    def __init__(self, permission=None, extraParams=None,):
        self.permission = permission
        self.extraParams = extraParams

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.I32:
                    self.permission = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.extraParams = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('getAuthorisedNames_args')
        if self.permission is not None:
            oprot.writeFieldBegin('permission', TType.I32, 1)
            oprot.writeI32(self.permission)
            oprot.writeFieldEnd()
        if self.extraParams is not None:
            oprot.writeFieldBegin('extraParams', TType.STRING, 2)
            oprot.writeString(self.extraParams.encode('utf-8') if sys.version_info[0] == 2 else self.extraParams)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)
all_structs.append(getAuthorisedNames_args)
getAuthorisedNames_args.thrift_spec = (
    None,  # 0
    (1, TType.I32, 'permission', None, None, ),  # 1
    (2, TType.STRING, 'extraParams', 'UTF8', None, ),  # 2
)


class getAuthorisedNames_result(object):
    """
    Attributes:
     - success
     - requestError
    """


    def __init__(self, success=None, requestError=None,):
        self.success = success
        self.requestError = requestError

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 0:
                if ftype == TType.STRUCT:
                    self.success = AuthorisationList()
                    self.success.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 1:
                if ftype == TType.STRUCT:
                    self.requestError = codechecker_api_shared.ttypes.RequestFailed()
                    self.requestError.read(iprot)
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('getAuthorisedNames_result')
        if self.success is not None:
            oprot.writeFieldBegin('success', TType.STRUCT, 0)
            self.success.write(oprot)
            oprot.writeFieldEnd()
        if self.requestError is not None:
            oprot.writeFieldBegin('requestError', TType.STRUCT, 1)
            self.requestError.write(oprot)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)
all_structs.append(getAuthorisedNames_result)
getAuthorisedNames_result.thrift_spec = (
    (0, TType.STRUCT, 'success', [AuthorisationList, None], None, ),  # 0
    (1, TType.STRUCT, 'requestError', [codechecker_api_shared.ttypes.RequestFailed, None], None, ),  # 1
)


class addPermission_args(object):
    """
    Attributes:
     - permission
     - authName
     - isGroup
     - extraParams
    """


    def __init__(self, permission=None, authName=None, isGroup=None, extraParams=None,):
        self.permission = permission
        self.authName = authName
        self.isGroup = isGroup
        self.extraParams = extraParams

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.I32:
                    self.permission = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.authName = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.BOOL:
                    self.isGroup = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.STRING:
                    self.extraParams = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('addPermission_args')
        if self.permission is not None:
            oprot.writeFieldBegin('permission', TType.I32, 1)
            oprot.writeI32(self.permission)
            oprot.writeFieldEnd()
        if self.authName is not None:
            oprot.writeFieldBegin('authName', TType.STRING, 2)
            oprot.writeString(self.authName.encode('utf-8') if sys.version_info[0] == 2 else self.authName)
            oprot.writeFieldEnd()
        if self.isGroup is not None:
            oprot.writeFieldBegin('isGroup', TType.BOOL, 3)
            oprot.writeBool(self.isGroup)
            oprot.writeFieldEnd()
        if self.extraParams is not None:
            oprot.writeFieldBegin('extraParams', TType.STRING, 4)
            oprot.writeString(self.extraParams.encode('utf-8') if sys.version_info[0] == 2 else self.extraParams)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)
all_structs.append(addPermission_args)
addPermission_args.thrift_spec = (
    None,  # 0
    (1, TType.I32, 'permission', None, None, ),  # 1
    (2, TType.STRING, 'authName', 'UTF8', None, ),  # 2
    (3, TType.BOOL, 'isGroup', None, None, ),  # 3
    (4, TType.STRING, 'extraParams', 'UTF8', None, ),  # 4
)


class addPermission_result(object):
    """
    Attributes:
     - success
     - requestError
    """


    def __init__(self, success=None, requestError=None,):
        self.success = success
        self.requestError = requestError

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 0:
                if ftype == TType.BOOL:
                    self.success = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 1:
                if ftype == TType.STRUCT:
                    self.requestError = codechecker_api_shared.ttypes.RequestFailed()
                    self.requestError.read(iprot)
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('addPermission_result')
        if self.success is not None:
            oprot.writeFieldBegin('success', TType.BOOL, 0)
            oprot.writeBool(self.success)
            oprot.writeFieldEnd()
        if self.requestError is not None:
            oprot.writeFieldBegin('requestError', TType.STRUCT, 1)
            self.requestError.write(oprot)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)
all_structs.append(addPermission_result)
addPermission_result.thrift_spec = (
    (0, TType.BOOL, 'success', None, None, ),  # 0
    (1, TType.STRUCT, 'requestError', [codechecker_api_shared.ttypes.RequestFailed, None], None, ),  # 1
)


class removePermission_args(object):
    """
    Attributes:
     - permission
     - authName
     - isGroup
     - extraParams
    """


    def __init__(self, permission=None, authName=None, isGroup=None, extraParams=None,):
        self.permission = permission
        self.authName = authName
        self.isGroup = isGroup
        self.extraParams = extraParams

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.I32:
                    self.permission = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.authName = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.BOOL:
                    self.isGroup = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.STRING:
                    self.extraParams = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('removePermission_args')
        if self.permission is not None:
            oprot.writeFieldBegin('permission', TType.I32, 1)
            oprot.writeI32(self.permission)
            oprot.writeFieldEnd()
        if self.authName is not None:
            oprot.writeFieldBegin('authName', TType.STRING, 2)
            oprot.writeString(self.authName.encode('utf-8') if sys.version_info[0] == 2 else self.authName)
            oprot.writeFieldEnd()
        if self.isGroup is not None:
            oprot.writeFieldBegin('isGroup', TType.BOOL, 3)
            oprot.writeBool(self.isGroup)
            oprot.writeFieldEnd()
        if self.extraParams is not None:
            oprot.writeFieldBegin('extraParams', TType.STRING, 4)
            oprot.writeString(self.extraParams.encode('utf-8') if sys.version_info[0] == 2 else self.extraParams)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)
all_structs.append(removePermission_args)
removePermission_args.thrift_spec = (
    None,  # 0
    (1, TType.I32, 'permission', None, None, ),  # 1
    (2, TType.STRING, 'authName', 'UTF8', None, ),  # 2
    (3, TType.BOOL, 'isGroup', None, None, ),  # 3
    (4, TType.STRING, 'extraParams', 'UTF8', None, ),  # 4
)


class removePermission_result(object):
    """
    Attributes:
     - success
     - requestError
    """


    def __init__(self, success=None, requestError=None,):
        self.success = success
        self.requestError = requestError

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 0:
                if ftype == TType.BOOL:
                    self.success = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 1:
                if ftype == TType.STRUCT:
                    self.requestError = codechecker_api_shared.ttypes.RequestFailed()
                    self.requestError.read(iprot)
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('removePermission_result')
        if self.success is not None:
            oprot.writeFieldBegin('success', TType.BOOL, 0)
            oprot.writeBool(self.success)
            oprot.writeFieldEnd()
        if self.requestError is not None:
            oprot.writeFieldBegin('requestError', TType.STRUCT, 1)
            self.requestError.write(oprot)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)
all_structs.append(removePermission_result)
removePermission_result.thrift_spec = (
    (0, TType.BOOL, 'success', None, None, ),  # 0
    (1, TType.STRUCT, 'requestError', [codechecker_api_shared.ttypes.RequestFailed, None], None, ),  # 1
)


class hasPermission_args(object):
    """
    Attributes:
     - permission
     - extraParams
    """


    def __init__(self, permission=None, extraParams=None,):
        self.permission = permission
        self.extraParams = extraParams

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.I32:
                    self.permission = iprot.readI32()
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.extraParams = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('hasPermission_args')
        if self.permission is not None:
            oprot.writeFieldBegin('permission', TType.I32, 1)
            oprot.writeI32(self.permission)
            oprot.writeFieldEnd()
        if self.extraParams is not None:
            oprot.writeFieldBegin('extraParams', TType.STRING, 2)
            oprot.writeString(self.extraParams.encode('utf-8') if sys.version_info[0] == 2 else self.extraParams)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)
all_structs.append(hasPermission_args)
hasPermission_args.thrift_spec = (
    None,  # 0
    (1, TType.I32, 'permission', None, None, ),  # 1
    (2, TType.STRING, 'extraParams', 'UTF8', None, ),  # 2
)


class hasPermission_result(object):
    """
    Attributes:
     - success
     - requestError
    """


    def __init__(self, success=None, requestError=None,):
        self.success = success
        self.requestError = requestError

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 0:
                if ftype == TType.BOOL:
                    self.success = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 1:
                if ftype == TType.STRUCT:
                    self.requestError = codechecker_api_shared.ttypes.RequestFailed()
                    self.requestError.read(iprot)
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('hasPermission_result')
        if self.success is not None:
            oprot.writeFieldBegin('success', TType.BOOL, 0)
            oprot.writeBool(self.success)
            oprot.writeFieldEnd()
        if self.requestError is not None:
            oprot.writeFieldBegin('requestError', TType.STRUCT, 1)
            self.requestError.write(oprot)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)
all_structs.append(hasPermission_result)
hasPermission_result.thrift_spec = (
    (0, TType.BOOL, 'success', None, None, ),  # 0
    (1, TType.STRUCT, 'requestError', [codechecker_api_shared.ttypes.RequestFailed, None], None, ),  # 1
)


class getTokens_args(object):


    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('getTokens_args')
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)
all_structs.append(getTokens_args)
getTokens_args.thrift_spec = (
)


class getTokens_result(object):
    """
    Attributes:
     - success
     - requestError
    """


    def __init__(self, success=None, requestError=None,):
        self.success = success
        self.requestError = requestError

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 0:
                if ftype == TType.LIST:
                    self.success = []
                    (_etype79, _size76) = iprot.readListBegin()
                    for _i80 in range(_size76):
                        _elem81 = SessionTokenData()
                        _elem81.read(iprot)
                        self.success.append(_elem81)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 1:
                if ftype == TType.STRUCT:
                    self.requestError = codechecker_api_shared.ttypes.RequestFailed()
                    self.requestError.read(iprot)
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('getTokens_result')
        if self.success is not None:
            oprot.writeFieldBegin('success', TType.LIST, 0)
            oprot.writeListBegin(TType.STRUCT, len(self.success))
            for iter82 in self.success:
                iter82.write(oprot)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        if self.requestError is not None:
            oprot.writeFieldBegin('requestError', TType.STRUCT, 1)
            self.requestError.write(oprot)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)
all_structs.append(getTokens_result)
getTokens_result.thrift_spec = (
    (0, TType.LIST, 'success', (TType.STRUCT, [SessionTokenData, None], False), None, ),  # 0
    (1, TType.STRUCT, 'requestError', [codechecker_api_shared.ttypes.RequestFailed, None], None, ),  # 1
)


class newToken_args(object):
    """
    Attributes:
     - description
    """


    def __init__(self, description=None,):
        self.description = description

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRING:
                    self.description = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('newToken_args')
        if self.description is not None:
            oprot.writeFieldBegin('description', TType.STRING, 1)
            oprot.writeString(self.description.encode('utf-8') if sys.version_info[0] == 2 else self.description)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)
all_structs.append(newToken_args)
newToken_args.thrift_spec = (
    None,  # 0
    (1, TType.STRING, 'description', 'UTF8', None, ),  # 1
)


class newToken_result(object):
    """
    Attributes:
     - success
     - requestError
    """


    def __init__(self, success=None, requestError=None,):
        self.success = success
        self.requestError = requestError

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 0:
                if ftype == TType.STRUCT:
                    self.success = SessionTokenData()
                    self.success.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 1:
                if ftype == TType.STRUCT:
                    self.requestError = codechecker_api_shared.ttypes.RequestFailed()
                    self.requestError.read(iprot)
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('newToken_result')
        if self.success is not None:
            oprot.writeFieldBegin('success', TType.STRUCT, 0)
            self.success.write(oprot)
            oprot.writeFieldEnd()
        if self.requestError is not None:
            oprot.writeFieldBegin('requestError', TType.STRUCT, 1)
            self.requestError.write(oprot)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)
all_structs.append(newToken_result)
newToken_result.thrift_spec = (
    (0, TType.STRUCT, 'success', [SessionTokenData, None], None, ),  # 0
    (1, TType.STRUCT, 'requestError', [codechecker_api_shared.ttypes.RequestFailed, None], None, ),  # 1
)


class removeToken_args(object):
    """
    Attributes:
     - token
    """


    def __init__(self, token=None,):
        self.token = token

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 1:
                if ftype == TType.STRING:
                    self.token = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('removeToken_args')
        if self.token is not None:
            oprot.writeFieldBegin('token', TType.STRING, 1)
            oprot.writeString(self.token.encode('utf-8') if sys.version_info[0] == 2 else self.token)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)
all_structs.append(removeToken_args)
removeToken_args.thrift_spec = (
    None,  # 0
    (1, TType.STRING, 'token', 'UTF8', None, ),  # 1
)


class removeToken_result(object):
    """
    Attributes:
     - success
     - requestError
    """


    def __init__(self, success=None, requestError=None,):
        self.success = success
        self.requestError = requestError

    def read(self, iprot):
        if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
            iprot._fast_decode(self, iprot, [self.__class__, self.thrift_spec])
            return
        iprot.readStructBegin()
        while True:
            (fname, ftype, fid) = iprot.readFieldBegin()
            if ftype == TType.STOP:
                break
            if fid == 0:
                if ftype == TType.BOOL:
                    self.success = iprot.readBool()
                else:
                    iprot.skip(ftype)
            elif fid == 1:
                if ftype == TType.STRUCT:
                    self.requestError = codechecker_api_shared.ttypes.RequestFailed()
                    self.requestError.read(iprot)
                else:
                    iprot.skip(ftype)
            else:
                iprot.skip(ftype)
            iprot.readFieldEnd()
        iprot.readStructEnd()

    def write(self, oprot):
        if oprot._fast_encode is not None and self.thrift_spec is not None:
            oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
            return
        oprot.writeStructBegin('removeToken_result')
        if self.success is not None:
            oprot.writeFieldBegin('success', TType.BOOL, 0)
            oprot.writeBool(self.success)
            oprot.writeFieldEnd()
        if self.requestError is not None:
            oprot.writeFieldBegin('requestError', TType.STRUCT, 1)
            self.requestError.write(oprot)
            oprot.writeFieldEnd()
        oprot.writeFieldStop()
        oprot.writeStructEnd()

    def validate(self):
        return

    def __repr__(self):
        L = ['%s=%r' % (key, value)
             for key, value in self.__dict__.items()]
        return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

    def __eq__(self, other):
        return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not (self == other)
all_structs.append(removeToken_result)
removeToken_result.thrift_spec = (
    (0, TType.BOOL, 'success', None, None, ),  # 0
    (1, TType.STRUCT, 'requestError', [codechecker_api_shared.ttypes.RequestFailed, None], None, ),  # 1
)
fix_spec(all_structs)
del all_structs

