You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by ma...@apache.org on 2017/08/07 14:01:20 UTC
[44/51] [abbrv] [partial] airavata git commit: AIRAVATA-2505 Upgrade
Airavata to Thrift 0.10.0
http://git-wip-us.apache.org/repos/asf/airavata/blob/14ff0916/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/api/sharing/SharingRegistryService.py
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/api/sharing/SharingRegistryService.py b/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/api/sharing/SharingRegistryService.py
index e0dc634..5276063 100644
--- a/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/api/sharing/SharingRegistryService.py
+++ b/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/api/sharing/SharingRegistryService.py
@@ -1,12043 +1,11422 @@
#
-# Autogenerated by Thrift Compiler (0.9.3)
+# 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, TException, TApplicationException
+from thrift.Thrift import TType, TMessageType, TFrozenDict, TException, TApplicationException
+from thrift.protocol.TProtocol import TProtocolException
+import sys
import logging
-from ttypes import *
+from .ttypes import *
from thrift.Thrift import TProcessor
from thrift.transport import TTransport
-from thrift.protocol import TBinaryProtocol, TProtocol
-try:
- from thrift.protocol import fastbinary
-except:
- fastbinary = None
-class Iface:
- def createDomain(self, domain):
- """
- <p>API method to create a new domain</p>
+class Iface(object):
+ def createDomain(self, domain):
+ """
+ <p>API method to create a new domain</p>
+
+ Parameters:
+ - domain
+ """
+ pass
+
+ def updateDomain(self, domain):
+ """
+ <p>API method to update a domain</p>
+
+ Parameters:
+ - domain
+ """
+ pass
+
+ def isDomainExists(self, domainId):
+ """
+ <p>API method to check Domain Exists</p>
+
+ Parameters:
+ - domainId
+ """
+ pass
+
+ def deleteDomain(self, domainId):
+ """
+ <p>API method to delete domain</p>
+
+ Parameters:
+ - domainId
+ """
+ pass
+
+ def getDomain(self, domainId):
+ """
+ <p>API method to retrieve a domain</p>
+
+ Parameters:
+ - domainId
+ """
+ pass
+
+ def getDomains(self, offset, limit):
+ """
+ <p>API method to get all domain.</p>
+
+ Parameters:
+ - offset
+ - limit
+ """
+ pass
+
+ def createUser(self, user):
+ """
+ <p>API method to register a user in the system</p>
+
+ Parameters:
+ - user
+ """
+ pass
+
+ def updatedUser(self, user):
+ """
+ <p>API method to update existing user</p>
+
+ Parameters:
+ - user
+ """
+ pass
+
+ def isUserExists(self, domainId, userId):
+ """
+ <p>API method to check User Exists</p>
+
+ Parameters:
+ - domainId
+ - userId
+ """
+ pass
+
+ def deleteUser(self, domainId, userId):
+ """
+ <p>API method to delete user</p>
+
+ Parameters:
+ - domainId
+ - userId
+ """
+ pass
+
+ def getUser(self, domainId, userId):
+ """
+ <p>API method to get a user</p>
+
+ Parameters:
+ - domainId
+ - userId
+ """
+ pass
+
+ def getUsers(self, domainId, offset, limit):
+ """
+ <p>API method to get a list of users in a specific domain.</p>
+ <li>domainId : Domain id</li>
+ <li>offset : Starting result number</li>
+ <li>limit : Number of max results to be sent</li>
+
+ Parameters:
+ - domainId
+ - offset
+ - limit
+ """
+ pass
+
+ def createGroup(self, group):
+ """
+ <p>API method to create a new group</p>
+
+ Parameters:
+ - group
+ """
+ pass
+
+ def updateGroup(self, group):
+ """
+ <p>API method to update a group</p>
+
+ Parameters:
+ - group
+ """
+ pass
+
+ def isGroupExists(self, domainId, groupId):
+ """
+ <p>API method to check Group Exists</p>
+
+ Parameters:
+ - domainId
+ - groupId
+ """
+ pass
+
+ def deleteGroup(self, domainId, groupId):
+ """
+ <p>API method to delete a group</p>
+
+ Parameters:
+ - domainId
+ - groupId
+ """
+ pass
+
+ def getGroup(self, domainId, groupId):
+ """
+ <p>API method to get a group</p>
+
+ Parameters:
+ - domainId
+ - groupId
+ """
+ pass
+
+ def getGroups(self, domainId, offset, limit):
+ """
+ <p>API method to get groups in a domainId.</p>
+
+ Parameters:
+ - domainId
+ - offset
+ - limit
+ """
+ pass
+
+ def addUsersToGroup(self, domainId, userIds, groupId):
+ """
+ <p>API method to add list of users to a group</p>
+
+ Parameters:
+ - domainId
+ - userIds
+ - groupId
+ """
+ pass
+
+ def removeUsersFromGroup(self, domainId, userIds, groupId):
+ """
+ <p>API method to remove users from a group</p>
+
+ Parameters:
+ - domainId
+ - userIds
+ - groupId
+ """
+ pass
+
+ def getGroupMembersOfTypeUser(self, domainId, groupId, offset, limit):
+ """
+ <p>API method to get list of child users in a group. Only the direct members will be returned.</p>
+
+ Parameters:
+ - domainId
+ - groupId
+ - offset
+ - limit
+ """
+ pass
+
+ def getGroupMembersOfTypeGroup(self, domainId, groupId, offset, limit):
+ """
+ <p>API method to get list of child groups in a group. Only the direct members will be returned.</p>
+
+ Parameters:
+ - domainId
+ - groupId
+ - offset
+ - limit
+ """
+ pass
+
+ def addChildGroupsToParentGroup(self, domainId, childIds, groupId):
+ """
+ <p>API method to add a child group to a parent group.</p>
+
+ Parameters:
+ - domainId
+ - childIds
+ - groupId
+ """
+ pass
+
+ def removeChildGroupFromParentGroup(self, domainId, childId, groupId):
+ """
+ <p>API method to remove a child group from parent group.</p>
+
+ Parameters:
+ - domainId
+ - childId
+ - groupId
+ """
+ pass
+
+ def getAllMemberGroupsForUser(self, domainId, userId):
+ """
+ Parameters:
+ - domainId
+ - userId
+ """
+ pass
+
+ def createEntityType(self, entityType):
+ """
+ <p>API method to create a new entity type</p>
+
+ Parameters:
+ - entityType
+ """
+ pass
+
+ def updateEntityType(self, entityType):
+ """
+ <p>API method to update entity type</p>
+
+ Parameters:
+ - entityType
+ """
+ pass
+
+ def isEntityTypeExists(self, domainId, entityTypeId):
+ """
+ <p>API method to check EntityType Exists</p>
+
+ Parameters:
+ - domainId
+ - entityTypeId
+ """
+ pass
+
+ def deleteEntityType(self, domainId, entityTypeId):
+ """
+ <p>API method to delete entity type</p>
+
+ Parameters:
+ - domainId
+ - entityTypeId
+ """
+ pass
+
+ def getEntityType(self, domainId, entityTypeId):
+ """
+ <p>API method to get an entity type</p>
+
+ Parameters:
+ - domainId
+ - entityTypeId
+ """
+ pass
+
+ def getEntityTypes(self, domainId, offset, limit):
+ """
+ <p>API method to get entity types in a domainId.</p>
+
+ Parameters:
+ - domainId
+ - offset
+ - limit
+ """
+ pass
+
+ def createEntity(self, entity):
+ """
+ <p>API method to register new entity</p>
+
+ Parameters:
+ - entity
+ """
+ pass
+
+ def updateEntity(self, entity):
+ """
+ <p>API method to update entity</p>
+
+ Parameters:
+ - entity
+ """
+ pass
+
+ def isEntityExists(self, domainId, entityId):
+ """
+ <p>API method to check Entity Exists</p>
+
+ Parameters:
+ - domainId
+ - entityId
+ """
+ pass
+
+ def deleteEntity(self, domainId, entityId):
+ """
+ <p>API method to delete entity</p>
+
+ Parameters:
+ - domainId
+ - entityId
+ """
+ pass
+
+ def getEntity(self, domainId, entityId):
+ """
+ <p>API method to get entity</p>
+
+ Parameters:
+ - domainId
+ - entityId
+ """
+ pass
+
+ def searchEntities(self, domainId, userId, filters, offset, limit):
+ """
+ <p>API method to search entities</p>
+
+ Parameters:
+ - domainId
+ - userId
+ - filters
+ - offset
+ - limit
+ """
+ pass
+
+ def getListOfSharedUsers(self, domainId, entityId, permissionTypeId):
+ """
+ <p>API method to get a list of shared users given the entity id</p>
+
+ Parameters:
+ - domainId
+ - entityId
+ - permissionTypeId
+ """
+ pass
+
+ def getListOfSharedGroups(self, domainId, entityId, permissionTypeId):
+ """
+ <p>API method to get a list of shared groups given the entity id</p>
+
+ Parameters:
+ - domainId
+ - entityId
+ - permissionTypeId
+ """
+ pass
+
+ def createPermissionType(self, permissionType):
+ """
+ <p>API method to create permission type</p>
+
+ Parameters:
+ - permissionType
+ """
+ pass
+
+ def updatePermissionType(self, permissionType):
+ """
+ <p>API method to update permission type</p>
+
+ Parameters:
+ - permissionType
+ """
+ pass
+
+ def isPermissionExists(self, dimainId, permissionId):
+ """
+ <p>API method to check Permission Exists</p>
+
+ Parameters:
+ - dimainId
+ - permissionId
+ """
+ pass
+
+ def deletePermissionType(self, domainId, permissionTypeId):
+ """
+ <p>API method to delete permission type</p>
+
+ Parameters:
+ - domainId
+ - permissionTypeId
+ """
+ pass
+
+ def getPermissionType(self, domainId, permissionTypeId):
+ """
+ <p>API method to get permission type</p>
+
+ Parameters:
+ - domainId
+ - permissionTypeId
+ """
+ pass
+
+ def getPermissionTypes(self, domainId, offset, limit):
+ """
+ <p>API method to get list of permission types in a given domainId.</p>
+
+ Parameters:
+ - domainId
+ - offset
+ - limit
+ """
+ pass
+
+ def shareEntityWithUsers(self, domainId, entityId, userList, perssionTypeId, cascadePermission):
+ """
+ <p>API method to share an entity with users</p>
+
+ Parameters:
+ - domainId
+ - entityId
+ - userList
+ - perssionTypeId
+ - cascadePermission
+ """
+ pass
+
+ def revokeEntitySharingFromUsers(self, domainId, entityId, userList, perssionTypeId):
+ """
+ <p>API method to revoke sharing from a list of users</p>
+
+ Parameters:
+ - domainId
+ - entityId
+ - userList
+ - perssionTypeId
+ """
+ pass
+
+ def shareEntityWithGroups(self, domainId, entityId, groupList, perssionTypeId, cascadePermission):
+ """
+ <p>API method to share an entity with list of groups</p>
+
+ Parameters:
+ - domainId
+ - entityId
+ - groupList
+ - perssionTypeId
+ - cascadePermission
+ """
+ pass
+
+ def revokeEntitySharingFromGroups(self, domainId, entityId, groupList, perssionTypeId):
+ """
+ <p>API method to revoke sharing from list of users</p>
+
+ Parameters:
+ - domainId
+ - entityId
+ - groupList
+ - perssionTypeId
+ """
+ pass
+
+ def userHasAccess(self, domainId, userId, entityId, permissionTypeId):
+ """
+ <p>API method to check whether a user has access to a specific entity</p>
+
+ Parameters:
+ - domainId
+ - userId
+ - entityId
+ - permissionTypeId
+ """
+ pass
- Parameters:
- - domain
- """
- pass
- def updateDomain(self, domain):
- """
- <p>API method to update a domain</p>
+class Client(Iface):
+ def __init__(self, iprot, oprot=None):
+ self._iprot = self._oprot = iprot
+ if oprot is not None:
+ self._oprot = oprot
+ self._seqid = 0
+
+ def createDomain(self, domain):
+ """
+ <p>API method to create a new domain</p>
+
+ Parameters:
+ - domain
+ """
+ self.send_createDomain(domain)
+ return self.recv_createDomain()
+
+ def send_createDomain(self, domain):
+ self._oprot.writeMessageBegin('createDomain', TMessageType.CALL, self._seqid)
+ args = createDomain_args()
+ args.domain = domain
+ args.write(self._oprot)
+ self._oprot.writeMessageEnd()
+ self._oprot.trans.flush()
+
+ def recv_createDomain(self):
+ iprot = self._iprot
+ (fname, mtype, rseqid) = iprot.readMessageBegin()
+ if mtype == TMessageType.EXCEPTION:
+ x = TApplicationException()
+ x.read(iprot)
+ iprot.readMessageEnd()
+ raise x
+ result = createDomain_result()
+ result.read(iprot)
+ iprot.readMessageEnd()
+ if result.success is not None:
+ return result.success
+ if result.sre is not None:
+ raise result.sre
+ if result.dee is not None:
+ raise result.dee
+ raise TApplicationException(TApplicationException.MISSING_RESULT, "createDomain failed: unknown result")
+
+ def updateDomain(self, domain):
+ """
+ <p>API method to update a domain</p>
+
+ Parameters:
+ - domain
+ """
+ self.send_updateDomain(domain)
+ return self.recv_updateDomain()
+
+ def send_updateDomain(self, domain):
+ self._oprot.writeMessageBegin('updateDomain', TMessageType.CALL, self._seqid)
+ args = updateDomain_args()
+ args.domain = domain
+ args.write(self._oprot)
+ self._oprot.writeMessageEnd()
+ self._oprot.trans.flush()
+
+ def recv_updateDomain(self):
+ iprot = self._iprot
+ (fname, mtype, rseqid) = iprot.readMessageBegin()
+ if mtype == TMessageType.EXCEPTION:
+ x = TApplicationException()
+ x.read(iprot)
+ iprot.readMessageEnd()
+ raise x
+ result = updateDomain_result()
+ result.read(iprot)
+ iprot.readMessageEnd()
+ if result.success is not None:
+ return result.success
+ if result.sre is not None:
+ raise result.sre
+ raise TApplicationException(TApplicationException.MISSING_RESULT, "updateDomain failed: unknown result")
+
+ def isDomainExists(self, domainId):
+ """
+ <p>API method to check Domain Exists</p>
+
+ Parameters:
+ - domainId
+ """
+ self.send_isDomainExists(domainId)
+ return self.recv_isDomainExists()
+
+ def send_isDomainExists(self, domainId):
+ self._oprot.writeMessageBegin('isDomainExists', TMessageType.CALL, self._seqid)
+ args = isDomainExists_args()
+ args.domainId = domainId
+ args.write(self._oprot)
+ self._oprot.writeMessageEnd()
+ self._oprot.trans.flush()
+
+ def recv_isDomainExists(self):
+ iprot = self._iprot
+ (fname, mtype, rseqid) = iprot.readMessageBegin()
+ if mtype == TMessageType.EXCEPTION:
+ x = TApplicationException()
+ x.read(iprot)
+ iprot.readMessageEnd()
+ raise x
+ result = isDomainExists_result()
+ result.read(iprot)
+ iprot.readMessageEnd()
+ if result.success is not None:
+ return result.success
+ if result.sre is not None:
+ raise result.sre
+ raise TApplicationException(TApplicationException.MISSING_RESULT, "isDomainExists failed: unknown result")
+
+ def deleteDomain(self, domainId):
+ """
+ <p>API method to delete domain</p>
+
+ Parameters:
+ - domainId
+ """
+ self.send_deleteDomain(domainId)
+ return self.recv_deleteDomain()
+
+ def send_deleteDomain(self, domainId):
+ self._oprot.writeMessageBegin('deleteDomain', TMessageType.CALL, self._seqid)
+ args = deleteDomain_args()
+ args.domainId = domainId
+ args.write(self._oprot)
+ self._oprot.writeMessageEnd()
+ self._oprot.trans.flush()
+
+ def recv_deleteDomain(self):
+ iprot = self._iprot
+ (fname, mtype, rseqid) = iprot.readMessageBegin()
+ if mtype == TMessageType.EXCEPTION:
+ x = TApplicationException()
+ x.read(iprot)
+ iprot.readMessageEnd()
+ raise x
+ result = deleteDomain_result()
+ result.read(iprot)
+ iprot.readMessageEnd()
+ if result.success is not None:
+ return result.success
+ if result.sre is not None:
+ raise result.sre
+ raise TApplicationException(TApplicationException.MISSING_RESULT, "deleteDomain failed: unknown result")
+
+ def getDomain(self, domainId):
+ """
+ <p>API method to retrieve a domain</p>
+
+ Parameters:
+ - domainId
+ """
+ self.send_getDomain(domainId)
+ return self.recv_getDomain()
+
+ def send_getDomain(self, domainId):
+ self._oprot.writeMessageBegin('getDomain', TMessageType.CALL, self._seqid)
+ args = getDomain_args()
+ args.domainId = domainId
+ args.write(self._oprot)
+ self._oprot.writeMessageEnd()
+ self._oprot.trans.flush()
+
+ def recv_getDomain(self):
+ iprot = self._iprot
+ (fname, mtype, rseqid) = iprot.readMessageBegin()
+ if mtype == TMessageType.EXCEPTION:
+ x = TApplicationException()
+ x.read(iprot)
+ iprot.readMessageEnd()
+ raise x
+ result = getDomain_result()
+ result.read(iprot)
+ iprot.readMessageEnd()
+ if result.success is not None:
+ return result.success
+ if result.sre is not None:
+ raise result.sre
+ raise TApplicationException(TApplicationException.MISSING_RESULT, "getDomain failed: unknown result")
+
+ def getDomains(self, offset, limit):
+ """
+ <p>API method to get all domain.</p>
+
+ Parameters:
+ - offset
+ - limit
+ """
+ self.send_getDomains(offset, limit)
+ return self.recv_getDomains()
+
+ def send_getDomains(self, offset, limit):
+ self._oprot.writeMessageBegin('getDomains', TMessageType.CALL, self._seqid)
+ args = getDomains_args()
+ args.offset = offset
+ args.limit = limit
+ args.write(self._oprot)
+ self._oprot.writeMessageEnd()
+ self._oprot.trans.flush()
+
+ def recv_getDomains(self):
+ iprot = self._iprot
+ (fname, mtype, rseqid) = iprot.readMessageBegin()
+ if mtype == TMessageType.EXCEPTION:
+ x = TApplicationException()
+ x.read(iprot)
+ iprot.readMessageEnd()
+ raise x
+ result = getDomains_result()
+ result.read(iprot)
+ iprot.readMessageEnd()
+ if result.success is not None:
+ return result.success
+ if result.sre is not None:
+ raise result.sre
+ raise TApplicationException(TApplicationException.MISSING_RESULT, "getDomains failed: unknown result")
+
+ def createUser(self, user):
+ """
+ <p>API method to register a user in the system</p>
+
+ Parameters:
+ - user
+ """
+ self.send_createUser(user)
+ return self.recv_createUser()
+
+ def send_createUser(self, user):
+ self._oprot.writeMessageBegin('createUser', TMessageType.CALL, self._seqid)
+ args = createUser_args()
+ args.user = user
+ args.write(self._oprot)
+ self._oprot.writeMessageEnd()
+ self._oprot.trans.flush()
+
+ def recv_createUser(self):
+ iprot = self._iprot
+ (fname, mtype, rseqid) = iprot.readMessageBegin()
+ if mtype == TMessageType.EXCEPTION:
+ x = TApplicationException()
+ x.read(iprot)
+ iprot.readMessageEnd()
+ raise x
+ result = createUser_result()
+ result.read(iprot)
+ iprot.readMessageEnd()
+ if result.success is not None:
+ return result.success
+ if result.sre is not None:
+ raise result.sre
+ if result.dee is not None:
+ raise result.dee
+ raise TApplicationException(TApplicationException.MISSING_RESULT, "createUser failed: unknown result")
+
+ def updatedUser(self, user):
+ """
+ <p>API method to update existing user</p>
+
+ Parameters:
+ - user
+ """
+ self.send_updatedUser(user)
+ return self.recv_updatedUser()
+
+ def send_updatedUser(self, user):
+ self._oprot.writeMessageBegin('updatedUser', TMessageType.CALL, self._seqid)
+ args = updatedUser_args()
+ args.user = user
+ args.write(self._oprot)
+ self._oprot.writeMessageEnd()
+ self._oprot.trans.flush()
+
+ def recv_updatedUser(self):
+ iprot = self._iprot
+ (fname, mtype, rseqid) = iprot.readMessageBegin()
+ if mtype == TMessageType.EXCEPTION:
+ x = TApplicationException()
+ x.read(iprot)
+ iprot.readMessageEnd()
+ raise x
+ result = updatedUser_result()
+ result.read(iprot)
+ iprot.readMessageEnd()
+ if result.success is not None:
+ return result.success
+ if result.sre is not None:
+ raise result.sre
+ raise TApplicationException(TApplicationException.MISSING_RESULT, "updatedUser failed: unknown result")
+
+ def isUserExists(self, domainId, userId):
+ """
+ <p>API method to check User Exists</p>
+
+ Parameters:
+ - domainId
+ - userId
+ """
+ self.send_isUserExists(domainId, userId)
+ return self.recv_isUserExists()
+
+ def send_isUserExists(self, domainId, userId):
+ self._oprot.writeMessageBegin('isUserExists', TMessageType.CALL, self._seqid)
+ args = isUserExists_args()
+ args.domainId = domainId
+ args.userId = userId
+ args.write(self._oprot)
+ self._oprot.writeMessageEnd()
+ self._oprot.trans.flush()
+
+ def recv_isUserExists(self):
+ iprot = self._iprot
+ (fname, mtype, rseqid) = iprot.readMessageBegin()
+ if mtype == TMessageType.EXCEPTION:
+ x = TApplicationException()
+ x.read(iprot)
+ iprot.readMessageEnd()
+ raise x
+ result = isUserExists_result()
+ result.read(iprot)
+ iprot.readMessageEnd()
+ if result.success is not None:
+ return result.success
+ if result.sre is not None:
+ raise result.sre
+ raise TApplicationException(TApplicationException.MISSING_RESULT, "isUserExists failed: unknown result")
+
+ def deleteUser(self, domainId, userId):
+ """
+ <p>API method to delete user</p>
+
+ Parameters:
+ - domainId
+ - userId
+ """
+ self.send_deleteUser(domainId, userId)
+ return self.recv_deleteUser()
+
+ def send_deleteUser(self, domainId, userId):
+ self._oprot.writeMessageBegin('deleteUser', TMessageType.CALL, self._seqid)
+ args = deleteUser_args()
+ args.domainId = domainId
+ args.userId = userId
+ args.write(self._oprot)
+ self._oprot.writeMessageEnd()
+ self._oprot.trans.flush()
+
+ def recv_deleteUser(self):
+ iprot = self._iprot
+ (fname, mtype, rseqid) = iprot.readMessageBegin()
+ if mtype == TMessageType.EXCEPTION:
+ x = TApplicationException()
+ x.read(iprot)
+ iprot.readMessageEnd()
+ raise x
+ result = deleteUser_result()
+ result.read(iprot)
+ iprot.readMessageEnd()
+ if result.success is not None:
+ return result.success
+ if result.sre is not None:
+ raise result.sre
+ raise TApplicationException(TApplicationException.MISSING_RESULT, "deleteUser failed: unknown result")
+
+ def getUser(self, domainId, userId):
+ """
+ <p>API method to get a user</p>
+
+ Parameters:
+ - domainId
+ - userId
+ """
+ self.send_getUser(domainId, userId)
+ return self.recv_getUser()
+
+ def send_getUser(self, domainId, userId):
+ self._oprot.writeMessageBegin('getUser', TMessageType.CALL, self._seqid)
+ args = getUser_args()
+ args.domainId = domainId
+ args.userId = userId
+ args.write(self._oprot)
+ self._oprot.writeMessageEnd()
+ self._oprot.trans.flush()
+
+ def recv_getUser(self):
+ iprot = self._iprot
+ (fname, mtype, rseqid) = iprot.readMessageBegin()
+ if mtype == TMessageType.EXCEPTION:
+ x = TApplicationException()
+ x.read(iprot)
+ iprot.readMessageEnd()
+ raise x
+ result = getUser_result()
+ result.read(iprot)
+ iprot.readMessageEnd()
+ if result.success is not None:
+ return result.success
+ if result.sre is not None:
+ raise result.sre
+ raise TApplicationException(TApplicationException.MISSING_RESULT, "getUser failed: unknown result")
+
+ def getUsers(self, domainId, offset, limit):
+ """
+ <p>API method to get a list of users in a specific domain.</p>
+ <li>domainId : Domain id</li>
+ <li>offset : Starting result number</li>
+ <li>limit : Number of max results to be sent</li>
+
+ Parameters:
+ - domainId
+ - offset
+ - limit
+ """
+ self.send_getUsers(domainId, offset, limit)
+ return self.recv_getUsers()
+
+ def send_getUsers(self, domainId, offset, limit):
+ self._oprot.writeMessageBegin('getUsers', TMessageType.CALL, self._seqid)
+ args = getUsers_args()
+ args.domainId = domainId
+ args.offset = offset
+ args.limit = limit
+ args.write(self._oprot)
+ self._oprot.writeMessageEnd()
+ self._oprot.trans.flush()
+
+ def recv_getUsers(self):
+ iprot = self._iprot
+ (fname, mtype, rseqid) = iprot.readMessageBegin()
+ if mtype == TMessageType.EXCEPTION:
+ x = TApplicationException()
+ x.read(iprot)
+ iprot.readMessageEnd()
+ raise x
+ result = getUsers_result()
+ result.read(iprot)
+ iprot.readMessageEnd()
+ if result.success is not None:
+ return result.success
+ if result.sre is not None:
+ raise result.sre
+ raise TApplicationException(TApplicationException.MISSING_RESULT, "getUsers failed: unknown result")
+
+ def createGroup(self, group):
+ """
+ <p>API method to create a new group</p>
+
+ Parameters:
+ - group
+ """
+ self.send_createGroup(group)
+ return self.recv_createGroup()
+
+ def send_createGroup(self, group):
+ self._oprot.writeMessageBegin('createGroup', TMessageType.CALL, self._seqid)
+ args = createGroup_args()
+ args.group = group
+ 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.sre is not None:
+ raise result.sre
+ raise TApplicationException(TApplicationException.MISSING_RESULT, "createGroup failed: unknown result")
+
+ def updateGroup(self, group):
+ """
+ <p>API method to update a group</p>
+
+ Parameters:
+ - group
+ """
+ self.send_updateGroup(group)
+ return self.recv_updateGroup()
+
+ def send_updateGroup(self, group):
+ self._oprot.writeMessageBegin('updateGroup', TMessageType.CALL, self._seqid)
+ args = updateGroup_args()
+ args.group = group
+ args.write(self._oprot)
+ self._oprot.writeMessageEnd()
+ self._oprot.trans.flush()
+
+ def recv_updateGroup(self):
+ iprot = self._iprot
+ (fname, mtype, rseqid) = iprot.readMessageBegin()
+ if mtype == TMessageType.EXCEPTION:
+ x = TApplicationException()
+ x.read(iprot)
+ iprot.readMessageEnd()
+ raise x
+ result = updateGroup_result()
+ result.read(iprot)
+ iprot.readMessageEnd()
+ if result.success is not None:
+ return result.success
+ if result.sre is not None:
+ raise result.sre
+ raise TApplicationException(TApplicationException.MISSING_RESULT, "updateGroup failed: unknown result")
+
+ def isGroupExists(self, domainId, groupId):
+ """
+ <p>API method to check Group Exists</p>
+
+ Parameters:
+ - domainId
+ - groupId
+ """
+ self.send_isGroupExists(domainId, groupId)
+ return self.recv_isGroupExists()
+
+ def send_isGroupExists(self, domainId, groupId):
+ self._oprot.writeMessageBegin('isGroupExists', TMessageType.CALL, self._seqid)
+ args = isGroupExists_args()
+ args.domainId = domainId
+ args.groupId = groupId
+ args.write(self._oprot)
+ self._oprot.writeMessageEnd()
+ self._oprot.trans.flush()
+
+ def recv_isGroupExists(self):
+ iprot = self._iprot
+ (fname, mtype, rseqid) = iprot.readMessageBegin()
+ if mtype == TMessageType.EXCEPTION:
+ x = TApplicationException()
+ x.read(iprot)
+ iprot.readMessageEnd()
+ raise x
+ result = isGroupExists_result()
+ result.read(iprot)
+ iprot.readMessageEnd()
+ if result.success is not None:
+ return result.success
+ if result.sre is not None:
+ raise result.sre
+ raise TApplicationException(TApplicationException.MISSING_RESULT, "isGroupExists failed: unknown result")
+
+ def deleteGroup(self, domainId, groupId):
+ """
+ <p>API method to delete a group</p>
+
+ Parameters:
+ - domainId
+ - groupId
+ """
+ self.send_deleteGroup(domainId, groupId)
+ return self.recv_deleteGroup()
+
+ def send_deleteGroup(self, domainId, groupId):
+ self._oprot.writeMessageBegin('deleteGroup', TMessageType.CALL, self._seqid)
+ args = deleteGroup_args()
+ args.domainId = domainId
+ args.groupId = groupId
+ args.write(self._oprot)
+ self._oprot.writeMessageEnd()
+ self._oprot.trans.flush()
+
+ def recv_deleteGroup(self):
+ iprot = self._iprot
+ (fname, mtype, rseqid) = iprot.readMessageBegin()
+ if mtype == TMessageType.EXCEPTION:
+ x = TApplicationException()
+ x.read(iprot)
+ iprot.readMessageEnd()
+ raise x
+ result = deleteGroup_result()
+ result.read(iprot)
+ iprot.readMessageEnd()
+ if result.success is not None:
+ return result.success
+ if result.sre is not None:
+ raise result.sre
+ raise TApplicationException(TApplicationException.MISSING_RESULT, "deleteGroup failed: unknown result")
+
+ def getGroup(self, domainId, groupId):
+ """
+ <p>API method to get a group</p>
+
+ Parameters:
+ - domainId
+ - groupId
+ """
+ self.send_getGroup(domainId, groupId)
+ return self.recv_getGroup()
+
+ def send_getGroup(self, domainId, groupId):
+ self._oprot.writeMessageBegin('getGroup', TMessageType.CALL, self._seqid)
+ args = getGroup_args()
+ args.domainId = domainId
+ 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.sre is not None:
+ raise result.sre
+ raise TApplicationException(TApplicationException.MISSING_RESULT, "getGroup failed: unknown result")
+
+ def getGroups(self, domainId, offset, limit):
+ """
+ <p>API method to get groups in a domainId.</p>
+
+ Parameters:
+ - domainId
+ - offset
+ - limit
+ """
+ self.send_getGroups(domainId, offset, limit)
+ return self.recv_getGroups()
+
+ def send_getGroups(self, domainId, offset, limit):
+ self._oprot.writeMessageBegin('getGroups', TMessageType.CALL, self._seqid)
+ args = getGroups_args()
+ args.domainId = domainId
+ args.offset = offset
+ args.limit = limit
+ 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
+ raise TApplicationException(TApplicationException.MISSING_RESULT, "getGroups failed: unknown result")
+
+ def addUsersToGroup(self, domainId, userIds, groupId):
+ """
+ <p>API method to add list of users to a group</p>
+
+ Parameters:
+ - domainId
+ - userIds
+ - groupId
+ """
+ self.send_addUsersToGroup(domainId, userIds, groupId)
+ return self.recv_addUsersToGroup()
+
+ def send_addUsersToGroup(self, domainId, userIds, groupId):
+ self._oprot.writeMessageBegin('addUsersToGroup', TMessageType.CALL, self._seqid)
+ args = addUsersToGroup_args()
+ args.domainId = domainId
+ 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.sre is not None:
+ raise result.sre
+ raise TApplicationException(TApplicationException.MISSING_RESULT, "addUsersToGroup failed: unknown result")
+
+ def removeUsersFromGroup(self, domainId, userIds, groupId):
+ """
+ <p>API method to remove users from a group</p>
+
+ Parameters:
+ - domainId
+ - userIds
+ - groupId
+ """
+ self.send_removeUsersFromGroup(domainId, userIds, groupId)
+ return self.recv_removeUsersFromGroup()
+
+ def send_removeUsersFromGroup(self, domainId, userIds, groupId):
+ self._oprot.writeMessageBegin('removeUsersFromGroup', TMessageType.CALL, self._seqid)
+ args = removeUsersFromGroup_args()
+ args.domainId = domainId
+ 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.sre is not None:
+ raise result.sre
+ raise TApplicationException(TApplicationException.MISSING_RESULT, "removeUsersFromGroup failed: unknown result")
+
+ def getGroupMembersOfTypeUser(self, domainId, groupId, offset, limit):
+ """
+ <p>API method to get list of child users in a group. Only the direct members will be returned.</p>
+
+ Parameters:
+ - domainId
+ - groupId
+ - offset
+ - limit
+ """
+ self.send_getGroupMembersOfTypeUser(domainId, groupId, offset, limit)
+ return self.recv_getGroupMembersOfTypeUser()
+
+ def send_getGroupMembersOfTypeUser(self, domainId, groupId, offset, limit):
+ self._oprot.writeMessageBegin('getGroupMembersOfTypeUser', TMessageType.CALL, self._seqid)
+ args = getGroupMembersOfTypeUser_args()
+ args.domainId = domainId
+ args.groupId = groupId
+ args.offset = offset
+ args.limit = limit
+ args.write(self._oprot)
+ self._oprot.writeMessageEnd()
+ self._oprot.trans.flush()
+
+ def recv_getGroupMembersOfTypeUser(self):
+ iprot = self._iprot
+ (fname, mtype, rseqid) = iprot.readMessageBegin()
+ if mtype == TMessageType.EXCEPTION:
+ x = TApplicationException()
+ x.read(iprot)
+ iprot.readMessageEnd()
+ raise x
+ result = getGroupMembersOfTypeUser_result()
+ result.read(iprot)
+ iprot.readMessageEnd()
+ if result.success is not None:
+ return result.success
+ if result.sre is not None:
+ raise result.sre
+ raise TApplicationException(TApplicationException.MISSING_RESULT, "getGroupMembersOfTypeUser failed: unknown result")
+
+ def getGroupMembersOfTypeGroup(self, domainId, groupId, offset, limit):
+ """
+ <p>API method to get list of child groups in a group. Only the direct members will be returned.</p>
+
+ Parameters:
+ - domainId
+ - groupId
+ - offset
+ - limit
+ """
+ self.send_getGroupMembersOfTypeGroup(domainId, groupId, offset, limit)
+ return self.recv_getGroupMembersOfTypeGroup()
+
+ def send_getGroupMembersOfTypeGroup(self, domainId, groupId, offset, limit):
+ self._oprot.writeMessageBegin('getGroupMembersOfTypeGroup', TMessageType.CALL, self._seqid)
+ args = getGroupMembersOfTypeGroup_args()
+ args.domainId = domainId
+ args.groupId = groupId
+ args.offset = offset
+ args.limit = limit
+ args.write(self._oprot)
+ self._oprot.writeMessageEnd()
+ self._oprot.trans.flush()
+
+ def recv_getGroupMembersOfTypeGroup(self):
+ iprot = self._iprot
+ (fname, mtype, rseqid) = iprot.readMessageBegin()
+ if mtype == TMessageType.EXCEPTION:
+ x = TApplicationException()
+ x.read(iprot)
+ iprot.readMessageEnd()
+ raise x
+ result = getGroupMembersOfTypeGroup_result()
+ result.read(iprot)
+ iprot.readMessageEnd()
+ if result.success is not None:
+ return result.success
+ if result.sre is not None:
+ raise result.sre
+ raise TApplicationException(TApplicationException.MISSING_RESULT, "getGroupMembersOfTypeGroup failed: unknown result")
+
+ def addChildGroupsToParentGroup(self, domainId, childIds, groupId):
+ """
+ <p>API method to add a child group to a parent group.</p>
+
+ Parameters:
+ - domainId
+ - childIds
+ - groupId
+ """
+ self.send_addChildGroupsToParentGroup(domainId, childIds, groupId)
+ return self.recv_addChildGroupsToParentGroup()
+
+ def send_addChildGroupsToParentGroup(self, domainId, childIds, groupId):
+ self._oprot.writeMessageBegin('addChildGroupsToParentGroup', TMessageType.CALL, self._seqid)
+ args = addChildGroupsToParentGroup_args()
+ args.domainId = domainId
+ args.childIds = childIds
+ args.groupId = groupId
+ args.write(self._oprot)
+ self._oprot.writeMessageEnd()
+ self._oprot.trans.flush()
+
+ def recv_addChildGroupsToParentGroup(self):
+ iprot = self._iprot
+ (fname, mtype, rseqid) = iprot.readMessageBegin()
+ if mtype == TMessageType.EXCEPTION:
+ x = TApplicationException()
+ x.read(iprot)
+ iprot.readMessageEnd()
+ raise x
+ result = addChildGroupsToParentGroup_result()
+ result.read(iprot)
+ iprot.readMessageEnd()
+ if result.success is not None:
+ return result.success
+ if result.sre is not None:
+ raise result.sre
+ raise TApplicationException(TApplicationException.MISSING_RESULT, "addChildGroupsToParentGroup failed: unknown result")
+
+ def removeChildGroupFromParentGroup(self, domainId, childId, groupId):
+ """
+ <p>API method to remove a child group from parent group.</p>
+
+ Parameters:
+ - domainId
+ - childId
+ - groupId
+ """
+ self.send_removeChildGroupFromParentGroup(domainId, childId, groupId)
+ return self.recv_removeChildGroupFromParentGroup()
+
+ def send_removeChildGroupFromParentGroup(self, domainId, childId, groupId):
+ self._oprot.writeMessageBegin('removeChildGroupFromParentGroup', TMessageType.CALL, self._seqid)
+ args = removeChildGroupFromParentGroup_args()
+ args.domainId = domainId
+ args.childId = childId
+ args.groupId = groupId
+ args.write(self._oprot)
+ self._oprot.writeMessageEnd()
+ self._oprot.trans.flush()
+
+ def recv_removeChildGroupFromParentGroup(self):
+ iprot = self._iprot
+ (fname, mtype, rseqid) = iprot.readMessageBegin()
+ if mtype == TMessageType.EXCEPTION:
+ x = TApplicationException()
+ x.read(iprot)
+ iprot.readMessageEnd()
+ raise x
+ result = removeChildGroupFromParentGroup_result()
+ result.read(iprot)
+ iprot.readMessageEnd()
+ if result.success is not None:
+ return result.success
+ if result.sre is not None:
+ raise result.sre
+ raise TApplicationException(TApplicationException.MISSING_RESULT, "removeChildGroupFromParentGroup failed: unknown result")
+
+ def getAllMemberGroupsForUser(self, domainId, userId):
+ """
+ Parameters:
+ - domainId
+ - userId
+ """
+ self.send_getAllMemberGroupsForUser(domainId, userId)
+ return self.recv_getAllMemberGroupsForUser()
+
+ def send_getAllMemberGroupsForUser(self, domainId, userId):
+ self._oprot.writeMessageBegin('getAllMemberGroupsForUser', TMessageType.CALL, self._seqid)
+ args = getAllMemberGroupsForUser_args()
+ args.domainId = domainId
+ args.userId = userId
+ args.write(self._oprot)
+ self._oprot.writeMessageEnd()
+ self._oprot.trans.flush()
+
+ def recv_getAllMemberGroupsForUser(self):
+ iprot = self._iprot
+ (fname, mtype, rseqid) = iprot.readMessageBegin()
+ if mtype == TMessageType.EXCEPTION:
+ x = TApplicationException()
+ x.read(iprot)
+ iprot.readMessageEnd()
+ raise x
+ result = getAllMemberGroupsForUser_result()
+ result.read(iprot)
+ iprot.readMessageEnd()
+ if result.success is not None:
+ return result.success
+ if result.sre is not None:
+ raise result.sre
+ raise TApplicationException(TApplicationException.MISSING_RESULT, "getAllMemberGroupsForUser failed: unknown result")
+
+ def createEntityType(self, entityType):
+ """
+ <p>API method to create a new entity type</p>
+
+ Parameters:
+ - entityType
+ """
+ self.send_createEntityType(entityType)
+ return self.recv_createEntityType()
+
+ def send_createEntityType(self, entityType):
+ self._oprot.writeMessageBegin('createEntityType', TMessageType.CALL, self._seqid)
+ args = createEntityType_args()
+ args.entityType = entityType
+ args.write(self._oprot)
+ self._oprot.writeMessageEnd()
+ self._oprot.trans.flush()
+
+ def recv_createEntityType(self):
+ iprot = self._iprot
+ (fname, mtype, rseqid) = iprot.readMessageBegin()
+ if mtype == TMessageType.EXCEPTION:
+ x = TApplicationException()
+ x.read(iprot)
+ iprot.readMessageEnd()
+ raise x
+ result = createEntityType_result()
+ result.read(iprot)
+ iprot.readMessageEnd()
+ if result.success is not None:
+ return result.success
+ if result.sre is not None:
+ raise result.sre
+ if result.dee is not None:
+ raise result.dee
+ raise TApplicationException(TApplicationException.MISSING_RESULT, "createEntityType failed: unknown result")
+
+ def updateEntityType(self, entityType):
+ """
+ <p>API method to update entity type</p>
+
+ Parameters:
+ - entityType
+ """
+ self.send_updateEntityType(entityType)
+ return self.recv_updateEntityType()
+
+ def send_updateEntityType(self, entityType):
+ self._oprot.writeMessageBegin('updateEntityType', TMessageType.CALL, self._seqid)
+ args = updateEntityType_args()
+ args.entityType = entityType
+ args.write(self._oprot)
+ self._oprot.writeMessageEnd()
+ self._oprot.trans.flush()
+
+ def recv_updateEntityType(self):
+ iprot = self._iprot
+ (fname, mtype, rseqid) = iprot.readMessageBegin()
+ if mtype == TMessageType.EXCEPTION:
+ x = TApplicationException()
+ x.read(iprot)
+ iprot.readMessageEnd()
+ raise x
+ result = updateEntityType_result()
+ result.read(iprot)
+ iprot.readMessageEnd()
+ if result.success is not None:
+ return result.success
+ if result.sre is not None:
+ raise result.sre
+ raise TApplicationException(TApplicationException.MISSING_RESULT, "updateEntityType failed: unknown result")
+
+ def isEntityTypeExists(self, domainId, entityTypeId):
+ """
+ <p>API method to check EntityType Exists</p>
+
+ Parameters:
+ - domainId
+ - entityTypeId
+ """
+ self.send_isEntityTypeExists(domainId, entityTypeId)
+ return self.recv_isEntityTypeExists()
+
+ def send_isEntityTypeExists(self, domainId, entityTypeId):
+ self._oprot.writeMessageBegin('isEntityTypeExists', TMessageType.CALL, self._seqid)
+ args = isEntityTypeExists_args()
+ args.domainId = domainId
+ args.entityTypeId = entityTypeId
+ args.write(self._oprot)
+ self._oprot.writeMessageEnd()
+ self._oprot.trans.flush()
+
+ def recv_isEntityTypeExists(self):
+ iprot = self._iprot
+ (fname, mtype, rseqid) = iprot.readMessageBegin()
+ if mtype == TMessageType.EXCEPTION:
+ x = TApplicationException()
+ x.read(iprot)
+ iprot.readMessageEnd()
+ raise x
+ result = isEntityTypeExists_result()
+ result.read(iprot)
+ iprot.readMessageEnd()
+ if result.success is not None:
+ return result.success
+ if result.sre is not None:
+ raise result.sre
+ raise TApplicationException(TApplicationException.MISSING_RESULT, "isEntityTypeExists failed: unknown result")
+
+ def deleteEntityType(self, domainId, entityTypeId):
+ """
+ <p>API method to delete entity type</p>
+
+ Parameters:
+ - domainId
+ - entityTypeId
+ """
+ self.send_deleteEntityType(domainId, entityTypeId)
+ return self.recv_deleteEntityType()
+
+ def send_deleteEntityType(self, domainId, entityTypeId):
+ self._oprot.writeMessageBegin('deleteEntityType', TMessageType.CALL, self._seqid)
+ args = deleteEntityType_args()
+ args.domainId = domainId
+ args.entityTypeId = entityTypeId
+ args.write(self._oprot)
+ self._oprot.writeMessageEnd()
+ self._oprot.trans.flush()
+
+ def recv_deleteEntityType(self):
+ iprot = self._iprot
+ (fname, mtype, rseqid) = iprot.readMessageBegin()
+ if mtype == TMessageType.EXCEPTION:
+ x = TApplicationException()
+ x.read(iprot)
+ iprot.readMessageEnd()
+ raise x
+ result = deleteEntityType_result()
+ result.read(iprot)
+ iprot.readMessageEnd()
+ if result.success is not None:
+ return result.success
+ if result.sre is not None:
+ raise result.sre
+ raise TApplicationException(TApplicationException.MISSING_RESULT, "deleteEntityType failed: unknown result")
+
+ def getEntityType(self, domainId, entityTypeId):
+ """
+ <p>API method to get an entity type</p>
+
+ Parameters:
+ - domainId
+ - entityTypeId
+ """
+ self.send_getEntityType(domainId, entityTypeId)
+ return self.recv_getEntityType()
+
+ def send_getEntityType(self, domainId, entityTypeId):
+ self._oprot.writeMessageBegin('getEntityType', TMessageType.CALL, self._seqid)
+ args = getEntityType_args()
+ args.domainId = domainId
+ args.entityTypeId = entityTypeId
+ args.write(self._oprot)
+ self._oprot.writeMessageEnd()
+ self._oprot.trans.flush()
+
+ def recv_getEntityType(self):
+ iprot = self._iprot
+ (fname, mtype, rseqid) = iprot.readMessageBegin()
+ if mtype == TMessageType.EXCEPTION:
+ x = TApplicationException()
+ x.read(iprot)
+ iprot.readMessageEnd()
+ raise x
+ result = getEntityType_result()
+ result.read(iprot)
+ iprot.readMessageEnd()
+ if result.success is not None:
+ return result.success
+ if result.sre is not None:
+ raise result.sre
+ raise TApplicationException(TApplicationException.MISSING_RESULT, "getEntityType failed: unknown result")
+
+ def getEntityTypes(self, domainId, offset, limit):
+ """
+ <p>API method to get entity types in a domainId.</p>
+
+ Parameters:
+ - domainId
+ - offset
+ - limit
+ """
+ self.send_getEntityTypes(domainId, offset, limit)
+ return self.recv_getEntityTypes()
+
+ def send_getEntityTypes(self, domainId, offset, limit):
+ self._oprot.writeMessageBegin('getEntityTypes', TMessageType.CALL, self._seqid)
+ args = getEntityTypes_args()
+ args.domainId = domainId
+ args.offset = offset
+ args.limit = limit
+ args.write(self._oprot)
+ self._oprot.writeMessageEnd()
+ self._oprot.trans.flush()
+
+ def recv_getEntityTypes(self):
+ iprot = self._iprot
+ (fname, mtype, rseqid) = iprot.readMessageBegin()
+ if mtype == TMessageType.EXCEPTION:
+ x = TApplicationException()
+ x.read(iprot)
+ iprot.readMessageEnd()
+ raise x
+ result = getEntityTypes_result()
+ result.read(iprot)
+ iprot.readMessageEnd()
+ if result.success is not None:
+ return result.success
+ if result.sre is not None:
+ raise result.sre
+ raise TApplicationException(TApplicationException.MISSING_RESULT, "getEntityTypes failed: unknown result")
+
+ def createEntity(self, entity):
+ """
+ <p>API method to register new entity</p>
+
+ Parameters:
+ - entity
+ """
+ self.send_createEntity(entity)
+ return self.recv_createEntity()
+
+ def send_createEntity(self, entity):
+ self._oprot.writeMessageBegin('createEntity', TMessageType.CALL, self._seqid)
+ args = createEntity_args()
+ args.entity = entity
+ args.write(self._oprot)
+ self._oprot.writeMessageEnd()
+ self._oprot.trans.flush()
+
+ def recv_createEntity(self):
+ iprot = self._iprot
+ (fname, mtype, rseqid) = iprot.readMessageBegin()
+ if mtype == TMessageType.EXCEPTION:
+ x = TApplicationException()
+ x.read(iprot)
+ iprot.readMessageEnd()
+ raise x
+ result = createEntity_result()
+ result.read(iprot)
+ iprot.readMessageEnd()
+ if result.success is not None:
+ return result.success
+ if result.sre is not None:
+ raise result.sre
+ raise TApplicationException(TApplicationException.MISSING_RESULT, "createEntity failed: unknown result")
+
+ def updateEntity(self, entity):
+ """
+ <p>API method to update entity</p>
+
+ Parameters:
+ - entity
+ """
+ self.send_updateEntity(entity)
+ return self.recv_updateEntity()
+
+ def send_updateEntity(self, entity):
+ self._oprot.writeMessageBegin('updateEntity', TMessageType.CALL, self._seqid)
+ args = updateEntity_args()
+ args.entity = entity
+ args.write(self._oprot)
+ self._oprot.writeMessageEnd()
+ self._oprot.trans.flush()
+
+ def recv_updateEntity(self):
+ iprot = self._iprot
+ (fname, mtype, rseqid) = iprot.readMessageBegin()
+ if mtype == TMessageType.EXCEPTION:
+ x = TApplicationException()
+ x.read(iprot)
+ iprot.readMessageEnd()
+ raise x
+ result = updateEntity_result()
+ result.read(iprot)
+ iprot.readMessageEnd()
+ if result.success is not None:
+ return result.success
+ if result.sre is not None:
+ raise result.sre
+ raise TApplicationException(TApplicationException.MISSING_RESULT, "updateEntity failed: unknown result")
+
+ def isEntityExists(self, domainId, entityId):
+ """
+ <p>API method to check Entity Exists</p>
+
+ Parameters:
+ - domainId
+ - entityId
+ """
+ self.send_isEntityExists(domainId, entityId)
+ return self.recv_isEntityExists()
+
+ def send_isEntityExists(self, domainId, entityId):
+ self._oprot.writeMessageBegin('isEntityExists', TMessageType.CALL, self._seqid)
+ args = isEntityExists_args()
+ args.domainId = domainId
+ args.entityId = entityId
+ args.write(self._oprot)
+ self._oprot.writeMessageEnd()
+ self._oprot.trans.flush()
+
+ def recv_isEntityExists(self):
+ iprot = self._iprot
+ (fname, mtype, rseqid) = iprot.readMessageBegin()
+ if mtype == TMessageType.EXCEPTION:
+ x = TApplicationException()
+ x.read(iprot)
+ iprot.readMessageEnd()
+ raise x
+ result = isEntityExists_result()
+ result.read(iprot)
+ iprot.readMessageEnd()
+ if result.success is not None:
+ return result.success
+ if result.sre is not None:
+ raise result.sre
+ raise TApplicationException(TApplicationException.MISSING_RESULT, "isEntityExists failed: unknown result")
+
+ def deleteEntity(self, domainId, entityId):
+ """
+ <p>API method to delete entity</p>
+
+ Parameters:
+ - domainId
+ - entityId
+ """
+ self.send_deleteEntity(domainId, entityId)
+ return self.recv_deleteEntity()
+
+ def send_deleteEntity(self, domainId, entityId):
+ self._oprot.writeMessageBegin('deleteEntity', TMessageType.CALL, self._seqid)
+ args = deleteEntity_args()
+ args.domainId = domainId
+ args.entityId = entityId
+ args.write(self._oprot)
+ self._oprot.writeMessageEnd()
+ self._oprot.trans.flush()
+
+ def recv_deleteEntity(self):
+ iprot = self._iprot
+ (fname, mtype, rseqid) = iprot.readMessageBegin()
+ if mtype == TMessageType.EXCEPTION:
+ x = TApplicationException()
+ x.read(iprot)
+ iprot.readMessageEnd()
+ raise x
+ result = deleteEntity_result()
+ result.read(iprot)
+ iprot.readMessageEnd()
+ if result.success is not None:
+ return result.success
+ if result.sre is not None:
+ raise result.sre
+ raise TApplicationException(TApplicationException.MISSING_RESULT, "deleteEntity failed: unknown result")
+
+ def getEntity(self, domainId, entityId):
+ """
+ <p>API method to get entity</p>
+
+ Parameters:
+ - domainId
+ - entityId
+ """
+ self.send_getEntity(domainId, entityId)
+ return self.recv_getEntity()
+
+ def send_getEntity(self, domainId, entityId):
+ self._oprot.writeMessageBegin('getEntity', TMessageType.CALL, self._seqid)
+ args = getEntity_args()
+ args.domainId = domainId
+ args.entityId = entityId
+ args.write(self._oprot)
+ self._oprot.writeMessageEnd()
+ self._oprot.trans.flush()
+
+ def recv_getEntity(self):
+ iprot = self._iprot
+ (fname, mtype, rseqid) = iprot.readMessageBegin()
+ if mtype == TMessageType.EXCEPTION:
+ x = TApplicationException()
+ x.read(iprot)
+ iprot.readMessageEnd()
+ raise x
+ result = getEntity_result()
+ result.read(iprot)
+ iprot.readMessageEnd()
+ if result.success is not None:
+ return result.success
+ if result.sre is not None:
+ raise result.sre
+ raise TApplicationException(TApplicationException.MISSING_RESULT, "getEntity failed: unknown result")
+
+ def searchEntities(self, domainId, userId, filters, offset, limit):
+ """
+ <p>API method to search entities</p>
+
+ Parameters:
+ - domainId
+ - userId
+ - filters
+ - offset
+ - limit
+ """
+ self.send_searchEntities(domainId, userId, filters, offset, limit)
+ return self.recv_searchEntities()
+
+ def send_searchEntities(self, domainId, userId, filters, offset, limit):
+ self._oprot.writeMessageBegin('searchEntities', TMessageType.CALL, self._seqid)
+ args = searchEntities_args()
+ args.domainId = domainId
+ args.userId = userId
+ args.filters = filters
+ args.offset = offset
+ args.limit = limit
+ args.write(self._oprot)
+ self._oprot.writeMessageEnd()
+ self._oprot.trans.flush()
+
+ def recv_searchEntities(self):
+ iprot = self._iprot
+ (fname, mtype, rseqid) = iprot.readMessageBegin()
+ if mtype == TMessageType.EXCEPTION:
+ x = TApplicationException()
+ x.read(iprot)
+ iprot.readMessageEnd()
+ raise x
+ result = searchEntities_result()
+ result.read(iprot)
+ iprot.readMessageEnd()
+ if result.success is not None:
+ return result.success
+ if result.sre is not None:
+ raise result.sre
+ raise TApplicationException(TApplicationException.MISSING_RESULT, "searchEntities failed: unknown result")
+
+ def getListOfSharedUsers(self, domainId, entityId, permissionTypeId):
+ """
+ <p>API method to get a list of shared users given the entity id</p>
+
+ Parameters:
+ - domainId
+ - entityId
+ - permissionTypeId
+ """
+ self.send_getListOfSharedUsers(domainId, entityId, permissionTypeId)
+ return self.recv_getListOfSharedUsers()
+
+ def send_getListOfSharedUsers(self, domainId, entityId, permissionTypeId):
+ self._oprot.writeMessageBegin('getListOfSharedUsers', TMessageType.CALL, self._seqid)
+ args = getListOfSharedUsers_args()
+ args.domainId = domainId
+ args.entityId = entityId
+ args.permissionTypeId = permissionTypeId
+ args.write(self._oprot)
+ self._oprot.writeMessageEnd()
+ self._oprot.trans.flush()
+
+ def recv_getListOfSharedUsers(self):
+ iprot = self._iprot
+ (fname, mtype, rseqid) = iprot.readMessageBegin()
+ if mtype == TMessageType.EXCEPTION:
+ x = TApplicationException()
+ x.read(iprot)
+ iprot.readMessageEnd()
+ raise x
+ result = getListOfSharedUsers_result()
+ result.read(iprot)
+ iprot.readMessageEnd()
+ if result.success is not None:
+ return result.success
+ if result.sre is not None:
+ raise result.sre
+ raise TApplicationException(TApplicationException.MISSING_RESULT, "getListOfSharedUsers failed: unknown result")
+
+ def getListOfSharedGroups(self, domainId, entityId, permissionTypeId):
+ """
+ <p>API method to get a list of shared groups given the entity id</p>
+
+ Parameters:
+ - domainId
+ - entityId
+ - permissionTypeId
+ """
+ self.send_getListOfSharedGroups(domainId, entityId, permissionTypeId)
+ return self.recv_getListOfSharedGroups()
+
+ def send_getListOfSharedGroups(self, domainId, entityId, permissionTypeId):
+ self._oprot.writeMessageBegin('getListOfSharedGroups', TMessageType.CALL, self._seqid)
+ args = getListOfSharedGroups_args()
+ args.domainId = domainId
+ args.entityId = entityId
+ args.permissionTypeId = permissionTypeId
+ args.write(self._oprot)
+ self._oprot.writeMessageEnd()
+ self._oprot.trans.flush()
+
+ def recv_getListOfSharedGroups(self):
+ iprot = self._iprot
+ (fname, mtype, rseqid) = iprot.readMessageBegin()
+ if mtype == TMessageType.EXCEPTION:
+ x = TApplicationException()
+ x.read(iprot)
+ iprot.readMessageEnd()
+ raise x
+ result = getListOfSharedGroups_result()
+ result.read(iprot)
+ iprot.readMessageEnd()
+ if result.success is not None:
+ return result.success
+ if result.sre is not None:
+ raise result.sre
+ raise TApplicationException(TApplicationException.MISSING_RESULT, "getListOfSharedGroups failed: unknown result")
+
+ def createPermissionType(self, permissionType):
+ """
+ <p>API method to create permission type</p>
+
+ Parameters:
+ - permissionType
+ """
+ self.send_createPermissionType(permissionType)
+ return self.recv_createPermissionType()
+
+ def send_createPermissionType(self, permissionType):
+ self._oprot.writeMessageBegin('createPermissionType', TMessageType.CALL, self._seqid)
+ args = createPermissionType_args()
+ args.permissionType = permissionType
+ args.write(self._oprot)
+ self._oprot.writeMessageEnd()
+ self._oprot.trans.flush()
+
+ def recv_createPermissionType(self):
+ iprot = self._iprot
+ (fname, mtype, rseqid) = iprot.readMessageBegin()
+ if mtype == TMessageType.EXCEPTION:
+ x = TApplicationException()
+ x.read(iprot)
+ iprot.readMessageEnd()
+ raise x
+ result = createPermissionType_result()
+ result.read(iprot)
+ iprot.readMessageEnd()
+ if result.success is not None:
+ return result.success
+ if result.sre is not None:
+ raise result.sre
+ if result.dee is not None:
+ raise result.dee
+ raise TApplicationException(TApplicationException.MISSING_RESULT, "createPermissionType failed: unknown result")
+
+ def updatePermissionType(self, permissionType):
+ """
+ <p>API method to update permission type</p>
+
+ Parameters:
+ - permissionType
+ """
+ self.send_updatePermissionType(permissionType)
+ return self.recv_updatePermissionType()
+
+ def send_updatePermissionType(self, permissionType):
+ self._oprot.writeMessageBegin('updatePermissionType', TMessageType.CALL, self._seqid)
+ args = updatePermissionType_args()
+ args.permissionType = permissionType
+ args.write(self._oprot)
+ self._oprot.writeMessageEnd()
+ self._oprot.trans.flush()
+
+ def recv_updatePermissionType(self):
+ iprot = self._iprot
+ (fname, mtype, rseqid) = iprot.readMessageBegin()
+ if mtype == TMessageType.EXCEPTION:
+ x = TApplicationException()
+ x.read(iprot)
+ iprot.readMessageEnd()
+ raise x
+ result = updatePermissionType_result()
+ result.read(iprot)
+ iprot.readMessageEnd()
+ if result.success is not None:
+ return result.success
+ if result.sre is not None:
+ raise result.sre
+ raise TApplicationException(TApplicationException.MISSING_RESULT, "updatePermissionType failed: unknown result")
+
+ def isPermissionExists(self, dimainId, permissionId):
+ """
+ <p>API method to check Permission Exists</p>
+
+ Parameters:
+ - dimainId
+ - permissionId
+ """
+ self.send_isPermissionExists(dimainId, permissionId)
+ return self.recv_isPermissionExists()
+
+ def send_isPermissionExists(self, dimainId, permissionId):
+ self._oprot.writeMessageBegin('isPermissionExists', TMessageType.CALL, self._seqid)
+ args = isPermissionExists_args()
+ args.dimainId = dimainId
+ args.permissionId = permissionId
+ args.write(self._oprot)
+ self._oprot.writeMessageEnd()
+ self._oprot.trans.flush()
+
+ def recv_isPermissionExists(self):
+ iprot = self._iprot
+ (fname, mtype, rseqid) = iprot.readMessageBegin()
+ if mtype == TMessageType.EXCEPTION:
+ x = TApplicationException()
+ x.read(iprot)
+ iprot.readMessageEnd()
+ raise x
+ result = isPermissionExists_result()
+ result.read(iprot)
+ iprot.readMessageEnd()
+ if result.success is not None:
+ return result.success
+ if result.sre is not None:
+ raise result.sre
+ raise TApplicationException(TApplicationException.MISSING_RESULT, "isPermissionExists failed: unknown result")
+
+ def deletePermissionType(self, domainId, permissionTypeId):
+ """
+ <p>API method to delete permission type</p>
+
+ Parameters:
+ - domainId
+ - permissionTypeId
+ """
+ self.send_deletePermissionType(domainId, permissionTypeId)
+ return self.recv_deletePermissionType()
+
+ def send_deletePermissionType(self, domainId, permissionTypeId):
+ self._oprot.writeMessageBegin('deletePermissionType', TMessageType.CALL, self._seqid)
+ args = deletePermissionType_args()
+ args.domainId = domainId
+ args.permissionTypeId = permissionTypeId
+ args.write(self._oprot)
+ self._oprot.writeMessageEnd()
+ self._oprot.trans.flush()
+
+ def recv_deletePermissionType(self):
+ iprot = self._iprot
+ (fname, mtype, rseqid) = iprot.readMessageBegin()
+ if mtype == TMessageType.EXCEPTION:
+ x = TApplicationException()
+ x.read(iprot)
+ iprot.readMessageEnd()
+ raise x
+ result = deletePermissionType_result()
+ result.read(iprot)
+ iprot.readMessageEnd()
+ if result.success is not None:
+ return result.success
+ if result.sre is not None:
+ raise result.sre
+ raise TApplicationException(TApplicationException.MISSING_RESULT, "deletePermissionType failed: unknown result")
+
+ def getPermissionType(self, domainId, permissionTypeId):
+ """
+ <p>API method to get permission type</p>
+
+ Parameters:
+ - domainId
+ - permissionTypeId
+ """
+ self.send_getPermissionType(domainId, permissionTypeId)
+ return self.recv_getPermissionType()
+
+ def send_getPermissionType(self, domainId, permissionTypeId):
+ self._oprot.writeMessageBegin('getPermissionType', TMessageType.CALL, self._seqid)
+ args = getPermissionType_args()
+ args.domainId = domainId
+ args.permissionTypeId = permissionTypeId
+ args.write(self._oprot)
+ self._oprot.writeMessageEnd()
+ self._oprot.trans.flush()
+
+ def recv_getPermissionType(self):
+ iprot = self._iprot
+ (fname, mtype, rseqid) = iprot.readMessageBegin()
+ if mtype == TMessageType.EXCEPTION:
+ x = TApplicationException()
+ x.read(iprot)
+ iprot.readMessageEnd()
+ raise x
+ result = getPermissionType_result()
+ result.read(iprot)
+ iprot.readMessageEnd()
+ if result.success is not None:
+ return result.success
+ if result.sre is not None:
+ raise result.sre
+ raise TApplicationException(TApplicationException.MISSING_RESULT, "getPermissionType failed: unknown result")
+
+ def getPermissionTypes(self, domainId, offset, limit):
+ """
+ <p>API method to get list of permission types in a given domainId.</p>
+
+ Parameters:
+ - domainId
+ - offset
+ - limit
+ """
+ self.send_getPermissionTypes(domainId, offset, limit)
+ return self.recv_getPermissionTypes()
+
+ def send_getPermissionTypes(self, domainId, offset, limit):
+ self._oprot.writeMessageBegin('getPermissionTypes', TMessageType.CALL, self._seqid)
+ args = getPermissionTypes_args()
+ args.domainId = domainId
+ args.offset = offset
+ args.limit = limit
+ args.write(self._oprot)
+ self._oprot.writeMessageEnd()
+ self._oprot.trans.flush()
+
+ def recv_getPermissionTypes(self):
+ iprot = self._iprot
+ (fname, mtype, rseqid) = iprot.readMessageBegin()
+ if mtype == TMessageType.EXCEPTION:
+ x = TApplicationException()
+ x.read(iprot)
+ iprot.readMessageEnd()
+ raise x
+ result = getPermissionTypes_result()
+ result.read(iprot)
+ iprot.readMessageEnd()
+ if result.success is not None:
+ return result.success
+ if result.sre is not None:
+ raise result.sre
+ raise TApplicationException(TApplicationException.MISSING_RESULT, "getPermissionTypes failed: unknown result")
+
+ def shareEntityWithUsers(self, domainId, entityId, userList, perssionTypeId, cascadePermission):
+ """
+ <p>API method to share an entity with users</p>
+
+ Parameters:
+ - domainId
+ - entityId
+ - userList
+ - perssionTypeId
+ - cascadePermission
+ """
+ self.send_shareEntityWithUsers(domainId, entityId, userList, perssionTypeId, cascadePermission)
+ return self.recv_shareEntityWithUsers()
+
+ def send_shareEntityWithUsers(self, domainId, entityId, userList, perssionTypeId, cascadePermission):
+ self._oprot.writeMessageBegin('shareEntityWithUsers', TMessageType.CALL, self._seqid)
+ args = shareEntityWithUsers_args()
+ args.domainId = domainId
+ args.entityId = entityId
+ args.userList = userList
+ args.perssionTypeId = perssionTypeId
+ args.cascadePermission = cascadePermission
+ args.write(self._oprot)
+ self._oprot.writeMessageEnd()
+ self._oprot.trans.flush()
+
+ def recv_shareEntityWithUsers(self):
+ iprot = self._iprot
+ (fname, mtype, rseqid) = iprot.readMessageBegin()
+ if mtype == TMessageType.EXCEPTION:
+ x = TApplicationException()
+ x.read(iprot)
+ iprot.readMessageEnd()
+ raise x
+ result = shareEntityWithUsers_result()
+ result.read(iprot)
+ iprot.readMessageEnd()
+ if result.success is not None:
+ return result.success
+ if result.sre is not None:
+ raise result.sre
+ raise TApplicationException(TApplicationException.MISSING_RESULT, "shareEntityWithUsers failed: unknown result")
+
+ def revokeEntitySharingFromUsers(self, domainId, entityId, userList, perssionTypeId):
+ """
+ <p>API method to revoke sharing from a list of users</p>
+
+ Parameters:
+ - domainId
+ - entityId
+ - userList
+ - perssionTypeId
+ """
+ self.send_revokeEntitySharingFromUsers(domainId, entityId, userList, perssionTypeId)
+ return self.recv_revokeEntitySharingFromUsers()
+
+ def send_revokeEntitySharingFromUsers(self, domainId, entityId, userList, perssionTypeId):
+ self._oprot.writeMessageBegin('revokeEntitySharingFromUsers', TMessageType.CALL, self._seqid)
+ args = revokeEntitySharingFromUsers_args()
+ args.domainId = domainId
+ args.entityId = entityId
+ args.userList = userList
+ args.perssionTypeId = perssionTypeId
+ args.write(self._oprot)
+ self._oprot.writeMessageEnd()
+ self._oprot.trans.flush()
+
+ def recv_revokeEntitySharingFromUsers(self):
+ iprot = self._iprot
+ (fname, mtype, rseqid) = iprot.readMessageBegin()
+ if mtype == TMessageType.EXCEPTION:
+ x = TApplicationException()
+ x.read(iprot)
+ iprot.readMessageEnd()
+ raise x
+ result = revokeEntitySharingFromUsers_result()
+ result.read(iprot)
+ iprot.readMessageEnd()
+ if result.success is not None:
+ return result.success
+ if result.sre is not None:
+ raise result.sre
+ raise TApplicationException(TApplicationException.MISSING_RESULT, "revokeEntitySharingFromUsers failed: unknown result")
+
+ def shareEntityWithGroups(self, domainId, entityId, groupList, perssionTypeId, cascadePermission):
+ """
+ <p>API method to share an entity with list of groups</p>
+
+ Parameters:
+ - domainId
+ - entityId
+ - groupList
+ - perssionTypeId
+ - cascadePermission
+ """
+ self.send_shareEntityWithGroups(domainId, entityId, groupList, perssionTypeId, cascadePermission)
+ return self.recv_shareEntityWithGroups()
+
+ def send_shareEntityWithGroups(self, domainId, entityId, groupList, perssionTypeId, cascadePermission):
+ self._oprot.writeMessageBegin('shareEntityWithGroups', TMessageType.CALL, self._seqid)
+ args = shareEntityWithGroups_args()
+ args.domainId = domainId
+ args.entityId = entityId
+ args.groupList = groupList
+ args.perssionTypeId = perssionTypeId
+ args.cascadePermission = cascadePermission
+ args.write(self._oprot)
+ self._oprot.writeMessageEnd()
+ self._oprot.trans.flush()
+
+ def recv_shareEntityWithGroups(self):
+ iprot = self._iprot
+ (fname, mtype, rseqid) = iprot.readMessageBegin()
+ if mtype == TMessageType.EXCEPTION:
+ x = TApplicationException()
+ x.read(iprot)
+ iprot.readMessageEnd()
+ raise x
+ result = shareEntityWithGroups_result()
+ result.read(iprot)
+ iprot.readMessageEnd()
+ if result.success is not None:
+ return result.success
+ if result.sre is not None:
+ raise result.sre
+ raise TApplicationException(TApplicationException.MISSING_RESULT, "shareEntityWithGroups failed: unknown result")
+
+ def revokeEntitySharingFromGroups(self, domainId, entityId, groupList, perssionTypeId):
+ """
+ <p>API method to revoke sharing from list of users</p>
+
+ Parameters:
+ - domainId
+ - entityId
+ - groupList
+ - perssionTypeId
+ """
+ self.send_revokeEntitySharingFromGroups(domainId, entityId, groupList, perssionTypeId)
+ return self.recv_revokeEntitySharingFromGroups()
+
+ def send_revokeEntitySharingFromGroups(self, domainId, entityId, groupList, perssionTypeId):
+ self._oprot.writeMessageBegin('revokeEntitySharingFromGroups', TMessageType.CALL, self._seqid)
+ args = revokeEntitySharingFromGroups_args()
+ args.domainId = domainId
+ args.entityId = entityId
+ args.groupList = groupList
+ args.perssionTypeId = perssionTypeId
+ args.write(self._oprot)
+ self._oprot.writeMessageEnd()
+ self._oprot.trans.flush()
+
+ def recv_revokeEntitySharingFromGroups(self):
+ iprot = self._iprot
+ (fname, mtype, rseqid) = iprot.readMessageBegin()
+ if mtype == TMessageType.EXCEPTION:
+ x = TApplicationException()
+ x.read(iprot)
+ iprot.readMessageEnd()
+ raise x
+ result = revokeEntitySharingFromGroups_result()
+ result.read(iprot)
+ iprot.readMessageEnd()
+ if result.success is not None:
+ return result.success
+ if result.sre is not None:
+ raise result.sre
+ raise TApplicationException(TApplicationException.MISSING_RESULT, "revokeEntitySharingFromGroups failed: unknown result")
+
+ def userHasAccess(self, domainId, userId, entityId, permissionTypeId):
+ """
+ <p>API method to check whether a user has access to a specific entity</p>
+
+ Parameters:
+ - domainId
+ - userId
+ - entityId
+ - permissionTypeId
+ """
+ self.send_userHasAccess(domainId, userId, entityId, permissionTypeId)
+ return self.recv_userHasAccess()
+
+ def send_userHasAccess(self, domainId, userId, entityId, permissionTypeId):
+ self._oprot.writeMessageBegin('userHasAccess', TMessageType.CALL, self._seqid)
+ args = userHasAccess_args()
+ args.domainId = domainId
+ args.userId = userId
+ args.entityId = entityId
+ args.permissionTypeId = permissionTypeId
+ args.write(self._oprot)
+ self._oprot.writeMessageEnd()
+ self._oprot.trans.flush()
+
+ def recv_userHasAccess(self):
+ iprot = self._iprot
+ (fname, mtype, rseqid) = iprot.readMessageBegin()
+ if mtype == TMessageType.EXCEPTION:
+ x = TApplicationException()
+ x.read(iprot)
+ iprot.readMessageEnd()
+ raise x
+ result = userHasAccess_result()
+ result.read(iprot)
+ iprot.readMessageEnd()
+ if result.success is not None:
+ return result.success
+ if result.sre is not None:
+ raise result.sre
+ raise TApplicationException(TApplicationException.MISSING_RESULT, "userHasAccess failed: unknown result")
- Parameters:
- - domain
- """
- pass
- def isDomainExists(self, domainId):
- """
- <p>API method to check Domain Exists</p>
+class Processor(Iface, TProcessor):
+ def __init__(self, handler):
+ self._handler = handler
+ self._processMap = {}
+ self._processMap["createDomain"] = Processor.process_createDomain
+ self._processMap["updateDomain"] = Processor.process_updateDomain
+ self._processMap["isDomainExists"] = Processor.process_isDomainExists
+ self._processMap["deleteDomain"] = Processor.process_deleteDomain
+ self._processMap["getDomain"] = Processor.process_getDomain
+ self._processMap["getDomains"] = Processor.process_getDomains
+ self._processMap["createUser"] = Processor.process_createUser
+ self._processMap["updatedUser"] = Processor.process_updatedUser
+ self._processMap["isUserExists"] = Processor.process_isUserExists
+ self._processMap["deleteUser"] = Processor.process_deleteUser
+ self._processMap["getUser"] = Processor.process_getUser
+ self._processMap["getUsers"] = Processor.process_getUsers
+ self._processMap["createGroup"] = Processor.process_createGroup
+ self._processMap["updateGroup"] = Processor.process_updateGroup
+ self._processMap["isGroupExists"] = Processor.process_isGroupExists
+ self._processMap["deleteGroup"] = Processor.process_deleteGroup
+ self._processMap["getGroup"] = Processor.process_getGroup
+ self._processMap["getGroups"] = Processor.process_getGroups
+ self._processMap["addUsersToGroup"] = Processor.process_addUsersToGroup
+ self._processMap["removeUsersFromGroup"] = Processor.process_removeUsersFromGroup
+ self._processMap["getGroupMembersOfTypeUser"] = Processor.process_getGroupMembersOfTypeUser
+ self._processMap["getGroupMembersOfTypeGroup"] = Processor.process_getGroupMembersOfTypeGroup
+ self._processMap["addChildGroupsToParentGroup"] = Processor.process_addChildGroupsToParentGroup
+ self._processMap["removeChildGroupFromParentGroup"] = Processor.process_removeChildGroupFromParentGroup
+ self._processMap["getAllMemberGroupsForUser"] = Processor.process_getAllMemberGroupsForUser
+ self._processMap["createEntityType"] = Processor.process_createEntityType
+ self._processMap["updateEntityType"] = Processor.process_updateEntityType
+ self._processMap["isEntityTypeExists"] = Processor.process_isEntityTypeExists
+ self._processMap["deleteEntityType"] = Processor.process_deleteEntityType
+ self._processMap["getEntityType"] = Processor.process_getEntityType
+ self._processMap["getEntityTypes"] = Processor.process_getEntityTypes
+ self._processMap["createEntity"] = Processor.process_createEntity
+ self._processMap["updateEntity"] = Processor.process_updateEntity
+ self._processMap["isEntityExists"] = Processor.process_isEntityExists
+ self._processMap["deleteEntity"] = Processor.process_deleteEntity
+ self._processMap["getEntity"] = Processor.process_getEntity
+ self._processMap["searchEntities"] = Processor.process_searchEntities
+ self._processMap["getListOfSharedUsers"] = Processor.process_getListOfSharedUsers
+ self._processMap["getListOfSharedGroups"] = Processor.process_getListOfSharedGroups
+ self._processMap["createPermissionType"] = Processor.process_createPermissionType
+ self._processMap["updatePermissionType"] = Processor.process_updatePermissionType
+ self._processMap["isPermissionExists"] = Processor.process_isPermissionExists
+ self._processMap["deletePermissionType"] = Processor.process_deletePermissionType
+ self._processMap["getPermissionType"] = Processor.process_getPermissionType
+ self._processMap["getPermissionTypes"] = Processor.process_getPermissionTypes
+ self._processMap["shareEntityWithUsers"] = Processor.process_shareEntityWithUsers
+ self._processMap["revokeEntitySharingFromUsers"] = Processor.process_revokeEntitySharingFromUsers
+ self._processMap["shareEntityWithGroups"] = Processor.process_shareEntityWithGroups
+ self._processMap["revokeEntitySharingFromGroups"] = Processor.process_revokeEntitySharingFromGroups
+ self._processMap["userHasAccess"] = Processor.process_userHasAccess
+
+ 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_createDomain(self, seqid, iprot, oprot):
+ args = createDomain_args()
+ args.read(iprot)
+ iprot.readMessageEnd()
+ result = createDomain_result()
+ try:
+ result.success = self._handler.createDomain(args.domain)
+ msg_type = TMessageType.REPLY
+ except (TTransport.TTransportException, KeyboardInterrupt, SystemExit):
+ raise
+ except apache.airavata.model.sharing.ttypes.SharingRegistryException as sre:
+ msg_type = TMessageType.REPLY
+ result.sre = sre
+ except apache.airavata.model.sharing.ttypes.DuplicateEntryException as dee:
+ msg_type = TMessageType.REPLY
+ result.dee = dee
+ except Exception as ex:
+ msg_type = TMessageType.EXCEPTION
+ logging.exception(ex)
+ result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
+ oprot.writeMessageBegin("createDomain", msg_type, seqid)
+ result.write(oprot)
+ oprot.writeMessageEnd()
+ oprot.trans.flush()
+
+ def process_updateDomain(self, seqid, iprot, oprot):
+ args = updateDomain_args()
+ args.read(iprot)
+ iprot.readMessageEnd()
+ result = updateDomain_result()
+ try:
+ result.success = self._handler.updateDomain(args.domain)
+ msg_type = TMessageType.REPLY
+ except (TTransport.TTransportException, KeyboardInterrupt, SystemExit):
+ raise
+ except apache.airavata.model.sharing.ttypes.SharingRegistryException as sre:
+ msg_type = TMessageType.REPLY
+ result.sre = sre
+ except Exception as ex:
+ msg_type = TMessageType.EXCEPTION
+ logging.exception(ex)
+ result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
+ oprot.writeMessageBegin("updateDomain", msg_type, seqid)
+ result.write(oprot)
+ oprot.writeMessageEnd()
+ oprot.trans.flush()
+
+ def process_isDomainExists(self, seqid, iprot, oprot):
+ args = isDomainExists_args()
+ args.read(iprot)
+ iprot.readMessageEnd()
+ result = isDomainExists_result()
+ try:
+ result.success = self._handler.isDomainExists(args.domainId)
+ msg_type = TMessageType.REPLY
+ except (TTransport.TTransportException, KeyboardInterrupt, SystemExit):
+ raise
+ except apache.airavata.model.sharing.ttypes.SharingRegistryException as sre:
+ msg_type = TMessageType.REPLY
+ result.sre = sre
+ except Exception as ex:
+ msg_type = TMessageType.EXCEPTION
+ logging.exception(ex)
+ result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
+ oprot.writeMessageBegin("isDo
<TRUNCATED>