http://git-wip-us.apache.org/repos/asf/airavata/blob/a14d717f/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 new file mode 100644 index 0000000..df2ddf5 --- /dev/null +++ b/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/model/data/replica/ttypes.py @@ -0,0 +1,663 @@ +# +# 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.data.movement.ttypes + + +from thrift.transport import TTransport +from thrift.protocol import TBinaryProtocol, TProtocol +try: + from thrift.protocol import fastbinary +except: + fastbinary = None + + +class FileModelType: + FILE = 0 + DIRECTORY = 1 + + _VALUES_TO_NAMES = { + 0: "FILE", + 1: "DIRECTORY", + } + + _NAMES_TO_VALUES = { + "FILE": 0, + "DIRECTORY": 1, + } + +class StorageResourceType: + GATEWAY_DATA_STORE = 0 + BACKUP_GATEWAY_DATA_STORE = 1 + COMPUTE_RESOURCE = 2 + LONG_TERM_STORAGE_RESOURCE = 3 + OTHER = 4 + + _VALUES_TO_NAMES = { + 0: "GATEWAY_DATA_STORE", + 1: "BACKUP_GATEWAY_DATA_STORE", + 2: "COMPUTE_RESOURCE", + 3: "LONG_TERM_STORAGE_RESOURCE", + 4: "OTHER", + } + + _NAMES_TO_VALUES = { + "GATEWAY_DATA_STORE": 0, + "BACKUP_GATEWAY_DATA_STORE": 1, + "COMPUTE_RESOURCE": 2, + "LONG_TERM_STORAGE_RESOURCE": 3, + "OTHER": 4, + } + +class ReplicaPersistentType: + TRANSIENT = 0 + PERSISTENT = 1 + + _VALUES_TO_NAMES = { + 0: "TRANSIENT", + 1: "PERSISTENT", + } + + _NAMES_TO_VALUES = { + "TRANSIENT": 0, + "PERSISTENT": 1, + } + + +class FileCollectionModel: + """ + Attributes: + - collectionId + - gatewayId + - username + - sharedUsers + - sharedPublic + - collectionName + - collectionDescription + - fileIdList + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'collectionId', None, None, ), # 1 + (2, TType.STRING, 'gatewayId', None, None, ), # 2 + (3, TType.STRING, 'username', None, None, ), # 3 + (4, TType.LIST, 'sharedUsers', (TType.STRING,None), None, ), # 4 + (5, TType.BOOL, 'sharedPublic', None, None, ), # 5 + (6, TType.STRING, 'collectionName', None, None, ), # 6 + (7, TType.STRING, 'collectionDescription', None, None, ), # 7 + (8, TType.LIST, 'fileIdList', (TType.STRING,None), None, ), # 8 + ) + + def __init__(self, collectionId=None, gatewayId=None, username=None, sharedUsers=None, sharedPublic=None, collectionName=None, collectionDescription=None, fileIdList=None,): + self.collectionId = collectionId + self.gatewayId = gatewayId + self.username = username + self.sharedUsers = sharedUsers + self.sharedPublic = sharedPublic + self.collectionName = collectionName + self.collectionDescription = collectionDescription + self.fileIdList = fileIdList + + 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.collectionId = 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.username = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.LIST: + self.sharedUsers = [] + (_etype3, _size0) = iprot.readListBegin() + for _i4 in xrange(_size0): + _elem5 = iprot.readString() + self.sharedUsers.append(_elem5) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.BOOL: + self.sharedPublic = iprot.readBool() + else: + iprot.skip(ftype) + elif fid == 6: + if ftype == TType.STRING: + self.collectionName = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 7: + if ftype == TType.STRING: + self.collectionDescription = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 8: + if ftype == TType.LIST: + self.fileIdList = [] + (_etype9, _size6) = iprot.readListBegin() + for _i10 in xrange(_size6): + _elem11 = iprot.readString() + self.fileIdList.append(_elem11) + iprot.readListEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('FileCollectionModel') + if self.collectionId is not None: + oprot.writeFieldBegin('collectionId', TType.STRING, 1) + oprot.writeString(self.collectionId) + oprot.writeFieldEnd() + if self.gatewayId is not None: + oprot.writeFieldBegin('gatewayId', TType.STRING, 2) + oprot.writeString(self.gatewayId) + oprot.writeFieldEnd() + if self.username is not None: + oprot.writeFieldBegin('username', TType.STRING, 3) + oprot.writeString(self.username) + oprot.writeFieldEnd() + if self.sharedUsers is not None: + oprot.writeFieldBegin('sharedUsers', TType.LIST, 4) + oprot.writeListBegin(TType.STRING, len(self.sharedUsers)) + for iter12 in self.sharedUsers: + oprot.writeString(iter12) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.sharedPublic is not None: + oprot.writeFieldBegin('sharedPublic', TType.BOOL, 5) + oprot.writeBool(self.sharedPublic) + oprot.writeFieldEnd() + if self.collectionName is not None: + oprot.writeFieldBegin('collectionName', TType.STRING, 6) + oprot.writeString(self.collectionName) + oprot.writeFieldEnd() + if self.collectionDescription is not None: + oprot.writeFieldBegin('collectionDescription', TType.STRING, 7) + oprot.writeString(self.collectionDescription) + oprot.writeFieldEnd() + if self.fileIdList is not None: + oprot.writeFieldBegin('fileIdList', TType.LIST, 8) + oprot.writeListBegin(TType.STRING, len(self.fileIdList)) + for iter13 in self.fileIdList: + oprot.writeString(iter13) + oprot.writeListEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.collectionId) + value = (value * 31) ^ hash(self.gatewayId) + value = (value * 31) ^ hash(self.username) + value = (value * 31) ^ hash(self.sharedUsers) + value = (value * 31) ^ hash(self.sharedPublic) + value = (value * 31) ^ hash(self.collectionName) + value = (value * 31) ^ hash(self.collectionDescription) + value = (value * 31) ^ hash(self.fileIdList) + 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 FileModel: + """ + Attributes: + - fileId + - gatewayId + - username + - sharedUsers + - sharedPublic + - fileName + - fileDescription + - sha256Checksum + - fileType + - fileSize + - dataType + - creationTime + - lastModifiedTime + - fileReplicas + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'fileId', None, None, ), # 1 + (2, TType.STRING, 'gatewayId', None, None, ), # 2 + (3, TType.STRING, 'username', None, None, ), # 3 + (4, TType.LIST, 'sharedUsers', (TType.STRING,None), None, ), # 4 + (5, TType.BOOL, 'sharedPublic', None, None, ), # 5 + (6, TType.STRING, 'fileName', None, None, ), # 6 + (7, TType.STRING, 'fileDescription', None, None, ), # 7 + (8, TType.STRING, 'sha256Checksum', None, None, ), # 8 + (9, TType.I32, 'fileType', None, None, ), # 9 + (10, TType.I32, 'fileSize', None, None, ), # 10 + (11, TType.STRING, 'dataType', None, None, ), # 11 + (12, TType.I64, 'creationTime', None, None, ), # 12 + (13, TType.I64, 'lastModifiedTime', None, None, ), # 13 + (14, TType.LIST, 'fileReplicas', (TType.STRUCT,(FileReplicaModel, FileReplicaModel.thrift_spec)), None, ), # 14 + ) + + def __init__(self, fileId=None, gatewayId=None, username=None, sharedUsers=None, sharedPublic=None, fileName=None, fileDescription=None, sha256Checksum=None, fileType=None, fileSize=None, dataType=None, creationTime=None, lastModifiedTime=None, fileReplicas=None,): + self.fileId = fileId + self.gatewayId = gatewayId + self.username = username + self.sharedUsers = sharedUsers + self.sharedPublic = sharedPublic + self.fileName = fileName + self.fileDescription = fileDescription + self.sha256Checksum = sha256Checksum + self.fileType = fileType + self.fileSize = fileSize + self.dataType = dataType + self.creationTime = creationTime + self.lastModifiedTime = lastModifiedTime + self.fileReplicas = fileReplicas + + 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.fileId = 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.username = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.LIST: + self.sharedUsers = [] + (_etype17, _size14) = iprot.readListBegin() + for _i18 in xrange(_size14): + _elem19 = iprot.readString() + self.sharedUsers.append(_elem19) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.BOOL: + self.sharedPublic = iprot.readBool() + else: + iprot.skip(ftype) + elif fid == 6: + if ftype == TType.STRING: + self.fileName = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 7: + if ftype == TType.STRING: + self.fileDescription = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 8: + if ftype == TType.STRING: + self.sha256Checksum = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 9: + if ftype == TType.I32: + self.fileType = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 10: + if ftype == TType.I32: + self.fileSize = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 11: + if ftype == TType.STRING: + self.dataType = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 12: + if ftype == TType.I64: + self.creationTime = iprot.readI64() + else: + iprot.skip(ftype) + elif fid == 13: + if ftype == TType.I64: + self.lastModifiedTime = iprot.readI64() + else: + iprot.skip(ftype) + elif fid == 14: + if ftype == TType.LIST: + self.fileReplicas = [] + (_etype23, _size20) = iprot.readListBegin() + for _i24 in xrange(_size20): + _elem25 = FileReplicaModel() + _elem25.read(iprot) + self.fileReplicas.append(_elem25) + 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('FileModel') + if self.fileId is not None: + oprot.writeFieldBegin('fileId', TType.STRING, 1) + oprot.writeString(self.fileId) + oprot.writeFieldEnd() + if self.gatewayId is not None: + oprot.writeFieldBegin('gatewayId', TType.STRING, 2) + oprot.writeString(self.gatewayId) + oprot.writeFieldEnd() + if self.username is not None: + oprot.writeFieldBegin('username', TType.STRING, 3) + oprot.writeString(self.username) + oprot.writeFieldEnd() + if self.sharedUsers is not None: + oprot.writeFieldBegin('sharedUsers', TType.LIST, 4) + oprot.writeListBegin(TType.STRING, len(self.sharedUsers)) + for iter26 in self.sharedUsers: + oprot.writeString(iter26) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.sharedPublic is not None: + oprot.writeFieldBegin('sharedPublic', TType.BOOL, 5) + oprot.writeBool(self.sharedPublic) + oprot.writeFieldEnd() + if self.fileName is not None: + oprot.writeFieldBegin('fileName', TType.STRING, 6) + oprot.writeString(self.fileName) + oprot.writeFieldEnd() + if self.fileDescription is not None: + oprot.writeFieldBegin('fileDescription', TType.STRING, 7) + oprot.writeString(self.fileDescription) + oprot.writeFieldEnd() + if self.sha256Checksum is not None: + oprot.writeFieldBegin('sha256Checksum', TType.STRING, 8) + oprot.writeString(self.sha256Checksum) + oprot.writeFieldEnd() + if self.fileType is not None: + oprot.writeFieldBegin('fileType', TType.I32, 9) + oprot.writeI32(self.fileType) + oprot.writeFieldEnd() + if self.fileSize is not None: + oprot.writeFieldBegin('fileSize', TType.I32, 10) + oprot.writeI32(self.fileSize) + oprot.writeFieldEnd() + if self.dataType is not None: + oprot.writeFieldBegin('dataType', TType.STRING, 11) + oprot.writeString(self.dataType) + oprot.writeFieldEnd() + if self.creationTime is not None: + oprot.writeFieldBegin('creationTime', TType.I64, 12) + oprot.writeI64(self.creationTime) + oprot.writeFieldEnd() + if self.lastModifiedTime is not None: + oprot.writeFieldBegin('lastModifiedTime', TType.I64, 13) + oprot.writeI64(self.lastModifiedTime) + oprot.writeFieldEnd() + if self.fileReplicas is not None: + oprot.writeFieldBegin('fileReplicas', TType.LIST, 14) + oprot.writeListBegin(TType.STRUCT, len(self.fileReplicas)) + for iter27 in self.fileReplicas: + iter27.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.fileId) + value = (value * 31) ^ hash(self.gatewayId) + value = (value * 31) ^ hash(self.username) + value = (value * 31) ^ hash(self.sharedUsers) + value = (value * 31) ^ hash(self.sharedPublic) + value = (value * 31) ^ hash(self.fileName) + value = (value * 31) ^ hash(self.fileDescription) + value = (value * 31) ^ hash(self.sha256Checksum) + value = (value * 31) ^ hash(self.fileType) + value = (value * 31) ^ hash(self.fileSize) + value = (value * 31) ^ hash(self.dataType) + value = (value * 31) ^ hash(self.creationTime) + value = (value * 31) ^ hash(self.lastModifiedTime) + value = (value * 31) ^ hash(self.fileReplicas) + 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 FileReplicaModel: + """ + Attributes: + - replicaName + - replicaDescription + - storageHostname + - storageResourceId + - filePath + - creationTime + - validUntilTime + - storageResourceType + - replicaPersistentType + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'replicaName', None, None, ), # 1 + (2, TType.STRING, 'replicaDescription', None, None, ), # 2 + (3, TType.STRING, 'storageHostname', None, None, ), # 3 + (4, TType.STRING, 'storageResourceId', None, None, ), # 4 + (5, TType.STRING, 'filePath', None, None, ), # 5 + (6, TType.I64, 'creationTime', None, None, ), # 6 + (7, TType.I64, 'validUntilTime', None, None, ), # 7 + (8, TType.I32, 'storageResourceType', None, None, ), # 8 + (9, TType.I32, 'replicaPersistentType', None, None, ), # 9 + ) + + def __init__(self, replicaName=None, replicaDescription=None, storageHostname=None, storageResourceId=None, filePath=None, creationTime=None, validUntilTime=None, storageResourceType=None, replicaPersistentType=None,): + self.replicaName = replicaName + self.replicaDescription = replicaDescription + self.storageHostname = storageHostname + self.storageResourceId = storageResourceId + self.filePath = filePath + self.creationTime = creationTime + self.validUntilTime = validUntilTime + self.storageResourceType = storageResourceType + self.replicaPersistentType = replicaPersistentType + + 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.replicaName = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.replicaDescription = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.storageHostname = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRING: + self.storageResourceId = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.STRING: + self.filePath = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 6: + if ftype == TType.I64: + self.creationTime = 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.storageResourceType = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 9: + if ftype == TType.I32: + self.replicaPersistentType = iprot.readI32() + 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('FileReplicaModel') + if self.replicaName is not None: + oprot.writeFieldBegin('replicaName', TType.STRING, 1) + oprot.writeString(self.replicaName) + oprot.writeFieldEnd() + if self.replicaDescription is not None: + oprot.writeFieldBegin('replicaDescription', TType.STRING, 2) + oprot.writeString(self.replicaDescription) + oprot.writeFieldEnd() + if self.storageHostname is not None: + oprot.writeFieldBegin('storageHostname', TType.STRING, 3) + oprot.writeString(self.storageHostname) + oprot.writeFieldEnd() + if self.storageResourceId is not None: + oprot.writeFieldBegin('storageResourceId', TType.STRING, 4) + oprot.writeString(self.storageResourceId) + oprot.writeFieldEnd() + if self.filePath is not None: + oprot.writeFieldBegin('filePath', TType.STRING, 5) + oprot.writeString(self.filePath) + oprot.writeFieldEnd() + if self.creationTime is not None: + oprot.writeFieldBegin('creationTime', TType.I64, 6) + oprot.writeI64(self.creationTime) + oprot.writeFieldEnd() + if self.validUntilTime is not None: + oprot.writeFieldBegin('validUntilTime', TType.I64, 7) + oprot.writeI64(self.validUntilTime) + oprot.writeFieldEnd() + if self.storageResourceType is not None: + oprot.writeFieldBegin('storageResourceType', TType.I32, 8) + oprot.writeI32(self.storageResourceType) + oprot.writeFieldEnd() + if self.replicaPersistentType is not None: + oprot.writeFieldBegin('replicaPersistentType', TType.I32, 9) + oprot.writeI32(self.replicaPersistentType) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.replicaName) + value = (value * 31) ^ hash(self.replicaDescription) + value = (value * 31) ^ hash(self.storageHostname) + value = (value * 31) ^ hash(self.storageResourceId) + value = (value * 31) ^ hash(self.filePath) + value = (value * 31) ^ hash(self.creationTime) + value = (value * 31) ^ hash(self.validUntilTime) + value = (value * 31) ^ hash(self.storageResourceType) + value = (value * 31) ^ hash(self.replicaPersistentType) + 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/a14d717f/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/model/data/transfer/__init__.py ---------------------------------------------------------------------- diff --git a/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/model/data/transfer/__init__.py b/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/model/data/transfer/__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/data/transfer/__init__.py @@ -0,0 +1 @@ +__all__ = ['ttypes', 'constants'] http://git-wip-us.apache.org/repos/asf/airavata/blob/a14d717f/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/model/data/transfer/constants.py ---------------------------------------------------------------------- diff --git a/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/model/data/transfer/constants.py b/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/model/data/transfer/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/data/transfer/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/a14d717f/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/model/data/transfer/ttypes.py ---------------------------------------------------------------------- diff --git a/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/model/data/transfer/ttypes.py b/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/model/data/transfer/ttypes.py new file mode 100644 index 0000000..ae35462 --- /dev/null +++ b/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/model/data/transfer/ttypes.py @@ -0,0 +1,597 @@ +# +# 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 StorageResourceProtocol: + SCP = 0 + SFTP = 1 + HTTP = 2 + HTTPS = 3 + GridFTP = 4 + LOCAL = 5 + + _VALUES_TO_NAMES = { + 0: "SCP", + 1: "SFTP", + 2: "HTTP", + 3: "HTTPS", + 4: "GridFTP", + 5: "LOCAL", + } + + _NAMES_TO_VALUES = { + "SCP": 0, + "SFTP": 1, + "HTTP": 2, + "HTTPS": 3, + "GridFTP": 4, + "LOCAL": 5, + } + +class LSEntryType: + DIRECTORY = 0 + FILE = 1 + + _VALUES_TO_NAMES = { + 0: "DIRECTORY", + 1: "FILE", + } + + _NAMES_TO_VALUES = { + "DIRECTORY": 0, + "FILE": 1, + } + +class FileTransferMode: + SYNC = 0 + ASYNC = 1 + + _VALUES_TO_NAMES = { + 0: "SYNC", + 1: "ASYNC", + } + + _NAMES_TO_VALUES = { + "SYNC": 0, + "ASYNC": 1, + } + +class FileTransferStatus: + CREATED = 0 + QUEUED = 1 + RUNNING = 2 + COMPLETED = 3 + FAILED = 4 + + _VALUES_TO_NAMES = { + 0: "CREATED", + 1: "QUEUED", + 2: "RUNNING", + 3: "COMPLETED", + 4: "FAILED", + } + + _NAMES_TO_VALUES = { + "CREATED": 0, + "QUEUED": 1, + "RUNNING": 2, + "COMPLETED": 3, + "FAILED": 4, + } + + +class FileTransferRequestModel: + """ + Attributes: + - transferId + - gatewayId + - username + - srcHostname + - srcLoginName + - srcPort + - srcProtocol + - srcFilePath + - srcHostCredToken + - destHostname + - destLoginName + - destPort + - destProtocol + - destFilePath + - destHostCredToken + - fileTransferMode + - transferStatus + - fileSize + - transferTime + - createdTime + - lastModifiedType + - callbackEmails + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'transferId', None, None, ), # 1 + (2, TType.STRING, 'gatewayId', None, None, ), # 2 + (3, TType.STRING, 'username', None, None, ), # 3 + (4, TType.STRING, 'srcHostname', None, None, ), # 4 + (5, TType.STRING, 'srcLoginName', None, None, ), # 5 + (6, TType.I64, 'srcPort', None, None, ), # 6 + (7, TType.I32, 'srcProtocol', None, None, ), # 7 + (8, TType.STRING, 'srcFilePath', None, None, ), # 8 + (9, TType.STRING, 'srcHostCredToken', None, None, ), # 9 + (10, TType.STRING, 'destHostname', None, None, ), # 10 + (11, TType.STRING, 'destLoginName', None, None, ), # 11 + (12, TType.I64, 'destPort', None, None, ), # 12 + (13, TType.I32, 'destProtocol', None, None, ), # 13 + (14, TType.STRING, 'destFilePath', None, None, ), # 14 + (15, TType.STRING, 'destHostCredToken', None, None, ), # 15 + (16, TType.I32, 'fileTransferMode', None, None, ), # 16 + (17, TType.I32, 'transferStatus', None, None, ), # 17 + (18, TType.I64, 'fileSize', None, None, ), # 18 + (19, TType.I64, 'transferTime', None, None, ), # 19 + (20, TType.I64, 'createdTime', None, None, ), # 20 + (21, TType.I64, 'lastModifiedType', None, None, ), # 21 + (22, TType.LIST, 'callbackEmails', (TType.STRING,None), None, ), # 22 + ) + + def __init__(self, transferId=None, gatewayId=None, username=None, srcHostname=None, srcLoginName=None, srcPort=None, srcProtocol=None, srcFilePath=None, srcHostCredToken=None, destHostname=None, destLoginName=None, destPort=None, destProtocol=None, destFilePath=None, destHostCredToken=None, fileTransferMode=None, transferStatus=None, fileSize=None, transferTime=None, createdTime=None, lastModifiedType=None, callbackEmails=None,): + self.transferId = transferId + self.gatewayId = gatewayId + self.username = username + self.srcHostname = srcHostname + self.srcLoginName = srcLoginName + self.srcPort = srcPort + self.srcProtocol = srcProtocol + self.srcFilePath = srcFilePath + self.srcHostCredToken = srcHostCredToken + self.destHostname = destHostname + self.destLoginName = destLoginName + self.destPort = destPort + self.destProtocol = destProtocol + self.destFilePath = destFilePath + self.destHostCredToken = destHostCredToken + self.fileTransferMode = fileTransferMode + self.transferStatus = transferStatus + self.fileSize = fileSize + self.transferTime = transferTime + self.createdTime = createdTime + self.lastModifiedType = lastModifiedType + self.callbackEmails = callbackEmails + + 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.transferId = 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.username = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRING: + self.srcHostname = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.STRING: + self.srcLoginName = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 6: + if ftype == TType.I64: + self.srcPort = iprot.readI64() + else: + iprot.skip(ftype) + elif fid == 7: + if ftype == TType.I32: + self.srcProtocol = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 8: + if ftype == TType.STRING: + self.srcFilePath = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 9: + if ftype == TType.STRING: + self.srcHostCredToken = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 10: + if ftype == TType.STRING: + self.destHostname = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 11: + if ftype == TType.STRING: + self.destLoginName = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 12: + if ftype == TType.I64: + self.destPort = iprot.readI64() + else: + iprot.skip(ftype) + elif fid == 13: + if ftype == TType.I32: + self.destProtocol = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 14: + if ftype == TType.STRING: + self.destFilePath = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 15: + if ftype == TType.STRING: + self.destHostCredToken = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 16: + if ftype == TType.I32: + self.fileTransferMode = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 17: + if ftype == TType.I32: + self.transferStatus = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 18: + if ftype == TType.I64: + self.fileSize = iprot.readI64() + else: + iprot.skip(ftype) + elif fid == 19: + if ftype == TType.I64: + self.transferTime = iprot.readI64() + else: + iprot.skip(ftype) + elif fid == 20: + if ftype == TType.I64: + self.createdTime = iprot.readI64() + else: + iprot.skip(ftype) + elif fid == 21: + if ftype == TType.I64: + self.lastModifiedType = iprot.readI64() + else: + iprot.skip(ftype) + elif fid == 22: + if ftype == TType.LIST: + self.callbackEmails = [] + (_etype3, _size0) = iprot.readListBegin() + for _i4 in xrange(_size0): + _elem5 = iprot.readString() + self.callbackEmails.append(_elem5) + 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('FileTransferRequestModel') + if self.transferId is not None: + oprot.writeFieldBegin('transferId', TType.STRING, 1) + oprot.writeString(self.transferId) + oprot.writeFieldEnd() + if self.gatewayId is not None: + oprot.writeFieldBegin('gatewayId', TType.STRING, 2) + oprot.writeString(self.gatewayId) + oprot.writeFieldEnd() + if self.username is not None: + oprot.writeFieldBegin('username', TType.STRING, 3) + oprot.writeString(self.username) + oprot.writeFieldEnd() + if self.srcHostname is not None: + oprot.writeFieldBegin('srcHostname', TType.STRING, 4) + oprot.writeString(self.srcHostname) + oprot.writeFieldEnd() + if self.srcLoginName is not None: + oprot.writeFieldBegin('srcLoginName', TType.STRING, 5) + oprot.writeString(self.srcLoginName) + oprot.writeFieldEnd() + if self.srcPort is not None: + oprot.writeFieldBegin('srcPort', TType.I64, 6) + oprot.writeI64(self.srcPort) + oprot.writeFieldEnd() + if self.srcProtocol is not None: + oprot.writeFieldBegin('srcProtocol', TType.I32, 7) + oprot.writeI32(self.srcProtocol) + oprot.writeFieldEnd() + if self.srcFilePath is not None: + oprot.writeFieldBegin('srcFilePath', TType.STRING, 8) + oprot.writeString(self.srcFilePath) + oprot.writeFieldEnd() + if self.srcHostCredToken is not None: + oprot.writeFieldBegin('srcHostCredToken', TType.STRING, 9) + oprot.writeString(self.srcHostCredToken) + oprot.writeFieldEnd() + if self.destHostname is not None: + oprot.writeFieldBegin('destHostname', TType.STRING, 10) + oprot.writeString(self.destHostname) + oprot.writeFieldEnd() + if self.destLoginName is not None: + oprot.writeFieldBegin('destLoginName', TType.STRING, 11) + oprot.writeString(self.destLoginName) + oprot.writeFieldEnd() + if self.destPort is not None: + oprot.writeFieldBegin('destPort', TType.I64, 12) + oprot.writeI64(self.destPort) + oprot.writeFieldEnd() + if self.destProtocol is not None: + oprot.writeFieldBegin('destProtocol', TType.I32, 13) + oprot.writeI32(self.destProtocol) + oprot.writeFieldEnd() + if self.destFilePath is not None: + oprot.writeFieldBegin('destFilePath', TType.STRING, 14) + oprot.writeString(self.destFilePath) + oprot.writeFieldEnd() + if self.destHostCredToken is not None: + oprot.writeFieldBegin('destHostCredToken', TType.STRING, 15) + oprot.writeString(self.destHostCredToken) + oprot.writeFieldEnd() + if self.fileTransferMode is not None: + oprot.writeFieldBegin('fileTransferMode', TType.I32, 16) + oprot.writeI32(self.fileTransferMode) + oprot.writeFieldEnd() + if self.transferStatus is not None: + oprot.writeFieldBegin('transferStatus', TType.I32, 17) + oprot.writeI32(self.transferStatus) + oprot.writeFieldEnd() + if self.fileSize is not None: + oprot.writeFieldBegin('fileSize', TType.I64, 18) + oprot.writeI64(self.fileSize) + oprot.writeFieldEnd() + if self.transferTime is not None: + oprot.writeFieldBegin('transferTime', TType.I64, 19) + oprot.writeI64(self.transferTime) + oprot.writeFieldEnd() + if self.createdTime is not None: + oprot.writeFieldBegin('createdTime', TType.I64, 20) + oprot.writeI64(self.createdTime) + oprot.writeFieldEnd() + if self.lastModifiedType is not None: + oprot.writeFieldBegin('lastModifiedType', TType.I64, 21) + oprot.writeI64(self.lastModifiedType) + oprot.writeFieldEnd() + if self.callbackEmails is not None: + oprot.writeFieldBegin('callbackEmails', TType.LIST, 22) + oprot.writeListBegin(TType.STRING, len(self.callbackEmails)) + for iter6 in self.callbackEmails: + oprot.writeString(iter6) + oprot.writeListEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.transferId) + value = (value * 31) ^ hash(self.gatewayId) + value = (value * 31) ^ hash(self.username) + value = (value * 31) ^ hash(self.srcHostname) + value = (value * 31) ^ hash(self.srcLoginName) + value = (value * 31) ^ hash(self.srcPort) + value = (value * 31) ^ hash(self.srcProtocol) + value = (value * 31) ^ hash(self.srcFilePath) + value = (value * 31) ^ hash(self.srcHostCredToken) + value = (value * 31) ^ hash(self.destHostname) + value = (value * 31) ^ hash(self.destLoginName) + value = (value * 31) ^ hash(self.destPort) + value = (value * 31) ^ hash(self.destProtocol) + value = (value * 31) ^ hash(self.destFilePath) + value = (value * 31) ^ hash(self.destHostCredToken) + value = (value * 31) ^ hash(self.fileTransferMode) + value = (value * 31) ^ hash(self.transferStatus) + value = (value * 31) ^ hash(self.fileSize) + value = (value * 31) ^ hash(self.transferTime) + value = (value * 31) ^ hash(self.createdTime) + value = (value * 31) ^ hash(self.lastModifiedType) + value = (value * 31) ^ hash(self.callbackEmails) + 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 LSEntryModel: + """ + Attributes: + - type + - size + - nativeType + - name + - path + - storageHostName + - lastModifiedType + - createdTime + """ + + thrift_spec = ( + None, # 0 + (1, TType.I32, 'type', None, None, ), # 1 + (2, TType.I64, 'size', None, None, ), # 2 + (3, TType.STRING, 'nativeType', None, None, ), # 3 + (4, TType.STRING, 'name', None, None, ), # 4 + (5, TType.STRING, 'path', None, None, ), # 5 + (6, TType.STRING, 'storageHostName', None, None, ), # 6 + (7, TType.I64, 'lastModifiedType', None, None, ), # 7 + (8, TType.I64, 'createdTime', None, None, ), # 8 + ) + + def __init__(self, type=None, size=None, nativeType=None, name=None, path=None, storageHostName=None, lastModifiedType=None, createdTime=None,): + self.type = type + self.size = size + self.nativeType = nativeType + self.name = name + self.path = path + self.storageHostName = storageHostName + self.lastModifiedType = lastModifiedType + self.createdTime = createdTime + + 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.type = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.I64: + self.size = iprot.readI64() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.nativeType = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRING: + self.name = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.STRING: + self.path = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 6: + if ftype == TType.STRING: + self.storageHostName = iprot.readString() + else: + iprot.skip(ftype) + elif fid == 7: + if ftype == TType.I64: + self.lastModifiedType = iprot.readI64() + else: + iprot.skip(ftype) + elif fid == 8: + if ftype == TType.I64: + self.createdTime = iprot.readI64() + 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('LSEntryModel') + if self.type is not None: + oprot.writeFieldBegin('type', TType.I32, 1) + oprot.writeI32(self.type) + oprot.writeFieldEnd() + if self.size is not None: + oprot.writeFieldBegin('size', TType.I64, 2) + oprot.writeI64(self.size) + oprot.writeFieldEnd() + if self.nativeType is not None: + oprot.writeFieldBegin('nativeType', TType.STRING, 3) + oprot.writeString(self.nativeType) + oprot.writeFieldEnd() + if self.name is not None: + oprot.writeFieldBegin('name', TType.STRING, 4) + oprot.writeString(self.name) + oprot.writeFieldEnd() + if self.path is not None: + oprot.writeFieldBegin('path', TType.STRING, 5) + oprot.writeString(self.path) + oprot.writeFieldEnd() + if self.storageHostName is not None: + oprot.writeFieldBegin('storageHostName', TType.STRING, 6) + oprot.writeString(self.storageHostName) + oprot.writeFieldEnd() + if self.lastModifiedType is not None: + oprot.writeFieldBegin('lastModifiedType', TType.I64, 7) + oprot.writeI64(self.lastModifiedType) + oprot.writeFieldEnd() + if self.createdTime is not None: + oprot.writeFieldBegin('createdTime', TType.I64, 8) + oprot.writeI64(self.createdTime) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __hash__(self): + value = 17 + value = (value * 31) ^ hash(self.type) + value = (value * 31) ^ hash(self.size) + value = (value * 31) ^ hash(self.nativeType) + value = (value * 31) ^ hash(self.name) + value = (value * 31) ^ hash(self.path) + value = (value * 31) ^ hash(self.storageHostName) + value = (value * 31) ^ hash(self.lastModifiedType) + value = (value * 31) ^ hash(self.createdTime) + 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)
