#
# 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 createGroup(self, authInfo, name):
        """
        Parameters:
         - authInfo
         - name
        """
        pass

    def createGroup2(self, authInfo, group):
        """
        Parameters:
         - authInfo
         - group
        """
        pass

    def createUser(self, authinfo, user):
        """
        Parameters:
         - authinfo
         - user
        """
        pass

    def deleteGroup(self, authInfo, groupId):
        """
        Parameters:
         - authInfo
         - groupId
        """
        pass

    def deleteUser(self, authInfo, userId, responsibleUser):
        """
        Parameters:
         - authInfo
         - userId
         - responsibleUser
        """
        pass

    def getGroupById(self, authInfo, groupId):
        """
        Parameters:
         - authInfo
         - groupId
        """
        pass

    def getUserById(self, authInfo, userId):
        """
        Parameters:
         - authInfo
         - userId
        """
        pass

    def getAllGroups(self, authInfo):
        """
        Parameters:
         - authInfo
        """
        pass

    def getAllUsers(self, authInfo):
        """
        Parameters:
         - authInfo
        """
        pass

    def resetPaswordByEmail(self, email):
        """
        Parameters:
         - email
        """
        pass

    def confirmResetPassword(self, passwordResetHash):
        """
        Parameters:
         - passwordResetHash
        """
        pass

    def setUserPassword(self, authInfo, userId, newPassword):
        """
        Parameters:
         - authInfo
         - userId
         - newPassword
        """
        pass

    def updateGroup(self, authInfo, group):
        """
        Parameters:
         - authInfo
         - group
        """
        pass

    def updateUser(self, authInfo, user):
        """
        Parameters:
         - authInfo
         - user
        """
        pass

    def authenticateUser(self, authInfo, externalId, params):
        """
        Parameters:
         - authInfo
         - externalId
         - params
        """
        pass

    def getAllSystemPermissions(self, auth):
        """
        Parameters:
         - auth
        """
        pass

    def getPermissionsForUser(self, auth, userId):
        """
        Parameters:
         - auth
         - userId
        """
        pass

    def getAllDataSetPermissions(self, auth):
        """
        Parameters:
         - auth
        """
        pass

    def auditLogout(self, auth, userId):
        """
        Parameters:
         - auth
         - userId
        """
        pass

    def createAPIToken(self, auth, displayName):
        """
        Parameters:
         - auth
         - displayName
        """
        pass

    def disableAPIToken(self, auth, id):
        """
        Parameters:
         - auth
         - id
        """
        pass

    def listAPITokens(self, auth):
        """
        Parameters:
         - auth
        """
        pass

    def updateAPITokenName(self, auth, apiToken):
        """
        Parameters:
         - auth
         - apiToken
        """
        pass

    def updateAPITokenGroups(self, auth, apiToken):
        """
        Parameters:
         - auth
         - apiToken
        """
        pass

    def getAPITokenById(self, auth, id):
        """
        Parameters:
         - auth
         - id
        """
        pass

    def getAPITokensByGroupId(self, auth, groupId):
        """
        Parameters:
         - auth
         - groupId
        """
        pass

    def authenticateAPIToken(self, id):
        """
        Parameters:
         - id
        """
        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 createGroup(self, authInfo, name):
        """
        Parameters:
         - authInfo
         - name
        """
        self.send_createGroup(authInfo, name)
        return self.recv_createGroup()

    def send_createGroup(self, authInfo, name):
        self._oprot.writeMessageBegin('createGroup', TMessageType.CALL, self._seqid)
        args = createGroup_args()
        args.authInfo = authInfo
        args.name = name
        args.write(self._oprot)
        self._oprot.writeMessageEnd()
        self._oprot.trans.flush()

    def recv_createGroup(self):
        iprot = self._iprot
        (fname, mtype, rseqid) = iprot.readMessageBegin()
        if mtype == TMessageType.EXCEPTION:
            x = TApplicationException()
            x.read(iprot)
            iprot.readMessageEnd()
            raise x
        result = createGroup_result()
        result.read(iprot)
        iprot.readMessageEnd()
        if result.success is not None:
            return result.success
        if result.ke is not None:
            raise result.ke
        if result.ae is not None:
            raise result.ae
        if result.ce is not None:
            raise result.ce
        raise TApplicationException(TApplicationException.MISSING_RESULT, "createGroup failed: unknown result")

    def createGroup2(self, authInfo, group):
        """
        Parameters:
         - authInfo
         - group
        """
        self.send_createGroup2(authInfo, group)
        return self.recv_createGroup2()

    def send_createGroup2(self, authInfo, group):
        self._oprot.writeMessageBegin('createGroup2', TMessageType.CALL, self._seqid)
        args = createGroup2_args()
        args.authInfo = authInfo
        args.group = group
        args.write(self._oprot)
        self._oprot.writeMessageEnd()
        self._oprot.trans.flush()

    def recv_createGroup2(self):
        iprot = self._iprot
        (fname, mtype, rseqid) = iprot.readMessageBegin()
        if mtype == TMessageType.EXCEPTION:
            x = TApplicationException()
            x.read(iprot)
            iprot.readMessageEnd()
            raise x
        result = createGroup2_result()
        result.read(iprot)
        iprot.readMessageEnd()
        if result.success is not None:
            return result.success
        if result.ke is not None:
            raise result.ke
        if result.ae is not None:
            raise result.ae
        if result.ce is not None:
            raise result.ce
        raise TApplicationException(TApplicationException.MISSING_RESULT, "createGroup2 failed: unknown result")

    def createUser(self, authinfo, user):
        """
        Parameters:
         - authinfo
         - user
        """
        self.send_createUser(authinfo, user)
        return self.recv_createUser()

    def send_createUser(self, authinfo, user):
        self._oprot.writeMessageBegin('createUser', TMessageType.CALL, self._seqid)
        args = createUser_args()
        args.authinfo = authinfo
        args.user = user
        args.write(self._oprot)
        self._oprot.writeMessageEnd()
        self._oprot.trans.flush()

    def recv_createUser(self):
        iprot = self._iprot
        (fname, mtype, rseqid) = iprot.readMessageBegin()
        if mtype == TMessageType.EXCEPTION:
            x = TApplicationException()
            x.read(iprot)
            iprot.readMessageEnd()
            raise x
        result = createUser_result()
        result.read(iprot)
        iprot.readMessageEnd()
        if result.success is not None:
            return result.success
        if result.ke is not None:
            raise result.ke
        if result.ae is not None:
            raise result.ae
        if result.ce is not None:
            raise result.ce
        raise TApplicationException(TApplicationException.MISSING_RESULT, "createUser failed: unknown result")

    def deleteGroup(self, authInfo, groupId):
        """
        Parameters:
         - authInfo
         - groupId
        """
        self.send_deleteGroup(authInfo, groupId)
        return self.recv_deleteGroup()

    def send_deleteGroup(self, authInfo, groupId):
        self._oprot.writeMessageBegin('deleteGroup', TMessageType.CALL, self._seqid)
        args = deleteGroup_args()
        args.authInfo = authInfo
        args.groupId = groupId
        args.write(self._oprot)
        self._oprot.writeMessageEnd()
        self._oprot.trans.flush()

    def recv_deleteGroup(self):
        iprot = self._iprot
        (fname, mtype, rseqid) = iprot.readMessageBegin()
        if mtype == TMessageType.EXCEPTION:
            x = TApplicationException()
            x.read(iprot)
            iprot.readMessageEnd()
            raise x
        result = deleteGroup_result()
        result.read(iprot)
        iprot.readMessageEnd()
        if result.success is not None:
            return result.success
        if result.ke is not None:
            raise result.ke
        if result.ae is not None:
            raise result.ae
        if result.ce is not None:
            raise result.ce
        raise TApplicationException(TApplicationException.MISSING_RESULT, "deleteGroup failed: unknown result")

    def deleteUser(self, authInfo, userId, responsibleUser):
        """
        Parameters:
         - authInfo
         - userId
         - responsibleUser
        """
        self.send_deleteUser(authInfo, userId, responsibleUser)
        return self.recv_deleteUser()

    def send_deleteUser(self, authInfo, userId, responsibleUser):
        self._oprot.writeMessageBegin('deleteUser', TMessageType.CALL, self._seqid)
        args = deleteUser_args()
        args.authInfo = authInfo
        args.userId = userId
        args.responsibleUser = responsibleUser
        args.write(self._oprot)
        self._oprot.writeMessageEnd()
        self._oprot.trans.flush()

    def recv_deleteUser(self):
        iprot = self._iprot
        (fname, mtype, rseqid) = iprot.readMessageBegin()
        if mtype == TMessageType.EXCEPTION:
            x = TApplicationException()
            x.read(iprot)
            iprot.readMessageEnd()
            raise x
        result = deleteUser_result()
        result.read(iprot)
        iprot.readMessageEnd()
        if result.success is not None:
            return result.success
        if result.ke is not None:
            raise result.ke
        if result.ae is not None:
            raise result.ae
        if result.ce is not None:
            raise result.ce
        raise TApplicationException(TApplicationException.MISSING_RESULT, "deleteUser failed: unknown result")

    def getGroupById(self, authInfo, groupId):
        """
        Parameters:
         - authInfo
         - groupId
        """
        self.send_getGroupById(authInfo, groupId)
        return self.recv_getGroupById()

    def send_getGroupById(self, authInfo, groupId):
        self._oprot.writeMessageBegin('getGroupById', TMessageType.CALL, self._seqid)
        args = getGroupById_args()
        args.authInfo = authInfo
        args.groupId = groupId
        args.write(self._oprot)
        self._oprot.writeMessageEnd()
        self._oprot.trans.flush()

    def recv_getGroupById(self):
        iprot = self._iprot
        (fname, mtype, rseqid) = iprot.readMessageBegin()
        if mtype == TMessageType.EXCEPTION:
            x = TApplicationException()
            x.read(iprot)
            iprot.readMessageEnd()
            raise x
        result = getGroupById_result()
        result.read(iprot)
        iprot.readMessageEnd()
        if result.success is not None:
            return result.success
        if result.ke is not None:
            raise result.ke
        if result.ae is not None:
            raise result.ae
        if result.ce is not None:
            raise result.ce
        raise TApplicationException(TApplicationException.MISSING_RESULT, "getGroupById failed: unknown result")

    def getUserById(self, authInfo, userId):
        """
        Parameters:
         - authInfo
         - userId
        """
        self.send_getUserById(authInfo, userId)
        return self.recv_getUserById()

    def send_getUserById(self, authInfo, userId):
        self._oprot.writeMessageBegin('getUserById', TMessageType.CALL, self._seqid)
        args = getUserById_args()
        args.authInfo = authInfo
        args.userId = userId
        args.write(self._oprot)
        self._oprot.writeMessageEnd()
        self._oprot.trans.flush()

    def recv_getUserById(self):
        iprot = self._iprot
        (fname, mtype, rseqid) = iprot.readMessageBegin()
        if mtype == TMessageType.EXCEPTION:
            x = TApplicationException()
            x.read(iprot)
            iprot.readMessageEnd()
            raise x
        result = getUserById_result()
        result.read(iprot)
        iprot.readMessageEnd()
        if result.success is not None:
            return result.success
        if result.ke is not None:
            raise result.ke
        if result.ae is not None:
            raise result.ae
        if result.nfe is not None:
            raise result.nfe
        if result.ce is not None:
            raise result.ce
        raise TApplicationException(TApplicationException.MISSING_RESULT, "getUserById failed: unknown result")

    def getAllGroups(self, authInfo):
        """
        Parameters:
         - authInfo
        """
        self.send_getAllGroups(authInfo)
        return self.recv_getAllGroups()

    def send_getAllGroups(self, authInfo):
        self._oprot.writeMessageBegin('getAllGroups', TMessageType.CALL, self._seqid)
        args = getAllGroups_args()
        args.authInfo = authInfo
        args.write(self._oprot)
        self._oprot.writeMessageEnd()
        self._oprot.trans.flush()

    def recv_getAllGroups(self):
        iprot = self._iprot
        (fname, mtype, rseqid) = iprot.readMessageBegin()
        if mtype == TMessageType.EXCEPTION:
            x = TApplicationException()
            x.read(iprot)
            iprot.readMessageEnd()
            raise x
        result = getAllGroups_result()
        result.read(iprot)
        iprot.readMessageEnd()
        if result.success is not None:
            return result.success
        if result.ke is not None:
            raise result.ke
        if result.ae is not None:
            raise result.ae
        if result.ce is not None:
            raise result.ce
        raise TApplicationException(TApplicationException.MISSING_RESULT, "getAllGroups failed: unknown result")

    def getAllUsers(self, authInfo):
        """
        Parameters:
         - authInfo
        """
        self.send_getAllUsers(authInfo)
        return self.recv_getAllUsers()

    def send_getAllUsers(self, authInfo):
        self._oprot.writeMessageBegin('getAllUsers', TMessageType.CALL, self._seqid)
        args = getAllUsers_args()
        args.authInfo = authInfo
        args.write(self._oprot)
        self._oprot.writeMessageEnd()
        self._oprot.trans.flush()

    def recv_getAllUsers(self):
        iprot = self._iprot
        (fname, mtype, rseqid) = iprot.readMessageBegin()
        if mtype == TMessageType.EXCEPTION:
            x = TApplicationException()
            x.read(iprot)
            iprot.readMessageEnd()
            raise x
        result = getAllUsers_result()
        result.read(iprot)
        iprot.readMessageEnd()
        if result.success is not None:
            return result.success
        if result.ke is not None:
            raise result.ke
        if result.ae is not None:
            raise result.ae
        if result.ce is not None:
            raise result.ce
        raise TApplicationException(TApplicationException.MISSING_RESULT, "getAllUsers failed: unknown result")

    def resetPaswordByEmail(self, email):
        """
        Parameters:
         - email
        """
        self.send_resetPaswordByEmail(email)
        self.recv_resetPaswordByEmail()

    def send_resetPaswordByEmail(self, email):
        self._oprot.writeMessageBegin('resetPaswordByEmail', TMessageType.CALL, self._seqid)
        args = resetPaswordByEmail_args()
        args.email = email
        args.write(self._oprot)
        self._oprot.writeMessageEnd()
        self._oprot.trans.flush()

    def recv_resetPaswordByEmail(self):
        iprot = self._iprot
        (fname, mtype, rseqid) = iprot.readMessageBegin()
        if mtype == TMessageType.EXCEPTION:
            x = TApplicationException()
            x.read(iprot)
            iprot.readMessageEnd()
            raise x
        result = resetPaswordByEmail_result()
        result.read(iprot)
        iprot.readMessageEnd()
        if result.ke is not None:
            raise result.ke
        if result.ae is not None:
            raise result.ae
        return

    def confirmResetPassword(self, passwordResetHash):
        """
        Parameters:
         - passwordResetHash
        """
        self.send_confirmResetPassword(passwordResetHash)
        self.recv_confirmResetPassword()

    def send_confirmResetPassword(self, passwordResetHash):
        self._oprot.writeMessageBegin('confirmResetPassword', TMessageType.CALL, self._seqid)
        args = confirmResetPassword_args()
        args.passwordResetHash = passwordResetHash
        args.write(self._oprot)
        self._oprot.writeMessageEnd()
        self._oprot.trans.flush()

    def recv_confirmResetPassword(self):
        iprot = self._iprot
        (fname, mtype, rseqid) = iprot.readMessageBegin()
        if mtype == TMessageType.EXCEPTION:
            x = TApplicationException()
            x.read(iprot)
            iprot.readMessageEnd()
            raise x
        result = confirmResetPassword_result()
        result.read(iprot)
        iprot.readMessageEnd()
        if result.ke is not None:
            raise result.ke
        if result.ae is not None:
            raise result.ae
        if result.ce is not None:
            raise result.ce
        return

    def setUserPassword(self, authInfo, userId, newPassword):
        """
        Parameters:
         - authInfo
         - userId
         - newPassword
        """
        self.send_setUserPassword(authInfo, userId, newPassword)
        return self.recv_setUserPassword()

    def send_setUserPassword(self, authInfo, userId, newPassword):
        self._oprot.writeMessageBegin('setUserPassword', TMessageType.CALL, self._seqid)
        args = setUserPassword_args()
        args.authInfo = authInfo
        args.userId = userId
        args.newPassword = newPassword
        args.write(self._oprot)
        self._oprot.writeMessageEnd()
        self._oprot.trans.flush()

    def recv_setUserPassword(self):
        iprot = self._iprot
        (fname, mtype, rseqid) = iprot.readMessageBegin()
        if mtype == TMessageType.EXCEPTION:
            x = TApplicationException()
            x.read(iprot)
            iprot.readMessageEnd()
            raise x
        result = setUserPassword_result()
        result.read(iprot)
        iprot.readMessageEnd()
        if result.success is not None:
            return result.success
        if result.ke is not None:
            raise result.ke
        if result.ae is not None:
            raise result.ae
        if result.ce is not None:
            raise result.ce
        raise TApplicationException(TApplicationException.MISSING_RESULT, "setUserPassword failed: unknown result")

    def updateGroup(self, authInfo, group):
        """
        Parameters:
         - authInfo
         - group
        """
        self.send_updateGroup(authInfo, group)
        return self.recv_updateGroup()

    def send_updateGroup(self, authInfo, group):
        self._oprot.writeMessageBegin('updateGroup', TMessageType.CALL, self._seqid)
        args = updateGroup_args()
        args.authInfo = authInfo
        args.group = group
        args.write(self._oprot)
        self._oprot.writeMessageEnd()
        self._oprot.trans.flush()

    def recv_updateGroup(self):
        iprot = self._iprot
        (fname, mtype, rseqid) = iprot.readMessageBegin()
        if mtype == TMessageType.EXCEPTION:
            x = TApplicationException()
            x.read(iprot)
            iprot.readMessageEnd()
            raise x
        result = updateGroup_result()
        result.read(iprot)
        iprot.readMessageEnd()
        if result.success is not None:
            return result.success
        if result.ke is not None:
            raise result.ke
        if result.ae is not None:
            raise result.ae
        if result.ce is not None:
            raise result.ce
        raise TApplicationException(TApplicationException.MISSING_RESULT, "updateGroup failed: unknown result")

    def updateUser(self, authInfo, user):
        """
        Parameters:
         - authInfo
         - user
        """
        self.send_updateUser(authInfo, user)
        return self.recv_updateUser()

    def send_updateUser(self, authInfo, user):
        self._oprot.writeMessageBegin('updateUser', TMessageType.CALL, self._seqid)
        args = updateUser_args()
        args.authInfo = authInfo
        args.user = user
        args.write(self._oprot)
        self._oprot.writeMessageEnd()
        self._oprot.trans.flush()

    def recv_updateUser(self):
        iprot = self._iprot
        (fname, mtype, rseqid) = iprot.readMessageBegin()
        if mtype == TMessageType.EXCEPTION:
            x = TApplicationException()
            x.read(iprot)
            iprot.readMessageEnd()
            raise x
        result = updateUser_result()
        result.read(iprot)
        iprot.readMessageEnd()
        if result.success is not None:
            return result.success
        if result.ke is not None:
            raise result.ke
        if result.ae is not None:
            raise result.ae
        if result.ce is not None:
            raise result.ce
        raise TApplicationException(TApplicationException.MISSING_RESULT, "updateUser failed: unknown result")

    def authenticateUser(self, authInfo, externalId, params):
        """
        Parameters:
         - authInfo
         - externalId
         - params
        """
        self.send_authenticateUser(authInfo, externalId, params)
        return self.recv_authenticateUser()

    def send_authenticateUser(self, authInfo, externalId, params):
        self._oprot.writeMessageBegin('authenticateUser', TMessageType.CALL, self._seqid)
        args = authenticateUser_args()
        args.authInfo = authInfo
        args.externalId = externalId
        args.params = params
        args.write(self._oprot)
        self._oprot.writeMessageEnd()
        self._oprot.trans.flush()

    def recv_authenticateUser(self):
        iprot = self._iprot
        (fname, mtype, rseqid) = iprot.readMessageBegin()
        if mtype == TMessageType.EXCEPTION:
            x = TApplicationException()
            x.read(iprot)
            iprot.readMessageEnd()
            raise x
        result = authenticateUser_result()
        result.read(iprot)
        iprot.readMessageEnd()
        if result.success is not None:
            return result.success
        if result.ke is not None:
            raise result.ke
        if result.ae is not None:
            raise result.ae
        if result.ce is not None:
            raise result.ce
        raise TApplicationException(TApplicationException.MISSING_RESULT, "authenticateUser failed: unknown result")

    def getAllSystemPermissions(self, auth):
        """
        Parameters:
         - auth
        """
        self.send_getAllSystemPermissions(auth)
        return self.recv_getAllSystemPermissions()

    def send_getAllSystemPermissions(self, auth):
        self._oprot.writeMessageBegin('getAllSystemPermissions', TMessageType.CALL, self._seqid)
        args = getAllSystemPermissions_args()
        args.auth = auth
        args.write(self._oprot)
        self._oprot.writeMessageEnd()
        self._oprot.trans.flush()

    def recv_getAllSystemPermissions(self):
        iprot = self._iprot
        (fname, mtype, rseqid) = iprot.readMessageBegin()
        if mtype == TMessageType.EXCEPTION:
            x = TApplicationException()
            x.read(iprot)
            iprot.readMessageEnd()
            raise x
        result = getAllSystemPermissions_result()
        result.read(iprot)
        iprot.readMessageEnd()
        if result.success is not None:
            return result.success
        if result.ke is not None:
            raise result.ke
        if result.ae is not None:
            raise result.ae
        if result.ce is not None:
            raise result.ce
        raise TApplicationException(TApplicationException.MISSING_RESULT, "getAllSystemPermissions failed: unknown result")

    def getPermissionsForUser(self, auth, userId):
        """
        Parameters:
         - auth
         - userId
        """
        self.send_getPermissionsForUser(auth, userId)
        return self.recv_getPermissionsForUser()

    def send_getPermissionsForUser(self, auth, userId):
        self._oprot.writeMessageBegin('getPermissionsForUser', TMessageType.CALL, self._seqid)
        args = getPermissionsForUser_args()
        args.auth = auth
        args.userId = userId
        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.ke is not None:
            raise result.ke
        if result.ae is not None:
            raise result.ae
        if result.ce is not None:
            raise result.ce
        raise TApplicationException(TApplicationException.MISSING_RESULT, "getPermissionsForUser failed: unknown result")

    def getAllDataSetPermissions(self, auth):
        """
        Parameters:
         - auth
        """
        self.send_getAllDataSetPermissions(auth)
        return self.recv_getAllDataSetPermissions()

    def send_getAllDataSetPermissions(self, auth):
        self._oprot.writeMessageBegin('getAllDataSetPermissions', TMessageType.CALL, self._seqid)
        args = getAllDataSetPermissions_args()
        args.auth = auth
        args.write(self._oprot)
        self._oprot.writeMessageEnd()
        self._oprot.trans.flush()

    def recv_getAllDataSetPermissions(self):
        iprot = self._iprot
        (fname, mtype, rseqid) = iprot.readMessageBegin()
        if mtype == TMessageType.EXCEPTION:
            x = TApplicationException()
            x.read(iprot)
            iprot.readMessageEnd()
            raise x
        result = getAllDataSetPermissions_result()
        result.read(iprot)
        iprot.readMessageEnd()
        if result.success is not None:
            return result.success
        if result.ke is not None:
            raise result.ke
        if result.ae is not None:
            raise result.ae
        if result.ce is not None:
            raise result.ce
        raise TApplicationException(TApplicationException.MISSING_RESULT, "getAllDataSetPermissions failed: unknown result")

    def auditLogout(self, auth, userId):
        """
        Parameters:
         - auth
         - userId
        """
        self.send_auditLogout(auth, userId)
        self.recv_auditLogout()

    def send_auditLogout(self, auth, userId):
        self._oprot.writeMessageBegin('auditLogout', TMessageType.CALL, self._seqid)
        args = auditLogout_args()
        args.auth = auth
        args.userId = userId
        args.write(self._oprot)
        self._oprot.writeMessageEnd()
        self._oprot.trans.flush()

    def recv_auditLogout(self):
        iprot = self._iprot
        (fname, mtype, rseqid) = iprot.readMessageBegin()
        if mtype == TMessageType.EXCEPTION:
            x = TApplicationException()
            x.read(iprot)
            iprot.readMessageEnd()
            raise x
        result = auditLogout_result()
        result.read(iprot)
        iprot.readMessageEnd()
        if result.ke is not None:
            raise result.ke
        if result.ae is not None:
            raise result.ae
        if result.ce is not None:
            raise result.ce
        return

    def createAPIToken(self, auth, displayName):
        """
        Parameters:
         - auth
         - displayName
        """
        self.send_createAPIToken(auth, displayName)
        return self.recv_createAPIToken()

    def send_createAPIToken(self, auth, displayName):
        self._oprot.writeMessageBegin('createAPIToken', TMessageType.CALL, self._seqid)
        args = createAPIToken_args()
        args.auth = auth
        args.displayName = displayName
        args.write(self._oprot)
        self._oprot.writeMessageEnd()
        self._oprot.trans.flush()

    def recv_createAPIToken(self):
        iprot = self._iprot
        (fname, mtype, rseqid) = iprot.readMessageBegin()
        if mtype == TMessageType.EXCEPTION:
            x = TApplicationException()
            x.read(iprot)
            iprot.readMessageEnd()
            raise x
        result = createAPIToken_result()
        result.read(iprot)
        iprot.readMessageEnd()
        if result.success is not None:
            return result.success
        if result.ke is not None:
            raise result.ke
        if result.ae is not None:
            raise result.ae
        if result.ce is not None:
            raise result.ce
        raise TApplicationException(TApplicationException.MISSING_RESULT, "createAPIToken failed: unknown result")

    def disableAPIToken(self, auth, id):
        """
        Parameters:
         - auth
         - id
        """
        self.send_disableAPIToken(auth, id)
        return self.recv_disableAPIToken()

    def send_disableAPIToken(self, auth, id):
        self._oprot.writeMessageBegin('disableAPIToken', TMessageType.CALL, self._seqid)
        args = disableAPIToken_args()
        args.auth = auth
        args.id = id
        args.write(self._oprot)
        self._oprot.writeMessageEnd()
        self._oprot.trans.flush()

    def recv_disableAPIToken(self):
        iprot = self._iprot
        (fname, mtype, rseqid) = iprot.readMessageBegin()
        if mtype == TMessageType.EXCEPTION:
            x = TApplicationException()
            x.read(iprot)
            iprot.readMessageEnd()
            raise x
        result = disableAPIToken_result()
        result.read(iprot)
        iprot.readMessageEnd()
        if result.success is not None:
            return result.success
        if result.ke is not None:
            raise result.ke
        if result.ae is not None:
            raise result.ae
        if result.ce is not None:
            raise result.ce
        raise TApplicationException(TApplicationException.MISSING_RESULT, "disableAPIToken failed: unknown result")

    def listAPITokens(self, auth):
        """
        Parameters:
         - auth
        """
        self.send_listAPITokens(auth)
        return self.recv_listAPITokens()

    def send_listAPITokens(self, auth):
        self._oprot.writeMessageBegin('listAPITokens', TMessageType.CALL, self._seqid)
        args = listAPITokens_args()
        args.auth = auth
        args.write(self._oprot)
        self._oprot.writeMessageEnd()
        self._oprot.trans.flush()

    def recv_listAPITokens(self):
        iprot = self._iprot
        (fname, mtype, rseqid) = iprot.readMessageBegin()
        if mtype == TMessageType.EXCEPTION:
            x = TApplicationException()
            x.read(iprot)
            iprot.readMessageEnd()
            raise x
        result = listAPITokens_result()
        result.read(iprot)
        iprot.readMessageEnd()
        if result.success is not None:
            return result.success
        if result.ke is not None:
            raise result.ke
        if result.ae is not None:
            raise result.ae
        if result.ce is not None:
            raise result.ce
        raise TApplicationException(TApplicationException.MISSING_RESULT, "listAPITokens failed: unknown result")

    def updateAPITokenName(self, auth, apiToken):
        """
        Parameters:
         - auth
         - apiToken
        """
        self.send_updateAPITokenName(auth, apiToken)
        return self.recv_updateAPITokenName()

    def send_updateAPITokenName(self, auth, apiToken):
        self._oprot.writeMessageBegin('updateAPITokenName', TMessageType.CALL, self._seqid)
        args = updateAPITokenName_args()
        args.auth = auth
        args.apiToken = apiToken
        args.write(self._oprot)
        self._oprot.writeMessageEnd()
        self._oprot.trans.flush()

    def recv_updateAPITokenName(self):
        iprot = self._iprot
        (fname, mtype, rseqid) = iprot.readMessageBegin()
        if mtype == TMessageType.EXCEPTION:
            x = TApplicationException()
            x.read(iprot)
            iprot.readMessageEnd()
            raise x
        result = updateAPITokenName_result()
        result.read(iprot)
        iprot.readMessageEnd()
        if result.success is not None:
            return result.success
        if result.ke is not None:
            raise result.ke
        if result.ae is not None:
            raise result.ae
        if result.ce is not None:
            raise result.ce
        raise TApplicationException(TApplicationException.MISSING_RESULT, "updateAPITokenName failed: unknown result")

    def updateAPITokenGroups(self, auth, apiToken):
        """
        Parameters:
         - auth
         - apiToken
        """
        self.send_updateAPITokenGroups(auth, apiToken)
        return self.recv_updateAPITokenGroups()

    def send_updateAPITokenGroups(self, auth, apiToken):
        self._oprot.writeMessageBegin('updateAPITokenGroups', TMessageType.CALL, self._seqid)
        args = updateAPITokenGroups_args()
        args.auth = auth
        args.apiToken = apiToken
        args.write(self._oprot)
        self._oprot.writeMessageEnd()
        self._oprot.trans.flush()

    def recv_updateAPITokenGroups(self):
        iprot = self._iprot
        (fname, mtype, rseqid) = iprot.readMessageBegin()
        if mtype == TMessageType.EXCEPTION:
            x = TApplicationException()
            x.read(iprot)
            iprot.readMessageEnd()
            raise x
        result = updateAPITokenGroups_result()
        result.read(iprot)
        iprot.readMessageEnd()
        if result.success is not None:
            return result.success
        if result.ke is not None:
            raise result.ke
        if result.ae is not None:
            raise result.ae
        if result.ce is not None:
            raise result.ce
        raise TApplicationException(TApplicationException.MISSING_RESULT, "updateAPITokenGroups failed: unknown result")

    def getAPITokenById(self, auth, id):
        """
        Parameters:
         - auth
         - id
        """
        self.send_getAPITokenById(auth, id)
        return self.recv_getAPITokenById()

    def send_getAPITokenById(self, auth, id):
        self._oprot.writeMessageBegin('getAPITokenById', TMessageType.CALL, self._seqid)
        args = getAPITokenById_args()
        args.auth = auth
        args.id = id
        args.write(self._oprot)
        self._oprot.writeMessageEnd()
        self._oprot.trans.flush()

    def recv_getAPITokenById(self):
        iprot = self._iprot
        (fname, mtype, rseqid) = iprot.readMessageBegin()
        if mtype == TMessageType.EXCEPTION:
            x = TApplicationException()
            x.read(iprot)
            iprot.readMessageEnd()
            raise x
        result = getAPITokenById_result()
        result.read(iprot)
        iprot.readMessageEnd()
        if result.success is not None:
            return result.success
        if result.ke is not None:
            raise result.ke
        if result.ae is not None:
            raise result.ae
        if result.ce is not None:
            raise result.ce
        raise TApplicationException(TApplicationException.MISSING_RESULT, "getAPITokenById failed: unknown result")

    def getAPITokensByGroupId(self, auth, groupId):
        """
        Parameters:
         - auth
         - groupId
        """
        self.send_getAPITokensByGroupId(auth, groupId)
        return self.recv_getAPITokensByGroupId()

    def send_getAPITokensByGroupId(self, auth, groupId):
        self._oprot.writeMessageBegin('getAPITokensByGroupId', TMessageType.CALL, self._seqid)
        args = getAPITokensByGroupId_args()
        args.auth = auth
        args.groupId = groupId
        args.write(self._oprot)
        self._oprot.writeMessageEnd()
        self._oprot.trans.flush()

    def recv_getAPITokensByGroupId(self):
        iprot = self._iprot
        (fname, mtype, rseqid) = iprot.readMessageBegin()
        if mtype == TMessageType.EXCEPTION:
            x = TApplicationException()
            x.read(iprot)
            iprot.readMessageEnd()
            raise x
        result = getAPITokensByGroupId_result()
        result.read(iprot)
        iprot.readMessageEnd()
        if result.success is not None:
            return result.success
        if result.ke is not None:
            raise result.ke
        if result.ae is not None:
            raise result.ae
        if result.ce is not None:
            raise result.ce
        raise TApplicationException(TApplicationException.MISSING_RESULT, "getAPITokensByGroupId failed: unknown result")

    def authenticateAPIToken(self, id):
        """
        Parameters:
         - id
        """
        self.send_authenticateAPIToken(id)
        return self.recv_authenticateAPIToken()

    def send_authenticateAPIToken(self, id):
        self._oprot.writeMessageBegin('authenticateAPIToken', TMessageType.CALL, self._seqid)
        args = authenticateAPIToken_args()
        args.id = id
        args.write(self._oprot)
        self._oprot.writeMessageEnd()
        self._oprot.trans.flush()

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


class Processor(Iface, TProcessor):
    def __init__(self, handler):
        self._handler = handler
        self._processMap = {}
        self._processMap["createGroup"] = Processor.process_createGroup
        self._processMap["createGroup2"] = Processor.process_createGroup2
        self._processMap["createUser"] = Processor.process_createUser
        self._processMap["deleteGroup"] = Processor.process_deleteGroup
        self._processMap["deleteUser"] = Processor.process_deleteUser
        self._processMap["getGroupById"] = Processor.process_getGroupById
        self._processMap["getUserById"] = Processor.process_getUserById
        self._processMap["getAllGroups"] = Processor.process_getAllGroups
        self._processMap["getAllUsers"] = Processor.process_getAllUsers
        self._processMap["resetPaswordByEmail"] = Processor.process_resetPaswordByEmail
        self._processMap["confirmResetPassword"] = Processor.process_confirmResetPassword
        self._processMap["setUserPassword"] = Processor.process_setUserPassword
        self._processMap["updateGroup"] = Processor.process_updateGroup
        self._processMap["updateUser"] = Processor.process_updateUser
        self._processMap["authenticateUser"] = Processor.process_authenticateUser
        self._processMap["getAllSystemPermissions"] = Processor.process_getAllSystemPermissions
        self._processMap["getPermissionsForUser"] = Processor.process_getPermissionsForUser
        self._processMap["getAllDataSetPermissions"] = Processor.process_getAllDataSetPermissions
        self._processMap["auditLogout"] = Processor.process_auditLogout
        self._processMap["createAPIToken"] = Processor.process_createAPIToken
        self._processMap["disableAPIToken"] = Processor.process_disableAPIToken
        self._processMap["listAPITokens"] = Processor.process_listAPITokens
        self._processMap["updateAPITokenName"] = Processor.process_updateAPITokenName
        self._processMap["updateAPITokenGroups"] = Processor.process_updateAPITokenGroups
        self._processMap["getAPITokenById"] = Processor.process_getAPITokenById
        self._processMap["getAPITokensByGroupId"] = Processor.process_getAPITokensByGroupId
        self._processMap["authenticateAPIToken"] = Processor.process_authenticateAPIToken

    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_createGroup(self, seqid, iprot, oprot):
        args = createGroup_args()
        args.read(iprot)
        iprot.readMessageEnd()
        result = createGroup_result()
        try:
            result.success = self._handler.createGroup(args.authInfo, args.name)
            msg_type = TMessageType.REPLY
        except TTransport.TTransportException:
            raise
        except koverse.thriftgen.ttypes.TKoverseException as ke:
            msg_type = TMessageType.REPLY
            result.ke = ke
        except koverse.thriftgen.security.ttypes.TAuthorizationException as ae:
            msg_type = TMessageType.REPLY
            result.ae = ae
        except koverse.thriftgen.security.ttypes.TCannotUseKoverseException as ce:
            msg_type = TMessageType.REPLY
            result.ce = ce
        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("createGroup", msg_type, seqid)
        result.write(oprot)
        oprot.writeMessageEnd()
        oprot.trans.flush()

    def process_createGroup2(self, seqid, iprot, oprot):
        args = createGroup2_args()
        args.read(iprot)
        iprot.readMessageEnd()
        result = createGroup2_result()
        try:
            result.success = self._handler.createGroup2(args.authInfo, args.group)
            msg_type = TMessageType.REPLY
        except TTransport.TTransportException:
            raise
        except koverse.thriftgen.ttypes.TKoverseException as ke:
            msg_type = TMessageType.REPLY
            result.ke = ke
        except koverse.thriftgen.security.ttypes.TAuthorizationException as ae:
            msg_type = TMessageType.REPLY
            result.ae = ae
        except koverse.thriftgen.security.ttypes.TCannotUseKoverseException as ce:
            msg_type = TMessageType.REPLY
            result.ce = ce
        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("createGroup2", msg_type, seqid)
        result.write(oprot)
        oprot.writeMessageEnd()
        oprot.trans.flush()

    def process_createUser(self, seqid, iprot, oprot):
        args = createUser_args()
        args.read(iprot)
        iprot.readMessageEnd()
        result = createUser_result()
        try:
            result.success = self._handler.createUser(args.authinfo, args.user)
            msg_type = TMessageType.REPLY
        except TTransport.TTransportException:
            raise
        except koverse.thriftgen.ttypes.TKoverseException as ke:
            msg_type = TMessageType.REPLY
            result.ke = ke
        except koverse.thriftgen.security.ttypes.TAuthorizationException as ae:
            msg_type = TMessageType.REPLY
            result.ae = ae
        except koverse.thriftgen.security.ttypes.TCannotUseKoverseException as ce:
            msg_type = TMessageType.REPLY
            result.ce = ce
        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("createUser", msg_type, seqid)
        result.write(oprot)
        oprot.writeMessageEnd()
        oprot.trans.flush()

    def process_deleteGroup(self, seqid, iprot, oprot):
        args = deleteGroup_args()
        args.read(iprot)
        iprot.readMessageEnd()
        result = deleteGroup_result()
        try:
            result.success = self._handler.deleteGroup(args.authInfo, args.groupId)
            msg_type = TMessageType.REPLY
        except TTransport.TTransportException:
            raise
        except koverse.thriftgen.ttypes.TKoverseException as ke:
            msg_type = TMessageType.REPLY
            result.ke = ke
        except koverse.thriftgen.security.ttypes.TAuthorizationException as ae:
            msg_type = TMessageType.REPLY
            result.ae = ae
        except koverse.thriftgen.security.ttypes.TCannotUseKoverseException as ce:
            msg_type = TMessageType.REPLY
            result.ce = ce
        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("deleteGroup", msg_type, seqid)
        result.write(oprot)
        oprot.writeMessageEnd()
        oprot.trans.flush()

    def process_deleteUser(self, seqid, iprot, oprot):
        args = deleteUser_args()
        args.read(iprot)
        iprot.readMessageEnd()
        result = deleteUser_result()
        try:
            result.success = self._handler.deleteUser(args.authInfo, args.userId, args.responsibleUser)
            msg_type = TMessageType.REPLY
        except TTransport.TTransportException:
            raise
        except koverse.thriftgen.ttypes.TKoverseException as ke:
            msg_type = TMessageType.REPLY
            result.ke = ke
        except koverse.thriftgen.security.ttypes.TAuthorizationException as ae:
            msg_type = TMessageType.REPLY
            result.ae = ae
        except koverse.thriftgen.security.ttypes.TCannotUseKoverseException as ce:
            msg_type = TMessageType.REPLY
            result.ce = ce
        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("deleteUser", msg_type, seqid)
        result.write(oprot)
        oprot.writeMessageEnd()
        oprot.trans.flush()

    def process_getGroupById(self, seqid, iprot, oprot):
        args = getGroupById_args()
        args.read(iprot)
        iprot.readMessageEnd()
        result = getGroupById_result()
        try:
            result.success = self._handler.getGroupById(args.authInfo, args.groupId)
            msg_type = TMessageType.REPLY
        except TTransport.TTransportException:
            raise
        except koverse.thriftgen.ttypes.TKoverseException as ke:
            msg_type = TMessageType.REPLY
            result.ke = ke
        except koverse.thriftgen.security.ttypes.TAuthorizationException as ae:
            msg_type = TMessageType.REPLY
            result.ae = ae
        except koverse.thriftgen.security.ttypes.TCannotUseKoverseException as ce:
            msg_type = TMessageType.REPLY
            result.ce = ce
        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("getGroupById", msg_type, seqid)
        result.write(oprot)
        oprot.writeMessageEnd()
        oprot.trans.flush()

    def process_getUserById(self, seqid, iprot, oprot):
        args = getUserById_args()
        args.read(iprot)
        iprot.readMessageEnd()
        result = getUserById_result()
        try:
            result.success = self._handler.getUserById(args.authInfo, args.userId)
            msg_type = TMessageType.REPLY
        except TTransport.TTransportException:
            raise
        except koverse.thriftgen.ttypes.TKoverseException as ke:
            msg_type = TMessageType.REPLY
            result.ke = ke
        except koverse.thriftgen.security.ttypes.TAuthorizationException as ae:
            msg_type = TMessageType.REPLY
            result.ae = ae
        except koverse.thriftgen.ttypes.TNotFoundException as nfe:
            msg_type = TMessageType.REPLY
            result.nfe = nfe
        except koverse.thriftgen.security.ttypes.TCannotUseKoverseException as ce:
            msg_type = TMessageType.REPLY
            result.ce = ce
        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("getUserById", msg_type, seqid)
        result.write(oprot)
        oprot.writeMessageEnd()
        oprot.trans.flush()

    def process_getAllGroups(self, seqid, iprot, oprot):
        args = getAllGroups_args()
        args.read(iprot)
        iprot.readMessageEnd()
        result = getAllGroups_result()
        try:
            result.success = self._handler.getAllGroups(args.authInfo)
            msg_type = TMessageType.REPLY
        except TTransport.TTransportException:
            raise
        except koverse.thriftgen.ttypes.TKoverseException as ke:
            msg_type = TMessageType.REPLY
            result.ke = ke
        except koverse.thriftgen.security.ttypes.TAuthorizationException as ae:
            msg_type = TMessageType.REPLY
            result.ae = ae
        except koverse.thriftgen.security.ttypes.TCannotUseKoverseException as ce:
            msg_type = TMessageType.REPLY
            result.ce = ce
        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("getAllGroups", msg_type, seqid)
        result.write(oprot)
        oprot.writeMessageEnd()
        oprot.trans.flush()

    def process_getAllUsers(self, seqid, iprot, oprot):
        args = getAllUsers_args()
        args.read(iprot)
        iprot.readMessageEnd()
        result = getAllUsers_result()
        try:
            result.success = self._handler.getAllUsers(args.authInfo)
            msg_type = TMessageType.REPLY
        except TTransport.TTransportException:
            raise
        except koverse.thriftgen.ttypes.TKoverseException as ke:
            msg_type = TMessageType.REPLY
            result.ke = ke
        except koverse.thriftgen.security.ttypes.TAuthorizationException as ae:
            msg_type = TMessageType.REPLY
            result.ae = ae
        except koverse.thriftgen.security.ttypes.TCannotUseKoverseException as ce:
            msg_type = TMessageType.REPLY
            result.ce = ce
        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("getAllUsers", msg_type, seqid)
        result.write(oprot)
        oprot.writeMessageEnd()
        oprot.trans.flush()

    def process_resetPaswordByEmail(self, seqid, iprot, oprot):
        args = resetPaswordByEmail_args()
        args.read(iprot)
        iprot.readMessageEnd()
        result = resetPaswordByEmail_result()
        try:
            self._handler.resetPaswordByEmail(args.email)
            msg_type = TMessageType.REPLY
        except TTransport.TTransportException:
            raise
        except koverse.thriftgen.ttypes.TKoverseException as ke:
            msg_type = TMessageType.REPLY
            result.ke = ke
        except koverse.thriftgen.security.ttypes.TAuthorizationException as ae:
            msg_type = TMessageType.REPLY
            result.ae = ae
        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("resetPaswordByEmail", msg_type, seqid)
        result.write(oprot)
        oprot.writeMessageEnd()
        oprot.trans.flush()

    def process_confirmResetPassword(self, seqid, iprot, oprot):
        args = confirmResetPassword_args()
        args.read(iprot)
        iprot.readMessageEnd()
        result = confirmResetPassword_result()
        try:
            self._handler.confirmResetPassword(args.passwordResetHash)
            msg_type = TMessageType.REPLY
        except TTransport.TTransportException:
            raise
        except koverse.thriftgen.ttypes.TKoverseException as ke:
            msg_type = TMessageType.REPLY
            result.ke = ke
        except koverse.thriftgen.security.ttypes.TAuthorizationException as ae:
            msg_type = TMessageType.REPLY
            result.ae = ae
        except koverse.thriftgen.security.ttypes.TCannotUseKoverseException as ce:
            msg_type = TMessageType.REPLY
            result.ce = ce
        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("confirmResetPassword", msg_type, seqid)
        result.write(oprot)
        oprot.writeMessageEnd()
        oprot.trans.flush()

    def process_setUserPassword(self, seqid, iprot, oprot):
        args = setUserPassword_args()
        args.read(iprot)
        iprot.readMessageEnd()
        result = setUserPassword_result()
        try:
            result.success = self._handler.setUserPassword(args.authInfo, args.userId, args.newPassword)
            msg_type = TMessageType.REPLY
        except TTransport.TTransportException:
            raise
        except koverse.thriftgen.ttypes.TKoverseException as ke:
            msg_type = TMessageType.REPLY
            result.ke = ke
        except koverse.thriftgen.security.ttypes.TAuthorizationException as ae:
            msg_type = TMessageType.REPLY
            result.ae = ae
        except koverse.thriftgen.security.ttypes.TCannotUseKoverseException as ce:
            msg_type = TMessageType.REPLY
            result.ce = ce
        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("setUserPassword", msg_type, seqid)
        result.write(oprot)
        oprot.writeMessageEnd()
        oprot.trans.flush()

    def process_updateGroup(self, seqid, iprot, oprot):
        args = updateGroup_args()
        args.read(iprot)
        iprot.readMessageEnd()
        result = updateGroup_result()
        try:
            result.success = self._handler.updateGroup(args.authInfo, args.group)
            msg_type = TMessageType.REPLY
        except TTransport.TTransportException:
            raise
        except koverse.thriftgen.ttypes.TKoverseException as ke:
            msg_type = TMessageType.REPLY
            result.ke = ke
        except koverse.thriftgen.security.ttypes.TAuthorizationException as ae:
            msg_type = TMessageType.REPLY
            result.ae = ae
        except koverse.thriftgen.security.ttypes.TCannotUseKoverseException as ce:
            msg_type = TMessageType.REPLY
            result.ce = ce
        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("updateGroup", msg_type, seqid)
        result.write(oprot)
        oprot.writeMessageEnd()
        oprot.trans.flush()

    def process_updateUser(self, seqid, iprot, oprot):
        args = updateUser_args()
        args.read(iprot)
        iprot.readMessageEnd()
        result = updateUser_result()
        try:
            result.success = self._handler.updateUser(args.authInfo, args.user)
            msg_type = TMessageType.REPLY
        except TTransport.TTransportException:
            raise
        except koverse.thriftgen.ttypes.TKoverseException as ke:
            msg_type = TMessageType.REPLY
            result.ke = ke
        except koverse.thriftgen.security.ttypes.TAuthorizationException as ae:
            msg_type = TMessageType.REPLY
            result.ae = ae
        except koverse.thriftgen.security.ttypes.TCannotUseKoverseException as ce:
            msg_type = TMessageType.REPLY
            result.ce = ce
        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("updateUser", msg_type, seqid)
        result.write(oprot)
        oprot.writeMessageEnd()
        oprot.trans.flush()

    def process_authenticateUser(self, seqid, iprot, oprot):
        args = authenticateUser_args()
        args.read(iprot)
        iprot.readMessageEnd()
        result = authenticateUser_result()
        try:
            result.success = self._handler.authenticateUser(args.authInfo, args.externalId, args.params)
            msg_type = TMessageType.REPLY
        except TTransport.TTransportException:
            raise
        except koverse.thriftgen.ttypes.TKoverseException as ke:
            msg_type = TMessageType.REPLY
            result.ke = ke
        except koverse.thriftgen.security.ttypes.TAuthorizationException as ae:
            msg_type = TMessageType.REPLY
            result.ae = ae
        except koverse.thriftgen.security.ttypes.TCannotUseKoverseException as ce:
            msg_type = TMessageType.REPLY
            result.ce = ce
        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("authenticateUser", msg_type, seqid)
        result.write(oprot)
        oprot.writeMessageEnd()
        oprot.trans.flush()

    def process_getAllSystemPermissions(self, seqid, iprot, oprot):
        args = getAllSystemPermissions_args()
        args.read(iprot)
        iprot.readMessageEnd()
        result = getAllSystemPermissions_result()
        try:
            result.success = self._handler.getAllSystemPermissions(args.auth)
            msg_type = TMessageType.REPLY
        except TTransport.TTransportException:
            raise
        except koverse.thriftgen.ttypes.TKoverseException as ke:
            msg_type = TMessageType.REPLY
            result.ke = ke
        except koverse.thriftgen.security.ttypes.TAuthorizationException as ae:
            msg_type = TMessageType.REPLY
            result.ae = ae
        except koverse.thriftgen.security.ttypes.TCannotUseKoverseException as ce:
            msg_type = TMessageType.REPLY
            result.ce = ce
        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("getAllSystemPermissions", 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.auth, args.userId)
            msg_type = TMessageType.REPLY
        except TTransport.TTransportException:
            raise
        except koverse.thriftgen.ttypes.TKoverseException as ke:
            msg_type = TMessageType.REPLY
            result.ke = ke
        except koverse.thriftgen.security.ttypes.TAuthorizationException as ae:
            msg_type = TMessageType.REPLY
            result.ae = ae
        except koverse.thriftgen.security.ttypes.TCannotUseKoverseException as ce:
            msg_type = TMessageType.REPLY
            result.ce = ce
        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_getAllDataSetPermissions(self, seqid, iprot, oprot):
        args = getAllDataSetPermissions_args()
        args.read(iprot)
        iprot.readMessageEnd()
        result = getAllDataSetPermissions_result()
        try:
            result.success = self._handler.getAllDataSetPermissions(args.auth)
            msg_type = TMessageType.REPLY
        except TTransport.TTransportException:
            raise
        except koverse.thriftgen.ttypes.TKoverseException as ke:
            msg_type = TMessageType.REPLY
            result.ke = ke
        except koverse.thriftgen.security.ttypes.TAuthorizationException as ae:
            msg_type = TMessageType.REPLY
            result.ae = ae
        except koverse.thriftgen.security.ttypes.TCannotUseKoverseException as ce:
            msg_type = TMessageType.REPLY
            result.ce = ce
        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("getAllDataSetPermissions", msg_type, seqid)
        result.write(oprot)
        oprot.writeMessageEnd()
        oprot.trans.flush()

    def process_auditLogout(self, seqid, iprot, oprot):
        args = auditLogout_args()
        args.read(iprot)
        iprot.readMessageEnd()
        result = auditLogout_result()
        try:
            self._handler.auditLogout(args.auth, args.userId)
            msg_type = TMessageType.REPLY
        except TTransport.TTransportException:
            raise
        except koverse.thriftgen.ttypes.TKoverseException as ke:
            msg_type = TMessageType.REPLY
            result.ke = ke
        except koverse.thriftgen.security.ttypes.TAuthorizationException as ae:
            msg_type = TMessageType.REPLY
            result.ae = ae
        except koverse.thriftgen.security.ttypes.TCannotUseKoverseException as ce:
            msg_type = TMessageType.REPLY
            result.ce = ce
        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("auditLogout", msg_type, seqid)
        result.write(oprot)
        oprot.writeMessageEnd()
        oprot.trans.flush()

    def process_createAPIToken(self, seqid, iprot, oprot):
        args = createAPIToken_args()
        args.read(iprot)
        iprot.readMessageEnd()
        result = createAPIToken_result()
        try:
            result.success = self._handler.createAPIToken(args.auth, args.displayName)
            msg_type = TMessageType.REPLY
        except TTransport.TTransportException:
            raise
        except koverse.thriftgen.ttypes.TKoverseException as ke:
            msg_type = TMessageType.REPLY
            result.ke = ke
        except koverse.thriftgen.security.ttypes.TAuthorizationException as ae:
            msg_type = TMessageType.REPLY
            result.ae = ae
        except koverse.thriftgen.security.ttypes.TCannotUseKoverseException as ce:
            msg_type = TMessageType.REPLY
            result.ce = ce
        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("createAPIToken", msg_type, seqid)
        result.write(oprot)
        oprot.writeMessageEnd()
        oprot.trans.flush()

    def process_disableAPIToken(self, seqid, iprot, oprot):
        args = disableAPIToken_args()
        args.read(iprot)
        iprot.readMessageEnd()
        result = disableAPIToken_result()
        try:
            result.success = self._handler.disableAPIToken(args.auth, args.id)
            msg_type = TMessageType.REPLY
        except TTransport.TTransportException:
            raise
        except koverse.thriftgen.ttypes.TKoverseException as ke:
            msg_type = TMessageType.REPLY
            result.ke = ke
        except koverse.thriftgen.security.ttypes.TAuthorizationException as ae:
            msg_type = TMessageType.REPLY
            result.ae = ae
        except koverse.thriftgen.security.ttypes.TCannotUseKoverseException as ce:
            msg_type = TMessageType.REPLY
            result.ce = ce
        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("disableAPIToken", msg_type, seqid)
        result.write(oprot)
        oprot.writeMessageEnd()
        oprot.trans.flush()

    def process_listAPITokens(self, seqid, iprot, oprot):
        args = listAPITokens_args()
        args.read(iprot)
        iprot.readMessageEnd()
        result = listAPITokens_result()
        try:
            result.success = self._handler.listAPITokens(args.auth)
            msg_type = TMessageType.REPLY
        except TTransport.TTransportException:
            raise
        except koverse.thriftgen.ttypes.TKoverseException as ke:
            msg_type = TMessageType.REPLY
            result.ke = ke
        except koverse.thriftgen.security.ttypes.TAuthorizationException as ae:
            msg_type = TMessageType.REPLY
            result.ae = ae
        except koverse.thriftgen.security.ttypes.TCannotUseKoverseException as ce:
            msg_type = TMessageType.REPLY
            result.ce = ce
        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("listAPITokens", msg_type, seqid)
        result.write(oprot)
        oprot.writeMessageEnd()
        oprot.trans.flush()

    def process_updateAPITokenName(self, seqid, iprot, oprot):
        args = updateAPITokenName_args()
        args.read(iprot)
        iprot.readMessageEnd()
        result = updateAPITokenName_result()
        try:
            result.success = self._handler.updateAPITokenName(args.auth, args.apiToken)
            msg_type = TMessageType.REPLY
        except TTransport.TTransportException:
            raise
        except koverse.thriftgen.ttypes.TKoverseException as ke:
            msg_type = TMessageType.REPLY
            result.ke = ke
        except koverse.thriftgen.security.ttypes.TAuthorizationException as ae:
            msg_type = TMessageType.REPLY
            result.ae = ae
        except koverse.thriftgen.security.ttypes.TCannotUseKoverseException as ce:
            msg_type = TMessageType.REPLY
            result.ce = ce
        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("updateAPITokenName", msg_type, seqid)
        result.write(oprot)
        oprot.writeMessageEnd()
        oprot.trans.flush()

    def process_updateAPITokenGroups(self, seqid, iprot, oprot):
        args = updateAPITokenGroups_args()
        args.read(iprot)
        iprot.readMessageEnd()
        result = updateAPITokenGroups_result()
        try:
            result.success = self._handler.updateAPITokenGroups(args.auth, args.apiToken)
            msg_type = TMessageType.REPLY
        except TTransport.TTransportException:
            raise
        except koverse.thriftgen.ttypes.TKoverseException as ke:
            msg_type = TMessageType.REPLY
            result.ke = ke
        except koverse.thriftgen.security.ttypes.TAuthorizationException as ae:
            msg_type = TMessageType.REPLY
            result.ae = ae
        except koverse.thriftgen.security.ttypes.TCannotUseKoverseException as ce:
            msg_type = TMessageType.REPLY
            result.ce = ce
        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("updateAPITokenGroups", msg_type, seqid)
        result.write(oprot)
        oprot.writeMessageEnd()
        oprot.trans.flush()

    def process_getAPITokenById(self, seqid, iprot, oprot):
        args = getAPITokenById_args()
        args.read(iprot)
        iprot.readMessageEnd()
        result = getAPITokenById_result()
        try:
            result.success = self._handler.getAPITokenById(args.auth, args.id)
            msg_type = TMessageType.REPLY
        except TTransport.TTransportException:
            raise
        except koverse.thriftgen.ttypes.TKoverseException as ke:
            msg_type = TMessageType.REPLY
            result.ke = ke
        except koverse.thriftgen.security.ttypes.TAuthorizationException as ae:
            msg_type = TMessageType.REPLY
            result.ae = ae
        except koverse.thriftgen.security.ttypes.TCannotUseKoverseException as ce:
            msg_type = TMessageType.REPLY
            result.ce = ce
        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("getAPITokenById", msg_type, seqid)
        result.write(oprot)
        oprot.writeMessageEnd()
        oprot.trans.flush()

    def process_getAPITokensByGroupId(self, seqid, iprot, oprot):
        args = getAPITokensByGroupId_args()
        args.read(iprot)
        iprot.readMessageEnd()
        result = getAPITokensByGroupId_result()
        try:
            result.success = self._handler.getAPITokensByGroupId(args.auth, args.groupId)
            msg_type = TMessageType.REPLY
        except TTransport.TTransportException:
            raise
        except koverse.thriftgen.ttypes.TKoverseException as ke:
            msg_type = TMessageType.REPLY
            result.ke = ke
        except koverse.thriftgen.security.ttypes.TAuthorizationException as ae:
            msg_type = TMessageType.REPLY
            result.ae = ae
        except koverse.thriftgen.security.ttypes.TCannotUseKoverseException as ce:
            msg_type = TMessageType.REPLY
            result.ce = ce
        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("getAPITokensByGroupId", msg_type, seqid)
        result.write(oprot)
        oprot.writeMessageEnd()
        oprot.trans.flush()

    def process_authenticateAPIToken(self, seqid, iprot, oprot):
        args = authenticateAPIToken_args()
        args.read(iprot)
        iprot.readMessageEnd()
        result = authenticateAPIToken_result()
        try:
            result.success = self._handler.authenticateAPIToken(args.id)
            msg_type = TMessageType.REPLY
        except TTransport.TTransportException:
            raise
        except koverse.thriftgen.ttypes.TKoverseException as ke:
            msg_type = TMessageType.REPLY
            result.ke = ke
        except koverse.thriftgen.security.ttypes.TCannotUseKoverseException as ce:
            msg_type = TMessageType.REPLY
            result.ce = ce
        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("authenticateAPIToken", msg_type, seqid)
        result.write(oprot)
        oprot.writeMessageEnd()
        oprot.trans.flush()

# HELPER FUNCTIONS AND STRUCTURES


class createGroup_args(object):
    """
    Attributes:
     - authInfo
     - name
    """


    def __init__(self, authInfo=None, name=None,):
        self.authInfo = authInfo
        self.name = name

    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.authInfo = koverse.thriftgen.security.ttypes.TAuthInfo()
                    self.authInfo.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.name = 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('createGroup_args')
        if self.authInfo is not None:
            oprot.writeFieldBegin('authInfo', TType.STRUCT, 1)
            self.authInfo.write(oprot)
            oprot.writeFieldEnd()
        if self.name is not None:
            oprot.writeFieldBegin('name', TType.STRING, 2)
            oprot.writeString(self.name.encode('utf-8') if sys.version_info[0] == 2 else self.name)
            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(createGroup_args)
createGroup_args.thrift_spec = (
    None,  # 0
    (1, TType.STRUCT, 'authInfo', [koverse.thriftgen.security.ttypes.TAuthInfo, None], None, ),  # 1
    (2, TType.STRING, 'name', 'UTF8', None, ),  # 2
)


class createGroup_result(object):
    """
    Attributes:
     - success
     - ke
     - ae
     - ce
    """


    def __init__(self, success=None, ke=None, ae=None, ce=None,):
        self.success = success
        self.ke = ke
        self.ae = ae
        self.ce = ce

    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 = TGroup()
                    self.success.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 1:
                if ftype == TType.STRUCT:
                    self.ke = koverse.thriftgen.ttypes.TKoverseException()
                    self.ke.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRUCT:
                    self.ae = koverse.thriftgen.security.ttypes.TAuthorizationException()
                    self.ae.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRUCT:
                    self.ce = koverse.thriftgen.security.ttypes.TCannotUseKoverseException()
                    self.ce.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('createGroup_result')
        if self.success is not None:
            oprot.writeFieldBegin('success', TType.STRUCT, 0)
            self.success.write(oprot)
            oprot.writeFieldEnd()
        if self.ke is not None:
            oprot.writeFieldBegin('ke', TType.STRUCT, 1)
            self.ke.write(oprot)
            oprot.writeFieldEnd()
        if self.ae is not None:
            oprot.writeFieldBegin('ae', TType.STRUCT, 2)
            self.ae.write(oprot)
            oprot.writeFieldEnd()
        if self.ce is not None:
            oprot.writeFieldBegin('ce', TType.STRUCT, 3)
            self.ce.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(createGroup_result)
createGroup_result.thrift_spec = (
    (0, TType.STRUCT, 'success', [TGroup, None], None, ),  # 0
    (1, TType.STRUCT, 'ke', [koverse.thriftgen.ttypes.TKoverseException, None], None, ),  # 1
    (2, TType.STRUCT, 'ae', [koverse.thriftgen.security.ttypes.TAuthorizationException, None], None, ),  # 2
    (3, TType.STRUCT, 'ce', [koverse.thriftgen.security.ttypes.TCannotUseKoverseException, None], None, ),  # 3
)


class createGroup2_args(object):
    """
    Attributes:
     - authInfo
     - group
    """


    def __init__(self, authInfo=None, group=None,):
        self.authInfo = authInfo
        self.group = group

    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.authInfo = koverse.thriftgen.security.ttypes.TAuthInfo()
                    self.authInfo.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRUCT:
                    self.group = TGroup()
                    self.group.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('createGroup2_args')
        if self.authInfo is not None:
            oprot.writeFieldBegin('authInfo', TType.STRUCT, 1)
            self.authInfo.write(oprot)
            oprot.writeFieldEnd()
        if self.group is not None:
            oprot.writeFieldBegin('group', TType.STRUCT, 2)
            self.group.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(createGroup2_args)
createGroup2_args.thrift_spec = (
    None,  # 0
    (1, TType.STRUCT, 'authInfo', [koverse.thriftgen.security.ttypes.TAuthInfo, None], None, ),  # 1
    (2, TType.STRUCT, 'group', [TGroup, None], None, ),  # 2
)


class createGroup2_result(object):
    """
    Attributes:
     - success
     - ke
     - ae
     - ce
    """


    def __init__(self, success=None, ke=None, ae=None, ce=None,):
        self.success = success
        self.ke = ke
        self.ae = ae
        self.ce = ce

    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 = TGroup()
                    self.success.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 1:
                if ftype == TType.STRUCT:
                    self.ke = koverse.thriftgen.ttypes.TKoverseException()
                    self.ke.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRUCT:
                    self.ae = koverse.thriftgen.security.ttypes.TAuthorizationException()
                    self.ae.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRUCT:
                    self.ce = koverse.thriftgen.security.ttypes.TCannotUseKoverseException()
                    self.ce.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('createGroup2_result')
        if self.success is not None:
            oprot.writeFieldBegin('success', TType.STRUCT, 0)
            self.success.write(oprot)
            oprot.writeFieldEnd()
        if self.ke is not None:
            oprot.writeFieldBegin('ke', TType.STRUCT, 1)
            self.ke.write(oprot)
            oprot.writeFieldEnd()
        if self.ae is not None:
            oprot.writeFieldBegin('ae', TType.STRUCT, 2)
            self.ae.write(oprot)
            oprot.writeFieldEnd()
        if self.ce is not None:
            oprot.writeFieldBegin('ce', TType.STRUCT, 3)
            self.ce.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(createGroup2_result)
createGroup2_result.thrift_spec = (
    (0, TType.STRUCT, 'success', [TGroup, None], None, ),  # 0
    (1, TType.STRUCT, 'ke', [koverse.thriftgen.ttypes.TKoverseException, None], None, ),  # 1
    (2, TType.STRUCT, 'ae', [koverse.thriftgen.security.ttypes.TAuthorizationException, None], None, ),  # 2
    (3, TType.STRUCT, 'ce', [koverse.thriftgen.security.ttypes.TCannotUseKoverseException, None], None, ),  # 3
)


class createUser_args(object):
    """
    Attributes:
     - authinfo
     - user
    """


    def __init__(self, authinfo=None, user=None,):
        self.authinfo = authinfo
        self.user = user

    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.authinfo = koverse.thriftgen.security.ttypes.TAuthInfo()
                    self.authinfo.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRUCT:
                    self.user = TUser()
                    self.user.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('createUser_args')
        if self.authinfo is not None:
            oprot.writeFieldBegin('authinfo', TType.STRUCT, 1)
            self.authinfo.write(oprot)
            oprot.writeFieldEnd()
        if self.user is not None:
            oprot.writeFieldBegin('user', TType.STRUCT, 2)
            self.user.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(createUser_args)
createUser_args.thrift_spec = (
    None,  # 0
    (1, TType.STRUCT, 'authinfo', [koverse.thriftgen.security.ttypes.TAuthInfo, None], None, ),  # 1
    (2, TType.STRUCT, 'user', [TUser, None], None, ),  # 2
)


class createUser_result(object):
    """
    Attributes:
     - success
     - ke
     - ae
     - ce
    """


    def __init__(self, success=None, ke=None, ae=None, ce=None,):
        self.success = success
        self.ke = ke
        self.ae = ae
        self.ce = ce

    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 = TUser()
                    self.success.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 1:
                if ftype == TType.STRUCT:
                    self.ke = koverse.thriftgen.ttypes.TKoverseException()
                    self.ke.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRUCT:
                    self.ae = koverse.thriftgen.security.ttypes.TAuthorizationException()
                    self.ae.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRUCT:
                    self.ce = koverse.thriftgen.security.ttypes.TCannotUseKoverseException()
                    self.ce.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('createUser_result')
        if self.success is not None:
            oprot.writeFieldBegin('success', TType.STRUCT, 0)
            self.success.write(oprot)
            oprot.writeFieldEnd()
        if self.ke is not None:
            oprot.writeFieldBegin('ke', TType.STRUCT, 1)
            self.ke.write(oprot)
            oprot.writeFieldEnd()
        if self.ae is not None:
            oprot.writeFieldBegin('ae', TType.STRUCT, 2)
            self.ae.write(oprot)
            oprot.writeFieldEnd()
        if self.ce is not None:
            oprot.writeFieldBegin('ce', TType.STRUCT, 3)
            self.ce.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(createUser_result)
createUser_result.thrift_spec = (
    (0, TType.STRUCT, 'success', [TUser, None], None, ),  # 0
    (1, TType.STRUCT, 'ke', [koverse.thriftgen.ttypes.TKoverseException, None], None, ),  # 1
    (2, TType.STRUCT, 'ae', [koverse.thriftgen.security.ttypes.TAuthorizationException, None], None, ),  # 2
    (3, TType.STRUCT, 'ce', [koverse.thriftgen.security.ttypes.TCannotUseKoverseException, None], None, ),  # 3
)


class deleteGroup_args(object):
    """
    Attributes:
     - authInfo
     - groupId
    """


    def __init__(self, authInfo=None, groupId=None,):
        self.authInfo = authInfo
        self.groupId = groupId

    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.authInfo = koverse.thriftgen.security.ttypes.TAuthInfo()
                    self.authInfo.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.I64:
                    self.groupId = iprot.readI64()
                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('deleteGroup_args')
        if self.authInfo is not None:
            oprot.writeFieldBegin('authInfo', TType.STRUCT, 1)
            self.authInfo.write(oprot)
            oprot.writeFieldEnd()
        if self.groupId is not None:
            oprot.writeFieldBegin('groupId', TType.I64, 2)
            oprot.writeI64(self.groupId)
            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(deleteGroup_args)
deleteGroup_args.thrift_spec = (
    None,  # 0
    (1, TType.STRUCT, 'authInfo', [koverse.thriftgen.security.ttypes.TAuthInfo, None], None, ),  # 1
    (2, TType.I64, 'groupId', None, None, ),  # 2
)


class deleteGroup_result(object):
    """
    Attributes:
     - success
     - ke
     - ae
     - ce
    """


    def __init__(self, success=None, ke=None, ae=None, ce=None,):
        self.success = success
        self.ke = ke
        self.ae = ae
        self.ce = ce

    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 = TGroup()
                    self.success.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 1:
                if ftype == TType.STRUCT:
                    self.ke = koverse.thriftgen.ttypes.TKoverseException()
                    self.ke.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRUCT:
                    self.ae = koverse.thriftgen.security.ttypes.TAuthorizationException()
                    self.ae.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRUCT:
                    self.ce = koverse.thriftgen.security.ttypes.TCannotUseKoverseException()
                    self.ce.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('deleteGroup_result')
        if self.success is not None:
            oprot.writeFieldBegin('success', TType.STRUCT, 0)
            self.success.write(oprot)
            oprot.writeFieldEnd()
        if self.ke is not None:
            oprot.writeFieldBegin('ke', TType.STRUCT, 1)
            self.ke.write(oprot)
            oprot.writeFieldEnd()
        if self.ae is not None:
            oprot.writeFieldBegin('ae', TType.STRUCT, 2)
            self.ae.write(oprot)
            oprot.writeFieldEnd()
        if self.ce is not None:
            oprot.writeFieldBegin('ce', TType.STRUCT, 3)
            self.ce.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(deleteGroup_result)
deleteGroup_result.thrift_spec = (
    (0, TType.STRUCT, 'success', [TGroup, None], None, ),  # 0
    (1, TType.STRUCT, 'ke', [koverse.thriftgen.ttypes.TKoverseException, None], None, ),  # 1
    (2, TType.STRUCT, 'ae', [koverse.thriftgen.security.ttypes.TAuthorizationException, None], None, ),  # 2
    (3, TType.STRUCT, 'ce', [koverse.thriftgen.security.ttypes.TCannotUseKoverseException, None], None, ),  # 3
)


class deleteUser_args(object):
    """
    Attributes:
     - authInfo
     - userId
     - responsibleUser
    """


    def __init__(self, authInfo=None, userId=None, responsibleUser=None,):
        self.authInfo = authInfo
        self.userId = userId
        self.responsibleUser = responsibleUser

    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.authInfo = koverse.thriftgen.security.ttypes.TAuthInfo()
                    self.authInfo.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.I64:
                    self.userId = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.I64:
                    self.responsibleUser = iprot.readI64()
                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('deleteUser_args')
        if self.authInfo is not None:
            oprot.writeFieldBegin('authInfo', TType.STRUCT, 1)
            self.authInfo.write(oprot)
            oprot.writeFieldEnd()
        if self.userId is not None:
            oprot.writeFieldBegin('userId', TType.I64, 2)
            oprot.writeI64(self.userId)
            oprot.writeFieldEnd()
        if self.responsibleUser is not None:
            oprot.writeFieldBegin('responsibleUser', TType.I64, 3)
            oprot.writeI64(self.responsibleUser)
            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(deleteUser_args)
deleteUser_args.thrift_spec = (
    None,  # 0
    (1, TType.STRUCT, 'authInfo', [koverse.thriftgen.security.ttypes.TAuthInfo, None], None, ),  # 1
    (2, TType.I64, 'userId', None, None, ),  # 2
    (3, TType.I64, 'responsibleUser', None, None, ),  # 3
)


class deleteUser_result(object):
    """
    Attributes:
     - success
     - ke
     - ae
     - ce
    """


    def __init__(self, success=None, ke=None, ae=None, ce=None,):
        self.success = success
        self.ke = ke
        self.ae = ae
        self.ce = ce

    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 = TUser()
                    self.success.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 1:
                if ftype == TType.STRUCT:
                    self.ke = koverse.thriftgen.ttypes.TKoverseException()
                    self.ke.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRUCT:
                    self.ae = koverse.thriftgen.security.ttypes.TAuthorizationException()
                    self.ae.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRUCT:
                    self.ce = koverse.thriftgen.security.ttypes.TCannotUseKoverseException()
                    self.ce.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('deleteUser_result')
        if self.success is not None:
            oprot.writeFieldBegin('success', TType.STRUCT, 0)
            self.success.write(oprot)
            oprot.writeFieldEnd()
        if self.ke is not None:
            oprot.writeFieldBegin('ke', TType.STRUCT, 1)
            self.ke.write(oprot)
            oprot.writeFieldEnd()
        if self.ae is not None:
            oprot.writeFieldBegin('ae', TType.STRUCT, 2)
            self.ae.write(oprot)
            oprot.writeFieldEnd()
        if self.ce is not None:
            oprot.writeFieldBegin('ce', TType.STRUCT, 3)
            self.ce.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(deleteUser_result)
deleteUser_result.thrift_spec = (
    (0, TType.STRUCT, 'success', [TUser, None], None, ),  # 0
    (1, TType.STRUCT, 'ke', [koverse.thriftgen.ttypes.TKoverseException, None], None, ),  # 1
    (2, TType.STRUCT, 'ae', [koverse.thriftgen.security.ttypes.TAuthorizationException, None], None, ),  # 2
    (3, TType.STRUCT, 'ce', [koverse.thriftgen.security.ttypes.TCannotUseKoverseException, None], None, ),  # 3
)


class getGroupById_args(object):
    """
    Attributes:
     - authInfo
     - groupId
    """


    def __init__(self, authInfo=None, groupId=None,):
        self.authInfo = authInfo
        self.groupId = groupId

    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.authInfo = koverse.thriftgen.security.ttypes.TAuthInfo()
                    self.authInfo.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.I64:
                    self.groupId = iprot.readI64()
                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('getGroupById_args')
        if self.authInfo is not None:
            oprot.writeFieldBegin('authInfo', TType.STRUCT, 1)
            self.authInfo.write(oprot)
            oprot.writeFieldEnd()
        if self.groupId is not None:
            oprot.writeFieldBegin('groupId', TType.I64, 2)
            oprot.writeI64(self.groupId)
            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(getGroupById_args)
getGroupById_args.thrift_spec = (
    None,  # 0
    (1, TType.STRUCT, 'authInfo', [koverse.thriftgen.security.ttypes.TAuthInfo, None], None, ),  # 1
    (2, TType.I64, 'groupId', None, None, ),  # 2
)


class getGroupById_result(object):
    """
    Attributes:
     - success
     - ke
     - ae
     - ce
    """


    def __init__(self, success=None, ke=None, ae=None, ce=None,):
        self.success = success
        self.ke = ke
        self.ae = ae
        self.ce = ce

    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 = TGroup()
                    self.success.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 1:
                if ftype == TType.STRUCT:
                    self.ke = koverse.thriftgen.ttypes.TKoverseException()
                    self.ke.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRUCT:
                    self.ae = koverse.thriftgen.security.ttypes.TAuthorizationException()
                    self.ae.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRUCT:
                    self.ce = koverse.thriftgen.security.ttypes.TCannotUseKoverseException()
                    self.ce.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('getGroupById_result')
        if self.success is not None:
            oprot.writeFieldBegin('success', TType.STRUCT, 0)
            self.success.write(oprot)
            oprot.writeFieldEnd()
        if self.ke is not None:
            oprot.writeFieldBegin('ke', TType.STRUCT, 1)
            self.ke.write(oprot)
            oprot.writeFieldEnd()
        if self.ae is not None:
            oprot.writeFieldBegin('ae', TType.STRUCT, 2)
            self.ae.write(oprot)
            oprot.writeFieldEnd()
        if self.ce is not None:
            oprot.writeFieldBegin('ce', TType.STRUCT, 3)
            self.ce.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(getGroupById_result)
getGroupById_result.thrift_spec = (
    (0, TType.STRUCT, 'success', [TGroup, None], None, ),  # 0
    (1, TType.STRUCT, 'ke', [koverse.thriftgen.ttypes.TKoverseException, None], None, ),  # 1
    (2, TType.STRUCT, 'ae', [koverse.thriftgen.security.ttypes.TAuthorizationException, None], None, ),  # 2
    (3, TType.STRUCT, 'ce', [koverse.thriftgen.security.ttypes.TCannotUseKoverseException, None], None, ),  # 3
)


class getUserById_args(object):
    """
    Attributes:
     - authInfo
     - userId
    """


    def __init__(self, authInfo=None, userId=None,):
        self.authInfo = authInfo
        self.userId = userId

    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.authInfo = koverse.thriftgen.security.ttypes.TAuthInfo()
                    self.authInfo.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.I64:
                    self.userId = iprot.readI64()
                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('getUserById_args')
        if self.authInfo is not None:
            oprot.writeFieldBegin('authInfo', TType.STRUCT, 1)
            self.authInfo.write(oprot)
            oprot.writeFieldEnd()
        if self.userId is not None:
            oprot.writeFieldBegin('userId', TType.I64, 2)
            oprot.writeI64(self.userId)
            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(getUserById_args)
getUserById_args.thrift_spec = (
    None,  # 0
    (1, TType.STRUCT, 'authInfo', [koverse.thriftgen.security.ttypes.TAuthInfo, None], None, ),  # 1
    (2, TType.I64, 'userId', None, None, ),  # 2
)


class getUserById_result(object):
    """
    Attributes:
     - success
     - ke
     - ae
     - nfe
     - ce
    """


    def __init__(self, success=None, ke=None, ae=None, nfe=None, ce=None,):
        self.success = success
        self.ke = ke
        self.ae = ae
        self.nfe = nfe
        self.ce = ce

    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 = TUser()
                    self.success.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 1:
                if ftype == TType.STRUCT:
                    self.ke = koverse.thriftgen.ttypes.TKoverseException()
                    self.ke.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRUCT:
                    self.ae = koverse.thriftgen.security.ttypes.TAuthorizationException()
                    self.ae.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRUCT:
                    self.nfe = koverse.thriftgen.ttypes.TNotFoundException()
                    self.nfe.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 4:
                if ftype == TType.STRUCT:
                    self.ce = koverse.thriftgen.security.ttypes.TCannotUseKoverseException()
                    self.ce.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('getUserById_result')
        if self.success is not None:
            oprot.writeFieldBegin('success', TType.STRUCT, 0)
            self.success.write(oprot)
            oprot.writeFieldEnd()
        if self.ke is not None:
            oprot.writeFieldBegin('ke', TType.STRUCT, 1)
            self.ke.write(oprot)
            oprot.writeFieldEnd()
        if self.ae is not None:
            oprot.writeFieldBegin('ae', TType.STRUCT, 2)
            self.ae.write(oprot)
            oprot.writeFieldEnd()
        if self.nfe is not None:
            oprot.writeFieldBegin('nfe', TType.STRUCT, 3)
            self.nfe.write(oprot)
            oprot.writeFieldEnd()
        if self.ce is not None:
            oprot.writeFieldBegin('ce', TType.STRUCT, 4)
            self.ce.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(getUserById_result)
getUserById_result.thrift_spec = (
    (0, TType.STRUCT, 'success', [TUser, None], None, ),  # 0
    (1, TType.STRUCT, 'ke', [koverse.thriftgen.ttypes.TKoverseException, None], None, ),  # 1
    (2, TType.STRUCT, 'ae', [koverse.thriftgen.security.ttypes.TAuthorizationException, None], None, ),  # 2
    (3, TType.STRUCT, 'nfe', [koverse.thriftgen.ttypes.TNotFoundException, None], None, ),  # 3
    (4, TType.STRUCT, 'ce', [koverse.thriftgen.security.ttypes.TCannotUseKoverseException, None], None, ),  # 4
)


class getAllGroups_args(object):
    """
    Attributes:
     - authInfo
    """


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

    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.authInfo = koverse.thriftgen.security.ttypes.TAuthInfo()
                    self.authInfo.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('getAllGroups_args')
        if self.authInfo is not None:
            oprot.writeFieldBegin('authInfo', TType.STRUCT, 1)
            self.authInfo.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(getAllGroups_args)
getAllGroups_args.thrift_spec = (
    None,  # 0
    (1, TType.STRUCT, 'authInfo', [koverse.thriftgen.security.ttypes.TAuthInfo, None], None, ),  # 1
)


class getAllGroups_result(object):
    """
    Attributes:
     - success
     - ke
     - ae
     - ce
    """


    def __init__(self, success=None, ke=None, ae=None, ce=None,):
        self.success = success
        self.ke = ke
        self.ae = ae
        self.ce = ce

    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 = []
                    (_etype59, _size56) = iprot.readListBegin()
                    for _i60 in range(_size56):
                        _elem61 = TGroup()
                        _elem61.read(iprot)
                        self.success.append(_elem61)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 1:
                if ftype == TType.STRUCT:
                    self.ke = koverse.thriftgen.ttypes.TKoverseException()
                    self.ke.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRUCT:
                    self.ae = koverse.thriftgen.security.ttypes.TAuthorizationException()
                    self.ae.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRUCT:
                    self.ce = koverse.thriftgen.security.ttypes.TCannotUseKoverseException()
                    self.ce.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('getAllGroups_result')
        if self.success is not None:
            oprot.writeFieldBegin('success', TType.LIST, 0)
            oprot.writeListBegin(TType.STRUCT, len(self.success))
            for iter62 in self.success:
                iter62.write(oprot)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        if self.ke is not None:
            oprot.writeFieldBegin('ke', TType.STRUCT, 1)
            self.ke.write(oprot)
            oprot.writeFieldEnd()
        if self.ae is not None:
            oprot.writeFieldBegin('ae', TType.STRUCT, 2)
            self.ae.write(oprot)
            oprot.writeFieldEnd()
        if self.ce is not None:
            oprot.writeFieldBegin('ce', TType.STRUCT, 3)
            self.ce.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(getAllGroups_result)
getAllGroups_result.thrift_spec = (
    (0, TType.LIST, 'success', (TType.STRUCT, [TGroup, None], False), None, ),  # 0
    (1, TType.STRUCT, 'ke', [koverse.thriftgen.ttypes.TKoverseException, None], None, ),  # 1
    (2, TType.STRUCT, 'ae', [koverse.thriftgen.security.ttypes.TAuthorizationException, None], None, ),  # 2
    (3, TType.STRUCT, 'ce', [koverse.thriftgen.security.ttypes.TCannotUseKoverseException, None], None, ),  # 3
)


class getAllUsers_args(object):
    """
    Attributes:
     - authInfo
    """


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

    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.authInfo = koverse.thriftgen.security.ttypes.TAuthInfo()
                    self.authInfo.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('getAllUsers_args')
        if self.authInfo is not None:
            oprot.writeFieldBegin('authInfo', TType.STRUCT, 1)
            self.authInfo.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(getAllUsers_args)
getAllUsers_args.thrift_spec = (
    None,  # 0
    (1, TType.STRUCT, 'authInfo', [koverse.thriftgen.security.ttypes.TAuthInfo, None], None, ),  # 1
)


class getAllUsers_result(object):
    """
    Attributes:
     - success
     - ke
     - ae
     - ce
    """


    def __init__(self, success=None, ke=None, ae=None, ce=None,):
        self.success = success
        self.ke = ke
        self.ae = ae
        self.ce = ce

    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 = []
                    (_etype66, _size63) = iprot.readListBegin()
                    for _i67 in range(_size63):
                        _elem68 = TUser()
                        _elem68.read(iprot)
                        self.success.append(_elem68)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 1:
                if ftype == TType.STRUCT:
                    self.ke = koverse.thriftgen.ttypes.TKoverseException()
                    self.ke.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRUCT:
                    self.ae = koverse.thriftgen.security.ttypes.TAuthorizationException()
                    self.ae.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRUCT:
                    self.ce = koverse.thriftgen.security.ttypes.TCannotUseKoverseException()
                    self.ce.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('getAllUsers_result')
        if self.success is not None:
            oprot.writeFieldBegin('success', TType.LIST, 0)
            oprot.writeListBegin(TType.STRUCT, len(self.success))
            for iter69 in self.success:
                iter69.write(oprot)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        if self.ke is not None:
            oprot.writeFieldBegin('ke', TType.STRUCT, 1)
            self.ke.write(oprot)
            oprot.writeFieldEnd()
        if self.ae is not None:
            oprot.writeFieldBegin('ae', TType.STRUCT, 2)
            self.ae.write(oprot)
            oprot.writeFieldEnd()
        if self.ce is not None:
            oprot.writeFieldBegin('ce', TType.STRUCT, 3)
            self.ce.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(getAllUsers_result)
getAllUsers_result.thrift_spec = (
    (0, TType.LIST, 'success', (TType.STRUCT, [TUser, None], False), None, ),  # 0
    (1, TType.STRUCT, 'ke', [koverse.thriftgen.ttypes.TKoverseException, None], None, ),  # 1
    (2, TType.STRUCT, 'ae', [koverse.thriftgen.security.ttypes.TAuthorizationException, None], None, ),  # 2
    (3, TType.STRUCT, 'ce', [koverse.thriftgen.security.ttypes.TCannotUseKoverseException, None], None, ),  # 3
)


class resetPaswordByEmail_args(object):
    """
    Attributes:
     - email
    """


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

    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.email = 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('resetPaswordByEmail_args')
        if self.email is not None:
            oprot.writeFieldBegin('email', TType.STRING, 1)
            oprot.writeString(self.email.encode('utf-8') if sys.version_info[0] == 2 else self.email)
            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(resetPaswordByEmail_args)
resetPaswordByEmail_args.thrift_spec = (
    None,  # 0
    (1, TType.STRING, 'email', 'UTF8', None, ),  # 1
)


class resetPaswordByEmail_result(object):
    """
    Attributes:
     - ke
     - ae
    """


    def __init__(self, ke=None, ae=None,):
        self.ke = ke
        self.ae = ae

    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.ke = koverse.thriftgen.ttypes.TKoverseException()
                    self.ke.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRUCT:
                    self.ae = koverse.thriftgen.security.ttypes.TAuthorizationException()
                    self.ae.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('resetPaswordByEmail_result')
        if self.ke is not None:
            oprot.writeFieldBegin('ke', TType.STRUCT, 1)
            self.ke.write(oprot)
            oprot.writeFieldEnd()
        if self.ae is not None:
            oprot.writeFieldBegin('ae', TType.STRUCT, 2)
            self.ae.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(resetPaswordByEmail_result)
resetPaswordByEmail_result.thrift_spec = (
    None,  # 0
    (1, TType.STRUCT, 'ke', [koverse.thriftgen.ttypes.TKoverseException, None], None, ),  # 1
    (2, TType.STRUCT, 'ae', [koverse.thriftgen.security.ttypes.TAuthorizationException, None], None, ),  # 2
)


class confirmResetPassword_args(object):
    """
    Attributes:
     - passwordResetHash
    """


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

    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.passwordResetHash = 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('confirmResetPassword_args')
        if self.passwordResetHash is not None:
            oprot.writeFieldBegin('passwordResetHash', TType.STRING, 1)
            oprot.writeString(self.passwordResetHash.encode('utf-8') if sys.version_info[0] == 2 else self.passwordResetHash)
            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(confirmResetPassword_args)
confirmResetPassword_args.thrift_spec = (
    None,  # 0
    (1, TType.STRING, 'passwordResetHash', 'UTF8', None, ),  # 1
)


class confirmResetPassword_result(object):
    """
    Attributes:
     - ke
     - ae
     - ce
    """


    def __init__(self, ke=None, ae=None, ce=None,):
        self.ke = ke
        self.ae = ae
        self.ce = ce

    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.ke = koverse.thriftgen.ttypes.TKoverseException()
                    self.ke.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRUCT:
                    self.ae = koverse.thriftgen.security.ttypes.TAuthorizationException()
                    self.ae.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRUCT:
                    self.ce = koverse.thriftgen.security.ttypes.TCannotUseKoverseException()
                    self.ce.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('confirmResetPassword_result')
        if self.ke is not None:
            oprot.writeFieldBegin('ke', TType.STRUCT, 1)
            self.ke.write(oprot)
            oprot.writeFieldEnd()
        if self.ae is not None:
            oprot.writeFieldBegin('ae', TType.STRUCT, 2)
            self.ae.write(oprot)
            oprot.writeFieldEnd()
        if self.ce is not None:
            oprot.writeFieldBegin('ce', TType.STRUCT, 3)
            self.ce.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(confirmResetPassword_result)
confirmResetPassword_result.thrift_spec = (
    None,  # 0
    (1, TType.STRUCT, 'ke', [koverse.thriftgen.ttypes.TKoverseException, None], None, ),  # 1
    (2, TType.STRUCT, 'ae', [koverse.thriftgen.security.ttypes.TAuthorizationException, None], None, ),  # 2
    (3, TType.STRUCT, 'ce', [koverse.thriftgen.security.ttypes.TCannotUseKoverseException, None], None, ),  # 3
)


class setUserPassword_args(object):
    """
    Attributes:
     - authInfo
     - userId
     - newPassword
    """


    def __init__(self, authInfo=None, userId=None, newPassword=None,):
        self.authInfo = authInfo
        self.userId = userId
        self.newPassword = newPassword

    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.authInfo = koverse.thriftgen.security.ttypes.TAuthInfo()
                    self.authInfo.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.I64:
                    self.userId = iprot.readI64()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRING:
                    self.newPassword = 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('setUserPassword_args')
        if self.authInfo is not None:
            oprot.writeFieldBegin('authInfo', TType.STRUCT, 1)
            self.authInfo.write(oprot)
            oprot.writeFieldEnd()
        if self.userId is not None:
            oprot.writeFieldBegin('userId', TType.I64, 2)
            oprot.writeI64(self.userId)
            oprot.writeFieldEnd()
        if self.newPassword is not None:
            oprot.writeFieldBegin('newPassword', TType.STRING, 3)
            oprot.writeString(self.newPassword.encode('utf-8') if sys.version_info[0] == 2 else self.newPassword)
            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(setUserPassword_args)
setUserPassword_args.thrift_spec = (
    None,  # 0
    (1, TType.STRUCT, 'authInfo', [koverse.thriftgen.security.ttypes.TAuthInfo, None], None, ),  # 1
    (2, TType.I64, 'userId', None, None, ),  # 2
    (3, TType.STRING, 'newPassword', 'UTF8', None, ),  # 3
)


class setUserPassword_result(object):
    """
    Attributes:
     - success
     - ke
     - ae
     - ce
    """


    def __init__(self, success=None, ke=None, ae=None, ce=None,):
        self.success = success
        self.ke = ke
        self.ae = ae
        self.ce = ce

    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 = TUser()
                    self.success.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 1:
                if ftype == TType.STRUCT:
                    self.ke = koverse.thriftgen.ttypes.TKoverseException()
                    self.ke.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRUCT:
                    self.ae = koverse.thriftgen.security.ttypes.TAuthorizationException()
                    self.ae.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRUCT:
                    self.ce = koverse.thriftgen.security.ttypes.TCannotUseKoverseException()
                    self.ce.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('setUserPassword_result')
        if self.success is not None:
            oprot.writeFieldBegin('success', TType.STRUCT, 0)
            self.success.write(oprot)
            oprot.writeFieldEnd()
        if self.ke is not None:
            oprot.writeFieldBegin('ke', TType.STRUCT, 1)
            self.ke.write(oprot)
            oprot.writeFieldEnd()
        if self.ae is not None:
            oprot.writeFieldBegin('ae', TType.STRUCT, 2)
            self.ae.write(oprot)
            oprot.writeFieldEnd()
        if self.ce is not None:
            oprot.writeFieldBegin('ce', TType.STRUCT, 3)
            self.ce.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(setUserPassword_result)
setUserPassword_result.thrift_spec = (
    (0, TType.STRUCT, 'success', [TUser, None], None, ),  # 0
    (1, TType.STRUCT, 'ke', [koverse.thriftgen.ttypes.TKoverseException, None], None, ),  # 1
    (2, TType.STRUCT, 'ae', [koverse.thriftgen.security.ttypes.TAuthorizationException, None], None, ),  # 2
    (3, TType.STRUCT, 'ce', [koverse.thriftgen.security.ttypes.TCannotUseKoverseException, None], None, ),  # 3
)


class updateGroup_args(object):
    """
    Attributes:
     - authInfo
     - group
    """


    def __init__(self, authInfo=None, group=None,):
        self.authInfo = authInfo
        self.group = group

    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.authInfo = koverse.thriftgen.security.ttypes.TAuthInfo()
                    self.authInfo.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRUCT:
                    self.group = TGroup()
                    self.group.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('updateGroup_args')
        if self.authInfo is not None:
            oprot.writeFieldBegin('authInfo', TType.STRUCT, 1)
            self.authInfo.write(oprot)
            oprot.writeFieldEnd()
        if self.group is not None:
            oprot.writeFieldBegin('group', TType.STRUCT, 2)
            self.group.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(updateGroup_args)
updateGroup_args.thrift_spec = (
    None,  # 0
    (1, TType.STRUCT, 'authInfo', [koverse.thriftgen.security.ttypes.TAuthInfo, None], None, ),  # 1
    (2, TType.STRUCT, 'group', [TGroup, None], None, ),  # 2
)


class updateGroup_result(object):
    """
    Attributes:
     - success
     - ke
     - ae
     - ce
    """


    def __init__(self, success=None, ke=None, ae=None, ce=None,):
        self.success = success
        self.ke = ke
        self.ae = ae
        self.ce = ce

    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 = TGroup()
                    self.success.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 1:
                if ftype == TType.STRUCT:
                    self.ke = koverse.thriftgen.ttypes.TKoverseException()
                    self.ke.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRUCT:
                    self.ae = koverse.thriftgen.security.ttypes.TAuthorizationException()
                    self.ae.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRUCT:
                    self.ce = koverse.thriftgen.security.ttypes.TCannotUseKoverseException()
                    self.ce.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('updateGroup_result')
        if self.success is not None:
            oprot.writeFieldBegin('success', TType.STRUCT, 0)
            self.success.write(oprot)
            oprot.writeFieldEnd()
        if self.ke is not None:
            oprot.writeFieldBegin('ke', TType.STRUCT, 1)
            self.ke.write(oprot)
            oprot.writeFieldEnd()
        if self.ae is not None:
            oprot.writeFieldBegin('ae', TType.STRUCT, 2)
            self.ae.write(oprot)
            oprot.writeFieldEnd()
        if self.ce is not None:
            oprot.writeFieldBegin('ce', TType.STRUCT, 3)
            self.ce.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(updateGroup_result)
updateGroup_result.thrift_spec = (
    (0, TType.STRUCT, 'success', [TGroup, None], None, ),  # 0
    (1, TType.STRUCT, 'ke', [koverse.thriftgen.ttypes.TKoverseException, None], None, ),  # 1
    (2, TType.STRUCT, 'ae', [koverse.thriftgen.security.ttypes.TAuthorizationException, None], None, ),  # 2
    (3, TType.STRUCT, 'ce', [koverse.thriftgen.security.ttypes.TCannotUseKoverseException, None], None, ),  # 3
)


class updateUser_args(object):
    """
    Attributes:
     - authInfo
     - user
    """


    def __init__(self, authInfo=None, user=None,):
        self.authInfo = authInfo
        self.user = user

    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.authInfo = koverse.thriftgen.security.ttypes.TAuthInfo()
                    self.authInfo.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRUCT:
                    self.user = TUser()
                    self.user.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('updateUser_args')
        if self.authInfo is not None:
            oprot.writeFieldBegin('authInfo', TType.STRUCT, 1)
            self.authInfo.write(oprot)
            oprot.writeFieldEnd()
        if self.user is not None:
            oprot.writeFieldBegin('user', TType.STRUCT, 2)
            self.user.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(updateUser_args)
updateUser_args.thrift_spec = (
    None,  # 0
    (1, TType.STRUCT, 'authInfo', [koverse.thriftgen.security.ttypes.TAuthInfo, None], None, ),  # 1
    (2, TType.STRUCT, 'user', [TUser, None], None, ),  # 2
)


class updateUser_result(object):
    """
    Attributes:
     - success
     - ke
     - ae
     - ce
    """


    def __init__(self, success=None, ke=None, ae=None, ce=None,):
        self.success = success
        self.ke = ke
        self.ae = ae
        self.ce = ce

    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 = TUser()
                    self.success.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 1:
                if ftype == TType.STRUCT:
                    self.ke = koverse.thriftgen.ttypes.TKoverseException()
                    self.ke.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRUCT:
                    self.ae = koverse.thriftgen.security.ttypes.TAuthorizationException()
                    self.ae.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRUCT:
                    self.ce = koverse.thriftgen.security.ttypes.TCannotUseKoverseException()
                    self.ce.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('updateUser_result')
        if self.success is not None:
            oprot.writeFieldBegin('success', TType.STRUCT, 0)
            self.success.write(oprot)
            oprot.writeFieldEnd()
        if self.ke is not None:
            oprot.writeFieldBegin('ke', TType.STRUCT, 1)
            self.ke.write(oprot)
            oprot.writeFieldEnd()
        if self.ae is not None:
            oprot.writeFieldBegin('ae', TType.STRUCT, 2)
            self.ae.write(oprot)
            oprot.writeFieldEnd()
        if self.ce is not None:
            oprot.writeFieldBegin('ce', TType.STRUCT, 3)
            self.ce.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(updateUser_result)
updateUser_result.thrift_spec = (
    (0, TType.STRUCT, 'success', [TUser, None], None, ),  # 0
    (1, TType.STRUCT, 'ke', [koverse.thriftgen.ttypes.TKoverseException, None], None, ),  # 1
    (2, TType.STRUCT, 'ae', [koverse.thriftgen.security.ttypes.TAuthorizationException, None], None, ),  # 2
    (3, TType.STRUCT, 'ce', [koverse.thriftgen.security.ttypes.TCannotUseKoverseException, None], None, ),  # 3
)


class authenticateUser_args(object):
    """
    Attributes:
     - authInfo
     - externalId
     - params
    """


    def __init__(self, authInfo=None, externalId=None, params=None,):
        self.authInfo = authInfo
        self.externalId = externalId
        self.params = params

    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.authInfo = koverse.thriftgen.security.ttypes.TAuthInfo()
                    self.authInfo.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.externalId = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.MAP:
                    self.params = {}
                    (_ktype71, _vtype72, _size70) = iprot.readMapBegin()
                    for _i74 in range(_size70):
                        _key75 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                        _val76 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                        self.params[_key75] = _val76
                    iprot.readMapEnd()
                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('authenticateUser_args')
        if self.authInfo is not None:
            oprot.writeFieldBegin('authInfo', TType.STRUCT, 1)
            self.authInfo.write(oprot)
            oprot.writeFieldEnd()
        if self.externalId is not None:
            oprot.writeFieldBegin('externalId', TType.STRING, 2)
            oprot.writeString(self.externalId.encode('utf-8') if sys.version_info[0] == 2 else self.externalId)
            oprot.writeFieldEnd()
        if self.params is not None:
            oprot.writeFieldBegin('params', TType.MAP, 3)
            oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.params))
            for kiter77, viter78 in self.params.items():
                oprot.writeString(kiter77.encode('utf-8') if sys.version_info[0] == 2 else kiter77)
                oprot.writeString(viter78.encode('utf-8') if sys.version_info[0] == 2 else viter78)
            oprot.writeMapEnd()
            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(authenticateUser_args)
authenticateUser_args.thrift_spec = (
    None,  # 0
    (1, TType.STRUCT, 'authInfo', [koverse.thriftgen.security.ttypes.TAuthInfo, None], None, ),  # 1
    (2, TType.STRING, 'externalId', 'UTF8', None, ),  # 2
    (3, TType.MAP, 'params', (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), None, ),  # 3
)


class authenticateUser_result(object):
    """
    Attributes:
     - success
     - ke
     - ae
     - ce
    """


    def __init__(self, success=None, ke=None, ae=None, ce=None,):
        self.success = success
        self.ke = ke
        self.ae = ae
        self.ce = ce

    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 = TUser()
                    self.success.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 1:
                if ftype == TType.STRUCT:
                    self.ke = koverse.thriftgen.ttypes.TKoverseException()
                    self.ke.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRUCT:
                    self.ae = koverse.thriftgen.security.ttypes.TAuthorizationException()
                    self.ae.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRUCT:
                    self.ce = koverse.thriftgen.security.ttypes.TCannotUseKoverseException()
                    self.ce.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('authenticateUser_result')
        if self.success is not None:
            oprot.writeFieldBegin('success', TType.STRUCT, 0)
            self.success.write(oprot)
            oprot.writeFieldEnd()
        if self.ke is not None:
            oprot.writeFieldBegin('ke', TType.STRUCT, 1)
            self.ke.write(oprot)
            oprot.writeFieldEnd()
        if self.ae is not None:
            oprot.writeFieldBegin('ae', TType.STRUCT, 2)
            self.ae.write(oprot)
            oprot.writeFieldEnd()
        if self.ce is not None:
            oprot.writeFieldBegin('ce', TType.STRUCT, 3)
            self.ce.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(authenticateUser_result)
authenticateUser_result.thrift_spec = (
    (0, TType.STRUCT, 'success', [TUser, None], None, ),  # 0
    (1, TType.STRUCT, 'ke', [koverse.thriftgen.ttypes.TKoverseException, None], None, ),  # 1
    (2, TType.STRUCT, 'ae', [koverse.thriftgen.security.ttypes.TAuthorizationException, None], None, ),  # 2
    (3, TType.STRUCT, 'ce', [koverse.thriftgen.security.ttypes.TCannotUseKoverseException, None], None, ),  # 3
)


class getAllSystemPermissions_args(object):
    """
    Attributes:
     - auth
    """


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

    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.auth = koverse.thriftgen.security.ttypes.TAuthInfo()
                    self.auth.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('getAllSystemPermissions_args')
        if self.auth is not None:
            oprot.writeFieldBegin('auth', TType.STRUCT, 1)
            self.auth.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(getAllSystemPermissions_args)
getAllSystemPermissions_args.thrift_spec = (
    None,  # 0
    (1, TType.STRUCT, 'auth', [koverse.thriftgen.security.ttypes.TAuthInfo, None], None, ),  # 1
)


class getAllSystemPermissions_result(object):
    """
    Attributes:
     - success
     - ke
     - ae
     - ce
    """


    def __init__(self, success=None, ke=None, ae=None, ce=None,):
        self.success = success
        self.ke = ke
        self.ae = ae
        self.ce = ce

    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 = []
                    (_etype82, _size79) = iprot.readListBegin()
                    for _i83 in range(_size79):
                        _elem84 = TSystemPermission()
                        _elem84.read(iprot)
                        self.success.append(_elem84)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 1:
                if ftype == TType.STRUCT:
                    self.ke = koverse.thriftgen.ttypes.TKoverseException()
                    self.ke.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRUCT:
                    self.ae = koverse.thriftgen.security.ttypes.TAuthorizationException()
                    self.ae.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRUCT:
                    self.ce = koverse.thriftgen.security.ttypes.TCannotUseKoverseException()
                    self.ce.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('getAllSystemPermissions_result')
        if self.success is not None:
            oprot.writeFieldBegin('success', TType.LIST, 0)
            oprot.writeListBegin(TType.STRUCT, len(self.success))
            for iter85 in self.success:
                iter85.write(oprot)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        if self.ke is not None:
            oprot.writeFieldBegin('ke', TType.STRUCT, 1)
            self.ke.write(oprot)
            oprot.writeFieldEnd()
        if self.ae is not None:
            oprot.writeFieldBegin('ae', TType.STRUCT, 2)
            self.ae.write(oprot)
            oprot.writeFieldEnd()
        if self.ce is not None:
            oprot.writeFieldBegin('ce', TType.STRUCT, 3)
            self.ce.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(getAllSystemPermissions_result)
getAllSystemPermissions_result.thrift_spec = (
    (0, TType.LIST, 'success', (TType.STRUCT, [TSystemPermission, None], False), None, ),  # 0
    (1, TType.STRUCT, 'ke', [koverse.thriftgen.ttypes.TKoverseException, None], None, ),  # 1
    (2, TType.STRUCT, 'ae', [koverse.thriftgen.security.ttypes.TAuthorizationException, None], None, ),  # 2
    (3, TType.STRUCT, 'ce', [koverse.thriftgen.security.ttypes.TCannotUseKoverseException, None], None, ),  # 3
)


class getPermissionsForUser_args(object):
    """
    Attributes:
     - auth
     - userId
    """


    def __init__(self, auth=None, userId=None,):
        self.auth = auth
        self.userId = userId

    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.auth = koverse.thriftgen.security.ttypes.TAuthInfo()
                    self.auth.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.I64:
                    self.userId = iprot.readI64()
                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.auth is not None:
            oprot.writeFieldBegin('auth', TType.STRUCT, 1)
            self.auth.write(oprot)
            oprot.writeFieldEnd()
        if self.userId is not None:
            oprot.writeFieldBegin('userId', TType.I64, 2)
            oprot.writeI64(self.userId)
            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.STRUCT, 'auth', [koverse.thriftgen.security.ttypes.TAuthInfo, None], None, ),  # 1
    (2, TType.I64, 'userId', None, None, ),  # 2
)


class getPermissionsForUser_result(object):
    """
    Attributes:
     - success
     - ke
     - ae
     - ce
    """


    def __init__(self, success=None, ke=None, ae=None, ce=None,):
        self.success = success
        self.ke = ke
        self.ae = ae
        self.ce = ce

    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 = []
                    (_etype89, _size86) = iprot.readListBegin()
                    for _i90 in range(_size86):
                        _elem91 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                        self.success.append(_elem91)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 1:
                if ftype == TType.STRUCT:
                    self.ke = koverse.thriftgen.ttypes.TKoverseException()
                    self.ke.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRUCT:
                    self.ae = koverse.thriftgen.security.ttypes.TAuthorizationException()
                    self.ae.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRUCT:
                    self.ce = koverse.thriftgen.security.ttypes.TCannotUseKoverseException()
                    self.ce.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.STRING, len(self.success))
            for iter92 in self.success:
                oprot.writeString(iter92.encode('utf-8') if sys.version_info[0] == 2 else iter92)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        if self.ke is not None:
            oprot.writeFieldBegin('ke', TType.STRUCT, 1)
            self.ke.write(oprot)
            oprot.writeFieldEnd()
        if self.ae is not None:
            oprot.writeFieldBegin('ae', TType.STRUCT, 2)
            self.ae.write(oprot)
            oprot.writeFieldEnd()
        if self.ce is not None:
            oprot.writeFieldBegin('ce', TType.STRUCT, 3)
            self.ce.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.STRING, 'UTF8', False), None, ),  # 0
    (1, TType.STRUCT, 'ke', [koverse.thriftgen.ttypes.TKoverseException, None], None, ),  # 1
    (2, TType.STRUCT, 'ae', [koverse.thriftgen.security.ttypes.TAuthorizationException, None], None, ),  # 2
    (3, TType.STRUCT, 'ce', [koverse.thriftgen.security.ttypes.TCannotUseKoverseException, None], None, ),  # 3
)


class getAllDataSetPermissions_args(object):
    """
    Attributes:
     - auth
    """


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

    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.auth = koverse.thriftgen.security.ttypes.TAuthInfo()
                    self.auth.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('getAllDataSetPermissions_args')
        if self.auth is not None:
            oprot.writeFieldBegin('auth', TType.STRUCT, 1)
            self.auth.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(getAllDataSetPermissions_args)
getAllDataSetPermissions_args.thrift_spec = (
    None,  # 0
    (1, TType.STRUCT, 'auth', [koverse.thriftgen.security.ttypes.TAuthInfo, None], None, ),  # 1
)


class getAllDataSetPermissions_result(object):
    """
    Attributes:
     - success
     - ke
     - ae
     - ce
    """


    def __init__(self, success=None, ke=None, ae=None, ce=None,):
        self.success = success
        self.ke = ke
        self.ae = ae
        self.ce = ce

    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 = []
                    (_etype96, _size93) = iprot.readListBegin()
                    for _i97 in range(_size93):
                        _elem98 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
                        self.success.append(_elem98)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 1:
                if ftype == TType.STRUCT:
                    self.ke = koverse.thriftgen.ttypes.TKoverseException()
                    self.ke.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRUCT:
                    self.ae = koverse.thriftgen.security.ttypes.TAuthorizationException()
                    self.ae.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRUCT:
                    self.ce = koverse.thriftgen.security.ttypes.TCannotUseKoverseException()
                    self.ce.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('getAllDataSetPermissions_result')
        if self.success is not None:
            oprot.writeFieldBegin('success', TType.LIST, 0)
            oprot.writeListBegin(TType.STRING, len(self.success))
            for iter99 in self.success:
                oprot.writeString(iter99.encode('utf-8') if sys.version_info[0] == 2 else iter99)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        if self.ke is not None:
            oprot.writeFieldBegin('ke', TType.STRUCT, 1)
            self.ke.write(oprot)
            oprot.writeFieldEnd()
        if self.ae is not None:
            oprot.writeFieldBegin('ae', TType.STRUCT, 2)
            self.ae.write(oprot)
            oprot.writeFieldEnd()
        if self.ce is not None:
            oprot.writeFieldBegin('ce', TType.STRUCT, 3)
            self.ce.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(getAllDataSetPermissions_result)
getAllDataSetPermissions_result.thrift_spec = (
    (0, TType.LIST, 'success', (TType.STRING, 'UTF8', False), None, ),  # 0
    (1, TType.STRUCT, 'ke', [koverse.thriftgen.ttypes.TKoverseException, None], None, ),  # 1
    (2, TType.STRUCT, 'ae', [koverse.thriftgen.security.ttypes.TAuthorizationException, None], None, ),  # 2
    (3, TType.STRUCT, 'ce', [koverse.thriftgen.security.ttypes.TCannotUseKoverseException, None], None, ),  # 3
)


class auditLogout_args(object):
    """
    Attributes:
     - auth
     - userId
    """


    def __init__(self, auth=None, userId=None,):
        self.auth = auth
        self.userId = userId

    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.auth = koverse.thriftgen.security.ttypes.TAuthInfo()
                    self.auth.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.I64:
                    self.userId = iprot.readI64()
                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('auditLogout_args')
        if self.auth is not None:
            oprot.writeFieldBegin('auth', TType.STRUCT, 1)
            self.auth.write(oprot)
            oprot.writeFieldEnd()
        if self.userId is not None:
            oprot.writeFieldBegin('userId', TType.I64, 2)
            oprot.writeI64(self.userId)
            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(auditLogout_args)
auditLogout_args.thrift_spec = (
    None,  # 0
    (1, TType.STRUCT, 'auth', [koverse.thriftgen.security.ttypes.TAuthInfo, None], None, ),  # 1
    (2, TType.I64, 'userId', None, None, ),  # 2
)


class auditLogout_result(object):
    """
    Attributes:
     - ke
     - ae
     - ce
    """


    def __init__(self, ke=None, ae=None, ce=None,):
        self.ke = ke
        self.ae = ae
        self.ce = ce

    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.ke = koverse.thriftgen.ttypes.TKoverseException()
                    self.ke.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRUCT:
                    self.ae = koverse.thriftgen.security.ttypes.TAuthorizationException()
                    self.ae.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRUCT:
                    self.ce = koverse.thriftgen.security.ttypes.TCannotUseKoverseException()
                    self.ce.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('auditLogout_result')
        if self.ke is not None:
            oprot.writeFieldBegin('ke', TType.STRUCT, 1)
            self.ke.write(oprot)
            oprot.writeFieldEnd()
        if self.ae is not None:
            oprot.writeFieldBegin('ae', TType.STRUCT, 2)
            self.ae.write(oprot)
            oprot.writeFieldEnd()
        if self.ce is not None:
            oprot.writeFieldBegin('ce', TType.STRUCT, 3)
            self.ce.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(auditLogout_result)
auditLogout_result.thrift_spec = (
    None,  # 0
    (1, TType.STRUCT, 'ke', [koverse.thriftgen.ttypes.TKoverseException, None], None, ),  # 1
    (2, TType.STRUCT, 'ae', [koverse.thriftgen.security.ttypes.TAuthorizationException, None], None, ),  # 2
    (3, TType.STRUCT, 'ce', [koverse.thriftgen.security.ttypes.TCannotUseKoverseException, None], None, ),  # 3
)


class createAPIToken_args(object):
    """
    Attributes:
     - auth
     - displayName
    """


    def __init__(self, auth=None, displayName=None,):
        self.auth = auth
        self.displayName = displayName

    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.auth = koverse.thriftgen.security.ttypes.TAuthInfo()
                    self.auth.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.displayName = 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('createAPIToken_args')
        if self.auth is not None:
            oprot.writeFieldBegin('auth', TType.STRUCT, 1)
            self.auth.write(oprot)
            oprot.writeFieldEnd()
        if self.displayName is not None:
            oprot.writeFieldBegin('displayName', TType.STRING, 2)
            oprot.writeString(self.displayName.encode('utf-8') if sys.version_info[0] == 2 else self.displayName)
            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(createAPIToken_args)
createAPIToken_args.thrift_spec = (
    None,  # 0
    (1, TType.STRUCT, 'auth', [koverse.thriftgen.security.ttypes.TAuthInfo, None], None, ),  # 1
    (2, TType.STRING, 'displayName', 'UTF8', None, ),  # 2
)


class createAPIToken_result(object):
    """
    Attributes:
     - success
     - ke
     - ae
     - ce
    """


    def __init__(self, success=None, ke=None, ae=None, ce=None,):
        self.success = success
        self.ke = ke
        self.ae = ae
        self.ce = ce

    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 = TAPIToken()
                    self.success.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 1:
                if ftype == TType.STRUCT:
                    self.ke = koverse.thriftgen.ttypes.TKoverseException()
                    self.ke.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRUCT:
                    self.ae = koverse.thriftgen.security.ttypes.TAuthorizationException()
                    self.ae.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRUCT:
                    self.ce = koverse.thriftgen.security.ttypes.TCannotUseKoverseException()
                    self.ce.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('createAPIToken_result')
        if self.success is not None:
            oprot.writeFieldBegin('success', TType.STRUCT, 0)
            self.success.write(oprot)
            oprot.writeFieldEnd()
        if self.ke is not None:
            oprot.writeFieldBegin('ke', TType.STRUCT, 1)
            self.ke.write(oprot)
            oprot.writeFieldEnd()
        if self.ae is not None:
            oprot.writeFieldBegin('ae', TType.STRUCT, 2)
            self.ae.write(oprot)
            oprot.writeFieldEnd()
        if self.ce is not None:
            oprot.writeFieldBegin('ce', TType.STRUCT, 3)
            self.ce.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(createAPIToken_result)
createAPIToken_result.thrift_spec = (
    (0, TType.STRUCT, 'success', [TAPIToken, None], None, ),  # 0
    (1, TType.STRUCT, 'ke', [koverse.thriftgen.ttypes.TKoverseException, None], None, ),  # 1
    (2, TType.STRUCT, 'ae', [koverse.thriftgen.security.ttypes.TAuthorizationException, None], None, ),  # 2
    (3, TType.STRUCT, 'ce', [koverse.thriftgen.security.ttypes.TCannotUseKoverseException, None], None, ),  # 3
)


class disableAPIToken_args(object):
    """
    Attributes:
     - auth
     - id
    """


    def __init__(self, auth=None, id=None,):
        self.auth = auth
        self.id = id

    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.auth = koverse.thriftgen.security.ttypes.TAuthInfo()
                    self.auth.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.id = 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('disableAPIToken_args')
        if self.auth is not None:
            oprot.writeFieldBegin('auth', TType.STRUCT, 1)
            self.auth.write(oprot)
            oprot.writeFieldEnd()
        if self.id is not None:
            oprot.writeFieldBegin('id', TType.STRING, 2)
            oprot.writeString(self.id.encode('utf-8') if sys.version_info[0] == 2 else self.id)
            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(disableAPIToken_args)
disableAPIToken_args.thrift_spec = (
    None,  # 0
    (1, TType.STRUCT, 'auth', [koverse.thriftgen.security.ttypes.TAuthInfo, None], None, ),  # 1
    (2, TType.STRING, 'id', 'UTF8', None, ),  # 2
)


class disableAPIToken_result(object):
    """
    Attributes:
     - success
     - ke
     - ae
     - ce
    """


    def __init__(self, success=None, ke=None, ae=None, ce=None,):
        self.success = success
        self.ke = ke
        self.ae = ae
        self.ce = ce

    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 = TAPIToken()
                    self.success.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 1:
                if ftype == TType.STRUCT:
                    self.ke = koverse.thriftgen.ttypes.TKoverseException()
                    self.ke.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRUCT:
                    self.ae = koverse.thriftgen.security.ttypes.TAuthorizationException()
                    self.ae.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRUCT:
                    self.ce = koverse.thriftgen.security.ttypes.TCannotUseKoverseException()
                    self.ce.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('disableAPIToken_result')
        if self.success is not None:
            oprot.writeFieldBegin('success', TType.STRUCT, 0)
            self.success.write(oprot)
            oprot.writeFieldEnd()
        if self.ke is not None:
            oprot.writeFieldBegin('ke', TType.STRUCT, 1)
            self.ke.write(oprot)
            oprot.writeFieldEnd()
        if self.ae is not None:
            oprot.writeFieldBegin('ae', TType.STRUCT, 2)
            self.ae.write(oprot)
            oprot.writeFieldEnd()
        if self.ce is not None:
            oprot.writeFieldBegin('ce', TType.STRUCT, 3)
            self.ce.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(disableAPIToken_result)
disableAPIToken_result.thrift_spec = (
    (0, TType.STRUCT, 'success', [TAPIToken, None], None, ),  # 0
    (1, TType.STRUCT, 'ke', [koverse.thriftgen.ttypes.TKoverseException, None], None, ),  # 1
    (2, TType.STRUCT, 'ae', [koverse.thriftgen.security.ttypes.TAuthorizationException, None], None, ),  # 2
    (3, TType.STRUCT, 'ce', [koverse.thriftgen.security.ttypes.TCannotUseKoverseException, None], None, ),  # 3
)


class listAPITokens_args(object):
    """
    Attributes:
     - auth
    """


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

    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.auth = koverse.thriftgen.security.ttypes.TAuthInfo()
                    self.auth.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('listAPITokens_args')
        if self.auth is not None:
            oprot.writeFieldBegin('auth', TType.STRUCT, 1)
            self.auth.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(listAPITokens_args)
listAPITokens_args.thrift_spec = (
    None,  # 0
    (1, TType.STRUCT, 'auth', [koverse.thriftgen.security.ttypes.TAuthInfo, None], None, ),  # 1
)


class listAPITokens_result(object):
    """
    Attributes:
     - success
     - ke
     - ae
     - ce
    """


    def __init__(self, success=None, ke=None, ae=None, ce=None,):
        self.success = success
        self.ke = ke
        self.ae = ae
        self.ce = ce

    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 = []
                    (_etype103, _size100) = iprot.readListBegin()
                    for _i104 in range(_size100):
                        _elem105 = TAPIToken()
                        _elem105.read(iprot)
                        self.success.append(_elem105)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 1:
                if ftype == TType.STRUCT:
                    self.ke = koverse.thriftgen.ttypes.TKoverseException()
                    self.ke.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRUCT:
                    self.ae = koverse.thriftgen.security.ttypes.TAuthorizationException()
                    self.ae.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRUCT:
                    self.ce = koverse.thriftgen.security.ttypes.TCannotUseKoverseException()
                    self.ce.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('listAPITokens_result')
        if self.success is not None:
            oprot.writeFieldBegin('success', TType.LIST, 0)
            oprot.writeListBegin(TType.STRUCT, len(self.success))
            for iter106 in self.success:
                iter106.write(oprot)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        if self.ke is not None:
            oprot.writeFieldBegin('ke', TType.STRUCT, 1)
            self.ke.write(oprot)
            oprot.writeFieldEnd()
        if self.ae is not None:
            oprot.writeFieldBegin('ae', TType.STRUCT, 2)
            self.ae.write(oprot)
            oprot.writeFieldEnd()
        if self.ce is not None:
            oprot.writeFieldBegin('ce', TType.STRUCT, 3)
            self.ce.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(listAPITokens_result)
listAPITokens_result.thrift_spec = (
    (0, TType.LIST, 'success', (TType.STRUCT, [TAPIToken, None], False), None, ),  # 0
    (1, TType.STRUCT, 'ke', [koverse.thriftgen.ttypes.TKoverseException, None], None, ),  # 1
    (2, TType.STRUCT, 'ae', [koverse.thriftgen.security.ttypes.TAuthorizationException, None], None, ),  # 2
    (3, TType.STRUCT, 'ce', [koverse.thriftgen.security.ttypes.TCannotUseKoverseException, None], None, ),  # 3
)


class updateAPITokenName_args(object):
    """
    Attributes:
     - auth
     - apiToken
    """


    def __init__(self, auth=None, apiToken=None,):
        self.auth = auth
        self.apiToken = apiToken

    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.auth = koverse.thriftgen.security.ttypes.TAuthInfo()
                    self.auth.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRUCT:
                    self.apiToken = TAPIToken()
                    self.apiToken.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('updateAPITokenName_args')
        if self.auth is not None:
            oprot.writeFieldBegin('auth', TType.STRUCT, 1)
            self.auth.write(oprot)
            oprot.writeFieldEnd()
        if self.apiToken is not None:
            oprot.writeFieldBegin('apiToken', TType.STRUCT, 2)
            self.apiToken.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(updateAPITokenName_args)
updateAPITokenName_args.thrift_spec = (
    None,  # 0
    (1, TType.STRUCT, 'auth', [koverse.thriftgen.security.ttypes.TAuthInfo, None], None, ),  # 1
    (2, TType.STRUCT, 'apiToken', [TAPIToken, None], None, ),  # 2
)


class updateAPITokenName_result(object):
    """
    Attributes:
     - success
     - ke
     - ae
     - ce
    """


    def __init__(self, success=None, ke=None, ae=None, ce=None,):
        self.success = success
        self.ke = ke
        self.ae = ae
        self.ce = ce

    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 = TAPIToken()
                    self.success.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 1:
                if ftype == TType.STRUCT:
                    self.ke = koverse.thriftgen.ttypes.TKoverseException()
                    self.ke.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRUCT:
                    self.ae = koverse.thriftgen.security.ttypes.TAuthorizationException()
                    self.ae.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRUCT:
                    self.ce = koverse.thriftgen.security.ttypes.TCannotUseKoverseException()
                    self.ce.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('updateAPITokenName_result')
        if self.success is not None:
            oprot.writeFieldBegin('success', TType.STRUCT, 0)
            self.success.write(oprot)
            oprot.writeFieldEnd()
        if self.ke is not None:
            oprot.writeFieldBegin('ke', TType.STRUCT, 1)
            self.ke.write(oprot)
            oprot.writeFieldEnd()
        if self.ae is not None:
            oprot.writeFieldBegin('ae', TType.STRUCT, 2)
            self.ae.write(oprot)
            oprot.writeFieldEnd()
        if self.ce is not None:
            oprot.writeFieldBegin('ce', TType.STRUCT, 3)
            self.ce.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(updateAPITokenName_result)
updateAPITokenName_result.thrift_spec = (
    (0, TType.STRUCT, 'success', [TAPIToken, None], None, ),  # 0
    (1, TType.STRUCT, 'ke', [koverse.thriftgen.ttypes.TKoverseException, None], None, ),  # 1
    (2, TType.STRUCT, 'ae', [koverse.thriftgen.security.ttypes.TAuthorizationException, None], None, ),  # 2
    (3, TType.STRUCT, 'ce', [koverse.thriftgen.security.ttypes.TCannotUseKoverseException, None], None, ),  # 3
)


class updateAPITokenGroups_args(object):
    """
    Attributes:
     - auth
     - apiToken
    """


    def __init__(self, auth=None, apiToken=None,):
        self.auth = auth
        self.apiToken = apiToken

    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.auth = koverse.thriftgen.security.ttypes.TAuthInfo()
                    self.auth.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRUCT:
                    self.apiToken = TAPIToken()
                    self.apiToken.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('updateAPITokenGroups_args')
        if self.auth is not None:
            oprot.writeFieldBegin('auth', TType.STRUCT, 1)
            self.auth.write(oprot)
            oprot.writeFieldEnd()
        if self.apiToken is not None:
            oprot.writeFieldBegin('apiToken', TType.STRUCT, 2)
            self.apiToken.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(updateAPITokenGroups_args)
updateAPITokenGroups_args.thrift_spec = (
    None,  # 0
    (1, TType.STRUCT, 'auth', [koverse.thriftgen.security.ttypes.TAuthInfo, None], None, ),  # 1
    (2, TType.STRUCT, 'apiToken', [TAPIToken, None], None, ),  # 2
)


class updateAPITokenGroups_result(object):
    """
    Attributes:
     - success
     - ke
     - ae
     - ce
    """


    def __init__(self, success=None, ke=None, ae=None, ce=None,):
        self.success = success
        self.ke = ke
        self.ae = ae
        self.ce = ce

    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 = TAPIToken()
                    self.success.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 1:
                if ftype == TType.STRUCT:
                    self.ke = koverse.thriftgen.ttypes.TKoverseException()
                    self.ke.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRUCT:
                    self.ae = koverse.thriftgen.security.ttypes.TAuthorizationException()
                    self.ae.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRUCT:
                    self.ce = koverse.thriftgen.security.ttypes.TCannotUseKoverseException()
                    self.ce.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('updateAPITokenGroups_result')
        if self.success is not None:
            oprot.writeFieldBegin('success', TType.STRUCT, 0)
            self.success.write(oprot)
            oprot.writeFieldEnd()
        if self.ke is not None:
            oprot.writeFieldBegin('ke', TType.STRUCT, 1)
            self.ke.write(oprot)
            oprot.writeFieldEnd()
        if self.ae is not None:
            oprot.writeFieldBegin('ae', TType.STRUCT, 2)
            self.ae.write(oprot)
            oprot.writeFieldEnd()
        if self.ce is not None:
            oprot.writeFieldBegin('ce', TType.STRUCT, 3)
            self.ce.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(updateAPITokenGroups_result)
updateAPITokenGroups_result.thrift_spec = (
    (0, TType.STRUCT, 'success', [TAPIToken, None], None, ),  # 0
    (1, TType.STRUCT, 'ke', [koverse.thriftgen.ttypes.TKoverseException, None], None, ),  # 1
    (2, TType.STRUCT, 'ae', [koverse.thriftgen.security.ttypes.TAuthorizationException, None], None, ),  # 2
    (3, TType.STRUCT, 'ce', [koverse.thriftgen.security.ttypes.TCannotUseKoverseException, None], None, ),  # 3
)


class getAPITokenById_args(object):
    """
    Attributes:
     - auth
     - id
    """


    def __init__(self, auth=None, id=None,):
        self.auth = auth
        self.id = id

    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.auth = koverse.thriftgen.security.ttypes.TAuthInfo()
                    self.auth.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRING:
                    self.id = 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('getAPITokenById_args')
        if self.auth is not None:
            oprot.writeFieldBegin('auth', TType.STRUCT, 1)
            self.auth.write(oprot)
            oprot.writeFieldEnd()
        if self.id is not None:
            oprot.writeFieldBegin('id', TType.STRING, 2)
            oprot.writeString(self.id.encode('utf-8') if sys.version_info[0] == 2 else self.id)
            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(getAPITokenById_args)
getAPITokenById_args.thrift_spec = (
    None,  # 0
    (1, TType.STRUCT, 'auth', [koverse.thriftgen.security.ttypes.TAuthInfo, None], None, ),  # 1
    (2, TType.STRING, 'id', 'UTF8', None, ),  # 2
)


class getAPITokenById_result(object):
    """
    Attributes:
     - success
     - ke
     - ae
     - ce
    """


    def __init__(self, success=None, ke=None, ae=None, ce=None,):
        self.success = success
        self.ke = ke
        self.ae = ae
        self.ce = ce

    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 = TAPIToken()
                    self.success.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 1:
                if ftype == TType.STRUCT:
                    self.ke = koverse.thriftgen.ttypes.TKoverseException()
                    self.ke.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRUCT:
                    self.ae = koverse.thriftgen.security.ttypes.TAuthorizationException()
                    self.ae.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRUCT:
                    self.ce = koverse.thriftgen.security.ttypes.TCannotUseKoverseException()
                    self.ce.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('getAPITokenById_result')
        if self.success is not None:
            oprot.writeFieldBegin('success', TType.STRUCT, 0)
            self.success.write(oprot)
            oprot.writeFieldEnd()
        if self.ke is not None:
            oprot.writeFieldBegin('ke', TType.STRUCT, 1)
            self.ke.write(oprot)
            oprot.writeFieldEnd()
        if self.ae is not None:
            oprot.writeFieldBegin('ae', TType.STRUCT, 2)
            self.ae.write(oprot)
            oprot.writeFieldEnd()
        if self.ce is not None:
            oprot.writeFieldBegin('ce', TType.STRUCT, 3)
            self.ce.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(getAPITokenById_result)
getAPITokenById_result.thrift_spec = (
    (0, TType.STRUCT, 'success', [TAPIToken, None], None, ),  # 0
    (1, TType.STRUCT, 'ke', [koverse.thriftgen.ttypes.TKoverseException, None], None, ),  # 1
    (2, TType.STRUCT, 'ae', [koverse.thriftgen.security.ttypes.TAuthorizationException, None], None, ),  # 2
    (3, TType.STRUCT, 'ce', [koverse.thriftgen.security.ttypes.TCannotUseKoverseException, None], None, ),  # 3
)


class getAPITokensByGroupId_args(object):
    """
    Attributes:
     - auth
     - groupId
    """


    def __init__(self, auth=None, groupId=None,):
        self.auth = auth
        self.groupId = groupId

    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.auth = koverse.thriftgen.security.ttypes.TAuthInfo()
                    self.auth.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.I64:
                    self.groupId = iprot.readI64()
                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('getAPITokensByGroupId_args')
        if self.auth is not None:
            oprot.writeFieldBegin('auth', TType.STRUCT, 1)
            self.auth.write(oprot)
            oprot.writeFieldEnd()
        if self.groupId is not None:
            oprot.writeFieldBegin('groupId', TType.I64, 2)
            oprot.writeI64(self.groupId)
            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(getAPITokensByGroupId_args)
getAPITokensByGroupId_args.thrift_spec = (
    None,  # 0
    (1, TType.STRUCT, 'auth', [koverse.thriftgen.security.ttypes.TAuthInfo, None], None, ),  # 1
    (2, TType.I64, 'groupId', None, None, ),  # 2
)


class getAPITokensByGroupId_result(object):
    """
    Attributes:
     - success
     - ke
     - ae
     - ce
    """


    def __init__(self, success=None, ke=None, ae=None, ce=None,):
        self.success = success
        self.ke = ke
        self.ae = ae
        self.ce = ce

    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 = []
                    (_etype110, _size107) = iprot.readListBegin()
                    for _i111 in range(_size107):
                        _elem112 = TAPIToken()
                        _elem112.read(iprot)
                        self.success.append(_elem112)
                    iprot.readListEnd()
                else:
                    iprot.skip(ftype)
            elif fid == 1:
                if ftype == TType.STRUCT:
                    self.ke = koverse.thriftgen.ttypes.TKoverseException()
                    self.ke.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRUCT:
                    self.ae = koverse.thriftgen.security.ttypes.TAuthorizationException()
                    self.ae.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 3:
                if ftype == TType.STRUCT:
                    self.ce = koverse.thriftgen.security.ttypes.TCannotUseKoverseException()
                    self.ce.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('getAPITokensByGroupId_result')
        if self.success is not None:
            oprot.writeFieldBegin('success', TType.LIST, 0)
            oprot.writeListBegin(TType.STRUCT, len(self.success))
            for iter113 in self.success:
                iter113.write(oprot)
            oprot.writeListEnd()
            oprot.writeFieldEnd()
        if self.ke is not None:
            oprot.writeFieldBegin('ke', TType.STRUCT, 1)
            self.ke.write(oprot)
            oprot.writeFieldEnd()
        if self.ae is not None:
            oprot.writeFieldBegin('ae', TType.STRUCT, 2)
            self.ae.write(oprot)
            oprot.writeFieldEnd()
        if self.ce is not None:
            oprot.writeFieldBegin('ce', TType.STRUCT, 3)
            self.ce.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(getAPITokensByGroupId_result)
getAPITokensByGroupId_result.thrift_spec = (
    (0, TType.LIST, 'success', (TType.STRUCT, [TAPIToken, None], False), None, ),  # 0
    (1, TType.STRUCT, 'ke', [koverse.thriftgen.ttypes.TKoverseException, None], None, ),  # 1
    (2, TType.STRUCT, 'ae', [koverse.thriftgen.security.ttypes.TAuthorizationException, None], None, ),  # 2
    (3, TType.STRUCT, 'ce', [koverse.thriftgen.security.ttypes.TCannotUseKoverseException, None], None, ),  # 3
)


class authenticateAPIToken_args(object):
    """
    Attributes:
     - id
    """


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

    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.id = 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('authenticateAPIToken_args')
        if self.id is not None:
            oprot.writeFieldBegin('id', TType.STRING, 1)
            oprot.writeString(self.id.encode('utf-8') if sys.version_info[0] == 2 else self.id)
            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(authenticateAPIToken_args)
authenticateAPIToken_args.thrift_spec = (
    None,  # 0
    (1, TType.STRING, 'id', 'UTF8', None, ),  # 1
)


class authenticateAPIToken_result(object):
    """
    Attributes:
     - success
     - ke
     - ce
    """


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

    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.ke = koverse.thriftgen.ttypes.TKoverseException()
                    self.ke.read(iprot)
                else:
                    iprot.skip(ftype)
            elif fid == 2:
                if ftype == TType.STRUCT:
                    self.ce = koverse.thriftgen.security.ttypes.TCannotUseKoverseException()
                    self.ce.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('authenticateAPIToken_result')
        if self.success is not None:
            oprot.writeFieldBegin('success', TType.BOOL, 0)
            oprot.writeBool(self.success)
            oprot.writeFieldEnd()
        if self.ke is not None:
            oprot.writeFieldBegin('ke', TType.STRUCT, 1)
            self.ke.write(oprot)
            oprot.writeFieldEnd()
        if self.ce is not None:
            oprot.writeFieldBegin('ce', TType.STRUCT, 2)
            self.ce.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(authenticateAPIToken_result)
authenticateAPIToken_result.thrift_spec = (
    (0, TType.BOOL, 'success', None, None, ),  # 0
    (1, TType.STRUCT, 'ke', [koverse.thriftgen.ttypes.TKoverseException, None], None, ),  # 1
    (2, TType.STRUCT, 'ce', [koverse.thriftgen.security.ttypes.TCannotUseKoverseException, None], None, ),  # 2
)
fix_spec(all_structs)
del all_structs

