http://git-wip-us.apache.org/repos/asf/airavata/blob/39fba1f5/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 22adc42..ca2ecbb 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 @@ -1,511 +1,477 @@ # -# 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 from thrift.transport import TTransport -from thrift.protocol import TBinaryProtocol, TProtocol -try: - from thrift.protocol import fastbinary -except: - fastbinary = None - - -class ReplicaLocationCategory: - GATEWAY_DATA_STORE = 0 - COMPUTE_RESOURCE = 1 - LONG_TERM_STORAGE_RESOURCE = 2 - OTHER = 3 - - _VALUES_TO_NAMES = { - 0: "GATEWAY_DATA_STORE", - 1: "COMPUTE_RESOURCE", - 2: "LONG_TERM_STORAGE_RESOURCE", - 3: "OTHER", - } - - _NAMES_TO_VALUES = { - "GATEWAY_DATA_STORE": 0, - "COMPUTE_RESOURCE": 1, - "LONG_TERM_STORAGE_RESOURCE": 2, - "OTHER": 3, - } - -class ReplicaPersistentType: - TRANSIENT = 0 - PERSISTENT = 1 - - _VALUES_TO_NAMES = { - 0: "TRANSIENT", - 1: "PERSISTENT", - } - - _NAMES_TO_VALUES = { - "TRANSIENT": 0, - "PERSISTENT": 1, - } - -class DataProductType: - FILE = 0 - COLLECTION = 1 - - _VALUES_TO_NAMES = { - 0: "FILE", - 1: "COLLECTION", - } - - _NAMES_TO_VALUES = { - "FILE": 0, - "COLLECTION": 1, - } - - -class DataReplicaLocationModel: - """ - Attributes: - - replicaId - - productUri - - replicaName - - replicaDescription - - creationTime - - lastModifiedTime - - validUntilTime - - replicaLocationCategory - - replicaPersistentType - - storageResourceId - - filePath - - replicaMetadata - """ - - 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 - ) - - 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.replicaName = replicaName - self.replicaDescription = replicaDescription - self.creationTime = creationTime - self.lastModifiedTime = lastModifiedTime - 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: - 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.replicaId = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRING: - self.productUri = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.STRING: - self.replicaName = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 4: - if ftype == TType.STRING: - self.replicaDescription = 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.I64: - self.lastModifiedTime = iprot.readI64() - else: - iprot.skip(ftype) - elif fid == 7: - if ftype == TType.I64: - self.validUntilTime = iprot.readI64() - else: - iprot.skip(ftype) - elif fid == 8: - if ftype == TType.I32: - self.replicaLocationCategory = iprot.readI32() - else: - iprot.skip(ftype) - elif fid == 9: - if ftype == TType.I32: - self.replicaPersistentType = iprot.readI32() - else: - iprot.skip(ftype) - elif fid == 10: - 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.replicaMetadata = {} - (_ktype1, _vtype2, _size0 ) = iprot.readMapBegin() - for _i4 in xrange(_size0): - _key5 = iprot.readString() - _val6 = iprot.readString() - self.replicaMetadata[_key5] = _val6 - iprot.readMapEnd() - 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('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, 2) - oprot.writeString(self.productUri) - oprot.writeFieldEnd() - if self.replicaName is not None: - oprot.writeFieldBegin('replicaName', TType.STRING, 3) - oprot.writeString(self.replicaName) - oprot.writeFieldEnd() - if self.replicaDescription is not None: - oprot.writeFieldBegin('replicaDescription', TType.STRING, 4) - oprot.writeString(self.replicaDescription) - oprot.writeFieldEnd() - if self.creationTime is not None: - oprot.writeFieldBegin('creationTime', TType.I64, 5) - oprot.writeI64(self.creationTime) - oprot.writeFieldEnd() - if self.lastModifiedTime is not None: - oprot.writeFieldBegin('lastModifiedTime', TType.I64, 6) - oprot.writeI64(self.lastModifiedTime) - oprot.writeFieldEnd() - if self.validUntilTime is not None: - oprot.writeFieldBegin('validUntilTime', TType.I64, 7) - oprot.writeI64(self.validUntilTime) - oprot.writeFieldEnd() - if self.replicaLocationCategory is not None: - oprot.writeFieldBegin('replicaLocationCategory', TType.I32, 8) - oprot.writeI32(self.replicaLocationCategory) - oprot.writeFieldEnd() - if self.replicaPersistentType is not None: - oprot.writeFieldBegin('replicaPersistentType', TType.I32, 9) - oprot.writeI32(self.replicaPersistentType) - oprot.writeFieldEnd() - if self.storageResourceId is not None: - oprot.writeFieldBegin('storageResourceId', TType.STRING, 10) - oprot.writeString(self.storageResourceId) - oprot.writeFieldEnd() - if self.filePath is not None: - oprot.writeFieldBegin('filePath', TType.STRING, 11) - oprot.writeString(self.filePath) - oprot.writeFieldEnd() - 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() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - 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.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) - 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 DataProductModel: - """ - Attributes: - - productUri - - gatewayId - - parentProductUri - - productName - - productDescription - - ownerName - - dataProductType - - productSize - - creationTime - - lastModifiedTime - - productMetadata - - replicaLocations - """ - - 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 - ) - - 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.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.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: - 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.productUri = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRING: - self.gatewayId = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.STRING: - self.parentProductUri = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 4: - if ftype == TType.STRING: - self.productName = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 5: - if ftype == TType.STRING: - self.productDescription = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 6: - if ftype == TType.STRING: - self.ownerName = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 7: - if ftype == TType.I32: - self.dataProductType = iprot.readI32() - else: - iprot.skip(ftype) - elif fid == 8: - if ftype == TType.I32: - self.productSize = iprot.readI32() - else: - iprot.skip(ftype) - elif fid == 9: - if ftype == TType.I64: - self.creationTime = iprot.readI64() - else: - iprot.skip(ftype) - elif fid == 10: - if ftype == TType.I64: - self.lastModifiedTime = iprot.readI64() - else: - iprot.skip(ftype) - elif fid == 11: - 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.LIST: - self.replicaLocations = [] - (_etype19, _size16) = iprot.readListBegin() - for _i20 in xrange(_size16): - _elem21 = DataReplicaLocationModel() - _elem21.read(iprot) - self.replicaLocations.append(_elem21) - 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('DataProductModel') - if self.productUri is not None: - oprot.writeFieldBegin('productUri', TType.STRING, 1) - oprot.writeString(self.productUri) - oprot.writeFieldEnd() - if self.gatewayId is not None: - oprot.writeFieldBegin('gatewayId', TType.STRING, 2) - oprot.writeString(self.gatewayId) - oprot.writeFieldEnd() - if self.parentProductUri is not None: - oprot.writeFieldBegin('parentProductUri', TType.STRING, 3) - oprot.writeString(self.parentProductUri) - oprot.writeFieldEnd() - if self.productName is not None: - oprot.writeFieldBegin('productName', TType.STRING, 4) - oprot.writeString(self.productName) - oprot.writeFieldEnd() - if self.productDescription is not None: - oprot.writeFieldBegin('productDescription', TType.STRING, 5) - oprot.writeString(self.productDescription) - oprot.writeFieldEnd() - if self.ownerName is not None: - oprot.writeFieldBegin('ownerName', TType.STRING, 6) - oprot.writeString(self.ownerName) - oprot.writeFieldEnd() - if self.dataProductType is not None: - oprot.writeFieldBegin('dataProductType', TType.I32, 7) - oprot.writeI32(self.dataProductType) - oprot.writeFieldEnd() - if self.productSize is not None: - oprot.writeFieldBegin('productSize', TType.I32, 8) - oprot.writeI32(self.productSize) - oprot.writeFieldEnd() - if self.creationTime is not None: - oprot.writeFieldBegin('creationTime', TType.I64, 9) - oprot.writeI64(self.creationTime) - oprot.writeFieldEnd() - if self.lastModifiedTime is not None: - oprot.writeFieldBegin('lastModifiedTime', TType.I64, 10) - oprot.writeI64(self.lastModifiedTime) - oprot.writeFieldEnd() - 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() - - def validate(self): - return - - - def __hash__(self): - value = 17 - 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.creationTime) - value = (value * 31) ^ hash(self.lastModifiedTime) - value = (value * 31) ^ hash(self.productMetadata) - value = (value * 31) ^ hash(self.replicaLocations) - 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 ReplicaLocationCategory(object): + GATEWAY_DATA_STORE = 0 + COMPUTE_RESOURCE = 1 + LONG_TERM_STORAGE_RESOURCE = 2 + OTHER = 3 + + _VALUES_TO_NAMES = { + 0: "GATEWAY_DATA_STORE", + 1: "COMPUTE_RESOURCE", + 2: "LONG_TERM_STORAGE_RESOURCE", + 3: "OTHER", + } + + _NAMES_TO_VALUES = { + "GATEWAY_DATA_STORE": 0, + "COMPUTE_RESOURCE": 1, + "LONG_TERM_STORAGE_RESOURCE": 2, + "OTHER": 3, + } + + +class ReplicaPersistentType(object): + TRANSIENT = 0 + PERSISTENT = 1 + + _VALUES_TO_NAMES = { + 0: "TRANSIENT", + 1: "PERSISTENT", + } + + _NAMES_TO_VALUES = { + "TRANSIENT": 0, + "PERSISTENT": 1, + } + + +class DataProductType(object): + FILE = 0 + COLLECTION = 1 + + _VALUES_TO_NAMES = { + 0: "FILE", + 1: "COLLECTION", + } + + _NAMES_TO_VALUES = { + "FILE": 0, + "COLLECTION": 1, + } + + +class DataReplicaLocationModel(object): + """ + Attributes: + - replicaId + - productUri + - replicaName + - replicaDescription + - creationTime + - lastModifiedTime + - validUntilTime + - replicaLocationCategory + - replicaPersistentType + - storageResourceId + - filePath + - replicaMetadata + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'replicaId', 'UTF8', None, ), # 1 + (2, TType.STRING, 'productUri', 'UTF8', None, ), # 2 + (3, TType.STRING, 'replicaName', 'UTF8', None, ), # 3 + (4, TType.STRING, 'replicaDescription', 'UTF8', 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', 'UTF8', None, ), # 10 + (11, TType.STRING, 'filePath', 'UTF8', None, ), # 11 + (12, TType.MAP, 'replicaMetadata', (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), 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 + self.productUri = productUri + self.replicaName = replicaName + self.replicaDescription = replicaDescription + self.creationTime = creationTime + self.lastModifiedTime = lastModifiedTime + self.validUntilTime = validUntilTime + self.replicaLocationCategory = replicaLocationCategory + self.replicaPersistentType = replicaPersistentType + self.storageResourceId = storageResourceId + self.filePath = filePath + self.replicaMetadata = replicaMetadata + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.replicaId = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.productUri = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.replicaName = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRING: + self.replicaDescription = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else 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.I64: + self.lastModifiedTime = iprot.readI64() + else: + iprot.skip(ftype) + elif fid == 7: + if ftype == TType.I64: + self.validUntilTime = iprot.readI64() + else: + iprot.skip(ftype) + elif fid == 8: + if ftype == TType.I32: + self.replicaLocationCategory = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 9: + if ftype == TType.I32: + self.replicaPersistentType = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 10: + if ftype == TType.STRING: + self.storageResourceId = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + else: + iprot.skip(ftype) + elif fid == 11: + if ftype == TType.STRING: + self.filePath = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + else: + iprot.skip(ftype) + elif fid == 12: + if ftype == TType.MAP: + self.replicaMetadata = {} + (_ktype1, _vtype2, _size0) = iprot.readMapBegin() + for _i4 in range(_size0): + _key5 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + _val6 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + self.replicaMetadata[_key5] = _val6 + iprot.readMapEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('DataReplicaLocationModel') + if self.replicaId is not None: + oprot.writeFieldBegin('replicaId', TType.STRING, 1) + oprot.writeString(self.replicaId.encode('utf-8') if sys.version_info[0] == 2 else self.replicaId) + oprot.writeFieldEnd() + if self.productUri is not None: + oprot.writeFieldBegin('productUri', TType.STRING, 2) + oprot.writeString(self.productUri.encode('utf-8') if sys.version_info[0] == 2 else self.productUri) + oprot.writeFieldEnd() + if self.replicaName is not None: + oprot.writeFieldBegin('replicaName', TType.STRING, 3) + oprot.writeString(self.replicaName.encode('utf-8') if sys.version_info[0] == 2 else self.replicaName) + oprot.writeFieldEnd() + if self.replicaDescription is not None: + oprot.writeFieldBegin('replicaDescription', TType.STRING, 4) + oprot.writeString(self.replicaDescription.encode('utf-8') if sys.version_info[0] == 2 else self.replicaDescription) + oprot.writeFieldEnd() + if self.creationTime is not None: + oprot.writeFieldBegin('creationTime', TType.I64, 5) + oprot.writeI64(self.creationTime) + oprot.writeFieldEnd() + if self.lastModifiedTime is not None: + oprot.writeFieldBegin('lastModifiedTime', TType.I64, 6) + oprot.writeI64(self.lastModifiedTime) + oprot.writeFieldEnd() + if self.validUntilTime is not None: + oprot.writeFieldBegin('validUntilTime', TType.I64, 7) + oprot.writeI64(self.validUntilTime) + oprot.writeFieldEnd() + if self.replicaLocationCategory is not None: + oprot.writeFieldBegin('replicaLocationCategory', TType.I32, 8) + oprot.writeI32(self.replicaLocationCategory) + oprot.writeFieldEnd() + if self.replicaPersistentType is not None: + oprot.writeFieldBegin('replicaPersistentType', TType.I32, 9) + oprot.writeI32(self.replicaPersistentType) + oprot.writeFieldEnd() + if self.storageResourceId is not None: + oprot.writeFieldBegin('storageResourceId', TType.STRING, 10) + oprot.writeString(self.storageResourceId.encode('utf-8') if sys.version_info[0] == 2 else self.storageResourceId) + oprot.writeFieldEnd() + if self.filePath is not None: + oprot.writeFieldBegin('filePath', TType.STRING, 11) + oprot.writeString(self.filePath.encode('utf-8') if sys.version_info[0] == 2 else self.filePath) + oprot.writeFieldEnd() + 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.encode('utf-8') if sys.version_info[0] == 2 else kiter7) + oprot.writeString(viter8.encode('utf-8') if sys.version_info[0] == 2 else viter8) + oprot.writeMapEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class DataProductModel(object): + """ + Attributes: + - productUri + - gatewayId + - parentProductUri + - productName + - productDescription + - ownerName + - dataProductType + - productSize + - creationTime + - lastModifiedTime + - productMetadata + - replicaLocations + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'productUri', 'UTF8', None, ), # 1 + (2, TType.STRING, 'gatewayId', 'UTF8', None, ), # 2 + (3, TType.STRING, 'parentProductUri', 'UTF8', None, ), # 3 + (4, TType.STRING, 'productName', 'UTF8', None, ), # 4 + (5, TType.STRING, 'productDescription', 'UTF8', None, ), # 5 + (6, TType.STRING, 'ownerName', 'UTF8', 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, 'UTF8', TType.STRING, 'UTF8', False), None, ), # 11 + (12, TType.LIST, 'replicaLocations', (TType.STRUCT, (DataReplicaLocationModel, DataReplicaLocationModel.thrift_spec), False), 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,): + 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.creationTime = creationTime + self.lastModifiedTime = lastModifiedTime + self.productMetadata = productMetadata + self.replicaLocations = replicaLocations + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.productUri = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.gatewayId = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.parentProductUri = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRING: + self.productName = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.STRING: + self.productDescription = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + else: + iprot.skip(ftype) + elif fid == 6: + if ftype == TType.STRING: + self.ownerName = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + else: + iprot.skip(ftype) + elif fid == 7: + if ftype == TType.I32: + self.dataProductType = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 8: + if ftype == TType.I32: + self.productSize = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 9: + if ftype == TType.I64: + self.creationTime = iprot.readI64() + else: + iprot.skip(ftype) + elif fid == 10: + if ftype == TType.I64: + self.lastModifiedTime = iprot.readI64() + else: + iprot.skip(ftype) + elif fid == 11: + if ftype == TType.MAP: + self.productMetadata = {} + (_ktype10, _vtype11, _size9) = iprot.readMapBegin() + for _i13 in range(_size9): + _key14 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + _val15 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + self.productMetadata[_key14] = _val15 + iprot.readMapEnd() + else: + iprot.skip(ftype) + elif fid == 12: + if ftype == TType.LIST: + self.replicaLocations = [] + (_etype19, _size16) = iprot.readListBegin() + for _i20 in range(_size16): + _elem21 = DataReplicaLocationModel() + _elem21.read(iprot) + self.replicaLocations.append(_elem21) + iprot.readListEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('DataProductModel') + if self.productUri is not None: + oprot.writeFieldBegin('productUri', TType.STRING, 1) + oprot.writeString(self.productUri.encode('utf-8') if sys.version_info[0] == 2 else self.productUri) + oprot.writeFieldEnd() + if self.gatewayId is not None: + oprot.writeFieldBegin('gatewayId', TType.STRING, 2) + oprot.writeString(self.gatewayId.encode('utf-8') if sys.version_info[0] == 2 else self.gatewayId) + oprot.writeFieldEnd() + if self.parentProductUri is not None: + oprot.writeFieldBegin('parentProductUri', TType.STRING, 3) + oprot.writeString(self.parentProductUri.encode('utf-8') if sys.version_info[0] == 2 else self.parentProductUri) + oprot.writeFieldEnd() + if self.productName is not None: + oprot.writeFieldBegin('productName', TType.STRING, 4) + oprot.writeString(self.productName.encode('utf-8') if sys.version_info[0] == 2 else self.productName) + oprot.writeFieldEnd() + if self.productDescription is not None: + oprot.writeFieldBegin('productDescription', TType.STRING, 5) + oprot.writeString(self.productDescription.encode('utf-8') if sys.version_info[0] == 2 else self.productDescription) + oprot.writeFieldEnd() + if self.ownerName is not None: + oprot.writeFieldBegin('ownerName', TType.STRING, 6) + oprot.writeString(self.ownerName.encode('utf-8') if sys.version_info[0] == 2 else self.ownerName) + oprot.writeFieldEnd() + if self.dataProductType is not None: + oprot.writeFieldBegin('dataProductType', TType.I32, 7) + oprot.writeI32(self.dataProductType) + oprot.writeFieldEnd() + if self.productSize is not None: + oprot.writeFieldBegin('productSize', TType.I32, 8) + oprot.writeI32(self.productSize) + oprot.writeFieldEnd() + if self.creationTime is not None: + oprot.writeFieldBegin('creationTime', TType.I64, 9) + oprot.writeI64(self.creationTime) + oprot.writeFieldEnd() + if self.lastModifiedTime is not None: + oprot.writeFieldBegin('lastModifiedTime', TType.I64, 10) + oprot.writeI64(self.lastModifiedTime) + oprot.writeFieldEnd() + 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.encode('utf-8') if sys.version_info[0] == 2 else kiter22) + oprot.writeString(viter23.encode('utf-8') if sys.version_info[0] == 2 else 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() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other)
http://git-wip-us.apache.org/repos/asf/airavata/blob/39fba1f5/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 index 4a6492b..eb0d35a 100644 --- 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 @@ -1,11 +1,12 @@ # -# 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 ttypes import * - +from thrift.Thrift import TType, TMessageType, TFrozenDict, TException, TApplicationException +from thrift.protocol.TProtocol import TProtocolException +import sys +from .ttypes import * http://git-wip-us.apache.org/repos/asf/airavata/blob/39fba1f5/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 index 996f5bb..d33f0df 100644 --- 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 @@ -1,494 +1,462 @@ # -# 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 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) + + +class CrudType(object): + 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(object): + 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(object): + PUBLISHER = 0 + SUBSCRIBER = 1 + + _VALUES_TO_NAMES = { + 0: "PUBLISHER", + 1: "SUBSCRIBER", + } + + _NAMES_TO_VALUES = { + "PUBLISHER": 0, + "SUBSCRIBER": 1, + } + + +class DBEventPublisherContext(object): + """ + 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', 'BINARY', 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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.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.readBinary() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('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.writeBinary(self.entityDataModel) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.crudType is None: + raise TProtocolException(message='Required field crudType is unset!') + if self.entityType is None: + raise TProtocolException(message='Required field entityType is unset!') + if self.entityDataModel is None: + raise TProtocolException(message='Required field entityDataModel is unset!') + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class DBEventPublisher(object): + """ + 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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.publisherContext = DBEventPublisherContext() + self.publisherContext.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('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 TProtocolException(message='Required field publisherContext is unset!') + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class DBEventSubscriber(object): + """ + Attributes: + - subscriberService + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'subscriberService', 'UTF8', None, ), # 1 + ) + + def __init__(self, subscriberService=None,): + self.subscriberService = subscriberService + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.subscriberService = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('DBEventSubscriber') + if self.subscriberService is not None: + oprot.writeFieldBegin('subscriberService', TType.STRING, 1) + oprot.writeString(self.subscriberService.encode('utf-8') if sys.version_info[0] == 2 else self.subscriberService) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.subscriberService is None: + raise TProtocolException(message='Required field subscriberService is unset!') + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class DBEventMessageContext(object): + """ + 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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.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._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('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 __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class DBEventMessage(object): + """ + 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', 'UTF8', 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._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.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().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('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.encode('utf-8') if sys.version_info[0] == 2 else self.publisherService) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.dbEventType is None: + raise TProtocolException(message='Required field dbEventType is unset!') + if self.messageContext is None: + raise TProtocolException(message='Required field messageContext is unset!') + if self.publisherService is None: + raise TProtocolException(message='Required field publisherService is unset!') + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) http://git-wip-us.apache.org/repos/asf/airavata/blob/39fba1f5/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/model/experiment/constants.py ---------------------------------------------------------------------- diff --git a/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/model/experiment/constants.py b/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/model/experiment/constants.py index 4a6492b..eb0d35a 100644 --- a/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/model/experiment/constants.py +++ b/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/model/experiment/constants.py @@ -1,11 +1,12 @@ # -# 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 ttypes import * - +from thrift.Thrift import TType, TMessageType, TFrozenDict, TException, TApplicationException +from thrift.protocol.TProtocol import TProtocolException +import sys +from .ttypes import *
