http://git-wip-us.apache.org/repos/asf/airavata/blob/ddb95c12/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/api/error/ttypes.py ---------------------------------------------------------------------- diff --git a/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/api/error/ttypes.py b/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/api/error/ttypes.py index 522cc18..ba5b056 100644 --- a/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/api/error/ttypes.py +++ b/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/api/error/ttypes.py @@ -495,6 +495,82 @@ class AuthorizationException(TException): def __ne__(self, other): return not (self == other) +class DuplicateEntryException(TException): + """ + This exception is thrown when you try to save a duplicate entity that already exists + in the database. + + message: contains the associated error message + + + Attributes: + - message + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'message', None, None, ), # 1 + ) + + def __init__(self, message=None,): + self.message = message + + 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.message = 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('DuplicateEntryException') + if self.message is not None: + oprot.writeFieldBegin('message', TType.STRING, 1) + oprot.writeString(self.message) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.message is None: + raise TProtocol.TProtocolException(message='Required field message is unset!') + return + + + def __str__(self): + return repr(self) + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.message) + 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 AiravataClientException(TException): """ This exception is thrown by Airavata Services when a call fails as a result of
http://git-wip-us.apache.org/repos/asf/airavata/blob/ddb95c12/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/api/ttypes.py ---------------------------------------------------------------------- diff --git a/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/api/ttypes.py b/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/api/ttypes.py index 422eae8..e829011 100644 --- a/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/api/ttypes.py +++ b/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/api/ttypes.py @@ -27,6 +27,7 @@ import apache.airavata.model.data.movement.ttypes import apache.airavata.model.workflow.ttypes import apache.airavata.model.data.replica.ttypes import apache.airavata.model.group.ttypes +import apache.airavata.model.user.ttypes from thrift.transport import TTransport http://git-wip-us.apache.org/repos/asf/airavata/blob/ddb95c12/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/model/data/replica/ttypes.py ---------------------------------------------------------------------- diff --git a/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/model/data/replica/ttypes.py b/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/model/data/replica/ttypes.py index e40994d..22adc42 100644 --- a/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/model/data/replica/ttypes.py +++ b/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/model/data/replica/ttypes.py @@ -65,52 +65,52 @@ class DataProductType: } -class DataProductModel: +class DataReplicaLocationModel: """ Attributes: + - replicaId - productUri - - gatewayId - - parentProductUri - - productName - - productDescription - - ownerName - - dataProductType - - productSize + - replicaName + - replicaDescription - creationTime - lastModifiedTime - - productMetadata - - replicaLocations + - validUntilTime + - replicaLocationCategory + - replicaPersistentType + - storageResourceId + - filePath + - replicaMetadata """ thrift_spec = ( None, # 0 - (1, TType.STRING, 'productUri', None, None, ), # 1 - (2, TType.STRING, 'gatewayId', None, None, ), # 2 - (3, TType.STRING, 'parentProductUri', None, None, ), # 3 - (4, TType.STRING, 'productName', None, None, ), # 4 - (5, TType.STRING, 'productDescription', None, None, ), # 5 - (6, TType.STRING, 'ownerName', None, None, ), # 6 - (7, TType.I32, 'dataProductType', None, None, ), # 7 - (8, TType.I32, 'productSize', None, None, ), # 8 - (9, TType.I64, 'creationTime', None, None, ), # 9 - (10, TType.I64, 'lastModifiedTime', None, None, ), # 10 - (11, TType.MAP, 'productMetadata', (TType.STRING,None,TType.STRING,None), None, ), # 11 - (12, TType.LIST, 'replicaLocations', (TType.STRUCT,(DataReplicaLocationModel, DataReplicaLocationModel.thrift_spec)), None, ), # 12 + (1, TType.STRING, 'replicaId', None, None, ), # 1 + (2, TType.STRING, 'productUri', None, None, ), # 2 + (3, TType.STRING, 'replicaName', None, None, ), # 3 + (4, TType.STRING, 'replicaDescription', None, None, ), # 4 + (5, TType.I64, 'creationTime', None, None, ), # 5 + (6, TType.I64, 'lastModifiedTime', None, None, ), # 6 + (7, TType.I64, 'validUntilTime', None, None, ), # 7 + (8, TType.I32, 'replicaLocationCategory', None, None, ), # 8 + (9, TType.I32, 'replicaPersistentType', None, None, ), # 9 + (10, TType.STRING, 'storageResourceId', None, None, ), # 10 + (11, TType.STRING, 'filePath', None, None, ), # 11 + (12, TType.MAP, 'replicaMetadata', (TType.STRING,None,TType.STRING,None), None, ), # 12 ) - def __init__(self, productUri=None, gatewayId=None, parentProductUri=None, productName=None, productDescription=None, ownerName=None, dataProductType=None, productSize=None, creationTime=None, lastModifiedTime=None, productMetadata=None, replicaLocations=None,): + def __init__(self, replicaId=None, productUri=None, replicaName=None, replicaDescription=None, creationTime=None, lastModifiedTime=None, validUntilTime=None, replicaLocationCategory=None, replicaPersistentType=None, storageResourceId=None, filePath=None, replicaMetadata=None,): + self.replicaId = replicaId self.productUri = productUri - self.gatewayId = gatewayId - self.parentProductUri = parentProductUri - self.productName = productName - self.productDescription = productDescription - self.ownerName = ownerName - self.dataProductType = dataProductType - self.productSize = productSize + self.replicaName = replicaName + self.replicaDescription = replicaDescription self.creationTime = creationTime self.lastModifiedTime = lastModifiedTime - self.productMetadata = productMetadata - self.replicaLocations = replicaLocations + self.validUntilTime = validUntilTime + self.replicaLocationCategory = replicaLocationCategory + self.replicaPersistentType = replicaPersistentType + self.storageResourceId = storageResourceId + self.filePath = filePath + self.replicaMetadata = replicaMetadata 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: @@ -123,76 +123,70 @@ class DataProductModel: break if fid == 1: if ftype == TType.STRING: - self.productUri = iprot.readString() + self.replicaId = iprot.readString() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: - self.gatewayId = iprot.readString() + self.productUri = iprot.readString() else: iprot.skip(ftype) elif fid == 3: if ftype == TType.STRING: - self.parentProductUri = iprot.readString() + self.replicaName = iprot.readString() else: iprot.skip(ftype) elif fid == 4: if ftype == TType.STRING: - self.productName = iprot.readString() + self.replicaDescription = iprot.readString() else: iprot.skip(ftype) elif fid == 5: - if ftype == TType.STRING: - self.productDescription = iprot.readString() + if ftype == TType.I64: + self.creationTime = iprot.readI64() else: iprot.skip(ftype) elif fid == 6: - if ftype == TType.STRING: - self.ownerName = iprot.readString() + if ftype == TType.I64: + self.lastModifiedTime = iprot.readI64() else: iprot.skip(ftype) elif fid == 7: - if ftype == TType.I32: - self.dataProductType = iprot.readI32() + if ftype == TType.I64: + self.validUntilTime = iprot.readI64() else: iprot.skip(ftype) elif fid == 8: if ftype == TType.I32: - self.productSize = iprot.readI32() + self.replicaLocationCategory = iprot.readI32() else: iprot.skip(ftype) elif fid == 9: - if ftype == TType.I64: - self.creationTime = iprot.readI64() + if ftype == TType.I32: + self.replicaPersistentType = iprot.readI32() else: iprot.skip(ftype) elif fid == 10: - if ftype == TType.I64: - self.lastModifiedTime = iprot.readI64() + if ftype == TType.STRING: + self.storageResourceId = iprot.readString() else: iprot.skip(ftype) elif fid == 11: + if ftype == TType.STRING: + self.filePath = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 12: if ftype == TType.MAP: - self.productMetadata = {} + self.replicaMetadata = {} (_ktype1, _vtype2, _size0 ) = iprot.readMapBegin() for _i4 in xrange(_size0): _key5 = iprot.readString() _val6 = iprot.readString() - self.productMetadata[_key5] = _val6 + self.replicaMetadata[_key5] = _val6 iprot.readMapEnd() else: iprot.skip(ftype) - elif fid == 12: - if ftype == TType.LIST: - self.replicaLocations = [] - (_etype10, _size7) = iprot.readListBegin() - for _i11 in xrange(_size7): - _elem12 = DataReplicaLocationModel() - _elem12.read(iprot) - self.replicaLocations.append(_elem12) - iprot.readListEnd() - else: - iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() @@ -202,62 +196,59 @@ class DataProductModel: 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('DataProductModel') + oprot.writeStructBegin('DataReplicaLocationModel') + if self.replicaId is not None: + oprot.writeFieldBegin('replicaId', TType.STRING, 1) + oprot.writeString(self.replicaId) + oprot.writeFieldEnd() if self.productUri is not None: - oprot.writeFieldBegin('productUri', TType.STRING, 1) + oprot.writeFieldBegin('productUri', TType.STRING, 2) oprot.writeString(self.productUri) oprot.writeFieldEnd() - if self.gatewayId is not None: - oprot.writeFieldBegin('gatewayId', TType.STRING, 2) - oprot.writeString(self.gatewayId) + if self.replicaName is not None: + oprot.writeFieldBegin('replicaName', TType.STRING, 3) + oprot.writeString(self.replicaName) oprot.writeFieldEnd() - if self.parentProductUri is not None: - oprot.writeFieldBegin('parentProductUri', TType.STRING, 3) - oprot.writeString(self.parentProductUri) + if self.replicaDescription is not None: + oprot.writeFieldBegin('replicaDescription', TType.STRING, 4) + oprot.writeString(self.replicaDescription) oprot.writeFieldEnd() - if self.productName is not None: - oprot.writeFieldBegin('productName', TType.STRING, 4) - oprot.writeString(self.productName) + if self.creationTime is not None: + oprot.writeFieldBegin('creationTime', TType.I64, 5) + oprot.writeI64(self.creationTime) oprot.writeFieldEnd() - if self.productDescription is not None: - oprot.writeFieldBegin('productDescription', TType.STRING, 5) - oprot.writeString(self.productDescription) + if self.lastModifiedTime is not None: + oprot.writeFieldBegin('lastModifiedTime', TType.I64, 6) + oprot.writeI64(self.lastModifiedTime) oprot.writeFieldEnd() - if self.ownerName is not None: - oprot.writeFieldBegin('ownerName', TType.STRING, 6) - oprot.writeString(self.ownerName) + if self.validUntilTime is not None: + oprot.writeFieldBegin('validUntilTime', TType.I64, 7) + oprot.writeI64(self.validUntilTime) oprot.writeFieldEnd() - if self.dataProductType is not None: - oprot.writeFieldBegin('dataProductType', TType.I32, 7) - oprot.writeI32(self.dataProductType) + if self.replicaLocationCategory is not None: + oprot.writeFieldBegin('replicaLocationCategory', TType.I32, 8) + oprot.writeI32(self.replicaLocationCategory) oprot.writeFieldEnd() - if self.productSize is not None: - oprot.writeFieldBegin('productSize', TType.I32, 8) - oprot.writeI32(self.productSize) + if self.replicaPersistentType is not None: + oprot.writeFieldBegin('replicaPersistentType', TType.I32, 9) + oprot.writeI32(self.replicaPersistentType) oprot.writeFieldEnd() - if self.creationTime is not None: - oprot.writeFieldBegin('creationTime', TType.I64, 9) - oprot.writeI64(self.creationTime) + if self.storageResourceId is not None: + oprot.writeFieldBegin('storageResourceId', TType.STRING, 10) + oprot.writeString(self.storageResourceId) oprot.writeFieldEnd() - if self.lastModifiedTime is not None: - oprot.writeFieldBegin('lastModifiedTime', TType.I64, 10) - oprot.writeI64(self.lastModifiedTime) + if self.filePath is not None: + oprot.writeFieldBegin('filePath', TType.STRING, 11) + oprot.writeString(self.filePath) oprot.writeFieldEnd() - if self.productMetadata is not None: - oprot.writeFieldBegin('productMetadata', TType.MAP, 11) - oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.productMetadata)) - for kiter13,viter14 in self.productMetadata.items(): - oprot.writeString(kiter13) - oprot.writeString(viter14) + if self.replicaMetadata is not None: + oprot.writeFieldBegin('replicaMetadata', TType.MAP, 12) + oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.replicaMetadata)) + for kiter7,viter8 in self.replicaMetadata.items(): + oprot.writeString(kiter7) + oprot.writeString(viter8) oprot.writeMapEnd() oprot.writeFieldEnd() - if self.replicaLocations is not None: - oprot.writeFieldBegin('replicaLocations', TType.LIST, 12) - oprot.writeListBegin(TType.STRUCT, len(self.replicaLocations)) - for iter15 in self.replicaLocations: - iter15.write(oprot) - oprot.writeListEnd() - oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -267,18 +258,18 @@ class DataProductModel: def __hash__(self): value = 17 + value = (value * 31) ^ hash(self.replicaId) value = (value * 31) ^ hash(self.productUri) - value = (value * 31) ^ hash(self.gatewayId) - value = (value * 31) ^ hash(self.parentProductUri) - value = (value * 31) ^ hash(self.productName) - value = (value * 31) ^ hash(self.productDescription) - value = (value * 31) ^ hash(self.ownerName) - value = (value * 31) ^ hash(self.dataProductType) - value = (value * 31) ^ hash(self.productSize) + value = (value * 31) ^ hash(self.replicaName) + value = (value * 31) ^ hash(self.replicaDescription) value = (value * 31) ^ hash(self.creationTime) value = (value * 31) ^ hash(self.lastModifiedTime) - value = (value * 31) ^ hash(self.productMetadata) - value = (value * 31) ^ hash(self.replicaLocations) + value = (value * 31) ^ hash(self.validUntilTime) + value = (value * 31) ^ hash(self.replicaLocationCategory) + value = (value * 31) ^ hash(self.replicaPersistentType) + value = (value * 31) ^ hash(self.storageResourceId) + value = (value * 31) ^ hash(self.filePath) + value = (value * 31) ^ hash(self.replicaMetadata) return value def __repr__(self): @@ -292,52 +283,52 @@ class DataProductModel: def __ne__(self, other): return not (self == other) -class DataReplicaLocationModel: +class DataProductModel: """ Attributes: - - replicaId - productUri - - replicaName - - replicaDescription + - gatewayId + - parentProductUri + - productName + - productDescription + - ownerName + - dataProductType + - productSize - creationTime - lastModifiedTime - - validUntilTime - - replicaLocationCategory - - replicaPersistentType - - storageResourceId - - filePath - - replicaMetadata + - productMetadata + - replicaLocations """ thrift_spec = ( None, # 0 - (1, TType.STRING, 'replicaId', None, None, ), # 1 - (2, TType.STRING, 'productUri', None, None, ), # 2 - (3, TType.STRING, 'replicaName', None, None, ), # 3 - (4, TType.STRING, 'replicaDescription', None, None, ), # 4 - (5, TType.I64, 'creationTime', None, None, ), # 5 - (6, TType.I64, 'lastModifiedTime', None, None, ), # 6 - (7, TType.I64, 'validUntilTime', None, None, ), # 7 - (8, TType.I32, 'replicaLocationCategory', None, None, ), # 8 - (9, TType.I32, 'replicaPersistentType', None, None, ), # 9 - (10, TType.STRING, 'storageResourceId', None, None, ), # 10 - (11, TType.STRING, 'filePath', None, None, ), # 11 - (12, TType.MAP, 'replicaMetadata', (TType.STRING,None,TType.STRING,None), None, ), # 12 + (1, TType.STRING, 'productUri', None, None, ), # 1 + (2, TType.STRING, 'gatewayId', None, None, ), # 2 + (3, TType.STRING, 'parentProductUri', None, None, ), # 3 + (4, TType.STRING, 'productName', None, None, ), # 4 + (5, TType.STRING, 'productDescription', None, None, ), # 5 + (6, TType.STRING, 'ownerName', None, None, ), # 6 + (7, TType.I32, 'dataProductType', None, None, ), # 7 + (8, TType.I32, 'productSize', None, None, ), # 8 + (9, TType.I64, 'creationTime', None, None, ), # 9 + (10, TType.I64, 'lastModifiedTime', None, None, ), # 10 + (11, TType.MAP, 'productMetadata', (TType.STRING,None,TType.STRING,None), None, ), # 11 + (12, TType.LIST, 'replicaLocations', (TType.STRUCT,(DataReplicaLocationModel, DataReplicaLocationModel.thrift_spec)), None, ), # 12 ) - def __init__(self, replicaId=None, productUri=None, replicaName=None, replicaDescription=None, creationTime=None, lastModifiedTime=None, validUntilTime=None, replicaLocationCategory=None, replicaPersistentType=None, storageResourceId=None, filePath=None, replicaMetadata=None,): - self.replicaId = replicaId + def __init__(self, productUri=None, gatewayId=None, parentProductUri=None, productName=None, productDescription=None, ownerName=None, dataProductType=None, productSize=None, creationTime=None, lastModifiedTime=None, productMetadata=None, replicaLocations=None,): self.productUri = productUri - self.replicaName = replicaName - self.replicaDescription = replicaDescription + self.gatewayId = gatewayId + self.parentProductUri = parentProductUri + self.productName = productName + self.productDescription = productDescription + self.ownerName = ownerName + self.dataProductType = dataProductType + self.productSize = productSize self.creationTime = creationTime self.lastModifiedTime = lastModifiedTime - self.validUntilTime = validUntilTime - self.replicaLocationCategory = replicaLocationCategory - self.replicaPersistentType = replicaPersistentType - self.storageResourceId = storageResourceId - self.filePath = filePath - self.replicaMetadata = replicaMetadata + self.productMetadata = productMetadata + self.replicaLocations = replicaLocations 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: @@ -350,68 +341,74 @@ class DataReplicaLocationModel: break if fid == 1: if ftype == TType.STRING: - self.replicaId = iprot.readString() + self.productUri = iprot.readString() else: iprot.skip(ftype) elif fid == 2: if ftype == TType.STRING: - self.productUri = iprot.readString() + self.gatewayId = iprot.readString() else: iprot.skip(ftype) elif fid == 3: if ftype == TType.STRING: - self.replicaName = iprot.readString() + self.parentProductUri = iprot.readString() else: iprot.skip(ftype) elif fid == 4: if ftype == TType.STRING: - self.replicaDescription = iprot.readString() + self.productName = iprot.readString() else: iprot.skip(ftype) elif fid == 5: - if ftype == TType.I64: - self.creationTime = iprot.readI64() + if ftype == TType.STRING: + self.productDescription = iprot.readString() else: iprot.skip(ftype) elif fid == 6: - if ftype == TType.I64: - self.lastModifiedTime = iprot.readI64() + if ftype == TType.STRING: + self.ownerName = iprot.readString() else: iprot.skip(ftype) elif fid == 7: - if ftype == TType.I64: - self.validUntilTime = iprot.readI64() + if ftype == TType.I32: + self.dataProductType = iprot.readI32() else: iprot.skip(ftype) elif fid == 8: if ftype == TType.I32: - self.replicaLocationCategory = iprot.readI32() + self.productSize = iprot.readI32() else: iprot.skip(ftype) elif fid == 9: - if ftype == TType.I32: - self.replicaPersistentType = iprot.readI32() + if ftype == TType.I64: + self.creationTime = iprot.readI64() else: iprot.skip(ftype) elif fid == 10: - if ftype == TType.STRING: - self.storageResourceId = iprot.readString() + if ftype == TType.I64: + self.lastModifiedTime = iprot.readI64() else: iprot.skip(ftype) elif fid == 11: - if ftype == TType.STRING: - self.filePath = iprot.readString() + if ftype == TType.MAP: + self.productMetadata = {} + (_ktype10, _vtype11, _size9 ) = iprot.readMapBegin() + for _i13 in xrange(_size9): + _key14 = iprot.readString() + _val15 = iprot.readString() + self.productMetadata[_key14] = _val15 + iprot.readMapEnd() else: iprot.skip(ftype) elif fid == 12: - if ftype == TType.MAP: - self.replicaMetadata = {} - (_ktype17, _vtype18, _size16 ) = iprot.readMapBegin() + if ftype == TType.LIST: + self.replicaLocations = [] + (_etype19, _size16) = iprot.readListBegin() for _i20 in xrange(_size16): - _key21 = iprot.readString() - _val22 = iprot.readString() - self.replicaMetadata[_key21] = _val22 - iprot.readMapEnd() + _elem21 = DataReplicaLocationModel() + _elem21.read(iprot) + self.replicaLocations.append(_elem21) + iprot.readListEnd() else: iprot.skip(ftype) else: @@ -423,59 +420,62 @@ class DataReplicaLocationModel: 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('DataReplicaLocationModel') - if self.replicaId is not None: - oprot.writeFieldBegin('replicaId', TType.STRING, 1) - oprot.writeString(self.replicaId) - oprot.writeFieldEnd() + oprot.writeStructBegin('DataProductModel') if self.productUri is not None: - oprot.writeFieldBegin('productUri', TType.STRING, 2) + oprot.writeFieldBegin('productUri', TType.STRING, 1) oprot.writeString(self.productUri) oprot.writeFieldEnd() - if self.replicaName is not None: - oprot.writeFieldBegin('replicaName', TType.STRING, 3) - oprot.writeString(self.replicaName) + if self.gatewayId is not None: + oprot.writeFieldBegin('gatewayId', TType.STRING, 2) + oprot.writeString(self.gatewayId) oprot.writeFieldEnd() - if self.replicaDescription is not None: - oprot.writeFieldBegin('replicaDescription', TType.STRING, 4) - oprot.writeString(self.replicaDescription) + if self.parentProductUri is not None: + oprot.writeFieldBegin('parentProductUri', TType.STRING, 3) + oprot.writeString(self.parentProductUri) oprot.writeFieldEnd() - if self.creationTime is not None: - oprot.writeFieldBegin('creationTime', TType.I64, 5) - oprot.writeI64(self.creationTime) + if self.productName is not None: + oprot.writeFieldBegin('productName', TType.STRING, 4) + oprot.writeString(self.productName) oprot.writeFieldEnd() - if self.lastModifiedTime is not None: - oprot.writeFieldBegin('lastModifiedTime', TType.I64, 6) - oprot.writeI64(self.lastModifiedTime) + if self.productDescription is not None: + oprot.writeFieldBegin('productDescription', TType.STRING, 5) + oprot.writeString(self.productDescription) oprot.writeFieldEnd() - if self.validUntilTime is not None: - oprot.writeFieldBegin('validUntilTime', TType.I64, 7) - oprot.writeI64(self.validUntilTime) + if self.ownerName is not None: + oprot.writeFieldBegin('ownerName', TType.STRING, 6) + oprot.writeString(self.ownerName) oprot.writeFieldEnd() - if self.replicaLocationCategory is not None: - oprot.writeFieldBegin('replicaLocationCategory', TType.I32, 8) - oprot.writeI32(self.replicaLocationCategory) + if self.dataProductType is not None: + oprot.writeFieldBegin('dataProductType', TType.I32, 7) + oprot.writeI32(self.dataProductType) oprot.writeFieldEnd() - if self.replicaPersistentType is not None: - oprot.writeFieldBegin('replicaPersistentType', TType.I32, 9) - oprot.writeI32(self.replicaPersistentType) + if self.productSize is not None: + oprot.writeFieldBegin('productSize', TType.I32, 8) + oprot.writeI32(self.productSize) oprot.writeFieldEnd() - if self.storageResourceId is not None: - oprot.writeFieldBegin('storageResourceId', TType.STRING, 10) - oprot.writeString(self.storageResourceId) + if self.creationTime is not None: + oprot.writeFieldBegin('creationTime', TType.I64, 9) + oprot.writeI64(self.creationTime) oprot.writeFieldEnd() - if self.filePath is not None: - oprot.writeFieldBegin('filePath', TType.STRING, 11) - oprot.writeString(self.filePath) + if self.lastModifiedTime is not None: + oprot.writeFieldBegin('lastModifiedTime', TType.I64, 10) + oprot.writeI64(self.lastModifiedTime) oprot.writeFieldEnd() - if self.replicaMetadata is not None: - oprot.writeFieldBegin('replicaMetadata', TType.MAP, 12) - oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.replicaMetadata)) - for kiter23,viter24 in self.replicaMetadata.items(): - oprot.writeString(kiter23) - oprot.writeString(viter24) + if self.productMetadata is not None: + oprot.writeFieldBegin('productMetadata', TType.MAP, 11) + oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.productMetadata)) + for kiter22,viter23 in self.productMetadata.items(): + oprot.writeString(kiter22) + oprot.writeString(viter23) oprot.writeMapEnd() oprot.writeFieldEnd() + if self.replicaLocations is not None: + oprot.writeFieldBegin('replicaLocations', TType.LIST, 12) + oprot.writeListBegin(TType.STRUCT, len(self.replicaLocations)) + for iter24 in self.replicaLocations: + iter24.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -485,18 +485,18 @@ class DataReplicaLocationModel: def __hash__(self): value = 17 - value = (value * 31) ^ hash(self.replicaId) value = (value * 31) ^ hash(self.productUri) - value = (value * 31) ^ hash(self.replicaName) - value = (value * 31) ^ hash(self.replicaDescription) + value = (value * 31) ^ hash(self.gatewayId) + value = (value * 31) ^ hash(self.parentProductUri) + value = (value * 31) ^ hash(self.productName) + value = (value * 31) ^ hash(self.productDescription) + value = (value * 31) ^ hash(self.ownerName) + value = (value * 31) ^ hash(self.dataProductType) + value = (value * 31) ^ hash(self.productSize) value = (value * 31) ^ hash(self.creationTime) value = (value * 31) ^ hash(self.lastModifiedTime) - value = (value * 31) ^ hash(self.validUntilTime) - value = (value * 31) ^ hash(self.replicaLocationCategory) - value = (value * 31) ^ hash(self.replicaPersistentType) - value = (value * 31) ^ hash(self.storageResourceId) - value = (value * 31) ^ hash(self.filePath) - value = (value * 31) ^ hash(self.replicaMetadata) + value = (value * 31) ^ hash(self.productMetadata) + value = (value * 31) ^ hash(self.replicaLocations) return value def __repr__(self): http://git-wip-us.apache.org/repos/asf/airavata/blob/ddb95c12/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/model/dbevent/__init__.py ---------------------------------------------------------------------- diff --git a/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/model/dbevent/__init__.py b/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/model/dbevent/__init__.py new file mode 100644 index 0000000..adefd8e --- /dev/null +++ b/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/model/dbevent/__init__.py @@ -0,0 +1 @@ +__all__ = ['ttypes', 'constants'] http://git-wip-us.apache.org/repos/asf/airavata/blob/ddb95c12/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/model/dbevent/constants.py ---------------------------------------------------------------------- diff --git a/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/model/dbevent/constants.py b/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/model/dbevent/constants.py new file mode 100644 index 0000000..4a6492b --- /dev/null +++ b/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/model/dbevent/constants.py @@ -0,0 +1,11 @@ +# +# Autogenerated by Thrift Compiler (0.9.3) +# +# 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 ttypes import * + http://git-wip-us.apache.org/repos/asf/airavata/blob/ddb95c12/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/model/dbevent/ttypes.py ---------------------------------------------------------------------- diff --git a/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/model/dbevent/ttypes.py b/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/model/dbevent/ttypes.py new file mode 100644 index 0000000..996f5bb --- /dev/null +++ b/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/model/dbevent/ttypes.py @@ -0,0 +1,494 @@ +# +# Autogenerated by Thrift Compiler (0.9.3) +# +# 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.transport import TTransport +from thrift.protocol import TBinaryProtocol, TProtocol +try: + from thrift.protocol import fastbinary +except: + fastbinary = None + + +class CrudType: + CREATE = 0 + READ = 1 + UPDATE = 2 + DELETE = 3 + + _VALUES_TO_NAMES = { + 0: "CREATE", + 1: "READ", + 2: "UPDATE", + 3: "DELETE", + } + + _NAMES_TO_VALUES = { + "CREATE": 0, + "READ": 1, + "UPDATE": 2, + "DELETE": 3, + } + +class EntityType: + USER_PROFILE = 0 + TENANT = 1 + GROUP = 2 + PROJECT = 3 + EXPERIMENT = 4 + APPLICATION = 5 + SHARING = 6 + REGISTRY = 7 + + _VALUES_TO_NAMES = { + 0: "USER_PROFILE", + 1: "TENANT", + 2: "GROUP", + 3: "PROJECT", + 4: "EXPERIMENT", + 5: "APPLICATION", + 6: "SHARING", + 7: "REGISTRY", + } + + _NAMES_TO_VALUES = { + "USER_PROFILE": 0, + "TENANT": 1, + "GROUP": 2, + "PROJECT": 3, + "EXPERIMENT": 4, + "APPLICATION": 5, + "SHARING": 6, + "REGISTRY": 7, + } + +class DBEventType: + PUBLISHER = 0 + SUBSCRIBER = 1 + + _VALUES_TO_NAMES = { + 0: "PUBLISHER", + 1: "SUBSCRIBER", + } + + _NAMES_TO_VALUES = { + "PUBLISHER": 0, + "SUBSCRIBER": 1, + } + + +class DBEventPublisherContext: + """ + Attributes: + - crudType + - entityType + - entityDataModel + """ + + thrift_spec = ( + None, # 0 + (1, TType.I32, 'crudType', None, None, ), # 1 + (2, TType.I32, 'entityType', None, None, ), # 2 + (3, TType.STRING, 'entityDataModel', None, None, ), # 3 + ) + + def __init__(self, crudType=None, entityType=None, entityDataModel=None,): + self.crudType = crudType + self.entityType = entityType + self.entityDataModel = entityDataModel + + 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.I32: + self.crudType = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.I32: + self.entityType = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.entityDataModel = 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('DBEventPublisherContext') + if self.crudType is not None: + oprot.writeFieldBegin('crudType', TType.I32, 1) + oprot.writeI32(self.crudType) + oprot.writeFieldEnd() + if self.entityType is not None: + oprot.writeFieldBegin('entityType', TType.I32, 2) + oprot.writeI32(self.entityType) + oprot.writeFieldEnd() + if self.entityDataModel is not None: + oprot.writeFieldBegin('entityDataModel', TType.STRING, 3) + oprot.writeString(self.entityDataModel) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.crudType is None: + raise TProtocol.TProtocolException(message='Required field crudType is unset!') + if self.entityType is None: + raise TProtocol.TProtocolException(message='Required field entityType is unset!') + if self.entityDataModel is None: + raise TProtocol.TProtocolException(message='Required field entityDataModel is unset!') + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.crudType) + value = (value * 31) ^ hash(self.entityType) + value = (value * 31) ^ hash(self.entityDataModel) + 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 DBEventPublisher: + """ + Attributes: + - publisherContext + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'publisherContext', (DBEventPublisherContext, DBEventPublisherContext.thrift_spec), None, ), # 1 + ) + + def __init__(self, publisherContext=None,): + self.publisherContext = publisherContext + + 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.STRUCT: + self.publisherContext = DBEventPublisherContext() + self.publisherContext.read(iprot) + 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('DBEventPublisher') + if self.publisherContext is not None: + oprot.writeFieldBegin('publisherContext', TType.STRUCT, 1) + self.publisherContext.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.publisherContext is None: + raise TProtocol.TProtocolException(message='Required field publisherContext is unset!') + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.publisherContext) + 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 DBEventSubscriber: + """ + Attributes: + - subscriberService + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'subscriberService', None, None, ), # 1 + ) + + def __init__(self, subscriberService=None,): + self.subscriberService = subscriberService + + 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.subscriberService = 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('DBEventSubscriber') + if self.subscriberService is not None: + oprot.writeFieldBegin('subscriberService', TType.STRING, 1) + oprot.writeString(self.subscriberService) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.subscriberService is None: + raise TProtocol.TProtocolException(message='Required field subscriberService is unset!') + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.subscriberService) + 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 DBEventMessageContext: + """ + Attributes: + - publisher + - subscriber + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'publisher', (DBEventPublisher, DBEventPublisher.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'subscriber', (DBEventSubscriber, DBEventSubscriber.thrift_spec), None, ), # 2 + ) + + def __init__(self, publisher=None, subscriber=None,): + self.publisher = publisher + self.subscriber = subscriber + + 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.STRUCT: + self.publisher = DBEventPublisher() + self.publisher.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.subscriber = DBEventSubscriber() + self.subscriber.read(iprot) + 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('DBEventMessageContext') + if self.publisher is not None: + oprot.writeFieldBegin('publisher', TType.STRUCT, 1) + self.publisher.write(oprot) + oprot.writeFieldEnd() + if self.subscriber is not None: + oprot.writeFieldBegin('subscriber', TType.STRUCT, 2) + self.subscriber.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.publisher) + value = (value * 31) ^ hash(self.subscriber) + 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 DBEventMessage: + """ + Attributes: + - dbEventType + - messageContext + - publisherService + """ + + thrift_spec = ( + None, # 0 + (1, TType.I32, 'dbEventType', None, None, ), # 1 + (2, TType.STRUCT, 'messageContext', (DBEventMessageContext, DBEventMessageContext.thrift_spec), None, ), # 2 + (3, TType.STRING, 'publisherService', None, None, ), # 3 + ) + + def __init__(self, dbEventType=None, messageContext=None, publisherService=None,): + self.dbEventType = dbEventType + self.messageContext = messageContext + self.publisherService = publisherService + + 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.I32: + self.dbEventType = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.messageContext = DBEventMessageContext() + self.messageContext.read(iprot) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.publisherService = 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('DBEventMessage') + if self.dbEventType is not None: + oprot.writeFieldBegin('dbEventType', TType.I32, 1) + oprot.writeI32(self.dbEventType) + oprot.writeFieldEnd() + if self.messageContext is not None: + oprot.writeFieldBegin('messageContext', TType.STRUCT, 2) + self.messageContext.write(oprot) + oprot.writeFieldEnd() + if self.publisherService is not None: + oprot.writeFieldBegin('publisherService', TType.STRING, 3) + oprot.writeString(self.publisherService) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.dbEventType is None: + raise TProtocol.TProtocolException(message='Required field dbEventType is unset!') + if self.messageContext is None: + raise TProtocol.TProtocolException(message='Required field messageContext is unset!') + if self.publisherService is None: + raise TProtocol.TProtocolException(message='Required field publisherService is unset!') + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.dbEventType) + value = (value * 31) ^ hash(self.messageContext) + value = (value * 31) ^ hash(self.publisherService) + 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) http://git-wip-us.apache.org/repos/asf/airavata/blob/ddb95c12/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/model/messaging/event/ttypes.py ---------------------------------------------------------------------- diff --git a/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/model/messaging/event/ttypes.py b/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/model/messaging/event/ttypes.py index 818841d..42e9da4 100644 --- a/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/model/messaging/event/ttypes.py +++ b/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/model/messaging/event/ttypes.py @@ -49,6 +49,7 @@ class MessageType: LAUNCHPROCESS = 5 TERMINATEPROCESS = 6 PROCESSOUTPUT = 7 + DB_EVENT = 8 _VALUES_TO_NAMES = { 0: "EXPERIMENT", @@ -59,6 +60,7 @@ class MessageType: 5: "LAUNCHPROCESS", 6: "TERMINATEPROCESS", 7: "PROCESSOUTPUT", + 8: "DB_EVENT", } _NAMES_TO_VALUES = { @@ -70,6 +72,7 @@ class MessageType: "LAUNCHPROCESS": 5, "TERMINATEPROCESS": 6, "PROCESSOUTPUT": 7, + "DB_EVENT": 8, } http://git-wip-us.apache.org/repos/asf/airavata/blob/ddb95c12/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/model/tenant/__init__.py ---------------------------------------------------------------------- diff --git a/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/model/tenant/__init__.py b/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/model/tenant/__init__.py new file mode 100644 index 0000000..adefd8e --- /dev/null +++ b/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/model/tenant/__init__.py @@ -0,0 +1 @@ +__all__ = ['ttypes', 'constants'] http://git-wip-us.apache.org/repos/asf/airavata/blob/ddb95c12/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/model/tenant/constants.py ---------------------------------------------------------------------- diff --git a/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/model/tenant/constants.py b/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/model/tenant/constants.py new file mode 100644 index 0000000..4a6492b --- /dev/null +++ b/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/model/tenant/constants.py @@ -0,0 +1,11 @@ +# +# Autogenerated by Thrift Compiler (0.9.3) +# +# 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 ttypes import * + http://git-wip-us.apache.org/repos/asf/airavata/blob/ddb95c12/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/model/tenant/ttypes.py ---------------------------------------------------------------------- diff --git a/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/model/tenant/ttypes.py b/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/model/tenant/ttypes.py new file mode 100644 index 0000000..f13ce58 --- /dev/null +++ b/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/model/tenant/ttypes.py @@ -0,0 +1,352 @@ +# +# Autogenerated by Thrift Compiler (0.9.3) +# +# 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 TenantApprovalStatus: + REQUESTED = 0 + APPROVED = 1 + ACTIVE = 2 + DEACTIVATED = 3 + CANCELLED = 4 + DENIED = 5 + CREATED = 6 + + _VALUES_TO_NAMES = { + 0: "REQUESTED", + 1: "APPROVED", + 2: "ACTIVE", + 3: "DEACTIVATED", + 4: "CANCELLED", + 5: "DENIED", + 6: "CREATED", + } + + _NAMES_TO_VALUES = { + "REQUESTED": 0, + "APPROVED": 1, + "ACTIVE": 2, + "DEACTIVATED": 3, + "CANCELLED": 4, + "DENIED": 5, + "CREATED": 6, + } + + +class Tenant: + """ + Attributes: + - tenantId + - tenantApprovalStatus + - tenantName + - domain + - emailAddress + - tenantAcronym + - tenantURL + - tenantPublicAbstract + - reviewProposalDescription + - tenantAdminFirstName + - tenantAdminLastName + - tenantAdminEmail + - identityServerUserName + - identityServerPasswordToken + - declinedReason + - oauthClientId + - oauthClientSecret + - requestCreationTime + - requesterUsername + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'tenantId', None, None, ), # 1 + (2, TType.I32, 'tenantApprovalStatus', None, None, ), # 2 + (3, TType.STRING, 'tenantName', None, None, ), # 3 + (4, TType.STRING, 'domain', None, None, ), # 4 + (5, TType.STRING, 'emailAddress', None, None, ), # 5 + (6, TType.STRING, 'tenantAcronym', None, None, ), # 6 + (7, TType.STRING, 'tenantURL', None, None, ), # 7 + (8, TType.STRING, 'tenantPublicAbstract', None, None, ), # 8 + (9, TType.STRING, 'reviewProposalDescription', None, None, ), # 9 + (10, TType.STRING, 'tenantAdminFirstName', None, None, ), # 10 + (11, TType.STRING, 'tenantAdminLastName', None, None, ), # 11 + (12, TType.STRING, 'tenantAdminEmail', None, None, ), # 12 + (13, TType.STRING, 'identityServerUserName', None, None, ), # 13 + (14, TType.STRING, 'identityServerPasswordToken', None, None, ), # 14 + (15, TType.STRING, 'declinedReason', None, None, ), # 15 + (16, TType.STRING, 'oauthClientId', None, None, ), # 16 + (17, TType.STRING, 'oauthClientSecret', None, None, ), # 17 + (18, TType.I64, 'requestCreationTime', None, None, ), # 18 + (19, TType.STRING, 'requesterUsername', None, None, ), # 19 + ) + + def __init__(self, tenantId=None, tenantApprovalStatus=None, tenantName=None, domain=None, emailAddress=None, tenantAcronym=None, tenantURL=None, tenantPublicAbstract=None, reviewProposalDescription=None, tenantAdminFirstName=None, tenantAdminLastName=None, tenantAdminEmail=None, identityServerUserName=None, identityServerPasswordToken=None, declinedReason=None, oauthClientId=None, oauthClientSecret=None, requestCreationTime=None, requesterUsername=None,): + self.tenantId = tenantId + self.tenantApprovalStatus = tenantApprovalStatus + self.tenantName = tenantName + self.domain = domain + self.emailAddress = emailAddress + self.tenantAcronym = tenantAcronym + self.tenantURL = tenantURL + self.tenantPublicAbstract = tenantPublicAbstract + self.reviewProposalDescription = reviewProposalDescription + self.tenantAdminFirstName = tenantAdminFirstName + self.tenantAdminLastName = tenantAdminLastName + self.tenantAdminEmail = tenantAdminEmail + self.identityServerUserName = identityServerUserName + self.identityServerPasswordToken = identityServerPasswordToken + self.declinedReason = declinedReason + self.oauthClientId = oauthClientId + self.oauthClientSecret = oauthClientSecret + self.requestCreationTime = requestCreationTime + self.requesterUsername = requesterUsername + + 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.tenantId = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.I32: + self.tenantApprovalStatus = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.tenantName = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRING: + self.domain = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.STRING: + self.emailAddress = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 6: + if ftype == TType.STRING: + self.tenantAcronym = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 7: + if ftype == TType.STRING: + self.tenantURL = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 8: + if ftype == TType.STRING: + self.tenantPublicAbstract = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 9: + if ftype == TType.STRING: + self.reviewProposalDescription = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 10: + if ftype == TType.STRING: + self.tenantAdminFirstName = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 11: + if ftype == TType.STRING: + self.tenantAdminLastName = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 12: + if ftype == TType.STRING: + self.tenantAdminEmail = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 13: + if ftype == TType.STRING: + self.identityServerUserName = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 14: + if ftype == TType.STRING: + self.identityServerPasswordToken = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 15: + if ftype == TType.STRING: + self.declinedReason = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 16: + if ftype == TType.STRING: + self.oauthClientId = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 17: + if ftype == TType.STRING: + self.oauthClientSecret = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 18: + if ftype == TType.I64: + self.requestCreationTime = iprot.readI64() + else: + iprot.skip(ftype) + elif fid == 19: + if ftype == TType.STRING: + self.requesterUsername = 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('Tenant') + if self.tenantId is not None: + oprot.writeFieldBegin('tenantId', TType.STRING, 1) + oprot.writeString(self.tenantId) + oprot.writeFieldEnd() + if self.tenantApprovalStatus is not None: + oprot.writeFieldBegin('tenantApprovalStatus', TType.I32, 2) + oprot.writeI32(self.tenantApprovalStatus) + oprot.writeFieldEnd() + if self.tenantName is not None: + oprot.writeFieldBegin('tenantName', TType.STRING, 3) + oprot.writeString(self.tenantName) + oprot.writeFieldEnd() + if self.domain is not None: + oprot.writeFieldBegin('domain', TType.STRING, 4) + oprot.writeString(self.domain) + oprot.writeFieldEnd() + if self.emailAddress is not None: + oprot.writeFieldBegin('emailAddress', TType.STRING, 5) + oprot.writeString(self.emailAddress) + oprot.writeFieldEnd() + if self.tenantAcronym is not None: + oprot.writeFieldBegin('tenantAcronym', TType.STRING, 6) + oprot.writeString(self.tenantAcronym) + oprot.writeFieldEnd() + if self.tenantURL is not None: + oprot.writeFieldBegin('tenantURL', TType.STRING, 7) + oprot.writeString(self.tenantURL) + oprot.writeFieldEnd() + if self.tenantPublicAbstract is not None: + oprot.writeFieldBegin('tenantPublicAbstract', TType.STRING, 8) + oprot.writeString(self.tenantPublicAbstract) + oprot.writeFieldEnd() + if self.reviewProposalDescription is not None: + oprot.writeFieldBegin('reviewProposalDescription', TType.STRING, 9) + oprot.writeString(self.reviewProposalDescription) + oprot.writeFieldEnd() + if self.tenantAdminFirstName is not None: + oprot.writeFieldBegin('tenantAdminFirstName', TType.STRING, 10) + oprot.writeString(self.tenantAdminFirstName) + oprot.writeFieldEnd() + if self.tenantAdminLastName is not None: + oprot.writeFieldBegin('tenantAdminLastName', TType.STRING, 11) + oprot.writeString(self.tenantAdminLastName) + oprot.writeFieldEnd() + if self.tenantAdminEmail is not None: + oprot.writeFieldBegin('tenantAdminEmail', TType.STRING, 12) + oprot.writeString(self.tenantAdminEmail) + oprot.writeFieldEnd() + if self.identityServerUserName is not None: + oprot.writeFieldBegin('identityServerUserName', TType.STRING, 13) + oprot.writeString(self.identityServerUserName) + oprot.writeFieldEnd() + if self.identityServerPasswordToken is not None: + oprot.writeFieldBegin('identityServerPasswordToken', TType.STRING, 14) + oprot.writeString(self.identityServerPasswordToken) + oprot.writeFieldEnd() + if self.declinedReason is not None: + oprot.writeFieldBegin('declinedReason', TType.STRING, 15) + oprot.writeString(self.declinedReason) + oprot.writeFieldEnd() + if self.oauthClientId is not None: + oprot.writeFieldBegin('oauthClientId', TType.STRING, 16) + oprot.writeString(self.oauthClientId) + oprot.writeFieldEnd() + if self.oauthClientSecret is not None: + oprot.writeFieldBegin('oauthClientSecret', TType.STRING, 17) + oprot.writeString(self.oauthClientSecret) + oprot.writeFieldEnd() + if self.requestCreationTime is not None: + oprot.writeFieldBegin('requestCreationTime', TType.I64, 18) + oprot.writeI64(self.requestCreationTime) + oprot.writeFieldEnd() + if self.requesterUsername is not None: + oprot.writeFieldBegin('requesterUsername', TType.STRING, 19) + oprot.writeString(self.requesterUsername) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.tenantId is None: + raise TProtocol.TProtocolException(message='Required field tenantId is unset!') + if self.tenantApprovalStatus is None: + raise TProtocol.TProtocolException(message='Required field tenantApprovalStatus is unset!') + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.tenantId) + value = (value * 31) ^ hash(self.tenantApprovalStatus) + value = (value * 31) ^ hash(self.tenantName) + value = (value * 31) ^ hash(self.domain) + value = (value * 31) ^ hash(self.emailAddress) + value = (value * 31) ^ hash(self.tenantAcronym) + value = (value * 31) ^ hash(self.tenantURL) + value = (value * 31) ^ hash(self.tenantPublicAbstract) + value = (value * 31) ^ hash(self.reviewProposalDescription) + value = (value * 31) ^ hash(self.tenantAdminFirstName) + value = (value * 31) ^ hash(self.tenantAdminLastName) + value = (value * 31) ^ hash(self.tenantAdminEmail) + value = (value * 31) ^ hash(self.identityServerUserName) + value = (value * 31) ^ hash(self.identityServerPasswordToken) + value = (value * 31) ^ hash(self.declinedReason) + value = (value * 31) ^ hash(self.oauthClientId) + value = (value * 31) ^ hash(self.oauthClientSecret) + value = (value * 31) ^ hash(self.requestCreationTime) + value = (value * 31) ^ hash(self.requesterUsername) + 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) http://git-wip-us.apache.org/repos/asf/airavata/blob/ddb95c12/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/model/ttypes.py ---------------------------------------------------------------------- diff --git a/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/model/ttypes.py b/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/model/ttypes.py index 72618cf..efe717c 100644 --- a/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/model/ttypes.py +++ b/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/model/ttypes.py @@ -12,6 +12,7 @@ import apache.airavata.model.workspace.ttypes import apache.airavata.api.error.ttypes import apache.airavata.model.messaging.event.ttypes import apache.airavata.model.security.ttypes +import apache.airavata.model.dbevent.ttypes import apache.airavata.model.experiment.ttypes import apache.airavata.model.job.ttypes import apache.airavata.model.task.ttypes @@ -22,6 +23,7 @@ import apache.airavata.model.data.movement.ttypes import apache.airavata.model.data.replica.ttypes import apache.airavata.model.user.ttypes import apache.airavata.model.group.ttypes +import apache.airavata.model.tenant.ttypes import credential_store_data_models.ttypes http://git-wip-us.apache.org/repos/asf/airavata/blob/ddb95c12/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/model/user/ttypes.py ---------------------------------------------------------------------- diff --git a/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/model/user/ttypes.py b/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/model/user/ttypes.py index 7e960e7..4dc61ae 100644 --- a/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/model/user/ttypes.py +++ b/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/model/user/ttypes.py @@ -174,6 +174,7 @@ class NSFDemographics: Attributes: + - airavataInternalUserId - gender - usCitizenship - ethnicities @@ -183,14 +184,16 @@ class NSFDemographics: thrift_spec = ( None, # 0 - (1, TType.STRING, 'gender', None, None, ), # 1 - (2, TType.I32, 'usCitizenship', None, None, ), # 2 - (3, TType.LIST, 'ethnicities', (TType.I32,None), None, ), # 3 - (4, TType.LIST, 'races', (TType.I32,None), None, ), # 4 - (5, TType.LIST, 'disabilities', (TType.I32,None), None, ), # 5 + (1, TType.STRING, 'airavataInternalUserId', None, "DO_NOT_SET_AT_CLIENTS", ), # 1 + (2, TType.STRING, 'gender', None, None, ), # 2 + (3, TType.I32, 'usCitizenship', None, None, ), # 3 + (4, TType.LIST, 'ethnicities', (TType.I32,None), None, ), # 4 + (5, TType.LIST, 'races', (TType.I32,None), None, ), # 5 + (6, TType.LIST, 'disabilities', (TType.I32,None), None, ), # 6 ) - def __init__(self, gender=None, usCitizenship=None, ethnicities=None, races=None, disabilities=None,): + def __init__(self, airavataInternalUserId=thrift_spec[1][4], gender=None, usCitizenship=None, ethnicities=None, races=None, disabilities=None,): + self.airavataInternalUserId = airavataInternalUserId self.gender = gender self.usCitizenship = usCitizenship self.ethnicities = ethnicities @@ -208,15 +211,20 @@ class NSFDemographics: break if fid == 1: if ftype == TType.STRING: - self.gender = iprot.readString() + self.airavataInternalUserId = iprot.readString() else: iprot.skip(ftype) elif fid == 2: + if ftype == TType.STRING: + self.gender = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 3: if ftype == TType.I32: self.usCitizenship = iprot.readI32() else: iprot.skip(ftype) - elif fid == 3: + elif fid == 4: if ftype == TType.LIST: self.ethnicities = [] (_etype3, _size0) = iprot.readListBegin() @@ -226,7 +234,7 @@ class NSFDemographics: iprot.readListEnd() else: iprot.skip(ftype) - elif fid == 4: + elif fid == 5: if ftype == TType.LIST: self.races = [] (_etype9, _size6) = iprot.readListBegin() @@ -236,7 +244,7 @@ class NSFDemographics: iprot.readListEnd() else: iprot.skip(ftype) - elif fid == 5: + elif fid == 6: if ftype == TType.LIST: self.disabilities = [] (_etype15, _size12) = iprot.readListBegin() @@ -256,30 +264,34 @@ class NSFDemographics: oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) return oprot.writeStructBegin('NSFDemographics') + if self.airavataInternalUserId is not None: + oprot.writeFieldBegin('airavataInternalUserId', TType.STRING, 1) + oprot.writeString(self.airavataInternalUserId) + oprot.writeFieldEnd() if self.gender is not None: - oprot.writeFieldBegin('gender', TType.STRING, 1) + oprot.writeFieldBegin('gender', TType.STRING, 2) oprot.writeString(self.gender) oprot.writeFieldEnd() if self.usCitizenship is not None: - oprot.writeFieldBegin('usCitizenship', TType.I32, 2) + oprot.writeFieldBegin('usCitizenship', TType.I32, 3) oprot.writeI32(self.usCitizenship) oprot.writeFieldEnd() if self.ethnicities is not None: - oprot.writeFieldBegin('ethnicities', TType.LIST, 3) + oprot.writeFieldBegin('ethnicities', TType.LIST, 4) oprot.writeListBegin(TType.I32, len(self.ethnicities)) for iter18 in self.ethnicities: oprot.writeI32(iter18) oprot.writeListEnd() oprot.writeFieldEnd() if self.races is not None: - oprot.writeFieldBegin('races', TType.LIST, 4) + oprot.writeFieldBegin('races', TType.LIST, 5) oprot.writeListBegin(TType.I32, len(self.races)) for iter19 in self.races: oprot.writeI32(iter19) oprot.writeListEnd() oprot.writeFieldEnd() if self.disabilities is not None: - oprot.writeFieldBegin('disabilities', TType.LIST, 5) + oprot.writeFieldBegin('disabilities', TType.LIST, 6) oprot.writeListBegin(TType.I32, len(self.disabilities)) for iter20 in self.disabilities: oprot.writeI32(iter20) @@ -289,11 +301,14 @@ class NSFDemographics: oprot.writeStructEnd() def validate(self): + if self.airavataInternalUserId is None: + raise TProtocol.TProtocolException(message='Required field airavataInternalUserId is unset!') return def __hash__(self): value = 17 + value = (value * 31) ^ hash(self.airavataInternalUserId) value = (value * 31) ^ hash(self.gender) value = (value * 31) ^ hash(self.usCitizenship) value = (value * 31) ^ hash(self.ethnicities) @@ -334,6 +349,12 @@ class UserProfile: * Externally assertable unique identifier. SAML (primarly in higher education, academic) tends to keep * user name less opaque. OpenID Connect maintains them to be opaque. * + * firstName, middleName, lastName: + * First and Last names as assertede by the user + * + * namePrefix, nameSuffix: + * prefix and suffix to the users name as asserted by the user + * * emails: * Email identifier are Verified, REQUIRED and MULTIVALUED * @@ -371,6 +392,11 @@ class UserProfile: - userId - gatewayId - emails + - firstName + - lastName + - middleName + - namePrefix + - nameSuffix - userName - orcidId - phones @@ -396,30 +422,40 @@ class UserProfile: (3, TType.STRING, 'userId', None, None, ), # 3 (4, TType.STRING, 'gatewayId', None, None, ), # 4 (5, TType.LIST, 'emails', (TType.STRING,None), None, ), # 5 - (6, TType.STRING, 'userName', None, None, ), # 6 - (7, TType.STRING, 'orcidId', None, None, ), # 7 - (8, TType.LIST, 'phones', (TType.STRING,None), None, ), # 8 - (9, TType.STRING, 'country', None, None, ), # 9 - (10, TType.LIST, 'nationality', (TType.STRING,None), None, ), # 10 - (11, TType.STRING, 'homeOrganization', None, None, ), # 11 - (12, TType.STRING, 'orginationAffiliation', None, None, ), # 12 - (13, TType.STRING, 'creationTime', None, None, ), # 13 - (14, TType.STRING, 'lastAccessTime', None, None, ), # 14 - (15, TType.STRING, 'validUntil', None, None, ), # 15 - (16, TType.I32, 'State', None, None, ), # 16 - (17, TType.STRING, 'comments', None, None, ), # 17 - (18, TType.LIST, 'labeledURI', (TType.STRING,None), None, ), # 18 - (19, TType.STRING, 'gpgKey', None, None, ), # 19 - (20, TType.STRING, 'timeZone', None, None, ), # 20 - (21, TType.STRUCT, 'nsfDemographics', (NSFDemographics, NSFDemographics.thrift_spec), None, ), # 21 + (6, TType.STRING, 'firstName', None, None, ), # 6 + (7, TType.STRING, 'lastName', None, None, ), # 7 + (8, TType.STRING, 'middleName', None, None, ), # 8 + (9, TType.STRING, 'namePrefix', None, None, ), # 9 + (10, TType.STRING, 'nameSuffix', None, None, ), # 10 + (11, TType.STRING, 'userName', None, None, ), # 11 + (12, TType.STRING, 'orcidId', None, None, ), # 12 + (13, TType.LIST, 'phones', (TType.STRING,None), None, ), # 13 + (14, TType.STRING, 'country', None, None, ), # 14 + (15, TType.LIST, 'nationality', (TType.STRING,None), None, ), # 15 + (16, TType.STRING, 'homeOrganization', None, None, ), # 16 + (17, TType.STRING, 'orginationAffiliation', None, None, ), # 17 + (18, TType.I64, 'creationTime', None, None, ), # 18 + (19, TType.I64, 'lastAccessTime', None, None, ), # 19 + (20, TType.I64, 'validUntil', None, None, ), # 20 + (21, TType.I32, 'State', None, None, ), # 21 + (22, TType.STRING, 'comments', None, None, ), # 22 + (23, TType.LIST, 'labeledURI', (TType.STRING,None), None, ), # 23 + (24, TType.STRING, 'gpgKey', None, None, ), # 24 + (25, TType.STRING, 'timeZone', None, None, ), # 25 + (26, TType.STRUCT, 'nsfDemographics', (NSFDemographics, NSFDemographics.thrift_spec), None, ), # 26 ) - def __init__(self, userModelVersion=thrift_spec[1][4], airavataInternalUserId=thrift_spec[2][4], userId=None, gatewayId=None, emails=None, userName=None, orcidId=None, phones=None, country=None, nationality=None, homeOrganization=None, orginationAffiliation=None, creationTime=None, lastAccessTime=None, validUntil=None, State=None, comments=None, labeledURI=None, gpgKey=None, timeZone=None, nsfDemographics=None,): + def __init__(self, userModelVersion=thrift_spec[1][4], airavataInternalUserId=thrift_spec[2][4], userId=None, gatewayId=None, emails=None, firstName=None, lastName=None, middleName=None, namePrefix=None, nameSuffix=None, userName=None, orcidId=None, phones=None, country=None, nationality=None, homeOrganization=None, orginationAffiliation=None, creationTime=None, lastAccessTime=None, validUntil=None, State=None, comments=None, labeledURI=None, gpgKey=None, timeZone=None, nsfDemographics=None,): self.userModelVersion = userModelVersion self.airavataInternalUserId = airavataInternalUserId self.userId = userId self.gatewayId = gatewayId self.emails = emails + self.firstName = firstName + self.lastName = lastName + self.middleName = middleName + self.namePrefix = namePrefix + self.nameSuffix = nameSuffix self.userName = userName self.orcidId = orcidId self.phones = phones @@ -478,15 +514,40 @@ class UserProfile: iprot.skip(ftype) elif fid == 6: if ftype == TType.STRING: - self.userName = iprot.readString() + self.firstName = iprot.readString() else: iprot.skip(ftype) elif fid == 7: if ftype == TType.STRING: - self.orcidId = iprot.readString() + self.lastName = iprot.readString() else: iprot.skip(ftype) elif fid == 8: + if ftype == TType.STRING: + self.middleName = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 9: + if ftype == TType.STRING: + self.namePrefix = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 10: + if ftype == TType.STRING: + self.nameSuffix = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 11: + if ftype == TType.STRING: + self.userName = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 12: + if ftype == TType.STRING: + self.orcidId = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 13: if ftype == TType.LIST: self.phones = [] (_etype30, _size27) = iprot.readListBegin() @@ -496,12 +557,12 @@ class UserProfile: iprot.readListEnd() else: iprot.skip(ftype) - elif fid == 9: + elif fid == 14: if ftype == TType.STRING: self.country = iprot.readString() else: iprot.skip(ftype) - elif fid == 10: + elif fid == 15: if ftype == TType.LIST: self.nationality = [] (_etype36, _size33) = iprot.readListBegin() @@ -511,42 +572,42 @@ class UserProfile: iprot.readListEnd() else: iprot.skip(ftype) - elif fid == 11: + elif fid == 16: if ftype == TType.STRING: self.homeOrganization = iprot.readString() else: iprot.skip(ftype) - elif fid == 12: + elif fid == 17: if ftype == TType.STRING: self.orginationAffiliation = iprot.readString() else: iprot.skip(ftype) - elif fid == 13: - if ftype == TType.STRING: - self.creationTime = iprot.readString() + elif fid == 18: + if ftype == TType.I64: + self.creationTime = iprot.readI64() else: iprot.skip(ftype) - elif fid == 14: - if ftype == TType.STRING: - self.lastAccessTime = iprot.readString() + elif fid == 19: + if ftype == TType.I64: + self.lastAccessTime = iprot.readI64() else: iprot.skip(ftype) - elif fid == 15: - if ftype == TType.STRING: - self.validUntil = iprot.readString() + elif fid == 20: + if ftype == TType.I64: + self.validUntil = iprot.readI64() else: iprot.skip(ftype) - elif fid == 16: + elif fid == 21: if ftype == TType.I32: self.State = iprot.readI32() else: iprot.skip(ftype) - elif fid == 17: + elif fid == 22: if ftype == TType.STRING: self.comments = iprot.readString() else: iprot.skip(ftype) - elif fid == 18: + elif fid == 23: if ftype == TType.LIST: self.labeledURI = [] (_etype42, _size39) = iprot.readListBegin() @@ -556,17 +617,17 @@ class UserProfile: iprot.readListEnd() else: iprot.skip(ftype) - elif fid == 19: + elif fid == 24: if ftype == TType.STRING: self.gpgKey = iprot.readString() else: iprot.skip(ftype) - elif fid == 20: + elif fid == 25: if ftype == TType.STRING: self.timeZone = iprot.readString() else: iprot.skip(ftype) - elif fid == 21: + elif fid == 26: if ftype == TType.STRUCT: self.nsfDemographics = NSFDemographics() self.nsfDemographics.read(iprot) @@ -605,77 +666,97 @@ class UserProfile: oprot.writeString(iter45) oprot.writeListEnd() oprot.writeFieldEnd() + if self.firstName is not None: + oprot.writeFieldBegin('firstName', TType.STRING, 6) + oprot.writeString(self.firstName) + oprot.writeFieldEnd() + if self.lastName is not None: + oprot.writeFieldBegin('lastName', TType.STRING, 7) + oprot.writeString(self.lastName) + oprot.writeFieldEnd() + if self.middleName is not None: + oprot.writeFieldBegin('middleName', TType.STRING, 8) + oprot.writeString(self.middleName) + oprot.writeFieldEnd() + if self.namePrefix is not None: + oprot.writeFieldBegin('namePrefix', TType.STRING, 9) + oprot.writeString(self.namePrefix) + oprot.writeFieldEnd() + if self.nameSuffix is not None: + oprot.writeFieldBegin('nameSuffix', TType.STRING, 10) + oprot.writeString(self.nameSuffix) + oprot.writeFieldEnd() if self.userName is not None: - oprot.writeFieldBegin('userName', TType.STRING, 6) + oprot.writeFieldBegin('userName', TType.STRING, 11) oprot.writeString(self.userName) oprot.writeFieldEnd() if self.orcidId is not None: - oprot.writeFieldBegin('orcidId', TType.STRING, 7) + oprot.writeFieldBegin('orcidId', TType.STRING, 12) oprot.writeString(self.orcidId) oprot.writeFieldEnd() if self.phones is not None: - oprot.writeFieldBegin('phones', TType.LIST, 8) + oprot.writeFieldBegin('phones', TType.LIST, 13) oprot.writeListBegin(TType.STRING, len(self.phones)) for iter46 in self.phones: oprot.writeString(iter46) oprot.writeListEnd() oprot.writeFieldEnd() if self.country is not None: - oprot.writeFieldBegin('country', TType.STRING, 9) + oprot.writeFieldBegin('country', TType.STRING, 14) oprot.writeString(self.country) oprot.writeFieldEnd() if self.nationality is not None: - oprot.writeFieldBegin('nationality', TType.LIST, 10) + oprot.writeFieldBegin('nationality', TType.LIST, 15) oprot.writeListBegin(TType.STRING, len(self.nationality)) for iter47 in self.nationality: oprot.writeString(iter47) oprot.writeListEnd() oprot.writeFieldEnd() if self.homeOrganization is not None: - oprot.writeFieldBegin('homeOrganization', TType.STRING, 11) + oprot.writeFieldBegin('homeOrganization', TType.STRING, 16) oprot.writeString(self.homeOrganization) oprot.writeFieldEnd() if self.orginationAffiliation is not None: - oprot.writeFieldBegin('orginationAffiliation', TType.STRING, 12) + oprot.writeFieldBegin('orginationAffiliation', TType.STRING, 17) oprot.writeString(self.orginationAffiliation) oprot.writeFieldEnd() if self.creationTime is not None: - oprot.writeFieldBegin('creationTime', TType.STRING, 13) - oprot.writeString(self.creationTime) + oprot.writeFieldBegin('creationTime', TType.I64, 18) + oprot.writeI64(self.creationTime) oprot.writeFieldEnd() if self.lastAccessTime is not None: - oprot.writeFieldBegin('lastAccessTime', TType.STRING, 14) - oprot.writeString(self.lastAccessTime) + oprot.writeFieldBegin('lastAccessTime', TType.I64, 19) + oprot.writeI64(self.lastAccessTime) oprot.writeFieldEnd() if self.validUntil is not None: - oprot.writeFieldBegin('validUntil', TType.STRING, 15) - oprot.writeString(self.validUntil) + oprot.writeFieldBegin('validUntil', TType.I64, 20) + oprot.writeI64(self.validUntil) oprot.writeFieldEnd() if self.State is not None: - oprot.writeFieldBegin('State', TType.I32, 16) + oprot.writeFieldBegin('State', TType.I32, 21) oprot.writeI32(self.State) oprot.writeFieldEnd() if self.comments is not None: - oprot.writeFieldBegin('comments', TType.STRING, 17) + oprot.writeFieldBegin('comments', TType.STRING, 22) oprot.writeString(self.comments) oprot.writeFieldEnd() if self.labeledURI is not None: - oprot.writeFieldBegin('labeledURI', TType.LIST, 18) + oprot.writeFieldBegin('labeledURI', TType.LIST, 23) oprot.writeListBegin(TType.STRING, len(self.labeledURI)) for iter48 in self.labeledURI: oprot.writeString(iter48) oprot.writeListEnd() oprot.writeFieldEnd() if self.gpgKey is not None: - oprot.writeFieldBegin('gpgKey', TType.STRING, 19) + oprot.writeFieldBegin('gpgKey', TType.STRING, 24) oprot.writeString(self.gpgKey) oprot.writeFieldEnd() if self.timeZone is not None: - oprot.writeFieldBegin('timeZone', TType.STRING, 20) + oprot.writeFieldBegin('timeZone', TType.STRING, 25) oprot.writeString(self.timeZone) oprot.writeFieldEnd() if self.nsfDemographics is not None: - oprot.writeFieldBegin('nsfDemographics', TType.STRUCT, 21) + oprot.writeFieldBegin('nsfDemographics', TType.STRUCT, 26) self.nsfDemographics.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() @@ -692,6 +773,10 @@ class UserProfile: raise TProtocol.TProtocolException(message='Required field gatewayId is unset!') if self.emails is None: raise TProtocol.TProtocolException(message='Required field emails is unset!') + if self.firstName is None: + raise TProtocol.TProtocolException(message='Required field firstName is unset!') + if self.lastName is None: + raise TProtocol.TProtocolException(message='Required field lastName is unset!') if self.creationTime is None: raise TProtocol.TProtocolException(message='Required field creationTime is unset!') if self.lastAccessTime is None: @@ -710,6 +795,11 @@ class UserProfile: value = (value * 31) ^ hash(self.userId) value = (value * 31) ^ hash(self.gatewayId) value = (value * 31) ^ hash(self.emails) + value = (value * 31) ^ hash(self.firstName) + value = (value * 31) ^ hash(self.lastName) + value = (value * 31) ^ hash(self.middleName) + value = (value * 31) ^ hash(self.namePrefix) + value = (value * 31) ^ hash(self.nameSuffix) value = (value * 31) ^ hash(self.userName) value = (value * 31) ^ hash(self.orcidId) value = (value * 31) ^ hash(self.phones)
