Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 3EC1E200CDD for ; Mon, 7 Aug 2017 16:55:38 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 3D45D165754; Mon, 7 Aug 2017 14:55:38 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 8D381165755 for ; Mon, 7 Aug 2017 16:55:34 +0200 (CEST) Received: (qmail 20086 invoked by uid 500); 7 Aug 2017 14:55:33 -0000 Mailing-List: contact commits-help@airavata.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@airavata.apache.org Delivered-To: mailing list commits@airavata.apache.org Received: (qmail 17558 invoked by uid 99); 7 Aug 2017 14:55:30 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 07 Aug 2017 14:55:30 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 63BD8F5ED7; Mon, 7 Aug 2017 14:55:28 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: machristie@apache.org To: commits@airavata.apache.org Date: Mon, 07 Aug 2017 14:56:00 -0000 Message-Id: <043aa618b63b45f9b844aff88978d6a0@git.apache.org> In-Reply-To: <3c67660f922b46c3b5d43e7f7bfa96ab@git.apache.org> References: <3c67660f922b46c3b5d43e7f7bfa96ab@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [35/51] [abbrv] [partial] airavata git commit: AIRAVATA-2505 Upgrade Airavata to Thrift 0.10.0 archived-at: Mon, 07 Aug 2017 14:55:38 -0000 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/messaging/event/ttypes.py ---------------------------------------------------------------------- diff --git a/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/model/messaging/event/ttypes.py b/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/model/messaging/event/ttypes.py index 42e9da4..a5224ec 100644 --- a/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/model/messaging/event/ttypes.py +++ b/airavata-api/airavata-client-sdks/airavata-python-sdk/src/main/resources/lib/apache/airavata/model/messaging/event/ttypes.py @@ -1,1514 +1,1407 @@ # -# 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 import apache.airavata.model.status.ttypes import apache.airavata.model.application.io.ttypes import apache.airavata.model.commons.ttypes - from thrift.transport import TTransport -from thrift.protocol import TBinaryProtocol, TProtocol -try: - from thrift.protocol import fastbinary -except: - fastbinary = None - - -class MessageLevel: - INFO = 0 - DEBUG = 1 - ERROR = 2 - ACK = 3 - - _VALUES_TO_NAMES = { - 0: "INFO", - 1: "DEBUG", - 2: "ERROR", - 3: "ACK", - } - - _NAMES_TO_VALUES = { - "INFO": 0, - "DEBUG": 1, - "ERROR": 2, - "ACK": 3, - } - -class MessageType: - EXPERIMENT = 0 - EXPERIMENT_CANCEL = 1 - TASK = 2 - PROCESS = 3 - JOB = 4 - LAUNCHPROCESS = 5 - TERMINATEPROCESS = 6 - PROCESSOUTPUT = 7 - DB_EVENT = 8 - - _VALUES_TO_NAMES = { - 0: "EXPERIMENT", - 1: "EXPERIMENT_CANCEL", - 2: "TASK", - 3: "PROCESS", - 4: "JOB", - 5: "LAUNCHPROCESS", - 6: "TERMINATEPROCESS", - 7: "PROCESSOUTPUT", - 8: "DB_EVENT", - } - - _NAMES_TO_VALUES = { - "EXPERIMENT": 0, - "EXPERIMENT_CANCEL": 1, - "TASK": 2, - "PROCESS": 3, - "JOB": 4, - "LAUNCHPROCESS": 5, - "TERMINATEPROCESS": 6, - "PROCESSOUTPUT": 7, - "DB_EVENT": 8, - } - - -class ExperimentStatusChangeEvent: - """ - Attributes: - - state - - experimentId - - gatewayId - """ - - thrift_spec = ( - None, # 0 - (1, TType.I32, 'state', None, None, ), # 1 - (2, TType.STRING, 'experimentId', None, None, ), # 2 - (3, TType.STRING, 'gatewayId', None, None, ), # 3 - ) - - def __init__(self, state=None, experimentId=None, gatewayId=None,): - self.state = state - self.experimentId = experimentId - self.gatewayId = gatewayId - - 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.state = iprot.readI32() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRING: - self.experimentId = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.STRING: - self.gatewayId = 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('ExperimentStatusChangeEvent') - if self.state is not None: - oprot.writeFieldBegin('state', TType.I32, 1) - oprot.writeI32(self.state) - oprot.writeFieldEnd() - if self.experimentId is not None: - oprot.writeFieldBegin('experimentId', TType.STRING, 2) - oprot.writeString(self.experimentId) - oprot.writeFieldEnd() - if self.gatewayId is not None: - oprot.writeFieldBegin('gatewayId', TType.STRING, 3) - oprot.writeString(self.gatewayId) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - if self.state is None: - raise TProtocol.TProtocolException(message='Required field state is unset!') - if self.experimentId is None: - raise TProtocol.TProtocolException(message='Required field experimentId is unset!') - if self.gatewayId is None: - raise TProtocol.TProtocolException(message='Required field gatewayId is unset!') - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.state) - value = (value * 31) ^ hash(self.experimentId) - value = (value * 31) ^ hash(self.gatewayId) - 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 ProcessIdentifier: - """ - Attributes: - - processId - - experimentId - - gatewayId - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'processId', None, None, ), # 1 - (2, TType.STRING, 'experimentId', None, None, ), # 2 - (3, TType.STRING, 'gatewayId', None, None, ), # 3 - ) - - def __init__(self, processId=None, experimentId=None, gatewayId=None,): - self.processId = processId - self.experimentId = experimentId - self.gatewayId = gatewayId - - 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.processId = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRING: - self.experimentId = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.STRING: - self.gatewayId = 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('ProcessIdentifier') - if self.processId is not None: - oprot.writeFieldBegin('processId', TType.STRING, 1) - oprot.writeString(self.processId) - oprot.writeFieldEnd() - if self.experimentId is not None: - oprot.writeFieldBegin('experimentId', TType.STRING, 2) - oprot.writeString(self.experimentId) - oprot.writeFieldEnd() - if self.gatewayId is not None: - oprot.writeFieldBegin('gatewayId', TType.STRING, 3) - oprot.writeString(self.gatewayId) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - if self.processId is None: - raise TProtocol.TProtocolException(message='Required field processId is unset!') - if self.experimentId is None: - raise TProtocol.TProtocolException(message='Required field experimentId is unset!') - if self.gatewayId is None: - raise TProtocol.TProtocolException(message='Required field gatewayId is unset!') - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.processId) - value = (value * 31) ^ hash(self.experimentId) - value = (value * 31) ^ hash(self.gatewayId) - 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 TaskIdentifier: - """ - Attributes: - - taskId - - processId - - experimentId - - gatewayId - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'taskId', None, None, ), # 1 - (2, TType.STRING, 'processId', None, None, ), # 2 - (3, TType.STRING, 'experimentId', None, None, ), # 3 - (4, TType.STRING, 'gatewayId', None, None, ), # 4 - ) - - def __init__(self, taskId=None, processId=None, experimentId=None, gatewayId=None,): - self.taskId = taskId - self.processId = processId - self.experimentId = experimentId - self.gatewayId = gatewayId - - 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.taskId = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRING: - self.processId = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.STRING: - self.experimentId = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 4: - if ftype == TType.STRING: - self.gatewayId = 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('TaskIdentifier') - if self.taskId is not None: - oprot.writeFieldBegin('taskId', TType.STRING, 1) - oprot.writeString(self.taskId) - oprot.writeFieldEnd() - if self.processId is not None: - oprot.writeFieldBegin('processId', TType.STRING, 2) - oprot.writeString(self.processId) - oprot.writeFieldEnd() - if self.experimentId is not None: - oprot.writeFieldBegin('experimentId', TType.STRING, 3) - oprot.writeString(self.experimentId) - oprot.writeFieldEnd() - if self.gatewayId is not None: - oprot.writeFieldBegin('gatewayId', TType.STRING, 4) - oprot.writeString(self.gatewayId) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - if self.taskId is None: - raise TProtocol.TProtocolException(message='Required field taskId is unset!') - if self.processId is None: - raise TProtocol.TProtocolException(message='Required field processId is unset!') - if self.experimentId is None: - raise TProtocol.TProtocolException(message='Required field experimentId is unset!') - if self.gatewayId is None: - raise TProtocol.TProtocolException(message='Required field gatewayId is unset!') - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.taskId) - value = (value * 31) ^ hash(self.processId) - value = (value * 31) ^ hash(self.experimentId) - value = (value * 31) ^ hash(self.gatewayId) - 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 TaskStatusChangeEvent: - """ - Attributes: - - state - - taskIdentity - """ - - thrift_spec = ( - None, # 0 - (1, TType.I32, 'state', None, None, ), # 1 - (2, TType.STRUCT, 'taskIdentity', (TaskIdentifier, TaskIdentifier.thrift_spec), None, ), # 2 - ) - - def __init__(self, state=None, taskIdentity=None,): - self.state = state - self.taskIdentity = taskIdentity - - 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.state = iprot.readI32() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.taskIdentity = TaskIdentifier() - self.taskIdentity.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('TaskStatusChangeEvent') - if self.state is not None: - oprot.writeFieldBegin('state', TType.I32, 1) - oprot.writeI32(self.state) - oprot.writeFieldEnd() - if self.taskIdentity is not None: - oprot.writeFieldBegin('taskIdentity', TType.STRUCT, 2) - self.taskIdentity.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - if self.state is None: - raise TProtocol.TProtocolException(message='Required field state is unset!') - if self.taskIdentity is None: - raise TProtocol.TProtocolException(message='Required field taskIdentity is unset!') - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.state) - value = (value * 31) ^ hash(self.taskIdentity) - 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 TaskStatusChangeRequestEvent: - """ - Attributes: - - state - - taskIdentity - """ - - thrift_spec = ( - None, # 0 - (1, TType.I32, 'state', None, None, ), # 1 - (2, TType.STRUCT, 'taskIdentity', (TaskIdentifier, TaskIdentifier.thrift_spec), None, ), # 2 - ) - - def __init__(self, state=None, taskIdentity=None,): - self.state = state - self.taskIdentity = taskIdentity - - 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.state = iprot.readI32() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.taskIdentity = TaskIdentifier() - self.taskIdentity.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('TaskStatusChangeRequestEvent') - if self.state is not None: - oprot.writeFieldBegin('state', TType.I32, 1) - oprot.writeI32(self.state) - oprot.writeFieldEnd() - if self.taskIdentity is not None: - oprot.writeFieldBegin('taskIdentity', TType.STRUCT, 2) - self.taskIdentity.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - if self.state is None: - raise TProtocol.TProtocolException(message='Required field state is unset!') - if self.taskIdentity is None: - raise TProtocol.TProtocolException(message='Required field taskIdentity is unset!') - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.state) - value = (value * 31) ^ hash(self.taskIdentity) - 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 ProcessStatusChangeEvent: - """ - Attributes: - - state - - processIdentity - """ - - thrift_spec = ( - None, # 0 - (1, TType.I32, 'state', None, None, ), # 1 - (2, TType.STRUCT, 'processIdentity', (ProcessIdentifier, ProcessIdentifier.thrift_spec), None, ), # 2 - ) - - def __init__(self, state=None, processIdentity=None,): - self.state = state - self.processIdentity = processIdentity - - 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.state = iprot.readI32() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.processIdentity = ProcessIdentifier() - self.processIdentity.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('ProcessStatusChangeEvent') - if self.state is not None: - oprot.writeFieldBegin('state', TType.I32, 1) - oprot.writeI32(self.state) - oprot.writeFieldEnd() - if self.processIdentity is not None: - oprot.writeFieldBegin('processIdentity', TType.STRUCT, 2) - self.processIdentity.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - if self.state is None: - raise TProtocol.TProtocolException(message='Required field state is unset!') - if self.processIdentity is None: - raise TProtocol.TProtocolException(message='Required field processIdentity is unset!') - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.state) - value = (value * 31) ^ hash(self.processIdentity) - 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 ProcessStatusChangeRequestEvent: - """ - Attributes: - - state - - processIdentity - """ - - thrift_spec = ( - None, # 0 - (1, TType.I32, 'state', None, None, ), # 1 - (2, TType.STRUCT, 'processIdentity', (ProcessIdentifier, ProcessIdentifier.thrift_spec), None, ), # 2 - ) - - def __init__(self, state=None, processIdentity=None,): - self.state = state - self.processIdentity = processIdentity - - 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.state = iprot.readI32() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.processIdentity = ProcessIdentifier() - self.processIdentity.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('ProcessStatusChangeRequestEvent') - if self.state is not None: - oprot.writeFieldBegin('state', TType.I32, 1) - oprot.writeI32(self.state) - oprot.writeFieldEnd() - if self.processIdentity is not None: - oprot.writeFieldBegin('processIdentity', TType.STRUCT, 2) - self.processIdentity.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - if self.state is None: - raise TProtocol.TProtocolException(message='Required field state is unset!') - if self.processIdentity is None: - raise TProtocol.TProtocolException(message='Required field processIdentity is unset!') - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.state) - value = (value * 31) ^ hash(self.processIdentity) - 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 TaskOutputChangeEvent: - """ - Attributes: - - output - - taskIdentity - """ - - thrift_spec = ( - None, # 0 - (1, TType.LIST, 'output', (TType.STRUCT,(apache.airavata.model.application.io.ttypes.OutputDataObjectType, apache.airavata.model.application.io.ttypes.OutputDataObjectType.thrift_spec)), None, ), # 1 - (2, TType.STRUCT, 'taskIdentity', (TaskIdentifier, TaskIdentifier.thrift_spec), None, ), # 2 - ) - - def __init__(self, output=None, taskIdentity=None,): - self.output = output - self.taskIdentity = taskIdentity - - 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.LIST: - self.output = [] - (_etype3, _size0) = iprot.readListBegin() - for _i4 in xrange(_size0): - _elem5 = apache.airavata.model.application.io.ttypes.OutputDataObjectType() - _elem5.read(iprot) - self.output.append(_elem5) - iprot.readListEnd() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.taskIdentity = TaskIdentifier() - self.taskIdentity.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('TaskOutputChangeEvent') - if self.output is not None: - oprot.writeFieldBegin('output', TType.LIST, 1) - oprot.writeListBegin(TType.STRUCT, len(self.output)) - for iter6 in self.output: - iter6.write(oprot) - oprot.writeListEnd() - oprot.writeFieldEnd() - if self.taskIdentity is not None: - oprot.writeFieldBegin('taskIdentity', TType.STRUCT, 2) - self.taskIdentity.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - if self.output is None: - raise TProtocol.TProtocolException(message='Required field output is unset!') - if self.taskIdentity is None: - raise TProtocol.TProtocolException(message='Required field taskIdentity is unset!') - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.output) - value = (value * 31) ^ hash(self.taskIdentity) - 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 JobIdentifier: - """ - Attributes: - - jobId - - taskId - - processId - - experimentId - - gatewayId - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'jobId', None, None, ), # 1 - (2, TType.STRING, 'taskId', None, None, ), # 2 - (3, TType.STRING, 'processId', None, None, ), # 3 - (4, TType.STRING, 'experimentId', None, None, ), # 4 - (5, TType.STRING, 'gatewayId', None, None, ), # 5 - ) - - def __init__(self, jobId=None, taskId=None, processId=None, experimentId=None, gatewayId=None,): - self.jobId = jobId - self.taskId = taskId - self.processId = processId - self.experimentId = experimentId - self.gatewayId = gatewayId - - 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.jobId = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRING: - self.taskId = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.STRING: - self.processId = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 4: - if ftype == TType.STRING: - self.experimentId = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 5: - if ftype == TType.STRING: - self.gatewayId = 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('JobIdentifier') - if self.jobId is not None: - oprot.writeFieldBegin('jobId', TType.STRING, 1) - oprot.writeString(self.jobId) - oprot.writeFieldEnd() - if self.taskId is not None: - oprot.writeFieldBegin('taskId', TType.STRING, 2) - oprot.writeString(self.taskId) - oprot.writeFieldEnd() - if self.processId is not None: - oprot.writeFieldBegin('processId', TType.STRING, 3) - oprot.writeString(self.processId) - oprot.writeFieldEnd() - if self.experimentId is not None: - oprot.writeFieldBegin('experimentId', TType.STRING, 4) - oprot.writeString(self.experimentId) - oprot.writeFieldEnd() - if self.gatewayId is not None: - oprot.writeFieldBegin('gatewayId', TType.STRING, 5) - oprot.writeString(self.gatewayId) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - if self.jobId is None: - raise TProtocol.TProtocolException(message='Required field jobId is unset!') - if self.taskId is None: - raise TProtocol.TProtocolException(message='Required field taskId is unset!') - if self.processId is None: - raise TProtocol.TProtocolException(message='Required field processId is unset!') - if self.experimentId is None: - raise TProtocol.TProtocolException(message='Required field experimentId is unset!') - if self.gatewayId is None: - raise TProtocol.TProtocolException(message='Required field gatewayId is unset!') - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.jobId) - value = (value * 31) ^ hash(self.taskId) - value = (value * 31) ^ hash(self.processId) - value = (value * 31) ^ hash(self.experimentId) - value = (value * 31) ^ hash(self.gatewayId) - 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 ExperimentSubmitEvent: - """ - Attributes: - - experimentId - - gatewayId - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'experimentId', None, None, ), # 1 - (2, TType.STRING, 'gatewayId', None, None, ), # 2 - ) - - def __init__(self, experimentId=None, gatewayId=None,): - self.experimentId = experimentId - self.gatewayId = gatewayId - - 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.experimentId = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRING: - self.gatewayId = 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('ExperimentSubmitEvent') - if self.experimentId is not None: - oprot.writeFieldBegin('experimentId', TType.STRING, 1) - oprot.writeString(self.experimentId) - oprot.writeFieldEnd() - if self.gatewayId is not None: - oprot.writeFieldBegin('gatewayId', TType.STRING, 2) - oprot.writeString(self.gatewayId) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - if self.experimentId is None: - raise TProtocol.TProtocolException(message='Required field experimentId is unset!') - if self.gatewayId is None: - raise TProtocol.TProtocolException(message='Required field gatewayId is unset!') - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.experimentId) - value = (value * 31) ^ hash(self.gatewayId) - 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 ProcessSubmitEvent: - """ - Attributes: - - processId - - gatewayId - - experimentId - - tokenId - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'processId', None, None, ), # 1 - (2, TType.STRING, 'gatewayId', None, None, ), # 2 - (3, TType.STRING, 'experimentId', None, None, ), # 3 - (4, TType.STRING, 'tokenId', None, None, ), # 4 - ) - - def __init__(self, processId=None, gatewayId=None, experimentId=None, tokenId=None,): - self.processId = processId - self.gatewayId = gatewayId - self.experimentId = experimentId - self.tokenId = tokenId - - 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.processId = 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.experimentId = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 4: - if ftype == TType.STRING: - self.tokenId = 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('ProcessSubmitEvent') - if self.processId is not None: - oprot.writeFieldBegin('processId', TType.STRING, 1) - oprot.writeString(self.processId) - oprot.writeFieldEnd() - if self.gatewayId is not None: - oprot.writeFieldBegin('gatewayId', TType.STRING, 2) - oprot.writeString(self.gatewayId) - oprot.writeFieldEnd() - if self.experimentId is not None: - oprot.writeFieldBegin('experimentId', TType.STRING, 3) - oprot.writeString(self.experimentId) - oprot.writeFieldEnd() - if self.tokenId is not None: - oprot.writeFieldBegin('tokenId', TType.STRING, 4) - oprot.writeString(self.tokenId) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - if self.processId is None: - raise TProtocol.TProtocolException(message='Required field processId is unset!') - if self.gatewayId is None: - raise TProtocol.TProtocolException(message='Required field gatewayId is unset!') - if self.experimentId is None: - raise TProtocol.TProtocolException(message='Required field experimentId is unset!') - if self.tokenId is None: - raise TProtocol.TProtocolException(message='Required field tokenId is unset!') - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.processId) - value = (value * 31) ^ hash(self.gatewayId) - value = (value * 31) ^ hash(self.experimentId) - value = (value * 31) ^ hash(self.tokenId) - 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 ProcessTerminateEvent: - """ - Attributes: - - processId - - gatewayId - - tokenId - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'processId', None, None, ), # 1 - (2, TType.STRING, 'gatewayId', None, None, ), # 2 - (3, TType.STRING, 'tokenId', None, None, ), # 3 - ) - - def __init__(self, processId=None, gatewayId=None, tokenId=None,): - self.processId = processId - self.gatewayId = gatewayId - self.tokenId = tokenId - - 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.processId = 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.tokenId = 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('ProcessTerminateEvent') - if self.processId is not None: - oprot.writeFieldBegin('processId', TType.STRING, 1) - oprot.writeString(self.processId) - oprot.writeFieldEnd() - if self.gatewayId is not None: - oprot.writeFieldBegin('gatewayId', TType.STRING, 2) - oprot.writeString(self.gatewayId) - oprot.writeFieldEnd() - if self.tokenId is not None: - oprot.writeFieldBegin('tokenId', TType.STRING, 3) - oprot.writeString(self.tokenId) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - if self.processId is None: - raise TProtocol.TProtocolException(message='Required field processId is unset!') - if self.gatewayId is None: - raise TProtocol.TProtocolException(message='Required field gatewayId is unset!') - if self.tokenId is None: - raise TProtocol.TProtocolException(message='Required field tokenId is unset!') - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.processId) - value = (value * 31) ^ hash(self.gatewayId) - value = (value * 31) ^ hash(self.tokenId) - 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 JobStatusChangeEvent: - """ - Attributes: - - state - - jobIdentity - """ - - thrift_spec = ( - None, # 0 - (1, TType.I32, 'state', None, None, ), # 1 - (2, TType.STRUCT, 'jobIdentity', (JobIdentifier, JobIdentifier.thrift_spec), None, ), # 2 - ) - - def __init__(self, state=None, jobIdentity=None,): - self.state = state - self.jobIdentity = jobIdentity - - 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.state = iprot.readI32() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.jobIdentity = JobIdentifier() - self.jobIdentity.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('JobStatusChangeEvent') - if self.state is not None: - oprot.writeFieldBegin('state', TType.I32, 1) - oprot.writeI32(self.state) - oprot.writeFieldEnd() - if self.jobIdentity is not None: - oprot.writeFieldBegin('jobIdentity', TType.STRUCT, 2) - self.jobIdentity.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - if self.state is None: - raise TProtocol.TProtocolException(message='Required field state is unset!') - if self.jobIdentity is None: - raise TProtocol.TProtocolException(message='Required field jobIdentity is unset!') - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.state) - value = (value * 31) ^ hash(self.jobIdentity) - 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 JobStatusChangeRequestEvent: - """ - Attributes: - - state - - jobIdentity - """ - - thrift_spec = ( - None, # 0 - (1, TType.I32, 'state', None, None, ), # 1 - (2, TType.STRUCT, 'jobIdentity', (JobIdentifier, JobIdentifier.thrift_spec), None, ), # 2 - ) - - def __init__(self, state=None, jobIdentity=None,): - self.state = state - self.jobIdentity = jobIdentity - - 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.state = iprot.readI32() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.jobIdentity = JobIdentifier() - self.jobIdentity.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('JobStatusChangeRequestEvent') - if self.state is not None: - oprot.writeFieldBegin('state', TType.I32, 1) - oprot.writeI32(self.state) - oprot.writeFieldEnd() - if self.jobIdentity is not None: - oprot.writeFieldBegin('jobIdentity', TType.STRUCT, 2) - self.jobIdentity.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - if self.state is None: - raise TProtocol.TProtocolException(message='Required field state is unset!') - if self.jobIdentity is None: - raise TProtocol.TProtocolException(message='Required field jobIdentity is unset!') - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.state) - value = (value * 31) ^ hash(self.jobIdentity) - 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 Message: - """ - Attributes: - - event - - messageId - - messageType - - updatedTime - - messageLevel - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'event', None, None, ), # 1 - (2, TType.STRING, 'messageId', None, "DO_NOT_SET_AT_CLIENTS", ), # 2 - (3, TType.I32, 'messageType', None, None, ), # 3 - (4, TType.I64, 'updatedTime', None, None, ), # 4 - (5, TType.I32, 'messageLevel', None, None, ), # 5 - ) - - def __init__(self, event=None, messageId=thrift_spec[2][4], messageType=None, updatedTime=None, messageLevel=None,): - self.event = event - self.messageId = messageId - self.messageType = messageType - self.updatedTime = updatedTime - self.messageLevel = messageLevel - - 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.event = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRING: - self.messageId = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.I32: - self.messageType = iprot.readI32() - else: - iprot.skip(ftype) - elif fid == 4: - if ftype == TType.I64: - self.updatedTime = iprot.readI64() - else: - iprot.skip(ftype) - elif fid == 5: - if ftype == TType.I32: - self.messageLevel = 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('Message') - if self.event is not None: - oprot.writeFieldBegin('event', TType.STRING, 1) - oprot.writeString(self.event) - oprot.writeFieldEnd() - if self.messageId is not None: - oprot.writeFieldBegin('messageId', TType.STRING, 2) - oprot.writeString(self.messageId) - oprot.writeFieldEnd() - if self.messageType is not None: - oprot.writeFieldBegin('messageType', TType.I32, 3) - oprot.writeI32(self.messageType) - oprot.writeFieldEnd() - if self.updatedTime is not None: - oprot.writeFieldBegin('updatedTime', TType.I64, 4) - oprot.writeI64(self.updatedTime) - oprot.writeFieldEnd() - if self.messageLevel is not None: - oprot.writeFieldBegin('messageLevel', TType.I32, 5) - oprot.writeI32(self.messageLevel) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - if self.event is None: - raise TProtocol.TProtocolException(message='Required field event is unset!') - if self.messageId is None: - raise TProtocol.TProtocolException(message='Required field messageId is unset!') - if self.messageType is None: - raise TProtocol.TProtocolException(message='Required field messageType is unset!') - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.event) - value = (value * 31) ^ hash(self.messageId) - value = (value * 31) ^ hash(self.messageType) - value = (value * 31) ^ hash(self.updatedTime) - value = (value * 31) ^ hash(self.messageLevel) - 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 MessageLevel(object): + INFO = 0 + DEBUG = 1 + ERROR = 2 + ACK = 3 + + _VALUES_TO_NAMES = { + 0: "INFO", + 1: "DEBUG", + 2: "ERROR", + 3: "ACK", + } + + _NAMES_TO_VALUES = { + "INFO": 0, + "DEBUG": 1, + "ERROR": 2, + "ACK": 3, + } + + +class MessageType(object): + EXPERIMENT = 0 + EXPERIMENT_CANCEL = 1 + TASK = 2 + PROCESS = 3 + JOB = 4 + LAUNCHPROCESS = 5 + TERMINATEPROCESS = 6 + PROCESSOUTPUT = 7 + DB_EVENT = 8 + + _VALUES_TO_NAMES = { + 0: "EXPERIMENT", + 1: "EXPERIMENT_CANCEL", + 2: "TASK", + 3: "PROCESS", + 4: "JOB", + 5: "LAUNCHPROCESS", + 6: "TERMINATEPROCESS", + 7: "PROCESSOUTPUT", + 8: "DB_EVENT", + } + + _NAMES_TO_VALUES = { + "EXPERIMENT": 0, + "EXPERIMENT_CANCEL": 1, + "TASK": 2, + "PROCESS": 3, + "JOB": 4, + "LAUNCHPROCESS": 5, + "TERMINATEPROCESS": 6, + "PROCESSOUTPUT": 7, + "DB_EVENT": 8, + } + + +class ExperimentStatusChangeEvent(object): + """ + Attributes: + - state + - experimentId + - gatewayId + """ + + thrift_spec = ( + None, # 0 + (1, TType.I32, 'state', None, None, ), # 1 + (2, TType.STRING, 'experimentId', 'UTF8', None, ), # 2 + (3, TType.STRING, 'gatewayId', 'UTF8', None, ), # 3 + ) + + def __init__(self, state=None, experimentId=None, gatewayId=None,): + self.state = state + self.experimentId = experimentId + self.gatewayId = gatewayId + + 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.state = iprot.readI32() + 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.gatewayId = 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('ExperimentStatusChangeEvent') + if self.state is not None: + oprot.writeFieldBegin('state', TType.I32, 1) + oprot.writeI32(self.state) + 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.gatewayId is not None: + oprot.writeFieldBegin('gatewayId', TType.STRING, 3) + oprot.writeString(self.gatewayId.encode('utf-8') if sys.version_info[0] == 2 else self.gatewayId) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.state is None: + raise TProtocolException(message='Required field state is unset!') + if self.experimentId is None: + raise TProtocolException(message='Required field experimentId is unset!') + if self.gatewayId is None: + raise TProtocolException(message='Required field gatewayId 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 ProcessIdentifier(object): + """ + Attributes: + - processId + - experimentId + - gatewayId + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'processId', 'UTF8', None, ), # 1 + (2, TType.STRING, 'experimentId', 'UTF8', None, ), # 2 + (3, TType.STRING, 'gatewayId', 'UTF8', None, ), # 3 + ) + + def __init__(self, processId=None, experimentId=None, gatewayId=None,): + self.processId = processId + self.experimentId = experimentId + self.gatewayId = gatewayId + + 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.processId = 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.gatewayId = 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('ProcessIdentifier') + if self.processId is not None: + oprot.writeFieldBegin('processId', TType.STRING, 1) + oprot.writeString(self.processId.encode('utf-8') if sys.version_info[0] == 2 else self.processId) + 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.gatewayId is not None: + oprot.writeFieldBegin('gatewayId', TType.STRING, 3) + oprot.writeString(self.gatewayId.encode('utf-8') if sys.version_info[0] == 2 else self.gatewayId) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.processId is None: + raise TProtocolException(message='Required field processId is unset!') + if self.experimentId is None: + raise TProtocolException(message='Required field experimentId is unset!') + if self.gatewayId is None: + raise TProtocolException(message='Required field gatewayId 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 TaskIdentifier(object): + """ + Attributes: + - taskId + - processId + - experimentId + - gatewayId + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'taskId', 'UTF8', None, ), # 1 + (2, TType.STRING, 'processId', 'UTF8', None, ), # 2 + (3, TType.STRING, 'experimentId', 'UTF8', None, ), # 3 + (4, TType.STRING, 'gatewayId', 'UTF8', None, ), # 4 + ) + + def __init__(self, taskId=None, processId=None, experimentId=None, gatewayId=None,): + self.taskId = taskId + self.processId = processId + self.experimentId = experimentId + self.gatewayId = gatewayId + + 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.taskId = 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.experimentId = 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.gatewayId = 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('TaskIdentifier') + if self.taskId is not None: + oprot.writeFieldBegin('taskId', TType.STRING, 1) + oprot.writeString(self.taskId.encode('utf-8') if sys.version_info[0] == 2 else self.taskId) + 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.experimentId is not None: + oprot.writeFieldBegin('experimentId', TType.STRING, 3) + oprot.writeString(self.experimentId.encode('utf-8') if sys.version_info[0] == 2 else self.experimentId) + oprot.writeFieldEnd() + if self.gatewayId is not None: + oprot.writeFieldBegin('gatewayId', TType.STRING, 4) + oprot.writeString(self.gatewayId.encode('utf-8') if sys.version_info[0] == 2 else self.gatewayId) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.taskId is None: + raise TProtocolException(message='Required field taskId is unset!') + if self.processId is None: + raise TProtocolException(message='Required field processId is unset!') + if self.experimentId is None: + raise TProtocolException(message='Required field experimentId is unset!') + if self.gatewayId is None: + raise TProtocolException(message='Required field gatewayId 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 TaskStatusChangeEvent(object): + """ + Attributes: + - state + - taskIdentity + """ + + thrift_spec = ( + None, # 0 + (1, TType.I32, 'state', None, None, ), # 1 + (2, TType.STRUCT, 'taskIdentity', (TaskIdentifier, TaskIdentifier.thrift_spec), None, ), # 2 + ) + + def __init__(self, state=None, taskIdentity=None,): + self.state = state + self.taskIdentity = taskIdentity + + 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.state = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.taskIdentity = TaskIdentifier() + self.taskIdentity.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('TaskStatusChangeEvent') + if self.state is not None: + oprot.writeFieldBegin('state', TType.I32, 1) + oprot.writeI32(self.state) + oprot.writeFieldEnd() + if self.taskIdentity is not None: + oprot.writeFieldBegin('taskIdentity', TType.STRUCT, 2) + self.taskIdentity.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.state is None: + raise TProtocolException(message='Required field state is unset!') + if self.taskIdentity is None: + raise TProtocolException(message='Required field taskIdentity 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 TaskStatusChangeRequestEvent(object): + """ + Attributes: + - state + - taskIdentity + """ + + thrift_spec = ( + None, # 0 + (1, TType.I32, 'state', None, None, ), # 1 + (2, TType.STRUCT, 'taskIdentity', (TaskIdentifier, TaskIdentifier.thrift_spec), None, ), # 2 + ) + + def __init__(self, state=None, taskIdentity=None,): + self.state = state + self.taskIdentity = taskIdentity + + 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.state = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.taskIdentity = TaskIdentifier() + self.taskIdentity.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('TaskStatusChangeRequestEvent') + if self.state is not None: + oprot.writeFieldBegin('state', TType.I32, 1) + oprot.writeI32(self.state) + oprot.writeFieldEnd() + if self.taskIdentity is not None: + oprot.writeFieldBegin('taskIdentity', TType.STRUCT, 2) + self.taskIdentity.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.state is None: + raise TProtocolException(message='Required field state is unset!') + if self.taskIdentity is None: + raise TProtocolException(message='Required field taskIdentity 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 ProcessStatusChangeEvent(object): + """ + Attributes: + - state + - processIdentity + """ + + thrift_spec = ( + None, # 0 + (1, TType.I32, 'state', None, None, ), # 1 + (2, TType.STRUCT, 'processIdentity', (ProcessIdentifier, ProcessIdentifier.thrift_spec), None, ), # 2 + ) + + def __init__(self, state=None, processIdentity=None,): + self.state = state + self.processIdentity = processIdentity + + 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.state = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.processIdentity = ProcessIdentifier() + self.processIdentity.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('ProcessStatusChangeEvent') + if self.state is not None: + oprot.writeFieldBegin('state', TType.I32, 1) + oprot.writeI32(self.state) + oprot.writeFieldEnd() + if self.processIdentity is not None: + oprot.writeFieldBegin('processIdentity', TType.STRUCT, 2) + self.processIdentity.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.state is None: + raise TProtocolException(message='Required field state is unset!') + if self.processIdentity is None: + raise TProtocolException(message='Required field processIdentity 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 ProcessStatusChangeRequestEvent(object): + """ + Attributes: + - state + - processIdentity + """ + + thrift_spec = ( + None, # 0 + (1, TType.I32, 'state', None, None, ), # 1 + (2, TType.STRUCT, 'processIdentity', (ProcessIdentifier, ProcessIdentifier.thrift_spec), None, ), # 2 + ) + + def __init__(self, state=None, processIdentity=None,): + self.state = state + self.processIdentity = processIdentity + + 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.state = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.processIdentity = ProcessIdentifier() + self.processIdentity.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('ProcessStatusChangeRequestEvent') + if self.state is not None: + oprot.writeFieldBegin('state', TType.I32, 1) + oprot.writeI32(self.state) + oprot.writeFieldEnd() + if self.processIdentity is not None: + oprot.writeFieldBegin('processIdentity', TType.STRUCT, 2) + self.processIdentity.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.state is None: + raise TProtocolException(message='Required field state is unset!') + if self.processIdentity is None: + raise TProtocolException(message='Required field processIdentity 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 TaskOutputChangeEvent(object): + """ + Attributes: + - output + - taskIdentity + """ + + thrift_spec = ( + None, # 0 + (1, TType.LIST, 'output', (TType.STRUCT, (apache.airavata.model.application.io.ttypes.OutputDataObjectType, apache.airavata.model.application.io.ttypes.OutputDataObjectType.thrift_spec), False), None, ), # 1 + (2, TType.STRUCT, 'taskIdentity', (TaskIdentifier, TaskIdentifier.thrift_spec), None, ), # 2 + ) + + def __init__(self, output=None, taskIdentity=None,): + self.output = output + self.taskIdentity = taskIdentity + + 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.LIST: + self.output = [] + (_etype3, _size0) = iprot.readListBegin() + for _i4 in range(_size0): + _elem5 = apache.airavata.model.application.io.ttypes.OutputDataObjectType() + _elem5.read(iprot) + self.output.append(_elem5) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.taskIdentity = TaskIdentifier() + self.taskIdentity.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('TaskOutputChangeEvent') + if self.output is not None: + oprot.writeFieldBegin('output', TType.LIST, 1) + oprot.writeListBegin(TType.STRUCT, len(self.output)) + for iter6 in self.output: + iter6.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.taskIdentity is not None: + oprot.writeFieldBegin('taskIdentity', TType.STRUCT, 2) + self.taskIdentity.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.output is None: + raise TProtocolException(message='Required field output is unset!') + if self.taskIdentity is None: + raise TProtocolException(message='Required field taskIdentity 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 JobIdentifier(object): + """ + Attributes: + - jobId + - taskId + - processId + - experimentId + - gatewayId + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'jobId', 'UTF8', None, ), # 1 + (2, TType.STRING, 'taskId', 'UTF8', None, ), # 2 + (3, TType.STRING, 'processId', 'UTF8', None, ), # 3 + (4, TType.STRING, 'experimentId', 'UTF8', None, ), # 4 + (5, TType.STRING, 'gatewayId', 'UTF8', None, ), # 5 + ) + + def __init__(self, jobId=None, taskId=None, processId=None, experimentId=None, gatewayId=None,): + self.jobId = jobId + self.taskId = taskId + self.processId = processId + self.experimentId = experimentId + self.gatewayId = gatewayId + + 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.jobId = 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.taskId = 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.processId = 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.experimentId = 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.gatewayId = 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('JobIdentifier') + if self.jobId is not None: + oprot.writeFieldBegin('jobId', TType.STRING, 1) + oprot.writeString(self.jobId.encode('utf-8') if sys.version_info[0] == 2 else self.jobId) + oprot.writeFieldEnd() + if self.taskId is not None: + oprot.writeFieldBegin('taskId', TType.STRING, 2) + oprot.writeString(self.taskId.encode('utf-8') if sys.version_info[0] == 2 else self.taskId) + oprot.writeFieldEnd() + if self.processId is not None: + oprot.writeFieldBegin('processId', TType.STRING, 3) + oprot.writeString(self.processId.encode('utf-8') if sys.version_info[0] == 2 else self.processId) + oprot.writeFieldEnd() + if self.experimentId is not None: + oprot.writeFieldBegin('experimentId', TType.STRING, 4) + oprot.writeString(self.experimentId.encode('utf-8') if sys.version_info[0] == 2 else self.experimentId) + oprot.writeFieldEnd() + if self.gatewayId is not None: + oprot.writeFieldBegin('gatewayId', TType.STRING, 5) + oprot.writeString(self.gatewayId.encode('utf-8') if sys.version_info[0] == 2 else self.gatewayId) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.jobId is None: + raise TProtocolException(message='Required field jobId is unset!') + if self.taskId is None: + raise TProtocolException(message='Required field taskId is unset!') + if self.processId is None: + raise TProtocolException(message='Required field processId is unset!') + if self.experimentId is None: + raise TProtocolException(message='Required field experimentId is unset!') + if self.gatewayId is None: + raise TProtocolException(message='Required field gatewayId 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 ExperimentSubmitEvent(object): + """ + Attributes: + - experimentId + - gatewayId + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'experimentId', 'UTF8', None, ), # 1 + (2, TType.STRING, 'gatewayId', 'UTF8', None, ), # 2 + ) + + def __init__(self, experimentId=None, gatewayId=None,): + self.experimentId = experimentId + self.gatewayId = gatewayId + + 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.experimentId = 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) + 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('ExperimentSubmitEvent') + if self.experimentId is not None: + oprot.writeFieldBegin('experimentId', TType.STRING, 1) + oprot.writeString(self.experimentId.encode('utf-8') if sys.version_info[0] == 2 else self.experimentId) + 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() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.experimentId is None: + raise TProtocolException(message='Required field experimentId is unset!') + if self.gatewayId is None: + raise TProtocolException(message='Required field gatewayId 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 ProcessSubmitEvent(object): + """ + Attributes: + - processId + - gatewayId + - experimentId + - tokenId + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'processId', 'UTF8', None, ), # 1 + (2, TType.STRING, 'gatewayId', 'UTF8', None, ), # 2 + (3, TType.STRING, 'experimentId', 'UTF8', None, ), # 3 + (4, TType.STRING, 'tokenId', 'UTF8', None, ), # 4 + ) + + def __init__(self, processId=None, gatewayId=None, experimentId=None, tokenId=None,): + self.processId = processId + self.gatewayId = gatewayId + self.experimentId = experimentId + self.tokenId = tokenId + + 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.processId = 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.experimentId = 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.tokenId = i