blob: 0bc86da690b7308bfbde8bf9e410a233fa56ddd4 [file] [log] [blame]
#
# Autogenerated by Thrift Compiler (0.10.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
import sys
import airavata.base.api.BaseAPI
import logging
from .ttypes import *
from thrift.Thrift import TProcessor
from thrift.transport import TTransport
class Iface(airavata.base.api.BaseAPI.Iface):
def getAPIVersion(self):
pass
def createGroup(self, authzToken, groupModel):
"""
Parameters:
- authzToken
- groupModel
"""
pass
def updateGroup(self, authzToken, groupModel):
"""
Parameters:
- authzToken
- groupModel
"""
pass
def deleteGroup(self, authzToken, groupId, ownerId):
"""
Parameters:
- authzToken
- groupId
- ownerId
"""
pass
def getGroup(self, authzToken, groupId):
"""
Parameters:
- authzToken
- groupId
"""
pass
def getGroups(self, authzToken):
"""
Parameters:
- authzToken
"""
pass
def getAllGroupsUserBelongs(self, authzToken, userName):
"""
Parameters:
- authzToken
- userName
"""
pass
def addUsersToGroup(self, authzToken, userIds, groupId):
"""
Parameters:
- authzToken
- userIds
- groupId
"""
pass
def removeUsersFromGroup(self, authzToken, userIds, groupId):
"""
Parameters:
- authzToken
- userIds
- groupId
"""
pass
def transferGroupOwnership(self, authzToken, groupId, newOwnerId):
"""
Parameters:
- authzToken
- groupId
- newOwnerId
"""
pass
def addGroupAdmins(self, authzToken, groupId, adminIds):
"""
Parameters:
- authzToken
- groupId
- adminIds
"""
pass
def removeGroupAdmins(self, authzToken, groupId, adminIds):
"""
Parameters:
- authzToken
- groupId
- adminIds
"""
pass
def hasAdminAccess(self, authzToken, groupId, adminId):
"""
Parameters:
- authzToken
- groupId
- adminId
"""
pass
def hasOwnerAccess(self, authzToken, groupId, ownerId):
"""
Parameters:
- authzToken
- groupId
- ownerId
"""
pass
class Client(airavata.base.api.BaseAPI.Client, Iface):
def __init__(self, iprot, oprot=None):
airavata.base.api.BaseAPI.Client.__init__(self, iprot, oprot)
def getAPIVersion(self):
self.send_getAPIVersion()
return self.recv_getAPIVersion()
def send_getAPIVersion(self):
self._oprot.writeMessageBegin('getAPIVersion', TMessageType.CALL, self._seqid)
args = getAPIVersion_args()
args.write(self._oprot)
self._oprot.writeMessageEnd()
self._oprot.trans.flush()
def recv_getAPIVersion(self):
iprot = self._iprot
(fname, mtype, rseqid) = iprot.readMessageBegin()
if mtype == TMessageType.EXCEPTION:
x = TApplicationException()
x.read(iprot)
iprot.readMessageEnd()
raise x
result = getAPIVersion_result()
result.read(iprot)
iprot.readMessageEnd()
if result.success is not None:
return result.success
if result.gse is not None:
raise result.gse
raise TApplicationException(TApplicationException.MISSING_RESULT, "getAPIVersion failed: unknown result")
def createGroup(self, authzToken, groupModel):
"""
Parameters:
- authzToken
- groupModel
"""
self.send_createGroup(authzToken, groupModel)
return self.recv_createGroup()
def send_createGroup(self, authzToken, groupModel):
self._oprot.writeMessageBegin('createGroup', TMessageType.CALL, self._seqid)
args = createGroup_args()
args.authzToken = authzToken
args.groupModel = groupModel
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.gse is not None:
raise result.gse
if result.ae is not None:
raise result.ae
raise TApplicationException(TApplicationException.MISSING_RESULT, "createGroup failed: unknown result")
def updateGroup(self, authzToken, groupModel):
"""
Parameters:
- authzToken
- groupModel
"""
self.send_updateGroup(authzToken, groupModel)
return self.recv_updateGroup()
def send_updateGroup(self, authzToken, groupModel):
self._oprot.writeMessageBegin('updateGroup', TMessageType.CALL, self._seqid)
args = updateGroup_args()
args.authzToken = authzToken
args.groupModel = groupModel
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.gse is not None:
raise result.gse
if result.ae is not None:
raise result.ae
raise TApplicationException(TApplicationException.MISSING_RESULT, "updateGroup failed: unknown result")
def deleteGroup(self, authzToken, groupId, ownerId):
"""
Parameters:
- authzToken
- groupId
- ownerId
"""
self.send_deleteGroup(authzToken, groupId, ownerId)
return self.recv_deleteGroup()
def send_deleteGroup(self, authzToken, groupId, ownerId):
self._oprot.writeMessageBegin('deleteGroup', TMessageType.CALL, self._seqid)
args = deleteGroup_args()
args.authzToken = authzToken
args.groupId = groupId
args.ownerId = ownerId
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.gse is not None:
raise result.gse
if result.ae is not None:
raise result.ae
raise TApplicationException(TApplicationException.MISSING_RESULT, "deleteGroup failed: unknown result")
def getGroup(self, authzToken, groupId):
"""
Parameters:
- authzToken
- groupId
"""
self.send_getGroup(authzToken, groupId)
return self.recv_getGroup()
def send_getGroup(self, authzToken, groupId):
self._oprot.writeMessageBegin('getGroup', TMessageType.CALL, self._seqid)
args = getGroup_args()
args.authzToken = authzToken
args.groupId = groupId
args.write(self._oprot)
self._oprot.writeMessageEnd()
self._oprot.trans.flush()
def recv_getGroup(self):
iprot = self._iprot
(fname, mtype, rseqid) = iprot.readMessageBegin()
if mtype == TMessageType.EXCEPTION:
x = TApplicationException()
x.read(iprot)
iprot.readMessageEnd()
raise x
result = getGroup_result()
result.read(iprot)
iprot.readMessageEnd()
if result.success is not None:
return result.success
if result.gse is not None:
raise result.gse
if result.ae is not None:
raise result.ae
raise TApplicationException(TApplicationException.MISSING_RESULT, "getGroup failed: unknown result")
def getGroups(self, authzToken):
"""
Parameters:
- authzToken
"""
self.send_getGroups(authzToken)
return self.recv_getGroups()
def send_getGroups(self, authzToken):
self._oprot.writeMessageBegin('getGroups', TMessageType.CALL, self._seqid)
args = getGroups_args()
args.authzToken = authzToken
args.write(self._oprot)
self._oprot.writeMessageEnd()
self._oprot.trans.flush()
def recv_getGroups(self):
iprot = self._iprot
(fname, mtype, rseqid) = iprot.readMessageBegin()
if mtype == TMessageType.EXCEPTION:
x = TApplicationException()
x.read(iprot)
iprot.readMessageEnd()
raise x
result = getGroups_result()
result.read(iprot)
iprot.readMessageEnd()
if result.success is not None:
return result.success
if result.gse is not None:
raise result.gse
if result.ae is not None:
raise result.ae
raise TApplicationException(TApplicationException.MISSING_RESULT, "getGroups failed: unknown result")
def getAllGroupsUserBelongs(self, authzToken, userName):
"""
Parameters:
- authzToken
- userName
"""
self.send_getAllGroupsUserBelongs(authzToken, userName)
return self.recv_getAllGroupsUserBelongs()
def send_getAllGroupsUserBelongs(self, authzToken, userName):
self._oprot.writeMessageBegin('getAllGroupsUserBelongs', TMessageType.CALL, self._seqid)
args = getAllGroupsUserBelongs_args()
args.authzToken = authzToken
args.userName = userName
args.write(self._oprot)
self._oprot.writeMessageEnd()
self._oprot.trans.flush()
def recv_getAllGroupsUserBelongs(self):
iprot = self._iprot
(fname, mtype, rseqid) = iprot.readMessageBegin()
if mtype == TMessageType.EXCEPTION:
x = TApplicationException()
x.read(iprot)
iprot.readMessageEnd()
raise x
result = getAllGroupsUserBelongs_result()
result.read(iprot)
iprot.readMessageEnd()
if result.success is not None:
return result.success
if result.gse is not None:
raise result.gse
if result.ae is not None:
raise result.ae
raise TApplicationException(TApplicationException.MISSING_RESULT, "getAllGroupsUserBelongs failed: unknown result")
def addUsersToGroup(self, authzToken, userIds, groupId):
"""
Parameters:
- authzToken
- userIds
- groupId
"""
self.send_addUsersToGroup(authzToken, userIds, groupId)
return self.recv_addUsersToGroup()
def send_addUsersToGroup(self, authzToken, userIds, groupId):
self._oprot.writeMessageBegin('addUsersToGroup', TMessageType.CALL, self._seqid)
args = addUsersToGroup_args()
args.authzToken = authzToken
args.userIds = userIds
args.groupId = groupId
args.write(self._oprot)
self._oprot.writeMessageEnd()
self._oprot.trans.flush()
def recv_addUsersToGroup(self):
iprot = self._iprot
(fname, mtype, rseqid) = iprot.readMessageBegin()
if mtype == TMessageType.EXCEPTION:
x = TApplicationException()
x.read(iprot)
iprot.readMessageEnd()
raise x
result = addUsersToGroup_result()
result.read(iprot)
iprot.readMessageEnd()
if result.success is not None:
return result.success
if result.gse is not None:
raise result.gse
if result.ae is not None:
raise result.ae
raise TApplicationException(TApplicationException.MISSING_RESULT, "addUsersToGroup failed: unknown result")
def removeUsersFromGroup(self, authzToken, userIds, groupId):
"""
Parameters:
- authzToken
- userIds
- groupId
"""
self.send_removeUsersFromGroup(authzToken, userIds, groupId)
return self.recv_removeUsersFromGroup()
def send_removeUsersFromGroup(self, authzToken, userIds, groupId):
self._oprot.writeMessageBegin('removeUsersFromGroup', TMessageType.CALL, self._seqid)
args = removeUsersFromGroup_args()
args.authzToken = authzToken
args.userIds = userIds
args.groupId = groupId
args.write(self._oprot)
self._oprot.writeMessageEnd()
self._oprot.trans.flush()
def recv_removeUsersFromGroup(self):
iprot = self._iprot
(fname, mtype, rseqid) = iprot.readMessageBegin()
if mtype == TMessageType.EXCEPTION:
x = TApplicationException()
x.read(iprot)
iprot.readMessageEnd()
raise x
result = removeUsersFromGroup_result()
result.read(iprot)
iprot.readMessageEnd()
if result.success is not None:
return result.success
if result.gse is not None:
raise result.gse
if result.ae is not None:
raise result.ae
raise TApplicationException(TApplicationException.MISSING_RESULT, "removeUsersFromGroup failed: unknown result")
def transferGroupOwnership(self, authzToken, groupId, newOwnerId):
"""
Parameters:
- authzToken
- groupId
- newOwnerId
"""
self.send_transferGroupOwnership(authzToken, groupId, newOwnerId)
return self.recv_transferGroupOwnership()
def send_transferGroupOwnership(self, authzToken, groupId, newOwnerId):
self._oprot.writeMessageBegin('transferGroupOwnership', TMessageType.CALL, self._seqid)
args = transferGroupOwnership_args()
args.authzToken = authzToken
args.groupId = groupId
args.newOwnerId = newOwnerId
args.write(self._oprot)
self._oprot.writeMessageEnd()
self._oprot.trans.flush()
def recv_transferGroupOwnership(self):
iprot = self._iprot
(fname, mtype, rseqid) = iprot.readMessageBegin()
if mtype == TMessageType.EXCEPTION:
x = TApplicationException()
x.read(iprot)
iprot.readMessageEnd()
raise x
result = transferGroupOwnership_result()
result.read(iprot)
iprot.readMessageEnd()
if result.success is not None:
return result.success
if result.gse is not None:
raise result.gse
if result.ae is not None:
raise result.ae
raise TApplicationException(TApplicationException.MISSING_RESULT, "transferGroupOwnership failed: unknown result")
def addGroupAdmins(self, authzToken, groupId, adminIds):
"""
Parameters:
- authzToken
- groupId
- adminIds
"""
self.send_addGroupAdmins(authzToken, groupId, adminIds)
return self.recv_addGroupAdmins()
def send_addGroupAdmins(self, authzToken, groupId, adminIds):
self._oprot.writeMessageBegin('addGroupAdmins', TMessageType.CALL, self._seqid)
args = addGroupAdmins_args()
args.authzToken = authzToken
args.groupId = groupId
args.adminIds = adminIds
args.write(self._oprot)
self._oprot.writeMessageEnd()
self._oprot.trans.flush()
def recv_addGroupAdmins(self):
iprot = self._iprot
(fname, mtype, rseqid) = iprot.readMessageBegin()
if mtype == TMessageType.EXCEPTION:
x = TApplicationException()
x.read(iprot)
iprot.readMessageEnd()
raise x
result = addGroupAdmins_result()
result.read(iprot)
iprot.readMessageEnd()
if result.success is not None:
return result.success
if result.gse is not None:
raise result.gse
if result.ae is not None:
raise result.ae
raise TApplicationException(TApplicationException.MISSING_RESULT, "addGroupAdmins failed: unknown result")
def removeGroupAdmins(self, authzToken, groupId, adminIds):
"""
Parameters:
- authzToken
- groupId
- adminIds
"""
self.send_removeGroupAdmins(authzToken, groupId, adminIds)
return self.recv_removeGroupAdmins()
def send_removeGroupAdmins(self, authzToken, groupId, adminIds):
self._oprot.writeMessageBegin('removeGroupAdmins', TMessageType.CALL, self._seqid)
args = removeGroupAdmins_args()
args.authzToken = authzToken
args.groupId = groupId
args.adminIds = adminIds
args.write(self._oprot)
self._oprot.writeMessageEnd()
self._oprot.trans.flush()
def recv_removeGroupAdmins(self):
iprot = self._iprot
(fname, mtype, rseqid) = iprot.readMessageBegin()
if mtype == TMessageType.EXCEPTION:
x = TApplicationException()
x.read(iprot)
iprot.readMessageEnd()
raise x
result = removeGroupAdmins_result()
result.read(iprot)
iprot.readMessageEnd()
if result.success is not None:
return result.success
if result.gse is not None:
raise result.gse
if result.ae is not None:
raise result.ae
raise TApplicationException(TApplicationException.MISSING_RESULT, "removeGroupAdmins failed: unknown result")
def hasAdminAccess(self, authzToken, groupId, adminId):
"""
Parameters:
- authzToken
- groupId
- adminId
"""
self.send_hasAdminAccess(authzToken, groupId, adminId)
return self.recv_hasAdminAccess()
def send_hasAdminAccess(self, authzToken, groupId, adminId):
self._oprot.writeMessageBegin('hasAdminAccess', TMessageType.CALL, self._seqid)
args = hasAdminAccess_args()
args.authzToken = authzToken
args.groupId = groupId
args.adminId = adminId
args.write(self._oprot)
self._oprot.writeMessageEnd()
self._oprot.trans.flush()
def recv_hasAdminAccess(self):
iprot = self._iprot
(fname, mtype, rseqid) = iprot.readMessageBegin()
if mtype == TMessageType.EXCEPTION:
x = TApplicationException()
x.read(iprot)
iprot.readMessageEnd()
raise x
result = hasAdminAccess_result()
result.read(iprot)
iprot.readMessageEnd()
if result.success is not None:
return result.success
if result.gse is not None:
raise result.gse
if result.ae is not None:
raise result.ae
raise TApplicationException(TApplicationException.MISSING_RESULT, "hasAdminAccess failed: unknown result")
def hasOwnerAccess(self, authzToken, groupId, ownerId):
"""
Parameters:
- authzToken
- groupId
- ownerId
"""
self.send_hasOwnerAccess(authzToken, groupId, ownerId)
return self.recv_hasOwnerAccess()
def send_hasOwnerAccess(self, authzToken, groupId, ownerId):
self._oprot.writeMessageBegin('hasOwnerAccess', TMessageType.CALL, self._seqid)
args = hasOwnerAccess_args()
args.authzToken = authzToken
args.groupId = groupId
args.ownerId = ownerId
args.write(self._oprot)
self._oprot.writeMessageEnd()
self._oprot.trans.flush()
def recv_hasOwnerAccess(self):
iprot = self._iprot
(fname, mtype, rseqid) = iprot.readMessageBegin()
if mtype == TMessageType.EXCEPTION:
x = TApplicationException()
x.read(iprot)
iprot.readMessageEnd()
raise x
result = hasOwnerAccess_result()
result.read(iprot)
iprot.readMessageEnd()
if result.success is not None:
return result.success
if result.gse is not None:
raise result.gse
if result.ae is not None:
raise result.ae
raise TApplicationException(TApplicationException.MISSING_RESULT, "hasOwnerAccess failed: unknown result")
class Processor(airavata.base.api.BaseAPI.Processor, Iface, TProcessor):
def __init__(self, handler):
airavata.base.api.BaseAPI.Processor.__init__(self, handler)
self._processMap["getAPIVersion"] = Processor.process_getAPIVersion
self._processMap["createGroup"] = Processor.process_createGroup
self._processMap["updateGroup"] = Processor.process_updateGroup
self._processMap["deleteGroup"] = Processor.process_deleteGroup
self._processMap["getGroup"] = Processor.process_getGroup
self._processMap["getGroups"] = Processor.process_getGroups
self._processMap["getAllGroupsUserBelongs"] = Processor.process_getAllGroupsUserBelongs
self._processMap["addUsersToGroup"] = Processor.process_addUsersToGroup
self._processMap["removeUsersFromGroup"] = Processor.process_removeUsersFromGroup
self._processMap["transferGroupOwnership"] = Processor.process_transferGroupOwnership
self._processMap["addGroupAdmins"] = Processor.process_addGroupAdmins
self._processMap["removeGroupAdmins"] = Processor.process_removeGroupAdmins
self._processMap["hasAdminAccess"] = Processor.process_hasAdminAccess
self._processMap["hasOwnerAccess"] = Processor.process_hasOwnerAccess
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_getAPIVersion(self, seqid, iprot, oprot):
args = getAPIVersion_args()
args.read(iprot)
iprot.readMessageEnd()
result = getAPIVersion_result()
try:
result.success = self._handler.getAPIVersion()
msg_type = TMessageType.REPLY
except (TTransport.TTransportException, KeyboardInterrupt, SystemExit):
raise
except airavata.service.profile.groupmanager.cpi.error.ttypes.GroupManagerServiceException as gse:
msg_type = TMessageType.REPLY
result.gse = gse
except Exception as ex:
msg_type = TMessageType.EXCEPTION
logging.exception(ex)
result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
oprot.writeMessageBegin("getAPIVersion", msg_type, seqid)
result.write(oprot)
oprot.writeMessageEnd()
oprot.trans.flush()
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.authzToken, args.groupModel)
msg_type = TMessageType.REPLY
except (TTransport.TTransportException, KeyboardInterrupt, SystemExit):
raise
except airavata.service.profile.groupmanager.cpi.error.ttypes.GroupManagerServiceException as gse:
msg_type = TMessageType.REPLY
result.gse = gse
except airavata.api.error.ttypes.AuthorizationException as ae:
msg_type = TMessageType.REPLY
result.ae = ae
except Exception as ex:
msg_type = TMessageType.EXCEPTION
logging.exception(ex)
result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
oprot.writeMessageBegin("createGroup", 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.authzToken, args.groupModel)
msg_type = TMessageType.REPLY
except (TTransport.TTransportException, KeyboardInterrupt, SystemExit):
raise
except airavata.service.profile.groupmanager.cpi.error.ttypes.GroupManagerServiceException as gse:
msg_type = TMessageType.REPLY
result.gse = gse
except airavata.api.error.ttypes.AuthorizationException as ae:
msg_type = TMessageType.REPLY
result.ae = ae
except Exception as ex:
msg_type = TMessageType.EXCEPTION
logging.exception(ex)
result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
oprot.writeMessageBegin("updateGroup", 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.authzToken, args.groupId, args.ownerId)
msg_type = TMessageType.REPLY
except (TTransport.TTransportException, KeyboardInterrupt, SystemExit):
raise
except airavata.service.profile.groupmanager.cpi.error.ttypes.GroupManagerServiceException as gse:
msg_type = TMessageType.REPLY
result.gse = gse
except airavata.api.error.ttypes.AuthorizationException as ae:
msg_type = TMessageType.REPLY
result.ae = ae
except Exception as ex:
msg_type = TMessageType.EXCEPTION
logging.exception(ex)
result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
oprot.writeMessageBegin("deleteGroup", msg_type, seqid)
result.write(oprot)
oprot.writeMessageEnd()
oprot.trans.flush()
def process_getGroup(self, seqid, iprot, oprot):
args = getGroup_args()
args.read(iprot)
iprot.readMessageEnd()
result = getGroup_result()
try:
result.success = self._handler.getGroup(args.authzToken, args.groupId)
msg_type = TMessageType.REPLY
except (TTransport.TTransportException, KeyboardInterrupt, SystemExit):
raise
except airavata.service.profile.groupmanager.cpi.error.ttypes.GroupManagerServiceException as gse:
msg_type = TMessageType.REPLY
result.gse = gse
except airavata.api.error.ttypes.AuthorizationException as ae:
msg_type = TMessageType.REPLY
result.ae = ae
except Exception as ex:
msg_type = TMessageType.EXCEPTION
logging.exception(ex)
result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
oprot.writeMessageBegin("getGroup", msg_type, seqid)
result.write(oprot)
oprot.writeMessageEnd()
oprot.trans.flush()
def process_getGroups(self, seqid, iprot, oprot):
args = getGroups_args()
args.read(iprot)
iprot.readMessageEnd()
result = getGroups_result()
try:
result.success = self._handler.getGroups(args.authzToken)
msg_type = TMessageType.REPLY
except (TTransport.TTransportException, KeyboardInterrupt, SystemExit):
raise
except airavata.service.profile.groupmanager.cpi.error.ttypes.GroupManagerServiceException as gse:
msg_type = TMessageType.REPLY
result.gse = gse
except airavata.api.error.ttypes.AuthorizationException as ae:
msg_type = TMessageType.REPLY
result.ae = ae
except Exception as ex:
msg_type = TMessageType.EXCEPTION
logging.exception(ex)
result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
oprot.writeMessageBegin("getGroups", msg_type, seqid)
result.write(oprot)
oprot.writeMessageEnd()
oprot.trans.flush()
def process_getAllGroupsUserBelongs(self, seqid, iprot, oprot):
args = getAllGroupsUserBelongs_args()
args.read(iprot)
iprot.readMessageEnd()
result = getAllGroupsUserBelongs_result()
try:
result.success = self._handler.getAllGroupsUserBelongs(args.authzToken, args.userName)
msg_type = TMessageType.REPLY
except (TTransport.TTransportException, KeyboardInterrupt, SystemExit):
raise
except airavata.service.profile.groupmanager.cpi.error.ttypes.GroupManagerServiceException as gse:
msg_type = TMessageType.REPLY
result.gse = gse
except airavata.api.error.ttypes.AuthorizationException as ae:
msg_type = TMessageType.REPLY
result.ae = ae
except Exception as ex:
msg_type = TMessageType.EXCEPTION
logging.exception(ex)
result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
oprot.writeMessageBegin("getAllGroupsUserBelongs", msg_type, seqid)
result.write(oprot)
oprot.writeMessageEnd()
oprot.trans.flush()
def process_addUsersToGroup(self, seqid, iprot, oprot):
args = addUsersToGroup_args()
args.read(iprot)
iprot.readMessageEnd()
result = addUsersToGroup_result()
try:
result.success = self._handler.addUsersToGroup(args.authzToken, args.userIds, args.groupId)
msg_type = TMessageType.REPLY
except (TTransport.TTransportException, KeyboardInterrupt, SystemExit):
raise
except airavata.service.profile.groupmanager.cpi.error.ttypes.GroupManagerServiceException as gse:
msg_type = TMessageType.REPLY
result.gse = gse
except airavata.api.error.ttypes.AuthorizationException as ae:
msg_type = TMessageType.REPLY
result.ae = ae
except Exception as ex:
msg_type = TMessageType.EXCEPTION
logging.exception(ex)
result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
oprot.writeMessageBegin("addUsersToGroup", msg_type, seqid)
result.write(oprot)
oprot.writeMessageEnd()
oprot.trans.flush()
def process_removeUsersFromGroup(self, seqid, iprot, oprot):
args = removeUsersFromGroup_args()
args.read(iprot)
iprot.readMessageEnd()
result = removeUsersFromGroup_result()
try:
result.success = self._handler.removeUsersFromGroup(args.authzToken, args.userIds, args.groupId)
msg_type = TMessageType.REPLY
except (TTransport.TTransportException, KeyboardInterrupt, SystemExit):
raise
except airavata.service.profile.groupmanager.cpi.error.ttypes.GroupManagerServiceException as gse:
msg_type = TMessageType.REPLY
result.gse = gse
except airavata.api.error.ttypes.AuthorizationException as ae:
msg_type = TMessageType.REPLY
result.ae = ae
except Exception as ex:
msg_type = TMessageType.EXCEPTION
logging.exception(ex)
result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
oprot.writeMessageBegin("removeUsersFromGroup", msg_type, seqid)
result.write(oprot)
oprot.writeMessageEnd()
oprot.trans.flush()
def process_transferGroupOwnership(self, seqid, iprot, oprot):
args = transferGroupOwnership_args()
args.read(iprot)
iprot.readMessageEnd()
result = transferGroupOwnership_result()
try:
result.success = self._handler.transferGroupOwnership(args.authzToken, args.groupId, args.newOwnerId)
msg_type = TMessageType.REPLY
except (TTransport.TTransportException, KeyboardInterrupt, SystemExit):
raise
except airavata.service.profile.groupmanager.cpi.error.ttypes.GroupManagerServiceException as gse:
msg_type = TMessageType.REPLY
result.gse = gse
except airavata.api.error.ttypes.AuthorizationException as ae:
msg_type = TMessageType.REPLY
result.ae = ae
except Exception as ex:
msg_type = TMessageType.EXCEPTION
logging.exception(ex)
result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
oprot.writeMessageBegin("transferGroupOwnership", msg_type, seqid)
result.write(oprot)
oprot.writeMessageEnd()
oprot.trans.flush()
def process_addGroupAdmins(self, seqid, iprot, oprot):
args = addGroupAdmins_args()
args.read(iprot)
iprot.readMessageEnd()
result = addGroupAdmins_result()
try:
result.success = self._handler.addGroupAdmins(args.authzToken, args.groupId, args.adminIds)
msg_type = TMessageType.REPLY
except (TTransport.TTransportException, KeyboardInterrupt, SystemExit):
raise
except airavata.service.profile.groupmanager.cpi.error.ttypes.GroupManagerServiceException as gse:
msg_type = TMessageType.REPLY
result.gse = gse
except airavata.api.error.ttypes.AuthorizationException as ae:
msg_type = TMessageType.REPLY
result.ae = ae
except Exception as ex:
msg_type = TMessageType.EXCEPTION
logging.exception(ex)
result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
oprot.writeMessageBegin("addGroupAdmins", msg_type, seqid)
result.write(oprot)
oprot.writeMessageEnd()
oprot.trans.flush()
def process_removeGroupAdmins(self, seqid, iprot, oprot):
args = removeGroupAdmins_args()
args.read(iprot)
iprot.readMessageEnd()
result = removeGroupAdmins_result()
try:
result.success = self._handler.removeGroupAdmins(args.authzToken, args.groupId, args.adminIds)
msg_type = TMessageType.REPLY
except (TTransport.TTransportException, KeyboardInterrupt, SystemExit):
raise
except airavata.service.profile.groupmanager.cpi.error.ttypes.GroupManagerServiceException as gse:
msg_type = TMessageType.REPLY
result.gse = gse
except airavata.api.error.ttypes.AuthorizationException as ae:
msg_type = TMessageType.REPLY
result.ae = ae
except Exception as ex:
msg_type = TMessageType.EXCEPTION
logging.exception(ex)
result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
oprot.writeMessageBegin("removeGroupAdmins", msg_type, seqid)
result.write(oprot)
oprot.writeMessageEnd()
oprot.trans.flush()
def process_hasAdminAccess(self, seqid, iprot, oprot):
args = hasAdminAccess_args()
args.read(iprot)
iprot.readMessageEnd()
result = hasAdminAccess_result()
try:
result.success = self._handler.hasAdminAccess(args.authzToken, args.groupId, args.adminId)
msg_type = TMessageType.REPLY
except (TTransport.TTransportException, KeyboardInterrupt, SystemExit):
raise
except airavata.service.profile.groupmanager.cpi.error.ttypes.GroupManagerServiceException as gse:
msg_type = TMessageType.REPLY
result.gse = gse
except airavata.api.error.ttypes.AuthorizationException as ae:
msg_type = TMessageType.REPLY
result.ae = ae
except Exception as ex:
msg_type = TMessageType.EXCEPTION
logging.exception(ex)
result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
oprot.writeMessageBegin("hasAdminAccess", msg_type, seqid)
result.write(oprot)
oprot.writeMessageEnd()
oprot.trans.flush()
def process_hasOwnerAccess(self, seqid, iprot, oprot):
args = hasOwnerAccess_args()
args.read(iprot)
iprot.readMessageEnd()
result = hasOwnerAccess_result()
try:
result.success = self._handler.hasOwnerAccess(args.authzToken, args.groupId, args.ownerId)
msg_type = TMessageType.REPLY
except (TTransport.TTransportException, KeyboardInterrupt, SystemExit):
raise
except airavata.service.profile.groupmanager.cpi.error.ttypes.GroupManagerServiceException as gse:
msg_type = TMessageType.REPLY
result.gse = gse
except airavata.api.error.ttypes.AuthorizationException as ae:
msg_type = TMessageType.REPLY
result.ae = ae
except Exception as ex:
msg_type = TMessageType.EXCEPTION
logging.exception(ex)
result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
oprot.writeMessageBegin("hasOwnerAccess", msg_type, seqid)
result.write(oprot)
oprot.writeMessageEnd()
oprot.trans.flush()
# HELPER FUNCTIONS AND STRUCTURES
class getAPIVersion_args(object):
thrift_spec = (
)
def read(self, iprot):
if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec))
return
iprot.readStructBegin()
while True:
(fname, ftype, fid) = iprot.readFieldBegin()
if ftype == TType.STOP:
break
else:
iprot.skip(ftype)
iprot.readFieldEnd()
iprot.readStructEnd()
def write(self, oprot):
if oprot._fast_encode is not None and self.thrift_spec is not None:
oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec)))
return
oprot.writeStructBegin('getAPIVersion_args')
oprot.writeFieldStop()
oprot.writeStructEnd()
def validate(self):
return
def __repr__(self):
L = ['%s=%r' % (key, value)
for key, value in self.__dict__.items()]
return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
def __eq__(self, other):
return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
def __ne__(self, other):
return not (self == other)
class getAPIVersion_result(object):
"""
Attributes:
- success
- gse
"""
thrift_spec = (
(0, TType.STRING, 'success', 'UTF8', None, ), # 0
(1, TType.STRUCT, 'gse', (airavata.service.profile.groupmanager.cpi.error.ttypes.GroupManagerServiceException, airavata.service.profile.groupmanager.cpi.error.ttypes.GroupManagerServiceException.thrift_spec), None, ), # 1
)
def __init__(self, success=None, gse=None,):
self.success = success
self.gse = gse
def read(self, iprot):
if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None:
iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec))
return
iprot.readStructBegin()
while True:
(fname, ftype, fid) = iprot.readFieldBegin()
if ftype == TType.STOP:
break
if fid == 0:
if ftype == TType.STRING:
self.success = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
else:
iprot.skip(ftype)
elif fid == 1:
if ftype == TType.STRUCT:
self.gse = airavata.service.profile.groupmanager.cpi.error.ttypes.GroupManagerServiceException()
self.gse.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('getAPIVersion_result')
if self.success is not None:
oprot.writeFieldBegin('success', TType.STRING, 0)
oprot.writeString(self.success.encode('utf-8') if sys.version_info[0] == 2 else self.success)
oprot.writeFieldEnd()
if self.gse is not None:
oprot.writeFieldBegin('gse', TType.STRUCT, 1)
self.gse.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)
class createGroup_args(object):
"""
Attributes:
- authzToken
- groupModel
"""
thrift_spec = (
None, # 0
(1, TType.STRUCT, 'authzToken', (airavata.model.security.ttypes.AuthzToken, airavata.model.security.ttypes.AuthzToken.thrift_spec), None, ), # 1
(2, TType.STRUCT, 'groupModel', (airavata.model.group.ttypes.GroupModel, airavata.model.group.ttypes.GroupModel.thrift_spec), None, ), # 2
)
def __init__(self, authzToken=None, groupModel=None,):
self.authzToken = authzToken
self.groupModel = groupModel
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.authzToken = airavata.model.security.ttypes.AuthzToken()
self.authzToken.read(iprot)
else:
iprot.skip(ftype)
elif fid == 2:
if ftype == TType.STRUCT:
self.groupModel = airavata.model.group.ttypes.GroupModel()
self.groupModel.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_args')
if self.authzToken is not None:
oprot.writeFieldBegin('authzToken', TType.STRUCT, 1)
self.authzToken.write(oprot)
oprot.writeFieldEnd()
if self.groupModel is not None:
oprot.writeFieldBegin('groupModel', TType.STRUCT, 2)
self.groupModel.write(oprot)
oprot.writeFieldEnd()
oprot.writeFieldStop()
oprot.writeStructEnd()
def validate(self):
if self.authzToken is None:
raise TProtocolException(message='Required field authzToken is unset!')
if self.groupModel is None:
raise TProtocolException(message='Required field groupModel is unset!')
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)
class createGroup_result(object):
"""
Attributes:
- success
- gse
- ae
"""
thrift_spec = (
(0, TType.STRING, 'success', 'UTF8', None, ), # 0
(1, TType.STRUCT, 'gse', (airavata.service.profile.groupmanager.cpi.error.ttypes.GroupManagerServiceException, airavata.service.profile.groupmanager.cpi.error.ttypes.GroupManagerServiceException.thrift_spec), None, ), # 1
(2, TType.STRUCT, 'ae', (airavata.api.error.ttypes.AuthorizationException, airavata.api.error.ttypes.AuthorizationException.thrift_spec), None, ), # 2
)
def __init__(self, success=None, gse=None, ae=None,):
self.success = success
self.gse = gse
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 == 0:
if ftype == TType.STRING:
self.success = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
else:
iprot.skip(ftype)
elif fid == 1:
if ftype == TType.STRUCT:
self.gse = airavata.service.profile.groupmanager.cpi.error.ttypes.GroupManagerServiceException()
self.gse.read(iprot)
else:
iprot.skip(ftype)
elif fid == 2:
if ftype == TType.STRUCT:
self.ae = airavata.api.error.ttypes.AuthorizationException()
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('createGroup_result')
if self.success is not None:
oprot.writeFieldBegin('success', TType.STRING, 0)
oprot.writeString(self.success.encode('utf-8') if sys.version_info[0] == 2 else self.success)
oprot.writeFieldEnd()
if self.gse is not None:
oprot.writeFieldBegin('gse', TType.STRUCT, 1)
self.gse.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)
class updateGroup_args(object):
"""
Attributes:
- authzToken
- groupModel
"""
thrift_spec = (
None, # 0
(1, TType.STRUCT, 'authzToken', (airavata.model.security.ttypes.AuthzToken, airavata.model.security.ttypes.AuthzToken.thrift_spec), None, ), # 1
(2, TType.STRUCT, 'groupModel', (airavata.model.group.ttypes.GroupModel, airavata.model.group.ttypes.GroupModel.thrift_spec), None, ), # 2
)
def __init__(self, authzToken=None, groupModel=None,):
self.authzToken = authzToken
self.groupModel = groupModel
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.authzToken = airavata.model.security.ttypes.AuthzToken()
self.authzToken.read(iprot)
else:
iprot.skip(ftype)
elif fid == 2:
if ftype == TType.STRUCT:
self.groupModel = airavata.model.group.ttypes.GroupModel()
self.groupModel.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.authzToken is not None:
oprot.writeFieldBegin('authzToken', TType.STRUCT, 1)
self.authzToken.write(oprot)
oprot.writeFieldEnd()
if self.groupModel is not None:
oprot.writeFieldBegin('groupModel', TType.STRUCT, 2)
self.groupModel.write(oprot)
oprot.writeFieldEnd()
oprot.writeFieldStop()
oprot.writeStructEnd()
def validate(self):
if self.authzToken is None:
raise TProtocolException(message='Required field authzToken is unset!')
if self.groupModel is None:
raise TProtocolException(message='Required field groupModel is unset!')
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)
class updateGroup_result(object):
"""
Attributes:
- success
- gse
- ae
"""
thrift_spec = (
(0, TType.BOOL, 'success', None, None, ), # 0
(1, TType.STRUCT, 'gse', (airavata.service.profile.groupmanager.cpi.error.ttypes.GroupManagerServiceException, airavata.service.profile.groupmanager.cpi.error.ttypes.GroupManagerServiceException.thrift_spec), None, ), # 1
(2, TType.STRUCT, 'ae', (airavata.api.error.ttypes.AuthorizationException, airavata.api.error.ttypes.AuthorizationException.thrift_spec), None, ), # 2
)
def __init__(self, success=None, gse=None, ae=None,):
self.success = success
self.gse = gse
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 == 0:
if ftype == TType.BOOL:
self.success = iprot.readBool()
else:
iprot.skip(ftype)
elif fid == 1:
if ftype == TType.STRUCT:
self.gse = airavata.service.profile.groupmanager.cpi.error.ttypes.GroupManagerServiceException()
self.gse.read(iprot)
else:
iprot.skip(ftype)
elif fid == 2:
if ftype == TType.STRUCT:
self.ae = airavata.api.error.ttypes.AuthorizationException()
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('updateGroup_result')
if self.success is not None:
oprot.writeFieldBegin('success', TType.BOOL, 0)
oprot.writeBool(self.success)
oprot.writeFieldEnd()
if self.gse is not None:
oprot.writeFieldBegin('gse', TType.STRUCT, 1)
self.gse.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)
class deleteGroup_args(object):
"""
Attributes:
- authzToken
- groupId
- ownerId
"""
thrift_spec = (
None, # 0
(1, TType.STRUCT, 'authzToken', (airavata.model.security.ttypes.AuthzToken, airavata.model.security.ttypes.AuthzToken.thrift_spec), None, ), # 1
(2, TType.STRING, 'groupId', 'UTF8', None, ), # 2
(3, TType.STRING, 'ownerId', 'UTF8', None, ), # 3
)
def __init__(self, authzToken=None, groupId=None, ownerId=None,):
self.authzToken = authzToken
self.groupId = groupId
self.ownerId = ownerId
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.authzToken = airavata.model.security.ttypes.AuthzToken()
self.authzToken.read(iprot)
else:
iprot.skip(ftype)
elif fid == 2:
if ftype == TType.STRING:
self.groupId = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
else:
iprot.skip(ftype)
elif fid == 3:
if ftype == TType.STRING:
self.ownerId = 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('deleteGroup_args')
if self.authzToken is not None:
oprot.writeFieldBegin('authzToken', TType.STRUCT, 1)
self.authzToken.write(oprot)
oprot.writeFieldEnd()
if self.groupId is not None:
oprot.writeFieldBegin('groupId', TType.STRING, 2)
oprot.writeString(self.groupId.encode('utf-8') if sys.version_info[0] == 2 else self.groupId)
oprot.writeFieldEnd()
if self.ownerId is not None:
oprot.writeFieldBegin('ownerId', TType.STRING, 3)
oprot.writeString(self.ownerId.encode('utf-8') if sys.version_info[0] == 2 else self.ownerId)
oprot.writeFieldEnd()
oprot.writeFieldStop()
oprot.writeStructEnd()
def validate(self):
if self.authzToken is None:
raise TProtocolException(message='Required field authzToken is unset!')
if self.groupId is None:
raise TProtocolException(message='Required field groupId is unset!')
if self.ownerId is None:
raise TProtocolException(message='Required field ownerId is unset!')
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)
class deleteGroup_result(object):
"""
Attributes:
- success
- gse
- ae
"""
thrift_spec = (
(0, TType.BOOL, 'success', None, None, ), # 0
(1, TType.STRUCT, 'gse', (airavata.service.profile.groupmanager.cpi.error.ttypes.GroupManagerServiceException, airavata.service.profile.groupmanager.cpi.error.ttypes.GroupManagerServiceException.thrift_spec), None, ), # 1
(2, TType.STRUCT, 'ae', (airavata.api.error.ttypes.AuthorizationException, airavata.api.error.ttypes.AuthorizationException.thrift_spec), None, ), # 2
)
def __init__(self, success=None, gse=None, ae=None,):
self.success = success
self.gse = gse
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 == 0:
if ftype == TType.BOOL:
self.success = iprot.readBool()
else:
iprot.skip(ftype)
elif fid == 1:
if ftype == TType.STRUCT:
self.gse = airavata.service.profile.groupmanager.cpi.error.ttypes.GroupManagerServiceException()
self.gse.read(iprot)
else:
iprot.skip(ftype)
elif fid == 2:
if ftype == TType.STRUCT:
self.ae = airavata.api.error.ttypes.AuthorizationException()
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('deleteGroup_result')
if self.success is not None:
oprot.writeFieldBegin('success', TType.BOOL, 0)
oprot.writeBool(self.success)
oprot.writeFieldEnd()
if self.gse is not None:
oprot.writeFieldBegin('gse', TType.STRUCT, 1)
self.gse.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)
class getGroup_args(object):
"""
Attributes:
- authzToken
- groupId
"""
thrift_spec = (
None, # 0
(1, TType.STRUCT, 'authzToken', (airavata.model.security.ttypes.AuthzToken, airavata.model.security.ttypes.AuthzToken.thrift_spec), None, ), # 1
(2, TType.STRING, 'groupId', 'UTF8', None, ), # 2
)
def __init__(self, authzToken=None, groupId=None,):
self.authzToken = authzToken
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.authzToken = airavata.model.security.ttypes.AuthzToken()
self.authzToken.read(iprot)
else:
iprot.skip(ftype)
elif fid == 2:
if ftype == TType.STRING:
self.groupId = 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('getGroup_args')
if self.authzToken is not None:
oprot.writeFieldBegin('authzToken', TType.STRUCT, 1)
self.authzToken.write(oprot)
oprot.writeFieldEnd()
if self.groupId is not None:
oprot.writeFieldBegin('groupId', TType.STRING, 2)
oprot.writeString(self.groupId.encode('utf-8') if sys.version_info[0] == 2 else self.groupId)
oprot.writeFieldEnd()
oprot.writeFieldStop()
oprot.writeStructEnd()
def validate(self):
if self.authzToken is None:
raise TProtocolException(message='Required field authzToken is unset!')
if self.groupId is None:
raise TProtocolException(message='Required field groupId is unset!')
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)
class getGroup_result(object):
"""
Attributes:
- success
- gse
- ae
"""
thrift_spec = (
(0, TType.STRUCT, 'success', (airavata.model.group.ttypes.GroupModel, airavata.model.group.ttypes.GroupModel.thrift_spec), None, ), # 0
(1, TType.STRUCT, 'gse', (airavata.service.profile.groupmanager.cpi.error.ttypes.GroupManagerServiceException, airavata.service.profile.groupmanager.cpi.error.ttypes.GroupManagerServiceException.thrift_spec), None, ), # 1
(2, TType.STRUCT, 'ae', (airavata.api.error.ttypes.AuthorizationException, airavata.api.error.ttypes.AuthorizationException.thrift_spec), None, ), # 2
)
def __init__(self, success=None, gse=None, ae=None,):
self.success = success
self.gse = gse
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 == 0:
if ftype == TType.STRUCT:
self.success = airavata.model.group.ttypes.GroupModel()
self.success.read(iprot)
else:
iprot.skip(ftype)
elif fid == 1:
if ftype == TType.STRUCT:
self.gse = airavata.service.profile.groupmanager.cpi.error.ttypes.GroupManagerServiceException()
self.gse.read(iprot)
else:
iprot.skip(ftype)
elif fid == 2:
if ftype == TType.STRUCT:
self.ae = airavata.api.error.ttypes.AuthorizationException()
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('getGroup_result')
if self.success is not None:
oprot.writeFieldBegin('success', TType.STRUCT, 0)
self.success.write(oprot)
oprot.writeFieldEnd()
if self.gse is not None:
oprot.writeFieldBegin('gse', TType.STRUCT, 1)
self.gse.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)
class getGroups_args(object):
"""
Attributes:
- authzToken
"""
thrift_spec = (
None, # 0
(1, TType.STRUCT, 'authzToken', (airavata.model.security.ttypes.AuthzToken, airavata.model.security.ttypes.AuthzToken.thrift_spec), None, ), # 1
)
def __init__(self, authzToken=None,):
self.authzToken = authzToken
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.authzToken = airavata.model.security.ttypes.AuthzToken()
self.authzToken.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('getGroups_args')
if self.authzToken is not None:
oprot.writeFieldBegin('authzToken', TType.STRUCT, 1)
self.authzToken.write(oprot)
oprot.writeFieldEnd()
oprot.writeFieldStop()
oprot.writeStructEnd()
def validate(self):
if self.authzToken is None:
raise TProtocolException(message='Required field authzToken is unset!')
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)
class getGroups_result(object):
"""
Attributes:
- success
- gse
- ae
"""
thrift_spec = (
(0, TType.LIST, 'success', (TType.STRUCT, (airavata.model.group.ttypes.GroupModel, airavata.model.group.ttypes.GroupModel.thrift_spec), False), None, ), # 0
(1, TType.STRUCT, 'gse', (airavata.service.profile.groupmanager.cpi.error.ttypes.GroupManagerServiceException, airavata.service.profile.groupmanager.cpi.error.ttypes.GroupManagerServiceException.thrift_spec), None, ), # 1
(2, TType.STRUCT, 'ae', (airavata.api.error.ttypes.AuthorizationException, airavata.api.error.ttypes.AuthorizationException.thrift_spec), None, ), # 2
)
def __init__(self, success=None, gse=None, ae=None,):
self.success = success
self.gse = gse
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 == 0:
if ftype == TType.LIST:
self.success = []
(_etype3, _size0) = iprot.readListBegin()
for _i4 in range(_size0):
_elem5 = airavata.model.group.ttypes.GroupModel()
_elem5.read(iprot)
self.success.append(_elem5)
iprot.readListEnd()
else:
iprot.skip(ftype)
elif fid == 1:
if ftype == TType.STRUCT:
self.gse = airavata.service.profile.groupmanager.cpi.error.ttypes.GroupManagerServiceException()
self.gse.read(iprot)
else:
iprot.skip(ftype)
elif fid == 2:
if ftype == TType.STRUCT:
self.ae = airavata.api.error.ttypes.AuthorizationException()
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('getGroups_result')
if self.success is not None:
oprot.writeFieldBegin('success', TType.LIST, 0)
oprot.writeListBegin(TType.STRUCT, len(self.success))
for iter6 in self.success:
iter6.write(oprot)
oprot.writeListEnd()
oprot.writeFieldEnd()
if self.gse is not None:
oprot.writeFieldBegin('gse', TType.STRUCT, 1)
self.gse.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)
class getAllGroupsUserBelongs_args(object):
"""
Attributes:
- authzToken
- userName
"""
thrift_spec = (
None, # 0
(1, TType.STRUCT, 'authzToken', (airavata.model.security.ttypes.AuthzToken, airavata.model.security.ttypes.AuthzToken.thrift_spec), None, ), # 1
(2, TType.STRING, 'userName', 'UTF8', None, ), # 2
)
def __init__(self, authzToken=None, userName=None,):
self.authzToken = authzToken
self.userName = userName
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.authzToken = airavata.model.security.ttypes.AuthzToken()
self.authzToken.read(iprot)
else:
iprot.skip(ftype)
elif fid == 2:
if ftype == TType.STRING:
self.userName = 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('getAllGroupsUserBelongs_args')
if self.authzToken is not None:
oprot.writeFieldBegin('authzToken', TType.STRUCT, 1)
self.authzToken.write(oprot)
oprot.writeFieldEnd()
if self.userName is not None:
oprot.writeFieldBegin('userName', TType.STRING, 2)
oprot.writeString(self.userName.encode('utf-8') if sys.version_info[0] == 2 else self.userName)
oprot.writeFieldEnd()
oprot.writeFieldStop()
oprot.writeStructEnd()
def validate(self):
if self.authzToken is None:
raise TProtocolException(message='Required field authzToken is unset!')
if self.userName is None:
raise TProtocolException(message='Required field userName is unset!')
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)
class getAllGroupsUserBelongs_result(object):
"""
Attributes:
- success
- gse
- ae
"""
thrift_spec = (
(0, TType.LIST, 'success', (TType.STRUCT, (airavata.model.group.ttypes.GroupModel, airavata.model.group.ttypes.GroupModel.thrift_spec), False), None, ), # 0
(1, TType.STRUCT, 'gse', (airavata.service.profile.groupmanager.cpi.error.ttypes.GroupManagerServiceException, airavata.service.profile.groupmanager.cpi.error.ttypes.GroupManagerServiceException.thrift_spec), None, ), # 1
(2, TType.STRUCT, 'ae', (airavata.api.error.ttypes.AuthorizationException, airavata.api.error.ttypes.AuthorizationException.thrift_spec), None, ), # 2
)
def __init__(self, success=None, gse=None, ae=None,):
self.success = success
self.gse = gse
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 == 0:
if ftype == TType.LIST:
self.success = []
(_etype10, _size7) = iprot.readListBegin()
for _i11 in range(_size7):
_elem12 = airavata.model.group.ttypes.GroupModel()
_elem12.read(iprot)
self.success.append(_elem12)
iprot.readListEnd()
else:
iprot.skip(ftype)
elif fid == 1:
if ftype == TType.STRUCT:
self.gse = airavata.service.profile.groupmanager.cpi.error.ttypes.GroupManagerServiceException()
self.gse.read(iprot)
else:
iprot.skip(ftype)
elif fid == 2:
if ftype == TType.STRUCT:
self.ae = airavata.api.error.ttypes.AuthorizationException()
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('getAllGroupsUserBelongs_result')
if self.success is not None:
oprot.writeFieldBegin('success', TType.LIST, 0)
oprot.writeListBegin(TType.STRUCT, len(self.success))
for iter13 in self.success:
iter13.write(oprot)
oprot.writeListEnd()
oprot.writeFieldEnd()
if self.gse is not None:
oprot.writeFieldBegin('gse', TType.STRUCT, 1)
self.gse.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)
class addUsersToGroup_args(object):
"""
Attributes:
- authzToken
- userIds
- groupId
"""
thrift_spec = (
None, # 0
(1, TType.STRUCT, 'authzToken', (airavata.model.security.ttypes.AuthzToken, airavata.model.security.ttypes.AuthzToken.thrift_spec), None, ), # 1
(2, TType.LIST, 'userIds', (TType.STRING, 'UTF8', False), None, ), # 2
(3, TType.STRING, 'groupId', 'UTF8', None, ), # 3
)
def __init__(self, authzToken=None, userIds=None, groupId=None,):
self.authzToken = authzToken
self.userIds = userIds
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.authzToken = airavata.model.security.ttypes.AuthzToken()
self.authzToken.read(iprot)
else:
iprot.skip(ftype)
elif fid == 2:
if ftype == TType.LIST:
self.userIds = []
(_etype17, _size14) = iprot.readListBegin()
for _i18 in range(_size14):
_elem19 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
self.userIds.append(_elem19)
iprot.readListEnd()
else:
iprot.skip(ftype)
elif fid == 3:
if ftype == TType.STRING:
self.groupId = 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('addUsersToGroup_args')
if self.authzToken is not None:
oprot.writeFieldBegin('authzToken', TType.STRUCT, 1)
self.authzToken.write(oprot)
oprot.writeFieldEnd()
if self.userIds is not None:
oprot.writeFieldBegin('userIds', TType.LIST, 2)
oprot.writeListBegin(TType.STRING, len(self.userIds))
for iter20 in self.userIds:
oprot.writeString(iter20.encode('utf-8') if sys.version_info[0] == 2 else iter20)
oprot.writeListEnd()
oprot.writeFieldEnd()
if self.groupId is not None:
oprot.writeFieldBegin('groupId', TType.STRING, 3)
oprot.writeString(self.groupId.encode('utf-8') if sys.version_info[0] == 2 else self.groupId)
oprot.writeFieldEnd()
oprot.writeFieldStop()
oprot.writeStructEnd()
def validate(self):
if self.authzToken is None:
raise TProtocolException(message='Required field authzToken is unset!')
if self.userIds is None:
raise TProtocolException(message='Required field userIds is unset!')
if self.groupId is None:
raise TProtocolException(message='Required field groupId is unset!')
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)
class addUsersToGroup_result(object):
"""
Attributes:
- success
- gse
- ae
"""
thrift_spec = (
(0, TType.BOOL, 'success', None, None, ), # 0
(1, TType.STRUCT, 'gse', (airavata.service.profile.groupmanager.cpi.error.ttypes.GroupManagerServiceException, airavata.service.profile.groupmanager.cpi.error.ttypes.GroupManagerServiceException.thrift_spec), None, ), # 1
(2, TType.STRUCT, 'ae', (airavata.api.error.ttypes.AuthorizationException, airavata.api.error.ttypes.AuthorizationException.thrift_spec), None, ), # 2
)
def __init__(self, success=None, gse=None, ae=None,):
self.success = success
self.gse = gse
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 == 0:
if ftype == TType.BOOL:
self.success = iprot.readBool()
else:
iprot.skip(ftype)
elif fid == 1:
if ftype == TType.STRUCT:
self.gse = airavata.service.profile.groupmanager.cpi.error.ttypes.GroupManagerServiceException()
self.gse.read(iprot)
else:
iprot.skip(ftype)
elif fid == 2:
if ftype == TType.STRUCT:
self.ae = airavata.api.error.ttypes.AuthorizationException()
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('addUsersToGroup_result')
if self.success is not None:
oprot.writeFieldBegin('success', TType.BOOL, 0)
oprot.writeBool(self.success)
oprot.writeFieldEnd()
if self.gse is not None:
oprot.writeFieldBegin('gse', TType.STRUCT, 1)
self.gse.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)
class removeUsersFromGroup_args(object):
"""
Attributes:
- authzToken
- userIds
- groupId
"""
thrift_spec = (
None, # 0
(1, TType.STRUCT, 'authzToken', (airavata.model.security.ttypes.AuthzToken, airavata.model.security.ttypes.AuthzToken.thrift_spec), None, ), # 1
(2, TType.LIST, 'userIds', (TType.STRING, 'UTF8', False), None, ), # 2
(3, TType.STRING, 'groupId', 'UTF8', None, ), # 3
)
def __init__(self, authzToken=None, userIds=None, groupId=None,):
self.authzToken = authzToken
self.userIds = userIds
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.authzToken = airavata.model.security.ttypes.AuthzToken()
self.authzToken.read(iprot)
else:
iprot.skip(ftype)
elif fid == 2:
if ftype == TType.LIST:
self.userIds = []
(_etype24, _size21) = iprot.readListBegin()
for _i25 in range(_size21):
_elem26 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
self.userIds.append(_elem26)
iprot.readListEnd()
else:
iprot.skip(ftype)
elif fid == 3:
if ftype == TType.STRING:
self.groupId = 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('removeUsersFromGroup_args')
if self.authzToken is not None:
oprot.writeFieldBegin('authzToken', TType.STRUCT, 1)
self.authzToken.write(oprot)
oprot.writeFieldEnd()
if self.userIds is not None:
oprot.writeFieldBegin('userIds', TType.LIST, 2)
oprot.writeListBegin(TType.STRING, len(self.userIds))
for iter27 in self.userIds:
oprot.writeString(iter27.encode('utf-8') if sys.version_info[0] == 2 else iter27)
oprot.writeListEnd()
oprot.writeFieldEnd()
if self.groupId is not None:
oprot.writeFieldBegin('groupId', TType.STRING, 3)
oprot.writeString(self.groupId.encode('utf-8') if sys.version_info[0] == 2 else self.groupId)
oprot.writeFieldEnd()
oprot.writeFieldStop()
oprot.writeStructEnd()
def validate(self):
if self.authzToken is None:
raise TProtocolException(message='Required field authzToken is unset!')
if self.userIds is None:
raise TProtocolException(message='Required field userIds is unset!')
if self.groupId is None:
raise TProtocolException(message='Required field groupId is unset!')
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)
class removeUsersFromGroup_result(object):
"""
Attributes:
- success
- gse
- ae
"""
thrift_spec = (
(0, TType.BOOL, 'success', None, None, ), # 0
(1, TType.STRUCT, 'gse', (airavata.service.profile.groupmanager.cpi.error.ttypes.GroupManagerServiceException, airavata.service.profile.groupmanager.cpi.error.ttypes.GroupManagerServiceException.thrift_spec), None, ), # 1
(2, TType.STRUCT, 'ae', (airavata.api.error.ttypes.AuthorizationException, airavata.api.error.ttypes.AuthorizationException.thrift_spec), None, ), # 2
)
def __init__(self, success=None, gse=None, ae=None,):
self.success = success
self.gse = gse
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 == 0:
if ftype == TType.BOOL:
self.success = iprot.readBool()
else:
iprot.skip(ftype)
elif fid == 1:
if ftype == TType.STRUCT:
self.gse = airavata.service.profile.groupmanager.cpi.error.ttypes.GroupManagerServiceException()
self.gse.read(iprot)
else:
iprot.skip(ftype)
elif fid == 2:
if ftype == TType.STRUCT:
self.ae = airavata.api.error.ttypes.AuthorizationException()
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('removeUsersFromGroup_result')
if self.success is not None:
oprot.writeFieldBegin('success', TType.BOOL, 0)
oprot.writeBool(self.success)
oprot.writeFieldEnd()
if self.gse is not None:
oprot.writeFieldBegin('gse', TType.STRUCT, 1)
self.gse.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)
class transferGroupOwnership_args(object):
"""
Attributes:
- authzToken
- groupId
- newOwnerId
"""
thrift_spec = (
None, # 0
(1, TType.STRUCT, 'authzToken', (airavata.model.security.ttypes.AuthzToken, airavata.model.security.ttypes.AuthzToken.thrift_spec), None, ), # 1
(2, TType.STRING, 'groupId', 'UTF8', None, ), # 2
(3, TType.STRING, 'newOwnerId', 'UTF8', None, ), # 3
)
def __init__(self, authzToken=None, groupId=None, newOwnerId=None,):
self.authzToken = authzToken
self.groupId = groupId
self.newOwnerId = newOwnerId
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.authzToken = airavata.model.security.ttypes.AuthzToken()
self.authzToken.read(iprot)
else:
iprot.skip(ftype)
elif fid == 2:
if ftype == TType.STRING:
self.groupId = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
else:
iprot.skip(ftype)
elif fid == 3:
if ftype == TType.STRING:
self.newOwnerId = 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('transferGroupOwnership_args')
if self.authzToken is not None:
oprot.writeFieldBegin('authzToken', TType.STRUCT, 1)
self.authzToken.write(oprot)
oprot.writeFieldEnd()
if self.groupId is not None:
oprot.writeFieldBegin('groupId', TType.STRING, 2)
oprot.writeString(self.groupId.encode('utf-8') if sys.version_info[0] == 2 else self.groupId)
oprot.writeFieldEnd()
if self.newOwnerId is not None:
oprot.writeFieldBegin('newOwnerId', TType.STRING, 3)
oprot.writeString(self.newOwnerId.encode('utf-8') if sys.version_info[0] == 2 else self.newOwnerId)
oprot.writeFieldEnd()
oprot.writeFieldStop()
oprot.writeStructEnd()
def validate(self):
if self.authzToken is None:
raise TProtocolException(message='Required field authzToken is unset!')
if self.groupId is None:
raise TProtocolException(message='Required field groupId is unset!')
if self.newOwnerId is None:
raise TProtocolException(message='Required field newOwnerId is unset!')
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)
class transferGroupOwnership_result(object):
"""
Attributes:
- success
- gse
- ae
"""
thrift_spec = (
(0, TType.BOOL, 'success', None, None, ), # 0
(1, TType.STRUCT, 'gse', (airavata.service.profile.groupmanager.cpi.error.ttypes.GroupManagerServiceException, airavata.service.profile.groupmanager.cpi.error.ttypes.GroupManagerServiceException.thrift_spec), None, ), # 1
(2, TType.STRUCT, 'ae', (airavata.api.error.ttypes.AuthorizationException, airavata.api.error.ttypes.AuthorizationException.thrift_spec), None, ), # 2
)
def __init__(self, success=None, gse=None, ae=None,):
self.success = success
self.gse = gse
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 == 0:
if ftype == TType.BOOL:
self.success = iprot.readBool()
else:
iprot.skip(ftype)
elif fid == 1:
if ftype == TType.STRUCT:
self.gse = airavata.service.profile.groupmanager.cpi.error.ttypes.GroupManagerServiceException()
self.gse.read(iprot)
else:
iprot.skip(ftype)
elif fid == 2:
if ftype == TType.STRUCT:
self.ae = airavata.api.error.ttypes.AuthorizationException()
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('transferGroupOwnership_result')
if self.success is not None:
oprot.writeFieldBegin('success', TType.BOOL, 0)
oprot.writeBool(self.success)
oprot.writeFieldEnd()
if self.gse is not None:
oprot.writeFieldBegin('gse', TType.STRUCT, 1)
self.gse.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)
class addGroupAdmins_args(object):
"""
Attributes:
- authzToken
- groupId
- adminIds
"""
thrift_spec = (
None, # 0
(1, TType.STRUCT, 'authzToken', (airavata.model.security.ttypes.AuthzToken, airavata.model.security.ttypes.AuthzToken.thrift_spec), None, ), # 1
(2, TType.STRING, 'groupId', 'UTF8', None, ), # 2
(3, TType.LIST, 'adminIds', (TType.STRING, 'UTF8', False), None, ), # 3
)
def __init__(self, authzToken=None, groupId=None, adminIds=None,):
self.authzToken = authzToken
self.groupId = groupId
self.adminIds = adminIds
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.authzToken = airavata.model.security.ttypes.AuthzToken()
self.authzToken.read(iprot)
else:
iprot.skip(ftype)
elif fid == 2:
if ftype == TType.STRING:
self.groupId = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
else:
iprot.skip(ftype)
elif fid == 3:
if ftype == TType.LIST:
self.adminIds = []
(_etype31, _size28) = iprot.readListBegin()
for _i32 in range(_size28):
_elem33 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
self.adminIds.append(_elem33)
iprot.readListEnd()
else:
iprot.skip(ftype)
else:
iprot.skip(ftype)
iprot.readFieldEnd()
iprot.readStructEnd()
def write(self, oprot):
if oprot._fast_encode is not None and self.thrift_spec is not None:
oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec)))
return
oprot.writeStructBegin('addGroupAdmins_args')
if self.authzToken is not None:
oprot.writeFieldBegin('authzToken', TType.STRUCT, 1)
self.authzToken.write(oprot)
oprot.writeFieldEnd()
if self.groupId is not None:
oprot.writeFieldBegin('groupId', TType.STRING, 2)
oprot.writeString(self.groupId.encode('utf-8') if sys.version_info[0] == 2 else self.groupId)
oprot.writeFieldEnd()
if self.adminIds is not None:
oprot.writeFieldBegin('adminIds', TType.LIST, 3)
oprot.writeListBegin(TType.STRING, len(self.adminIds))
for iter34 in self.adminIds:
oprot.writeString(iter34.encode('utf-8') if sys.version_info[0] == 2 else iter34)
oprot.writeListEnd()
oprot.writeFieldEnd()
oprot.writeFieldStop()
oprot.writeStructEnd()
def validate(self):
if self.authzToken is None:
raise TProtocolException(message='Required field authzToken is unset!')
if self.groupId is None:
raise TProtocolException(message='Required field groupId is unset!')
if self.adminIds is None:
raise TProtocolException(message='Required field adminIds is unset!')
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)
class addGroupAdmins_result(object):
"""
Attributes:
- success
- gse
- ae
"""
thrift_spec = (
(0, TType.BOOL, 'success', None, None, ), # 0
(1, TType.STRUCT, 'gse', (airavata.service.profile.groupmanager.cpi.error.ttypes.GroupManagerServiceException, airavata.service.profile.groupmanager.cpi.error.ttypes.GroupManagerServiceException.thrift_spec), None, ), # 1
(2, TType.STRUCT, 'ae', (airavata.api.error.ttypes.AuthorizationException, airavata.api.error.ttypes.AuthorizationException.thrift_spec), None, ), # 2
)
def __init__(self, success=None, gse=None, ae=None,):
self.success = success
self.gse = gse
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 == 0:
if ftype == TType.BOOL:
self.success = iprot.readBool()
else:
iprot.skip(ftype)
elif fid == 1:
if ftype == TType.STRUCT:
self.gse = airavata.service.profile.groupmanager.cpi.error.ttypes.GroupManagerServiceException()
self.gse.read(iprot)
else:
iprot.skip(ftype)
elif fid == 2:
if ftype == TType.STRUCT:
self.ae = airavata.api.error.ttypes.AuthorizationException()
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('addGroupAdmins_result')
if self.success is not None:
oprot.writeFieldBegin('success', TType.BOOL, 0)
oprot.writeBool(self.success)
oprot.writeFieldEnd()
if self.gse is not None:
oprot.writeFieldBegin('gse', TType.STRUCT, 1)
self.gse.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)
class removeGroupAdmins_args(object):
"""
Attributes:
- authzToken
- groupId
- adminIds
"""
thrift_spec = (
None, # 0
(1, TType.STRUCT, 'authzToken', (airavata.model.security.ttypes.AuthzToken, airavata.model.security.ttypes.AuthzToken.thrift_spec), None, ), # 1
(2, TType.STRING, 'groupId', 'UTF8', None, ), # 2
(3, TType.LIST, 'adminIds', (TType.STRING, 'UTF8', False), None, ), # 3
)
def __init__(self, authzToken=None, groupId=None, adminIds=None,):
self.authzToken = authzToken
self.groupId = groupId
self.adminIds = adminIds
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.authzToken = airavata.model.security.ttypes.AuthzToken()
self.authzToken.read(iprot)
else:
iprot.skip(ftype)
elif fid == 2:
if ftype == TType.STRING:
self.groupId = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
else:
iprot.skip(ftype)
elif fid == 3:
if ftype == TType.LIST:
self.adminIds = []
(_etype38, _size35) = iprot.readListBegin()
for _i39 in range(_size35):
_elem40 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
self.adminIds.append(_elem40)
iprot.readListEnd()
else:
iprot.skip(ftype)
else:
iprot.skip(ftype)
iprot.readFieldEnd()
iprot.readStructEnd()
def write(self, oprot):
if oprot._fast_encode is not None and self.thrift_spec is not None:
oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec)))
return
oprot.writeStructBegin('removeGroupAdmins_args')
if self.authzToken is not None:
oprot.writeFieldBegin('authzToken', TType.STRUCT, 1)
self.authzToken.write(oprot)
oprot.writeFieldEnd()
if self.groupId is not None:
oprot.writeFieldBegin('groupId', TType.STRING, 2)
oprot.writeString(self.groupId.encode('utf-8') if sys.version_info[0] == 2 else self.groupId)
oprot.writeFieldEnd()
if self.adminIds is not None:
oprot.writeFieldBegin('adminIds', TType.LIST, 3)
oprot.writeListBegin(TType.STRING, len(self.adminIds))
for iter41 in self.adminIds:
oprot.writeString(iter41.encode('utf-8') if sys.version_info[0] == 2 else iter41)
oprot.writeListEnd()
oprot.writeFieldEnd()
oprot.writeFieldStop()
oprot.writeStructEnd()
def validate(self):
if self.authzToken is None:
raise TProtocolException(message='Required field authzToken is unset!')
if self.groupId is None:
raise TProtocolException(message='Required field groupId is unset!')
if self.adminIds is None:
raise TProtocolException(message='Required field adminIds is unset!')
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)
class removeGroupAdmins_result(object):
"""
Attributes:
- success
- gse
- ae
"""
thrift_spec = (
(0, TType.BOOL, 'success', None, None, ), # 0
(1, TType.STRUCT, 'gse', (airavata.service.profile.groupmanager.cpi.error.ttypes.GroupManagerServiceException, airavata.service.profile.groupmanager.cpi.error.ttypes.GroupManagerServiceException.thrift_spec), None, ), # 1
(2, TType.STRUCT, 'ae', (airavata.api.error.ttypes.AuthorizationException, airavata.api.error.ttypes.AuthorizationException.thrift_spec), None, ), # 2
)
def __init__(self, success=None, gse=None, ae=None,):
self.success = success
self.gse = gse
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 == 0:
if ftype == TType.BOOL:
self.success = iprot.readBool()
else:
iprot.skip(ftype)
elif fid == 1:
if ftype == TType.STRUCT:
self.gse = airavata.service.profile.groupmanager.cpi.error.ttypes.GroupManagerServiceException()
self.gse.read(iprot)
else:
iprot.skip(ftype)
elif fid == 2:
if ftype == TType.STRUCT:
self.ae = airavata.api.error.ttypes.AuthorizationException()
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('removeGroupAdmins_result')
if self.success is not None:
oprot.writeFieldBegin('success', TType.BOOL, 0)
oprot.writeBool(self.success)
oprot.writeFieldEnd()
if self.gse is not None:
oprot.writeFieldBegin('gse', TType.STRUCT, 1)
self.gse.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)
class hasAdminAccess_args(object):
"""
Attributes:
- authzToken
- groupId
- adminId
"""
thrift_spec = (
None, # 0
(1, TType.STRUCT, 'authzToken', (airavata.model.security.ttypes.AuthzToken, airavata.model.security.ttypes.AuthzToken.thrift_spec), None, ), # 1
(2, TType.STRING, 'groupId', 'UTF8', None, ), # 2
(3, TType.STRING, 'adminId', 'UTF8', None, ), # 3
)
def __init__(self, authzToken=None, groupId=None, adminId=None,):
self.authzToken = authzToken
self.groupId = groupId
self.adminId = adminId
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.authzToken = airavata.model.security.ttypes.AuthzToken()
self.authzToken.read(iprot)
else:
iprot.skip(ftype)
elif fid == 2:
if ftype == TType.STRING:
self.groupId = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
else:
iprot.skip(ftype)
elif fid == 3:
if ftype == TType.STRING:
self.adminId = 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('hasAdminAccess_args')
if self.authzToken is not None:
oprot.writeFieldBegin('authzToken', TType.STRUCT, 1)
self.authzToken.write(oprot)
oprot.writeFieldEnd()
if self.groupId is not None:
oprot.writeFieldBegin('groupId', TType.STRING, 2)
oprot.writeString(self.groupId.encode('utf-8') if sys.version_info[0] == 2 else self.groupId)
oprot.writeFieldEnd()
if self.adminId is not None:
oprot.writeFieldBegin('adminId', TType.STRING, 3)
oprot.writeString(self.adminId.encode('utf-8') if sys.version_info[0] == 2 else self.adminId)
oprot.writeFieldEnd()
oprot.writeFieldStop()
oprot.writeStructEnd()
def validate(self):
if self.authzToken is None:
raise TProtocolException(message='Required field authzToken is unset!')
if self.groupId is None:
raise TProtocolException(message='Required field groupId is unset!')
if self.adminId is None:
raise TProtocolException(message='Required field adminId is unset!')
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)
class hasAdminAccess_result(object):
"""
Attributes:
- success
- gse
- ae
"""
thrift_spec = (
(0, TType.BOOL, 'success', None, None, ), # 0
(1, TType.STRUCT, 'gse', (airavata.service.profile.groupmanager.cpi.error.ttypes.GroupManagerServiceException, airavata.service.profile.groupmanager.cpi.error.ttypes.GroupManagerServiceException.thrift_spec), None, ), # 1
(2, TType.STRUCT, 'ae', (airavata.api.error.ttypes.AuthorizationException, airavata.api.error.ttypes.AuthorizationException.thrift_spec), None, ), # 2
)
def __init__(self, success=None, gse=None, ae=None,):
self.success = success
self.gse = gse
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 == 0:
if ftype == TType.BOOL:
self.success = iprot.readBool()
else:
iprot.skip(ftype)
elif fid == 1:
if ftype == TType.STRUCT:
self.gse = airavata.service.profile.groupmanager.cpi.error.ttypes.GroupManagerServiceException()
self.gse.read(iprot)
else:
iprot.skip(ftype)
elif fid == 2:
if ftype == TType.STRUCT:
self.ae = airavata.api.error.ttypes.AuthorizationException()
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('hasAdminAccess_result')
if self.success is not None:
oprot.writeFieldBegin('success', TType.BOOL, 0)
oprot.writeBool(self.success)
oprot.writeFieldEnd()
if self.gse is not None:
oprot.writeFieldBegin('gse', TType.STRUCT, 1)
self.gse.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)
class hasOwnerAccess_args(object):
"""
Attributes:
- authzToken
- groupId
- ownerId
"""
thrift_spec = (
None, # 0
(1, TType.STRUCT, 'authzToken', (airavata.model.security.ttypes.AuthzToken, airavata.model.security.ttypes.AuthzToken.thrift_spec), None, ), # 1
(2, TType.STRING, 'groupId', 'UTF8', None, ), # 2
(3, TType.STRING, 'ownerId', 'UTF8', None, ), # 3
)
def __init__(self, authzToken=None, groupId=None, ownerId=None,):
self.authzToken = authzToken
self.groupId = groupId
self.ownerId = ownerId
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.authzToken = airavata.model.security.ttypes.AuthzToken()
self.authzToken.read(iprot)
else:
iprot.skip(ftype)
elif fid == 2:
if ftype == TType.STRING:
self.groupId = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString()
else:
iprot.skip(ftype)
elif fid == 3:
if ftype == TType.STRING:
self.ownerId = 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('hasOwnerAccess_args')
if self.authzToken is not None:
oprot.writeFieldBegin('authzToken', TType.STRUCT, 1)
self.authzToken.write(oprot)
oprot.writeFieldEnd()
if self.groupId is not None:
oprot.writeFieldBegin('groupId', TType.STRING, 2)
oprot.writeString(self.groupId.encode('utf-8') if sys.version_info[0] == 2 else self.groupId)
oprot.writeFieldEnd()
if self.ownerId is not None:
oprot.writeFieldBegin('ownerId', TType.STRING, 3)
oprot.writeString(self.ownerId.encode('utf-8') if sys.version_info[0] == 2 else self.ownerId)
oprot.writeFieldEnd()
oprot.writeFieldStop()
oprot.writeStructEnd()
def validate(self):
if self.authzToken is None:
raise TProtocolException(message='Required field authzToken is unset!')
if self.groupId is None:
raise TProtocolException(message='Required field groupId is unset!')
if self.ownerId is None:
raise TProtocolException(message='Required field ownerId is unset!')
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)
class hasOwnerAccess_result(object):
"""
Attributes:
- success
- gse
- ae
"""
thrift_spec = (
(0, TType.BOOL, 'success', None, None, ), # 0
(1, TType.STRUCT, 'gse', (airavata.service.profile.groupmanager.cpi.error.ttypes.GroupManagerServiceException, airavata.service.profile.groupmanager.cpi.error.ttypes.GroupManagerServiceException.thrift_spec), None, ), # 1
(2, TType.STRUCT, 'ae', (airavata.api.error.ttypes.AuthorizationException, airavata.api.error.ttypes.AuthorizationException.thrift_spec), None, ), # 2
)
def __init__(self, success=None, gse=None, ae=None,):
self.success = success
self.gse = gse
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 == 0:
if ftype == TType.BOOL:
self.success = iprot.readBool()
else:
iprot.skip(ftype)
elif fid == 1:
if ftype == TType.STRUCT:
self.gse = airavata.service.profile.groupmanager.cpi.error.ttypes.GroupManagerServiceException()
self.gse.read(iprot)
else:
iprot.skip(ftype)
elif fid == 2:
if ftype == TType.STRUCT:
self.ae = airavata.api.error.ttypes.AuthorizationException()
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('hasOwnerAccess_result')
if self.success is not None:
oprot.writeFieldBegin('success', TType.BOOL, 0)
oprot.writeBool(self.success)
oprot.writeFieldEnd()
if self.gse is not None:
oprot.writeFieldBegin('gse', TType.STRUCT, 1)
self.gse.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)