blob: a3bba1060662936dddcb0eb6a36a384f0368e26d [file] [log] [blame]
#
# Autogenerated by Thrift Compiler (0.9.2)
#
# 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
import apache.airavata.model.commons.ttypes
from thrift.transport import TTransport
from thrift.protocol import TBinaryProtocol, TProtocol
try:
from thrift.protocol import fastbinary
except:
fastbinary = None
class Group:
"""
Attributes:
- groupName
- description
"""
thrift_spec = (
None, # 0
(1, TType.STRING, 'groupName', None, None, ), # 1
(2, TType.STRING, 'description', None, None, ), # 2
)
def __init__(self, groupName=None, description=None,):
self.groupName = groupName
self.description = description
def read(self, iprot):
if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
return
iprot.readStructBegin()
while True:
(fname, ftype, fid) = iprot.readFieldBegin()
if ftype == TType.STOP:
break
if fid == 1:
if ftype == TType.STRING:
self.groupName = iprot.readString();
else:
iprot.skip(ftype)
elif fid == 2:
if ftype == TType.STRING:
self.description = iprot.readString();
else:
iprot.skip(ftype)
else:
iprot.skip(ftype)
iprot.readFieldEnd()
iprot.readStructEnd()
def write(self, oprot):
if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
return
oprot.writeStructBegin('Group')
if self.groupName is not None:
oprot.writeFieldBegin('groupName', TType.STRING, 1)
oprot.writeString(self.groupName)
oprot.writeFieldEnd()
if self.description is not None:
oprot.writeFieldBegin('description', TType.STRING, 2)
oprot.writeString(self.description)
oprot.writeFieldEnd()
oprot.writeFieldStop()
oprot.writeStructEnd()
def validate(self):
if self.groupName is None:
raise TProtocol.TProtocolException(message='Required field groupName is unset!')
return
def __hash__(self):
value = 17
value = (value * 31) ^ hash(self.groupName)
value = (value * 31) ^ hash(self.description)
return value
def __repr__(self):
L = ['%s=%r' % (key, value)
for key, value in self.__dict__.iteritems()]
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 Project:
"""
Attributes:
- projectID
- owner
- name
- description
- creationTime
- sharedUsers
- sharedGroups
"""
thrift_spec = (
None, # 0
(1, TType.STRING, 'projectID', None, "DO_NOT_SET_AT_CLIENTS", ), # 1
(2, TType.STRING, 'owner', None, None, ), # 2
(3, TType.STRING, 'name', None, None, ), # 3
(4, TType.STRING, 'description', None, None, ), # 4
(5, TType.I64, 'creationTime', None, None, ), # 5
(6, TType.LIST, 'sharedUsers', (TType.STRING,None), None, ), # 6
(7, TType.LIST, 'sharedGroups', (TType.STRING,None), None, ), # 7
)
def __init__(self, projectID=thrift_spec[1][4], owner=None, name=None, description=None, creationTime=None, sharedUsers=None, sharedGroups=None,):
self.projectID = projectID
self.owner = owner
self.name = name
self.description = description
self.creationTime = creationTime
self.sharedUsers = sharedUsers
self.sharedGroups = sharedGroups
def read(self, iprot):
if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
return
iprot.readStructBegin()
while True:
(fname, ftype, fid) = iprot.readFieldBegin()
if ftype == TType.STOP:
break
if fid == 1:
if ftype == TType.STRING:
self.projectID = iprot.readString();
else:
iprot.skip(ftype)
elif fid == 2:
if ftype == TType.STRING:
self.owner = iprot.readString();
else:
iprot.skip(ftype)
elif fid == 3:
if ftype == TType.STRING:
self.name = iprot.readString();
else:
iprot.skip(ftype)
elif fid == 4:
if ftype == TType.STRING:
self.description = iprot.readString();
else:
iprot.skip(ftype)
elif fid == 5:
if ftype == TType.I64:
self.creationTime = iprot.readI64();
else:
iprot.skip(ftype)
elif fid == 6:
if ftype == TType.LIST:
self.sharedUsers = []
(_etype3, _size0) = iprot.readListBegin()
for _i4 in xrange(_size0):
_elem5 = iprot.readString();
self.sharedUsers.append(_elem5)
iprot.readListEnd()
else:
iprot.skip(ftype)
elif fid == 7:
if ftype == TType.LIST:
self.sharedGroups = []
(_etype9, _size6) = iprot.readListBegin()
for _i10 in xrange(_size6):
_elem11 = iprot.readString();
self.sharedGroups.append(_elem11)
iprot.readListEnd()
else:
iprot.skip(ftype)
else:
iprot.skip(ftype)
iprot.readFieldEnd()
iprot.readStructEnd()
def write(self, oprot):
if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
return
oprot.writeStructBegin('Project')
if self.projectID is not None:
oprot.writeFieldBegin('projectID', TType.STRING, 1)
oprot.writeString(self.projectID)
oprot.writeFieldEnd()
if self.owner is not None:
oprot.writeFieldBegin('owner', TType.STRING, 2)
oprot.writeString(self.owner)
oprot.writeFieldEnd()
if self.name is not None:
oprot.writeFieldBegin('name', TType.STRING, 3)
oprot.writeString(self.name)
oprot.writeFieldEnd()
if self.description is not None:
oprot.writeFieldBegin('description', TType.STRING, 4)
oprot.writeString(self.description)
oprot.writeFieldEnd()
if self.creationTime is not None:
oprot.writeFieldBegin('creationTime', TType.I64, 5)
oprot.writeI64(self.creationTime)
oprot.writeFieldEnd()
if self.sharedUsers is not None:
oprot.writeFieldBegin('sharedUsers', TType.LIST, 6)
oprot.writeListBegin(TType.STRING, len(self.sharedUsers))
for iter12 in self.sharedUsers:
oprot.writeString(iter12)
oprot.writeListEnd()
oprot.writeFieldEnd()
if self.sharedGroups is not None:
oprot.writeFieldBegin('sharedGroups', TType.LIST, 7)
oprot.writeListBegin(TType.STRING, len(self.sharedGroups))
for iter13 in self.sharedGroups:
oprot.writeString(iter13)
oprot.writeListEnd()
oprot.writeFieldEnd()
oprot.writeFieldStop()
oprot.writeStructEnd()
def validate(self):
if self.projectID is None:
raise TProtocol.TProtocolException(message='Required field projectID is unset!')
if self.owner is None:
raise TProtocol.TProtocolException(message='Required field owner is unset!')
if self.name is None:
raise TProtocol.TProtocolException(message='Required field name is unset!')
return
def __hash__(self):
value = 17
value = (value * 31) ^ hash(self.projectID)
value = (value * 31) ^ hash(self.owner)
value = (value * 31) ^ hash(self.name)
value = (value * 31) ^ hash(self.description)
value = (value * 31) ^ hash(self.creationTime)
value = (value * 31) ^ hash(self.sharedUsers)
value = (value * 31) ^ hash(self.sharedGroups)
return value
def __repr__(self):
L = ['%s=%r' % (key, value)
for key, value in self.__dict__.iteritems()]
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 User:
"""
Attributes:
- userName
- groupList
"""
thrift_spec = (
None, # 0
(1, TType.STRING, 'userName', None, None, ), # 1
(2, TType.LIST, 'groupList', (TType.STRUCT,(Group, Group.thrift_spec)), None, ), # 2
)
def __init__(self, userName=None, groupList=None,):
self.userName = userName
self.groupList = groupList
def read(self, iprot):
if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
return
iprot.readStructBegin()
while True:
(fname, ftype, fid) = iprot.readFieldBegin()
if ftype == TType.STOP:
break
if fid == 1:
if ftype == TType.STRING:
self.userName = iprot.readString();
else:
iprot.skip(ftype)
elif fid == 2:
if ftype == TType.LIST:
self.groupList = []
(_etype17, _size14) = iprot.readListBegin()
for _i18 in xrange(_size14):
_elem19 = Group()
_elem19.read(iprot)
self.groupList.append(_elem19)
iprot.readListEnd()
else:
iprot.skip(ftype)
else:
iprot.skip(ftype)
iprot.readFieldEnd()
iprot.readStructEnd()
def write(self, oprot):
if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
return
oprot.writeStructBegin('User')
if self.userName is not None:
oprot.writeFieldBegin('userName', TType.STRING, 1)
oprot.writeString(self.userName)
oprot.writeFieldEnd()
if self.groupList is not None:
oprot.writeFieldBegin('groupList', TType.LIST, 2)
oprot.writeListBegin(TType.STRUCT, len(self.groupList))
for iter20 in self.groupList:
iter20.write(oprot)
oprot.writeListEnd()
oprot.writeFieldEnd()
oprot.writeFieldStop()
oprot.writeStructEnd()
def validate(self):
if self.userName is None:
raise TProtocol.TProtocolException(message='Required field userName is unset!')
return
def __hash__(self):
value = 17
value = (value * 31) ^ hash(self.userName)
value = (value * 31) ^ hash(self.groupList)
return value
def __repr__(self):
L = ['%s=%r' % (key, value)
for key, value in self.__dict__.iteritems()]
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 Gateway:
"""
Attributes:
- gatewayId
- gatewayName
- domain
- emailAddress
"""
thrift_spec = (
None, # 0
(1, TType.STRING, 'gatewayId', None, None, ), # 1
(2, TType.STRING, 'gatewayName', None, None, ), # 2
(3, TType.STRING, 'domain', None, None, ), # 3
(4, TType.STRING, 'emailAddress', None, None, ), # 4
)
def __init__(self, gatewayId=None, gatewayName=None, domain=None, emailAddress=None,):
self.gatewayId = gatewayId
self.gatewayName = gatewayName
self.domain = domain
self.emailAddress = emailAddress
def read(self, iprot):
if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
return
iprot.readStructBegin()
while True:
(fname, ftype, fid) = iprot.readFieldBegin()
if ftype == TType.STOP:
break
if fid == 1:
if ftype == TType.STRING:
self.gatewayId = iprot.readString();
else:
iprot.skip(ftype)
elif fid == 2:
if ftype == TType.STRING:
self.gatewayName = iprot.readString();
else:
iprot.skip(ftype)
elif fid == 3:
if ftype == TType.STRING:
self.domain = iprot.readString();
else:
iprot.skip(ftype)
elif fid == 4:
if ftype == TType.STRING:
self.emailAddress = iprot.readString();
else:
iprot.skip(ftype)
else:
iprot.skip(ftype)
iprot.readFieldEnd()
iprot.readStructEnd()
def write(self, oprot):
if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
return
oprot.writeStructBegin('Gateway')
if self.gatewayId is not None:
oprot.writeFieldBegin('gatewayId', TType.STRING, 1)
oprot.writeString(self.gatewayId)
oprot.writeFieldEnd()
if self.gatewayName is not None:
oprot.writeFieldBegin('gatewayName', TType.STRING, 2)
oprot.writeString(self.gatewayName)
oprot.writeFieldEnd()
if self.domain is not None:
oprot.writeFieldBegin('domain', TType.STRING, 3)
oprot.writeString(self.domain)
oprot.writeFieldEnd()
if self.emailAddress is not None:
oprot.writeFieldBegin('emailAddress', TType.STRING, 4)
oprot.writeString(self.emailAddress)
oprot.writeFieldEnd()
oprot.writeFieldStop()
oprot.writeStructEnd()
def validate(self):
if self.gatewayId is None:
raise TProtocol.TProtocolException(message='Required field gatewayId is unset!')
return
def __hash__(self):
value = 17
value = (value * 31) ^ hash(self.gatewayId)
value = (value * 31) ^ hash(self.gatewayName)
value = (value * 31) ^ hash(self.domain)
value = (value * 31) ^ hash(self.emailAddress)
return value
def __repr__(self):
L = ['%s=%r' % (key, value)
for key, value in self.__dict__.iteritems()]
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)