| # |
| # 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, TFrozenDict, TException, TApplicationException |
| from thrift.protocol.TProtocol import TProtocolException |
| import sys |
| import airavata.model.commons.ttypes |
| import airavata.model.application.io.ttypes |
| |
| from thrift.transport import TTransport |
| |
| |
| class ApplicationState(object): |
| CREATED = 0 |
| VALIDATED = 1 |
| SCHEDULED = 2 |
| LAUNCHED = 3 |
| EXECUTING = 4 |
| CANCELING = 5 |
| CANCELED = 6 |
| COMPLETED = 7 |
| FAILED = 8 |
| |
| _VALUES_TO_NAMES = { |
| 0: "CREATED", |
| 1: "VALIDATED", |
| 2: "SCHEDULED", |
| 3: "LAUNCHED", |
| 4: "EXECUTING", |
| 5: "CANCELING", |
| 6: "CANCELED", |
| 7: "COMPLETED", |
| 8: "FAILED", |
| } |
| |
| _NAMES_TO_VALUES = { |
| "CREATED": 0, |
| "VALIDATED": 1, |
| "SCHEDULED": 2, |
| "LAUNCHED": 3, |
| "EXECUTING": 4, |
| "CANCELING": 5, |
| "CANCELED": 6, |
| "COMPLETED": 7, |
| "FAILED": 8, |
| } |
| |
| |
| class ComponentType(object): |
| APPLICATION = 0 |
| HANDLER = 1 |
| |
| _VALUES_TO_NAMES = { |
| 0: "APPLICATION", |
| 1: "HANDLER", |
| } |
| |
| _NAMES_TO_VALUES = { |
| "APPLICATION": 0, |
| "HANDLER": 1, |
| } |
| |
| |
| class HandlerType(object): |
| FLOW_STARTER = 0 |
| FLOW_TERMINATOR = 1 |
| |
| _VALUES_TO_NAMES = { |
| 0: "FLOW_STARTER", |
| 1: "FLOW_TERMINATOR", |
| } |
| |
| _NAMES_TO_VALUES = { |
| "FLOW_STARTER": 0, |
| "FLOW_TERMINATOR": 1, |
| } |
| |
| |
| class HandlerState(object): |
| CREATED = 0 |
| VALIDATED = 1 |
| SCHEDULED = 2 |
| LAUNCHED = 3 |
| EXECUTING = 4 |
| CANCELING = 5 |
| CANCELED = 6 |
| COMPLETED = 7 |
| FAILED = 8 |
| |
| _VALUES_TO_NAMES = { |
| 0: "CREATED", |
| 1: "VALIDATED", |
| 2: "SCHEDULED", |
| 3: "LAUNCHED", |
| 4: "EXECUTING", |
| 5: "CANCELING", |
| 6: "CANCELED", |
| 7: "COMPLETED", |
| 8: "FAILED", |
| } |
| |
| _NAMES_TO_VALUES = { |
| "CREATED": 0, |
| "VALIDATED": 1, |
| "SCHEDULED": 2, |
| "LAUNCHED": 3, |
| "EXECUTING": 4, |
| "CANCELING": 5, |
| "CANCELED": 6, |
| "COMPLETED": 7, |
| "FAILED": 8, |
| } |
| |
| |
| class WorkflowState(object): |
| CREATED = 0 |
| VALIDATED = 1 |
| SCHEDULED = 2 |
| LAUNCHED = 3 |
| EXECUTING = 4 |
| PAUSING = 5 |
| PAUSED = 6 |
| RESTARTING = 7 |
| CANCELING = 8 |
| CANCELED = 9 |
| COMPLETED = 10 |
| FAILED = 11 |
| |
| _VALUES_TO_NAMES = { |
| 0: "CREATED", |
| 1: "VALIDATED", |
| 2: "SCHEDULED", |
| 3: "LAUNCHED", |
| 4: "EXECUTING", |
| 5: "PAUSING", |
| 6: "PAUSED", |
| 7: "RESTARTING", |
| 8: "CANCELING", |
| 9: "CANCELED", |
| 10: "COMPLETED", |
| 11: "FAILED", |
| } |
| |
| _NAMES_TO_VALUES = { |
| "CREATED": 0, |
| "VALIDATED": 1, |
| "SCHEDULED": 2, |
| "LAUNCHED": 3, |
| "EXECUTING": 4, |
| "PAUSING": 5, |
| "PAUSED": 6, |
| "RESTARTING": 7, |
| "CANCELING": 8, |
| "CANCELED": 9, |
| "COMPLETED": 10, |
| "FAILED": 11, |
| } |
| |
| |
| class ApplicationStatus(object): |
| """ |
| Attributes: |
| - id |
| - state |
| - description |
| - updatedAt |
| """ |
| |
| thrift_spec = ( |
| None, # 0 |
| (1, TType.STRING, 'id', 'UTF8', None, ), # 1 |
| (2, TType.I32, 'state', None, None, ), # 2 |
| (3, TType.STRING, 'description', 'UTF8', None, ), # 3 |
| (4, TType.I64, 'updatedAt', None, None, ), # 4 |
| ) |
| |
| def __init__(self, id=None, state=None, description=None, updatedAt=None,): |
| self.id = id |
| self.state = state |
| self.description = description |
| self.updatedAt = updatedAt |
| |
| 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.id = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() |
| else: |
| iprot.skip(ftype) |
| elif fid == 2: |
| if ftype == TType.I32: |
| self.state = iprot.readI32() |
| else: |
| iprot.skip(ftype) |
| elif fid == 3: |
| if ftype == TType.STRING: |
| self.description = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() |
| else: |
| iprot.skip(ftype) |
| elif fid == 4: |
| if ftype == TType.I64: |
| self.updatedAt = iprot.readI64() |
| 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('ApplicationStatus') |
| if self.id is not None: |
| oprot.writeFieldBegin('id', TType.STRING, 1) |
| oprot.writeString(self.id.encode('utf-8') if sys.version_info[0] == 2 else self.id) |
| oprot.writeFieldEnd() |
| if self.state is not None: |
| oprot.writeFieldBegin('state', TType.I32, 2) |
| oprot.writeI32(self.state) |
| oprot.writeFieldEnd() |
| if self.description is not None: |
| oprot.writeFieldBegin('description', TType.STRING, 3) |
| oprot.writeString(self.description.encode('utf-8') if sys.version_info[0] == 2 else self.description) |
| oprot.writeFieldEnd() |
| if self.updatedAt is not None: |
| oprot.writeFieldBegin('updatedAt', TType.I64, 4) |
| oprot.writeI64(self.updatedAt) |
| oprot.writeFieldEnd() |
| oprot.writeFieldStop() |
| oprot.writeStructEnd() |
| |
| def validate(self): |
| if self.state is None: |
| raise TProtocolException(message='Required field state 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 WorkflowApplication(object): |
| """ |
| Attributes: |
| - id |
| - processId |
| - applicationInterfaceId |
| - computeResourceId |
| - queueName |
| - nodeCount |
| - coreCount |
| - wallTimeLimit |
| - physicalMemory |
| - statuses |
| - errors |
| - createdAt |
| - updatedAt |
| """ |
| |
| thrift_spec = ( |
| None, # 0 |
| (1, TType.STRING, 'id', 'UTF8', None, ), # 1 |
| (2, TType.STRING, 'processId', 'UTF8', None, ), # 2 |
| (3, TType.STRING, 'applicationInterfaceId', 'UTF8', None, ), # 3 |
| (4, TType.STRING, 'computeResourceId', 'UTF8', None, ), # 4 |
| (5, TType.STRING, 'queueName', 'UTF8', None, ), # 5 |
| (6, TType.I32, 'nodeCount', None, None, ), # 6 |
| (7, TType.I32, 'coreCount', None, None, ), # 7 |
| (8, TType.I32, 'wallTimeLimit', None, None, ), # 8 |
| (9, TType.I32, 'physicalMemory', None, None, ), # 9 |
| (10, TType.LIST, 'statuses', (TType.STRUCT, (ApplicationStatus, ApplicationStatus.thrift_spec), False), None, ), # 10 |
| (11, TType.LIST, 'errors', (TType.STRUCT, (airavata.model.commons.ttypes.ErrorModel, airavata.model.commons.ttypes.ErrorModel.thrift_spec), False), None, ), # 11 |
| (12, TType.I64, 'createdAt', None, None, ), # 12 |
| (13, TType.I64, 'updatedAt', None, None, ), # 13 |
| ) |
| |
| def __init__(self, id=None, processId=None, applicationInterfaceId=None, computeResourceId=None, queueName=None, nodeCount=None, coreCount=None, wallTimeLimit=None, physicalMemory=None, statuses=None, errors=None, createdAt=None, updatedAt=None,): |
| self.id = id |
| self.processId = processId |
| self.applicationInterfaceId = applicationInterfaceId |
| self.computeResourceId = computeResourceId |
| self.queueName = queueName |
| self.nodeCount = nodeCount |
| self.coreCount = coreCount |
| self.wallTimeLimit = wallTimeLimit |
| self.physicalMemory = physicalMemory |
| self.statuses = statuses |
| self.errors = errors |
| self.createdAt = createdAt |
| self.updatedAt = updatedAt |
| |
| 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.id = 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.processId = 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.applicationInterfaceId = 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.computeResourceId = 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.queueName = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() |
| else: |
| iprot.skip(ftype) |
| elif fid == 6: |
| if ftype == TType.I32: |
| self.nodeCount = iprot.readI32() |
| else: |
| iprot.skip(ftype) |
| elif fid == 7: |
| if ftype == TType.I32: |
| self.coreCount = iprot.readI32() |
| else: |
| iprot.skip(ftype) |
| elif fid == 8: |
| if ftype == TType.I32: |
| self.wallTimeLimit = iprot.readI32() |
| else: |
| iprot.skip(ftype) |
| elif fid == 9: |
| if ftype == TType.I32: |
| self.physicalMemory = iprot.readI32() |
| else: |
| iprot.skip(ftype) |
| elif fid == 10: |
| if ftype == TType.LIST: |
| self.statuses = [] |
| (_etype3, _size0) = iprot.readListBegin() |
| for _i4 in range(_size0): |
| _elem5 = ApplicationStatus() |
| _elem5.read(iprot) |
| self.statuses.append(_elem5) |
| iprot.readListEnd() |
| else: |
| iprot.skip(ftype) |
| elif fid == 11: |
| if ftype == TType.LIST: |
| self.errors = [] |
| (_etype9, _size6) = iprot.readListBegin() |
| for _i10 in range(_size6): |
| _elem11 = airavata.model.commons.ttypes.ErrorModel() |
| _elem11.read(iprot) |
| self.errors.append(_elem11) |
| iprot.readListEnd() |
| else: |
| iprot.skip(ftype) |
| elif fid == 12: |
| if ftype == TType.I64: |
| self.createdAt = iprot.readI64() |
| else: |
| iprot.skip(ftype) |
| elif fid == 13: |
| if ftype == TType.I64: |
| self.updatedAt = iprot.readI64() |
| 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('WorkflowApplication') |
| if self.id is not None: |
| oprot.writeFieldBegin('id', TType.STRING, 1) |
| oprot.writeString(self.id.encode('utf-8') if sys.version_info[0] == 2 else self.id) |
| oprot.writeFieldEnd() |
| if self.processId is not None: |
| oprot.writeFieldBegin('processId', TType.STRING, 2) |
| oprot.writeString(self.processId.encode('utf-8') if sys.version_info[0] == 2 else self.processId) |
| oprot.writeFieldEnd() |
| if self.applicationInterfaceId is not None: |
| oprot.writeFieldBegin('applicationInterfaceId', TType.STRING, 3) |
| oprot.writeString(self.applicationInterfaceId.encode('utf-8') if sys.version_info[0] == 2 else self.applicationInterfaceId) |
| oprot.writeFieldEnd() |
| if self.computeResourceId is not None: |
| oprot.writeFieldBegin('computeResourceId', TType.STRING, 4) |
| oprot.writeString(self.computeResourceId.encode('utf-8') if sys.version_info[0] == 2 else self.computeResourceId) |
| oprot.writeFieldEnd() |
| if self.queueName is not None: |
| oprot.writeFieldBegin('queueName', TType.STRING, 5) |
| oprot.writeString(self.queueName.encode('utf-8') if sys.version_info[0] == 2 else self.queueName) |
| oprot.writeFieldEnd() |
| if self.nodeCount is not None: |
| oprot.writeFieldBegin('nodeCount', TType.I32, 6) |
| oprot.writeI32(self.nodeCount) |
| oprot.writeFieldEnd() |
| if self.coreCount is not None: |
| oprot.writeFieldBegin('coreCount', TType.I32, 7) |
| oprot.writeI32(self.coreCount) |
| oprot.writeFieldEnd() |
| if self.wallTimeLimit is not None: |
| oprot.writeFieldBegin('wallTimeLimit', TType.I32, 8) |
| oprot.writeI32(self.wallTimeLimit) |
| oprot.writeFieldEnd() |
| if self.physicalMemory is not None: |
| oprot.writeFieldBegin('physicalMemory', TType.I32, 9) |
| oprot.writeI32(self.physicalMemory) |
| oprot.writeFieldEnd() |
| if self.statuses is not None: |
| oprot.writeFieldBegin('statuses', TType.LIST, 10) |
| oprot.writeListBegin(TType.STRUCT, len(self.statuses)) |
| for iter12 in self.statuses: |
| iter12.write(oprot) |
| oprot.writeListEnd() |
| oprot.writeFieldEnd() |
| if self.errors is not None: |
| oprot.writeFieldBegin('errors', TType.LIST, 11) |
| oprot.writeListBegin(TType.STRUCT, len(self.errors)) |
| for iter13 in self.errors: |
| iter13.write(oprot) |
| oprot.writeListEnd() |
| oprot.writeFieldEnd() |
| if self.createdAt is not None: |
| oprot.writeFieldBegin('createdAt', TType.I64, 12) |
| oprot.writeI64(self.createdAt) |
| oprot.writeFieldEnd() |
| if self.updatedAt is not None: |
| oprot.writeFieldBegin('updatedAt', TType.I64, 13) |
| oprot.writeI64(self.updatedAt) |
| oprot.writeFieldEnd() |
| oprot.writeFieldStop() |
| oprot.writeStructEnd() |
| |
| def validate(self): |
| if self.id is None: |
| raise TProtocolException(message='Required field id 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 DataBlock(object): |
| """ |
| Attributes: |
| - id |
| - value |
| - type |
| - createdAt |
| - updatedAt |
| """ |
| |
| thrift_spec = ( |
| None, # 0 |
| (1, TType.STRING, 'id', 'UTF8', None, ), # 1 |
| (2, TType.STRING, 'value', 'UTF8', None, ), # 2 |
| (3, TType.I32, 'type', None, None, ), # 3 |
| (4, TType.I64, 'createdAt', None, None, ), # 4 |
| (5, TType.I64, 'updatedAt', None, None, ), # 5 |
| ) |
| |
| def __init__(self, id=None, value=None, type=None, createdAt=None, updatedAt=None,): |
| self.id = id |
| self.value = value |
| self.type = type |
| self.createdAt = createdAt |
| self.updatedAt = updatedAt |
| |
| 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.id = 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.value = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() |
| else: |
| iprot.skip(ftype) |
| elif fid == 3: |
| if ftype == TType.I32: |
| self.type = iprot.readI32() |
| else: |
| iprot.skip(ftype) |
| elif fid == 4: |
| if ftype == TType.I64: |
| self.createdAt = iprot.readI64() |
| else: |
| iprot.skip(ftype) |
| elif fid == 5: |
| if ftype == TType.I64: |
| self.updatedAt = iprot.readI64() |
| 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('DataBlock') |
| if self.id is not None: |
| oprot.writeFieldBegin('id', TType.STRING, 1) |
| oprot.writeString(self.id.encode('utf-8') if sys.version_info[0] == 2 else self.id) |
| oprot.writeFieldEnd() |
| if self.value is not None: |
| oprot.writeFieldBegin('value', TType.STRING, 2) |
| oprot.writeString(self.value.encode('utf-8') if sys.version_info[0] == 2 else self.value) |
| oprot.writeFieldEnd() |
| if self.type is not None: |
| oprot.writeFieldBegin('type', TType.I32, 3) |
| oprot.writeI32(self.type) |
| oprot.writeFieldEnd() |
| if self.createdAt is not None: |
| oprot.writeFieldBegin('createdAt', TType.I64, 4) |
| oprot.writeI64(self.createdAt) |
| oprot.writeFieldEnd() |
| if self.updatedAt is not None: |
| oprot.writeFieldBegin('updatedAt', TType.I64, 5) |
| oprot.writeI64(self.updatedAt) |
| oprot.writeFieldEnd() |
| oprot.writeFieldStop() |
| oprot.writeStructEnd() |
| |
| def validate(self): |
| if self.id is None: |
| raise TProtocolException(message='Required field id 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 WorkflowConnection(object): |
| """ |
| Attributes: |
| - id |
| - dataBlock |
| - fromType |
| - fromId |
| - fromOutputName |
| - toType |
| - toId |
| - toInputName |
| - createdAt |
| - updatedAt |
| """ |
| |
| thrift_spec = ( |
| None, # 0 |
| (1, TType.STRING, 'id', 'UTF8', "DO_NOT_SET_AT_CLIENTS", ), # 1 |
| (2, TType.STRUCT, 'dataBlock', (DataBlock, DataBlock.thrift_spec), None, ), # 2 |
| (3, TType.I32, 'fromType', None, None, ), # 3 |
| (4, TType.STRING, 'fromId', 'UTF8', None, ), # 4 |
| (5, TType.STRING, 'fromOutputName', 'UTF8', None, ), # 5 |
| (6, TType.I32, 'toType', None, None, ), # 6 |
| (7, TType.STRING, 'toId', 'UTF8', None, ), # 7 |
| (8, TType.STRING, 'toInputName', 'UTF8', None, ), # 8 |
| (9, TType.I64, 'createdAt', None, None, ), # 9 |
| (10, TType.I64, 'updatedAt', None, None, ), # 10 |
| ) |
| |
| def __init__(self, id=thrift_spec[1][4], dataBlock=None, fromType=None, fromId=None, fromOutputName=None, toType=None, toId=None, toInputName=None, createdAt=None, updatedAt=None,): |
| self.id = id |
| self.dataBlock = dataBlock |
| self.fromType = fromType |
| self.fromId = fromId |
| self.fromOutputName = fromOutputName |
| self.toType = toType |
| self.toId = toId |
| self.toInputName = toInputName |
| self.createdAt = createdAt |
| self.updatedAt = updatedAt |
| |
| 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.id = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() |
| else: |
| iprot.skip(ftype) |
| elif fid == 2: |
| if ftype == TType.STRUCT: |
| self.dataBlock = DataBlock() |
| self.dataBlock.read(iprot) |
| else: |
| iprot.skip(ftype) |
| elif fid == 3: |
| if ftype == TType.I32: |
| self.fromType = iprot.readI32() |
| else: |
| iprot.skip(ftype) |
| elif fid == 4: |
| if ftype == TType.STRING: |
| self.fromId = 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.fromOutputName = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() |
| else: |
| iprot.skip(ftype) |
| elif fid == 6: |
| if ftype == TType.I32: |
| self.toType = iprot.readI32() |
| else: |
| iprot.skip(ftype) |
| elif fid == 7: |
| if ftype == TType.STRING: |
| self.toId = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() |
| else: |
| iprot.skip(ftype) |
| elif fid == 8: |
| if ftype == TType.STRING: |
| self.toInputName = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() |
| else: |
| iprot.skip(ftype) |
| elif fid == 9: |
| if ftype == TType.I64: |
| self.createdAt = iprot.readI64() |
| else: |
| iprot.skip(ftype) |
| elif fid == 10: |
| if ftype == TType.I64: |
| self.updatedAt = iprot.readI64() |
| 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('WorkflowConnection') |
| if self.id is not None: |
| oprot.writeFieldBegin('id', TType.STRING, 1) |
| oprot.writeString(self.id.encode('utf-8') if sys.version_info[0] == 2 else self.id) |
| oprot.writeFieldEnd() |
| if self.dataBlock is not None: |
| oprot.writeFieldBegin('dataBlock', TType.STRUCT, 2) |
| self.dataBlock.write(oprot) |
| oprot.writeFieldEnd() |
| if self.fromType is not None: |
| oprot.writeFieldBegin('fromType', TType.I32, 3) |
| oprot.writeI32(self.fromType) |
| oprot.writeFieldEnd() |
| if self.fromId is not None: |
| oprot.writeFieldBegin('fromId', TType.STRING, 4) |
| oprot.writeString(self.fromId.encode('utf-8') if sys.version_info[0] == 2 else self.fromId) |
| oprot.writeFieldEnd() |
| if self.fromOutputName is not None: |
| oprot.writeFieldBegin('fromOutputName', TType.STRING, 5) |
| oprot.writeString(self.fromOutputName.encode('utf-8') if sys.version_info[0] == 2 else self.fromOutputName) |
| oprot.writeFieldEnd() |
| if self.toType is not None: |
| oprot.writeFieldBegin('toType', TType.I32, 6) |
| oprot.writeI32(self.toType) |
| oprot.writeFieldEnd() |
| if self.toId is not None: |
| oprot.writeFieldBegin('toId', TType.STRING, 7) |
| oprot.writeString(self.toId.encode('utf-8') if sys.version_info[0] == 2 else self.toId) |
| oprot.writeFieldEnd() |
| if self.toInputName is not None: |
| oprot.writeFieldBegin('toInputName', TType.STRING, 8) |
| oprot.writeString(self.toInputName.encode('utf-8') if sys.version_info[0] == 2 else self.toInputName) |
| oprot.writeFieldEnd() |
| if self.createdAt is not None: |
| oprot.writeFieldBegin('createdAt', TType.I64, 9) |
| oprot.writeI64(self.createdAt) |
| oprot.writeFieldEnd() |
| if self.updatedAt is not None: |
| oprot.writeFieldBegin('updatedAt', TType.I64, 10) |
| oprot.writeI64(self.updatedAt) |
| oprot.writeFieldEnd() |
| oprot.writeFieldStop() |
| oprot.writeStructEnd() |
| |
| def validate(self): |
| if self.id is None: |
| raise TProtocolException(message='Required field id is unset!') |
| if self.fromType is None: |
| raise TProtocolException(message='Required field fromType is unset!') |
| if self.fromId is None: |
| raise TProtocolException(message='Required field fromId is unset!') |
| if self.fromOutputName is None: |
| raise TProtocolException(message='Required field fromOutputName is unset!') |
| if self.toType is None: |
| raise TProtocolException(message='Required field toType is unset!') |
| if self.toId is None: |
| raise TProtocolException(message='Required field toId is unset!') |
| if self.toInputName is None: |
| raise TProtocolException(message='Required field toInputName 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 HandlerStatus(object): |
| """ |
| Attributes: |
| - id |
| - state |
| - description |
| - updatedAt |
| """ |
| |
| thrift_spec = ( |
| None, # 0 |
| (1, TType.STRING, 'id', 'UTF8', None, ), # 1 |
| (2, TType.I32, 'state', None, None, ), # 2 |
| (3, TType.STRING, 'description', 'UTF8', None, ), # 3 |
| (4, TType.I64, 'updatedAt', None, None, ), # 4 |
| ) |
| |
| def __init__(self, id=None, state=None, description=None, updatedAt=None,): |
| self.id = id |
| self.state = state |
| self.description = description |
| self.updatedAt = updatedAt |
| |
| 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.id = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() |
| else: |
| iprot.skip(ftype) |
| elif fid == 2: |
| if ftype == TType.I32: |
| self.state = iprot.readI32() |
| else: |
| iprot.skip(ftype) |
| elif fid == 3: |
| if ftype == TType.STRING: |
| self.description = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() |
| else: |
| iprot.skip(ftype) |
| elif fid == 4: |
| if ftype == TType.I64: |
| self.updatedAt = iprot.readI64() |
| 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('HandlerStatus') |
| if self.id is not None: |
| oprot.writeFieldBegin('id', TType.STRING, 1) |
| oprot.writeString(self.id.encode('utf-8') if sys.version_info[0] == 2 else self.id) |
| oprot.writeFieldEnd() |
| if self.state is not None: |
| oprot.writeFieldBegin('state', TType.I32, 2) |
| oprot.writeI32(self.state) |
| oprot.writeFieldEnd() |
| if self.description is not None: |
| oprot.writeFieldBegin('description', TType.STRING, 3) |
| oprot.writeString(self.description.encode('utf-8') if sys.version_info[0] == 2 else self.description) |
| oprot.writeFieldEnd() |
| if self.updatedAt is not None: |
| oprot.writeFieldBegin('updatedAt', TType.I64, 4) |
| oprot.writeI64(self.updatedAt) |
| oprot.writeFieldEnd() |
| oprot.writeFieldStop() |
| oprot.writeStructEnd() |
| |
| def validate(self): |
| if self.state is None: |
| raise TProtocolException(message='Required field state 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 WorkflowHandler(object): |
| """ |
| Attributes: |
| - id |
| - type |
| - inputs |
| - outputs |
| - statuses |
| - errors |
| - createdAt |
| - updatedAt |
| """ |
| |
| thrift_spec = ( |
| None, # 0 |
| (1, TType.STRING, 'id', 'UTF8', None, ), # 1 |
| (2, TType.I32, 'type', None, None, ), # 2 |
| (3, TType.LIST, 'inputs', (TType.STRUCT, (airavata.model.application.io.ttypes.InputDataObjectType, airavata.model.application.io.ttypes.InputDataObjectType.thrift_spec), False), None, ), # 3 |
| (4, TType.LIST, 'outputs', (TType.STRUCT, (airavata.model.application.io.ttypes.OutputDataObjectType, airavata.model.application.io.ttypes.OutputDataObjectType.thrift_spec), False), None, ), # 4 |
| (5, TType.LIST, 'statuses', (TType.STRUCT, (HandlerStatus, HandlerStatus.thrift_spec), False), None, ), # 5 |
| (6, TType.LIST, 'errors', (TType.STRUCT, (airavata.model.commons.ttypes.ErrorModel, airavata.model.commons.ttypes.ErrorModel.thrift_spec), False), None, ), # 6 |
| (7, TType.I64, 'createdAt', None, None, ), # 7 |
| (8, TType.I64, 'updatedAt', None, None, ), # 8 |
| ) |
| |
| def __init__(self, id=None, type=None, inputs=None, outputs=None, statuses=None, errors=None, createdAt=None, updatedAt=None,): |
| self.id = id |
| self.type = type |
| self.inputs = inputs |
| self.outputs = outputs |
| self.statuses = statuses |
| self.errors = errors |
| self.createdAt = createdAt |
| self.updatedAt = updatedAt |
| |
| 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.id = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() |
| else: |
| iprot.skip(ftype) |
| elif fid == 2: |
| if ftype == TType.I32: |
| self.type = iprot.readI32() |
| else: |
| iprot.skip(ftype) |
| elif fid == 3: |
| if ftype == TType.LIST: |
| self.inputs = [] |
| (_etype17, _size14) = iprot.readListBegin() |
| for _i18 in range(_size14): |
| _elem19 = airavata.model.application.io.ttypes.InputDataObjectType() |
| _elem19.read(iprot) |
| self.inputs.append(_elem19) |
| iprot.readListEnd() |
| else: |
| iprot.skip(ftype) |
| elif fid == 4: |
| if ftype == TType.LIST: |
| self.outputs = [] |
| (_etype23, _size20) = iprot.readListBegin() |
| for _i24 in range(_size20): |
| _elem25 = airavata.model.application.io.ttypes.OutputDataObjectType() |
| _elem25.read(iprot) |
| self.outputs.append(_elem25) |
| iprot.readListEnd() |
| else: |
| iprot.skip(ftype) |
| elif fid == 5: |
| if ftype == TType.LIST: |
| self.statuses = [] |
| (_etype29, _size26) = iprot.readListBegin() |
| for _i30 in range(_size26): |
| _elem31 = HandlerStatus() |
| _elem31.read(iprot) |
| self.statuses.append(_elem31) |
| iprot.readListEnd() |
| else: |
| iprot.skip(ftype) |
| elif fid == 6: |
| if ftype == TType.LIST: |
| self.errors = [] |
| (_etype35, _size32) = iprot.readListBegin() |
| for _i36 in range(_size32): |
| _elem37 = airavata.model.commons.ttypes.ErrorModel() |
| _elem37.read(iprot) |
| self.errors.append(_elem37) |
| iprot.readListEnd() |
| else: |
| iprot.skip(ftype) |
| elif fid == 7: |
| if ftype == TType.I64: |
| self.createdAt = iprot.readI64() |
| else: |
| iprot.skip(ftype) |
| elif fid == 8: |
| if ftype == TType.I64: |
| self.updatedAt = iprot.readI64() |
| 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('WorkflowHandler') |
| if self.id is not None: |
| oprot.writeFieldBegin('id', TType.STRING, 1) |
| oprot.writeString(self.id.encode('utf-8') if sys.version_info[0] == 2 else self.id) |
| oprot.writeFieldEnd() |
| if self.type is not None: |
| oprot.writeFieldBegin('type', TType.I32, 2) |
| oprot.writeI32(self.type) |
| oprot.writeFieldEnd() |
| if self.inputs is not None: |
| oprot.writeFieldBegin('inputs', TType.LIST, 3) |
| oprot.writeListBegin(TType.STRUCT, len(self.inputs)) |
| for iter38 in self.inputs: |
| iter38.write(oprot) |
| oprot.writeListEnd() |
| oprot.writeFieldEnd() |
| if self.outputs is not None: |
| oprot.writeFieldBegin('outputs', TType.LIST, 4) |
| oprot.writeListBegin(TType.STRUCT, len(self.outputs)) |
| for iter39 in self.outputs: |
| iter39.write(oprot) |
| oprot.writeListEnd() |
| oprot.writeFieldEnd() |
| if self.statuses is not None: |
| oprot.writeFieldBegin('statuses', TType.LIST, 5) |
| oprot.writeListBegin(TType.STRUCT, len(self.statuses)) |
| for iter40 in self.statuses: |
| iter40.write(oprot) |
| oprot.writeListEnd() |
| oprot.writeFieldEnd() |
| if self.errors is not None: |
| oprot.writeFieldBegin('errors', TType.LIST, 6) |
| oprot.writeListBegin(TType.STRUCT, len(self.errors)) |
| for iter41 in self.errors: |
| iter41.write(oprot) |
| oprot.writeListEnd() |
| oprot.writeFieldEnd() |
| if self.createdAt is not None: |
| oprot.writeFieldBegin('createdAt', TType.I64, 7) |
| oprot.writeI64(self.createdAt) |
| oprot.writeFieldEnd() |
| if self.updatedAt is not None: |
| oprot.writeFieldBegin('updatedAt', TType.I64, 8) |
| oprot.writeI64(self.updatedAt) |
| oprot.writeFieldEnd() |
| oprot.writeFieldStop() |
| oprot.writeStructEnd() |
| |
| def validate(self): |
| if self.id is None: |
| raise TProtocolException(message='Required field id is unset!') |
| if self.type is None: |
| raise TProtocolException(message='Required field type 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 WorkflowStatus(object): |
| """ |
| Attributes: |
| - id |
| - state |
| - description |
| - updatedAt |
| """ |
| |
| thrift_spec = ( |
| None, # 0 |
| (1, TType.STRING, 'id', 'UTF8', None, ), # 1 |
| (2, TType.I32, 'state', None, None, ), # 2 |
| (3, TType.STRING, 'description', 'UTF8', None, ), # 3 |
| (4, TType.I64, 'updatedAt', None, None, ), # 4 |
| ) |
| |
| def __init__(self, id=None, state=None, description=None, updatedAt=None,): |
| self.id = id |
| self.state = state |
| self.description = description |
| self.updatedAt = updatedAt |
| |
| 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.id = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() |
| else: |
| iprot.skip(ftype) |
| elif fid == 2: |
| if ftype == TType.I32: |
| self.state = iprot.readI32() |
| else: |
| iprot.skip(ftype) |
| elif fid == 3: |
| if ftype == TType.STRING: |
| self.description = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() |
| else: |
| iprot.skip(ftype) |
| elif fid == 4: |
| if ftype == TType.I64: |
| self.updatedAt = iprot.readI64() |
| 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('WorkflowStatus') |
| if self.id is not None: |
| oprot.writeFieldBegin('id', TType.STRING, 1) |
| oprot.writeString(self.id.encode('utf-8') if sys.version_info[0] == 2 else self.id) |
| oprot.writeFieldEnd() |
| if self.state is not None: |
| oprot.writeFieldBegin('state', TType.I32, 2) |
| oprot.writeI32(self.state) |
| oprot.writeFieldEnd() |
| if self.description is not None: |
| oprot.writeFieldBegin('description', TType.STRING, 3) |
| oprot.writeString(self.description.encode('utf-8') if sys.version_info[0] == 2 else self.description) |
| oprot.writeFieldEnd() |
| if self.updatedAt is not None: |
| oprot.writeFieldBegin('updatedAt', TType.I64, 4) |
| oprot.writeI64(self.updatedAt) |
| oprot.writeFieldEnd() |
| oprot.writeFieldStop() |
| oprot.writeStructEnd() |
| |
| def validate(self): |
| if self.state is None: |
| raise TProtocolException(message='Required field state 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 AiravataWorkflow(object): |
| """ |
| Attributes: |
| - id |
| - experimentId |
| - description |
| - applications |
| - handlers |
| - connections |
| - statuses |
| - errors |
| - createdAt |
| - updatedAt |
| """ |
| |
| thrift_spec = ( |
| None, # 0 |
| (1, TType.STRING, 'id', 'UTF8', "DO_NOT_SET_AT_CLIENTS", ), # 1 |
| (2, TType.STRING, 'experimentId', 'UTF8', None, ), # 2 |
| (3, TType.STRING, 'description', 'UTF8', None, ), # 3 |
| (4, TType.LIST, 'applications', (TType.STRUCT, (WorkflowApplication, WorkflowApplication.thrift_spec), False), None, ), # 4 |
| (5, TType.LIST, 'handlers', (TType.STRUCT, (WorkflowHandler, WorkflowHandler.thrift_spec), False), None, ), # 5 |
| (6, TType.LIST, 'connections', (TType.STRUCT, (WorkflowConnection, WorkflowConnection.thrift_spec), False), None, ), # 6 |
| (7, TType.LIST, 'statuses', (TType.STRUCT, (WorkflowStatus, WorkflowStatus.thrift_spec), False), None, ), # 7 |
| (8, TType.LIST, 'errors', (TType.STRUCT, (airavata.model.commons.ttypes.ErrorModel, airavata.model.commons.ttypes.ErrorModel.thrift_spec), False), None, ), # 8 |
| (9, TType.I64, 'createdAt', None, None, ), # 9 |
| (10, TType.I64, 'updatedAt', None, None, ), # 10 |
| ) |
| |
| def __init__(self, id=thrift_spec[1][4], experimentId=None, description=None, applications=None, handlers=None, connections=None, statuses=None, errors=None, createdAt=None, updatedAt=None,): |
| self.id = id |
| self.experimentId = experimentId |
| self.description = description |
| self.applications = applications |
| self.handlers = handlers |
| self.connections = connections |
| self.statuses = statuses |
| self.errors = errors |
| self.createdAt = createdAt |
| self.updatedAt = updatedAt |
| |
| 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.id = 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.experimentId = 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.description = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() |
| else: |
| iprot.skip(ftype) |
| elif fid == 4: |
| if ftype == TType.LIST: |
| self.applications = [] |
| (_etype45, _size42) = iprot.readListBegin() |
| for _i46 in range(_size42): |
| _elem47 = WorkflowApplication() |
| _elem47.read(iprot) |
| self.applications.append(_elem47) |
| iprot.readListEnd() |
| else: |
| iprot.skip(ftype) |
| elif fid == 5: |
| if ftype == TType.LIST: |
| self.handlers = [] |
| (_etype51, _size48) = iprot.readListBegin() |
| for _i52 in range(_size48): |
| _elem53 = WorkflowHandler() |
| _elem53.read(iprot) |
| self.handlers.append(_elem53) |
| iprot.readListEnd() |
| else: |
| iprot.skip(ftype) |
| elif fid == 6: |
| if ftype == TType.LIST: |
| self.connections = [] |
| (_etype57, _size54) = iprot.readListBegin() |
| for _i58 in range(_size54): |
| _elem59 = WorkflowConnection() |
| _elem59.read(iprot) |
| self.connections.append(_elem59) |
| iprot.readListEnd() |
| else: |
| iprot.skip(ftype) |
| elif fid == 7: |
| if ftype == TType.LIST: |
| self.statuses = [] |
| (_etype63, _size60) = iprot.readListBegin() |
| for _i64 in range(_size60): |
| _elem65 = WorkflowStatus() |
| _elem65.read(iprot) |
| self.statuses.append(_elem65) |
| iprot.readListEnd() |
| else: |
| iprot.skip(ftype) |
| elif fid == 8: |
| if ftype == TType.LIST: |
| self.errors = [] |
| (_etype69, _size66) = iprot.readListBegin() |
| for _i70 in range(_size66): |
| _elem71 = airavata.model.commons.ttypes.ErrorModel() |
| _elem71.read(iprot) |
| self.errors.append(_elem71) |
| iprot.readListEnd() |
| else: |
| iprot.skip(ftype) |
| elif fid == 9: |
| if ftype == TType.I64: |
| self.createdAt = iprot.readI64() |
| else: |
| iprot.skip(ftype) |
| elif fid == 10: |
| if ftype == TType.I64: |
| self.updatedAt = iprot.readI64() |
| 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('AiravataWorkflow') |
| if self.id is not None: |
| oprot.writeFieldBegin('id', TType.STRING, 1) |
| oprot.writeString(self.id.encode('utf-8') if sys.version_info[0] == 2 else self.id) |
| oprot.writeFieldEnd() |
| if self.experimentId is not None: |
| oprot.writeFieldBegin('experimentId', TType.STRING, 2) |
| oprot.writeString(self.experimentId.encode('utf-8') if sys.version_info[0] == 2 else self.experimentId) |
| oprot.writeFieldEnd() |
| if self.description is not None: |
| oprot.writeFieldBegin('description', TType.STRING, 3) |
| oprot.writeString(self.description.encode('utf-8') if sys.version_info[0] == 2 else self.description) |
| oprot.writeFieldEnd() |
| if self.applications is not None: |
| oprot.writeFieldBegin('applications', TType.LIST, 4) |
| oprot.writeListBegin(TType.STRUCT, len(self.applications)) |
| for iter72 in self.applications: |
| iter72.write(oprot) |
| oprot.writeListEnd() |
| oprot.writeFieldEnd() |
| if self.handlers is not None: |
| oprot.writeFieldBegin('handlers', TType.LIST, 5) |
| oprot.writeListBegin(TType.STRUCT, len(self.handlers)) |
| for iter73 in self.handlers: |
| iter73.write(oprot) |
| oprot.writeListEnd() |
| oprot.writeFieldEnd() |
| if self.connections is not None: |
| oprot.writeFieldBegin('connections', TType.LIST, 6) |
| oprot.writeListBegin(TType.STRUCT, len(self.connections)) |
| for iter74 in self.connections: |
| iter74.write(oprot) |
| oprot.writeListEnd() |
| oprot.writeFieldEnd() |
| if self.statuses is not None: |
| oprot.writeFieldBegin('statuses', TType.LIST, 7) |
| oprot.writeListBegin(TType.STRUCT, len(self.statuses)) |
| for iter75 in self.statuses: |
| iter75.write(oprot) |
| oprot.writeListEnd() |
| oprot.writeFieldEnd() |
| if self.errors is not None: |
| oprot.writeFieldBegin('errors', TType.LIST, 8) |
| oprot.writeListBegin(TType.STRUCT, len(self.errors)) |
| for iter76 in self.errors: |
| iter76.write(oprot) |
| oprot.writeListEnd() |
| oprot.writeFieldEnd() |
| if self.createdAt is not None: |
| oprot.writeFieldBegin('createdAt', TType.I64, 9) |
| oprot.writeI64(self.createdAt) |
| oprot.writeFieldEnd() |
| if self.updatedAt is not None: |
| oprot.writeFieldBegin('updatedAt', TType.I64, 10) |
| oprot.writeI64(self.updatedAt) |
| oprot.writeFieldEnd() |
| oprot.writeFieldStop() |
| oprot.writeStructEnd() |
| |
| def validate(self): |
| if self.id is None: |
| raise TProtocolException(message='Required field id is unset!') |
| if self.experimentId is None: |
| raise TProtocolException(message='Required field experimentId 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) |