Blame | Last modification | View Log | RSS feed
## Autogenerated by Thrift Compiler (0.7.0)## DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING#from thrift.Thrift import *import shop2020.thriftpy.generic.GenericServicefrom ttypes import *from thrift.Thrift import TProcessorfrom thrift.transport import TTransportfrom thrift.protocol import TBinaryProtocol, TProtocoltry:from thrift.protocol import fastbinaryexcept:fastbinary = Noneclass Iface(shop2020.thriftpy.generic.GenericService.Iface):def scheduleAlert(self, entity):"""Create a new tracking object.Parameters:- entity"""passdef updateMonitoredObject(self, entity):"""Update previously stored tracking object.Parameters:- entity"""passdef endMonitoringEntity(self, entityType, entityIdentifier):"""Stop tracking the entityParameters:- entityType- entityIdentifier"""passdef getEntities(self, searchFilter):"""Get entities with specified conditions in SearchFilter ObjectParameters:- searchFilter"""passdef getAlertedEntities(self, searchFilter):"""Get entities with specified conditions in SearchFilter ObjectParameters:- searchFilter"""passdef getAlertMapper(self, entityType, eventType):"""Get alertMap for entityType and eventTypeParameters:- entityType- eventType"""passdef activateEntityMonitoring(self, entityType, userIds):"""Start monitoring entityType or Update monitoring paremetersParameters:- entityType- userIds"""passdef deActivateEntityMonitoring(self, entityType):"""Stop monitoring entityTypeParameters:- entityType"""passdef registerEventType(self, alertMap):"""Add AlertMap values for particular entity and eventParameters:- alertMap"""passclass Client(shop2020.thriftpy.generic.GenericService.Client, Iface):def __init__(self, iprot, oprot=None):shop2020.thriftpy.generic.GenericService.Client.__init__(self, iprot, oprot)def scheduleAlert(self, entity):"""Create a new tracking object.Parameters:- entity"""self.send_scheduleAlert(entity)self.recv_scheduleAlert()def send_scheduleAlert(self, entity):self._oprot.writeMessageBegin('scheduleAlert', TMessageType.CALL, self._seqid)args = scheduleAlert_args()args.entity = entityargs.write(self._oprot)self._oprot.writeMessageEnd()self._oprot.trans.flush()def recv_scheduleAlert(self, ):(fname, mtype, rseqid) = self._iprot.readMessageBegin()if mtype == TMessageType.EXCEPTION:x = TApplicationException()x.read(self._iprot)self._iprot.readMessageEnd()raise xresult = scheduleAlert_result()result.read(self._iprot)self._iprot.readMessageEnd()if result.e is not None:raise result.ereturndef updateMonitoredObject(self, entity):"""Update previously stored tracking object.Parameters:- entity"""self.send_updateMonitoredObject(entity)self.recv_updateMonitoredObject()def send_updateMonitoredObject(self, entity):self._oprot.writeMessageBegin('updateMonitoredObject', TMessageType.CALL, self._seqid)args = updateMonitoredObject_args()args.entity = entityargs.write(self._oprot)self._oprot.writeMessageEnd()self._oprot.trans.flush()def recv_updateMonitoredObject(self, ):(fname, mtype, rseqid) = self._iprot.readMessageBegin()if mtype == TMessageType.EXCEPTION:x = TApplicationException()x.read(self._iprot)self._iprot.readMessageEnd()raise xresult = updateMonitoredObject_result()result.read(self._iprot)self._iprot.readMessageEnd()if result.e is not None:raise result.ereturndef endMonitoringEntity(self, entityType, entityIdentifier):"""Stop tracking the entityParameters:- entityType- entityIdentifier"""self.send_endMonitoringEntity(entityType, entityIdentifier)self.recv_endMonitoringEntity()def send_endMonitoringEntity(self, entityType, entityIdentifier):self._oprot.writeMessageBegin('endMonitoringEntity', TMessageType.CALL, self._seqid)args = endMonitoringEntity_args()args.entityType = entityTypeargs.entityIdentifier = entityIdentifierargs.write(self._oprot)self._oprot.writeMessageEnd()self._oprot.trans.flush()def recv_endMonitoringEntity(self, ):(fname, mtype, rseqid) = self._iprot.readMessageBegin()if mtype == TMessageType.EXCEPTION:x = TApplicationException()x.read(self._iprot)self._iprot.readMessageEnd()raise xresult = endMonitoringEntity_result()result.read(self._iprot)self._iprot.readMessageEnd()if result.e is not None:raise result.ereturndef getEntities(self, searchFilter):"""Get entities with specified conditions in SearchFilter ObjectParameters:- searchFilter"""self.send_getEntities(searchFilter)return self.recv_getEntities()def send_getEntities(self, searchFilter):self._oprot.writeMessageBegin('getEntities', TMessageType.CALL, self._seqid)args = getEntities_args()args.searchFilter = searchFilterargs.write(self._oprot)self._oprot.writeMessageEnd()self._oprot.trans.flush()def recv_getEntities(self, ):(fname, mtype, rseqid) = self._iprot.readMessageBegin()if mtype == TMessageType.EXCEPTION:x = TApplicationException()x.read(self._iprot)self._iprot.readMessageEnd()raise xresult = getEntities_result()result.read(self._iprot)self._iprot.readMessageEnd()if result.success is not None:return result.successif result.e is not None:raise result.eraise TApplicationException(TApplicationException.MISSING_RESULT, "getEntities failed: unknown result");def getAlertedEntities(self, searchFilter):"""Get entities with specified conditions in SearchFilter ObjectParameters:- searchFilter"""self.send_getAlertedEntities(searchFilter)return self.recv_getAlertedEntities()def send_getAlertedEntities(self, searchFilter):self._oprot.writeMessageBegin('getAlertedEntities', TMessageType.CALL, self._seqid)args = getAlertedEntities_args()args.searchFilter = searchFilterargs.write(self._oprot)self._oprot.writeMessageEnd()self._oprot.trans.flush()def recv_getAlertedEntities(self, ):(fname, mtype, rseqid) = self._iprot.readMessageBegin()if mtype == TMessageType.EXCEPTION:x = TApplicationException()x.read(self._iprot)self._iprot.readMessageEnd()raise xresult = getAlertedEntities_result()result.read(self._iprot)self._iprot.readMessageEnd()if result.success is not None:return result.successif result.e is not None:raise result.eraise TApplicationException(TApplicationException.MISSING_RESULT, "getAlertedEntities failed: unknown result");def getAlertMapper(self, entityType, eventType):"""Get alertMap for entityType and eventTypeParameters:- entityType- eventType"""self.send_getAlertMapper(entityType, eventType)return self.recv_getAlertMapper()def send_getAlertMapper(self, entityType, eventType):self._oprot.writeMessageBegin('getAlertMapper', TMessageType.CALL, self._seqid)args = getAlertMapper_args()args.entityType = entityTypeargs.eventType = eventTypeargs.write(self._oprot)self._oprot.writeMessageEnd()self._oprot.trans.flush()def recv_getAlertMapper(self, ):(fname, mtype, rseqid) = self._iprot.readMessageBegin()if mtype == TMessageType.EXCEPTION:x = TApplicationException()x.read(self._iprot)self._iprot.readMessageEnd()raise xresult = getAlertMapper_result()result.read(self._iprot)self._iprot.readMessageEnd()if result.success is not None:return result.successif result.e is not None:raise result.eraise TApplicationException(TApplicationException.MISSING_RESULT, "getAlertMapper failed: unknown result");def activateEntityMonitoring(self, entityType, userIds):"""Start monitoring entityType or Update monitoring paremetersParameters:- entityType- userIds"""self.send_activateEntityMonitoring(entityType, userIds)self.recv_activateEntityMonitoring()def send_activateEntityMonitoring(self, entityType, userIds):self._oprot.writeMessageBegin('activateEntityMonitoring', TMessageType.CALL, self._seqid)args = activateEntityMonitoring_args()args.entityType = entityTypeargs.userIds = userIdsargs.write(self._oprot)self._oprot.writeMessageEnd()self._oprot.trans.flush()def recv_activateEntityMonitoring(self, ):(fname, mtype, rseqid) = self._iprot.readMessageBegin()if mtype == TMessageType.EXCEPTION:x = TApplicationException()x.read(self._iprot)self._iprot.readMessageEnd()raise xresult = activateEntityMonitoring_result()result.read(self._iprot)self._iprot.readMessageEnd()if result.e is not None:raise result.ereturndef deActivateEntityMonitoring(self, entityType):"""Stop monitoring entityTypeParameters:- entityType"""self.send_deActivateEntityMonitoring(entityType)self.recv_deActivateEntityMonitoring()def send_deActivateEntityMonitoring(self, entityType):self._oprot.writeMessageBegin('deActivateEntityMonitoring', TMessageType.CALL, self._seqid)args = deActivateEntityMonitoring_args()args.entityType = entityTypeargs.write(self._oprot)self._oprot.writeMessageEnd()self._oprot.trans.flush()def recv_deActivateEntityMonitoring(self, ):(fname, mtype, rseqid) = self._iprot.readMessageBegin()if mtype == TMessageType.EXCEPTION:x = TApplicationException()x.read(self._iprot)self._iprot.readMessageEnd()raise xresult = deActivateEntityMonitoring_result()result.read(self._iprot)self._iprot.readMessageEnd()if result.e is not None:raise result.ereturndef registerEventType(self, alertMap):"""Add AlertMap values for particular entity and eventParameters:- alertMap"""self.send_registerEventType(alertMap)self.recv_registerEventType()def send_registerEventType(self, alertMap):self._oprot.writeMessageBegin('registerEventType', TMessageType.CALL, self._seqid)args = registerEventType_args()args.alertMap = alertMapargs.write(self._oprot)self._oprot.writeMessageEnd()self._oprot.trans.flush()def recv_registerEventType(self, ):(fname, mtype, rseqid) = self._iprot.readMessageBegin()if mtype == TMessageType.EXCEPTION:x = TApplicationException()x.read(self._iprot)self._iprot.readMessageEnd()raise xresult = registerEventType_result()result.read(self._iprot)self._iprot.readMessageEnd()if result.e is not None:raise result.ereturnclass Processor(shop2020.thriftpy.generic.GenericService.Processor, Iface, TProcessor):def __init__(self, handler):shop2020.thriftpy.generic.GenericService.Processor.__init__(self, handler)self._processMap["scheduleAlert"] = Processor.process_scheduleAlertself._processMap["updateMonitoredObject"] = Processor.process_updateMonitoredObjectself._processMap["endMonitoringEntity"] = Processor.process_endMonitoringEntityself._processMap["getEntities"] = Processor.process_getEntitiesself._processMap["getAlertedEntities"] = Processor.process_getAlertedEntitiesself._processMap["getAlertMapper"] = Processor.process_getAlertMapperself._processMap["activateEntityMonitoring"] = Processor.process_activateEntityMonitoringself._processMap["deActivateEntityMonitoring"] = Processor.process_deActivateEntityMonitoringself._processMap["registerEventType"] = Processor.process_registerEventTypedef process(self, iprot, oprot):(name, type, seqid) = iprot.readMessageBegin()if name not in self._processMap:iprot.skip(TType.STRUCT)iprot.readMessageEnd()x = TApplicationException(TApplicationException.UNKNOWN_METHOD, 'Unknown function %s' % (name))oprot.writeMessageBegin(name, TMessageType.EXCEPTION, seqid)x.write(oprot)oprot.writeMessageEnd()oprot.trans.flush()returnelse:self._processMap[name](self, seqid, iprot, oprot)return Truedef process_scheduleAlert(self, seqid, iprot, oprot):args = scheduleAlert_args()args.read(iprot)iprot.readMessageEnd()result = scheduleAlert_result()try:self._handler.scheduleAlert(args.entity)except AlertServiceException, e:result.e = eoprot.writeMessageBegin("scheduleAlert", TMessageType.REPLY, seqid)result.write(oprot)oprot.writeMessageEnd()oprot.trans.flush()def process_updateMonitoredObject(self, seqid, iprot, oprot):args = updateMonitoredObject_args()args.read(iprot)iprot.readMessageEnd()result = updateMonitoredObject_result()try:self._handler.updateMonitoredObject(args.entity)except AlertServiceException, e:result.e = eoprot.writeMessageBegin("updateMonitoredObject", TMessageType.REPLY, seqid)result.write(oprot)oprot.writeMessageEnd()oprot.trans.flush()def process_endMonitoringEntity(self, seqid, iprot, oprot):args = endMonitoringEntity_args()args.read(iprot)iprot.readMessageEnd()result = endMonitoringEntity_result()try:self._handler.endMonitoringEntity(args.entityType, args.entityIdentifier)except AlertServiceException, e:result.e = eoprot.writeMessageBegin("endMonitoringEntity", TMessageType.REPLY, seqid)result.write(oprot)oprot.writeMessageEnd()oprot.trans.flush()def process_getEntities(self, seqid, iprot, oprot):args = getEntities_args()args.read(iprot)iprot.readMessageEnd()result = getEntities_result()try:result.success = self._handler.getEntities(args.searchFilter)except AlertServiceException, e:result.e = eoprot.writeMessageBegin("getEntities", TMessageType.REPLY, seqid)result.write(oprot)oprot.writeMessageEnd()oprot.trans.flush()def process_getAlertedEntities(self, seqid, iprot, oprot):args = getAlertedEntities_args()args.read(iprot)iprot.readMessageEnd()result = getAlertedEntities_result()try:result.success = self._handler.getAlertedEntities(args.searchFilter)except AlertServiceException, e:result.e = eoprot.writeMessageBegin("getAlertedEntities", TMessageType.REPLY, seqid)result.write(oprot)oprot.writeMessageEnd()oprot.trans.flush()def process_getAlertMapper(self, seqid, iprot, oprot):args = getAlertMapper_args()args.read(iprot)iprot.readMessageEnd()result = getAlertMapper_result()try:result.success = self._handler.getAlertMapper(args.entityType, args.eventType)except AlertServiceException, e:result.e = eoprot.writeMessageBegin("getAlertMapper", TMessageType.REPLY, seqid)result.write(oprot)oprot.writeMessageEnd()oprot.trans.flush()def process_activateEntityMonitoring(self, seqid, iprot, oprot):args = activateEntityMonitoring_args()args.read(iprot)iprot.readMessageEnd()result = activateEntityMonitoring_result()try:self._handler.activateEntityMonitoring(args.entityType, args.userIds)except AlertServiceException, e:result.e = eoprot.writeMessageBegin("activateEntityMonitoring", TMessageType.REPLY, seqid)result.write(oprot)oprot.writeMessageEnd()oprot.trans.flush()def process_deActivateEntityMonitoring(self, seqid, iprot, oprot):args = deActivateEntityMonitoring_args()args.read(iprot)iprot.readMessageEnd()result = deActivateEntityMonitoring_result()try:self._handler.deActivateEntityMonitoring(args.entityType)except AlertServiceException, e:result.e = eoprot.writeMessageBegin("deActivateEntityMonitoring", TMessageType.REPLY, seqid)result.write(oprot)oprot.writeMessageEnd()oprot.trans.flush()def process_registerEventType(self, seqid, iprot, oprot):args = registerEventType_args()args.read(iprot)iprot.readMessageEnd()result = registerEventType_result()try:self._handler.registerEventType(args.alertMap)except AlertServiceException, e:result.e = eoprot.writeMessageBegin("registerEventType", TMessageType.REPLY, seqid)result.write(oprot)oprot.writeMessageEnd()oprot.trans.flush()# HELPER FUNCTIONS AND STRUCTURESclass scheduleAlert_args:"""Attributes:- entity"""thrift_spec = (None, # 0(1, TType.STRUCT, 'entity', (MonitoredEntity, MonitoredEntity.thrift_spec), None, ), # 1)def __init__(self, entity=None,):self.entity = entitydef 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))returniprot.readStructBegin()while True:(fname, ftype, fid) = iprot.readFieldBegin()if ftype == TType.STOP:breakif fid == 1:if ftype == TType.STRUCT:self.entity = MonitoredEntity()self.entity.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)))returnoprot.writeStructBegin('scheduleAlert_args')if self.entity is not None:oprot.writeFieldBegin('entity', TType.STRUCT, 1)self.entity.write(oprot)oprot.writeFieldEnd()oprot.writeFieldStop()oprot.writeStructEnd()def validate(self):returndef __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 scheduleAlert_result:"""Attributes:- e"""thrift_spec = (None, # 0(1, TType.STRUCT, 'e', (AlertServiceException, AlertServiceException.thrift_spec), None, ), # 1)def __init__(self, e=None,):self.e = edef 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))returniprot.readStructBegin()while True:(fname, ftype, fid) = iprot.readFieldBegin()if ftype == TType.STOP:breakif fid == 1:if ftype == TType.STRUCT:self.e = AlertServiceException()self.e.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)))returnoprot.writeStructBegin('scheduleAlert_result')if self.e is not None:oprot.writeFieldBegin('e', TType.STRUCT, 1)self.e.write(oprot)oprot.writeFieldEnd()oprot.writeFieldStop()oprot.writeStructEnd()def validate(self):returndef __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 updateMonitoredObject_args:"""Attributes:- entity"""thrift_spec = (None, # 0(1, TType.STRUCT, 'entity', (MonitoredEntity, MonitoredEntity.thrift_spec), None, ), # 1)def __init__(self, entity=None,):self.entity = entitydef 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))returniprot.readStructBegin()while True:(fname, ftype, fid) = iprot.readFieldBegin()if ftype == TType.STOP:breakif fid == 1:if ftype == TType.STRUCT:self.entity = MonitoredEntity()self.entity.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)))returnoprot.writeStructBegin('updateMonitoredObject_args')if self.entity is not None:oprot.writeFieldBegin('entity', TType.STRUCT, 1)self.entity.write(oprot)oprot.writeFieldEnd()oprot.writeFieldStop()oprot.writeStructEnd()def validate(self):returndef __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 updateMonitoredObject_result:"""Attributes:- e"""thrift_spec = (None, # 0(1, TType.STRUCT, 'e', (AlertServiceException, AlertServiceException.thrift_spec), None, ), # 1)def __init__(self, e=None,):self.e = edef 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))returniprot.readStructBegin()while True:(fname, ftype, fid) = iprot.readFieldBegin()if ftype == TType.STOP:breakif fid == 1:if ftype == TType.STRUCT:self.e = AlertServiceException()self.e.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)))returnoprot.writeStructBegin('updateMonitoredObject_result')if self.e is not None:oprot.writeFieldBegin('e', TType.STRUCT, 1)self.e.write(oprot)oprot.writeFieldEnd()oprot.writeFieldStop()oprot.writeStructEnd()def validate(self):returndef __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 endMonitoringEntity_args:"""Attributes:- entityType- entityIdentifier"""thrift_spec = (None, # 0(1, TType.I32, 'entityType', None, None, ), # 1(2, TType.STRING, 'entityIdentifier', None, None, ), # 2)def __init__(self, entityType=None, entityIdentifier=None,):self.entityType = entityTypeself.entityIdentifier = entityIdentifierdef 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))returniprot.readStructBegin()while True:(fname, ftype, fid) = iprot.readFieldBegin()if ftype == TType.STOP:breakif fid == 1:if ftype == TType.I32:self.entityType = iprot.readI32();else:iprot.skip(ftype)elif fid == 2:if ftype == TType.STRING:self.entityIdentifier = 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)))returnoprot.writeStructBegin('endMonitoringEntity_args')if self.entityType is not None:oprot.writeFieldBegin('entityType', TType.I32, 1)oprot.writeI32(self.entityType)oprot.writeFieldEnd()if self.entityIdentifier is not None:oprot.writeFieldBegin('entityIdentifier', TType.STRING, 2)oprot.writeString(self.entityIdentifier)oprot.writeFieldEnd()oprot.writeFieldStop()oprot.writeStructEnd()def validate(self):returndef __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 endMonitoringEntity_result:"""Attributes:- e"""thrift_spec = (None, # 0(1, TType.STRUCT, 'e', (AlertServiceException, AlertServiceException.thrift_spec), None, ), # 1)def __init__(self, e=None,):self.e = edef 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))returniprot.readStructBegin()while True:(fname, ftype, fid) = iprot.readFieldBegin()if ftype == TType.STOP:breakif fid == 1:if ftype == TType.STRUCT:self.e = AlertServiceException()self.e.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)))returnoprot.writeStructBegin('endMonitoringEntity_result')if self.e is not None:oprot.writeFieldBegin('e', TType.STRUCT, 1)self.e.write(oprot)oprot.writeFieldEnd()oprot.writeFieldStop()oprot.writeStructEnd()def validate(self):returndef __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 getEntities_args:"""Attributes:- searchFilter"""thrift_spec = (None, # 0(1, TType.STRUCT, 'searchFilter', (SearchFilter, SearchFilter.thrift_spec), None, ), # 1)def __init__(self, searchFilter=None,):self.searchFilter = searchFilterdef 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))returniprot.readStructBegin()while True:(fname, ftype, fid) = iprot.readFieldBegin()if ftype == TType.STOP:breakif fid == 1:if ftype == TType.STRUCT:self.searchFilter = SearchFilter()self.searchFilter.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)))returnoprot.writeStructBegin('getEntities_args')if self.searchFilter is not None:oprot.writeFieldBegin('searchFilter', TType.STRUCT, 1)self.searchFilter.write(oprot)oprot.writeFieldEnd()oprot.writeFieldStop()oprot.writeStructEnd()def validate(self):returndef __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 getEntities_result:"""Attributes:- success- e"""thrift_spec = ((0, TType.LIST, 'success', (TType.STRUCT,(MonitoredEntity, MonitoredEntity.thrift_spec)), None, ), # 0(1, TType.STRUCT, 'e', (AlertServiceException, AlertServiceException.thrift_spec), None, ), # 1)def __init__(self, success=None, e=None,):self.success = successself.e = edef 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))returniprot.readStructBegin()while True:(fname, ftype, fid) = iprot.readFieldBegin()if ftype == TType.STOP:breakif fid == 0:if ftype == TType.LIST:self.success = [](_etype3, _size0) = iprot.readListBegin()for _i4 in xrange(_size0):_elem5 = MonitoredEntity()_elem5.read(iprot)self.success.append(_elem5)iprot.readListEnd()else:iprot.skip(ftype)elif fid == 1:if ftype == TType.STRUCT:self.e = AlertServiceException()self.e.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)))returnoprot.writeStructBegin('getEntities_result')if self.success is not None:oprot.writeFieldBegin('success', TType.LIST, 0)oprot.writeListBegin(TType.STRUCT, len(self.success))for iter6 in self.success:iter6.write(oprot)oprot.writeListEnd()oprot.writeFieldEnd()if self.e is not None:oprot.writeFieldBegin('e', TType.STRUCT, 1)self.e.write(oprot)oprot.writeFieldEnd()oprot.writeFieldStop()oprot.writeStructEnd()def validate(self):returndef __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 getAlertedEntities_args:"""Attributes:- searchFilter"""thrift_spec = (None, # 0(1, TType.STRUCT, 'searchFilter', (SearchFilter, SearchFilter.thrift_spec), None, ), # 1)def __init__(self, searchFilter=None,):self.searchFilter = searchFilterdef 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))returniprot.readStructBegin()while True:(fname, ftype, fid) = iprot.readFieldBegin()if ftype == TType.STOP:breakif fid == 1:if ftype == TType.STRUCT:self.searchFilter = SearchFilter()self.searchFilter.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)))returnoprot.writeStructBegin('getAlertedEntities_args')if self.searchFilter is not None:oprot.writeFieldBegin('searchFilter', TType.STRUCT, 1)self.searchFilter.write(oprot)oprot.writeFieldEnd()oprot.writeFieldStop()oprot.writeStructEnd()def validate(self):returndef __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 getAlertedEntities_result:"""Attributes:- success- e"""thrift_spec = ((0, TType.LIST, 'success', (TType.STRUCT,(AlertedEntity, AlertedEntity.thrift_spec)), None, ), # 0(1, TType.STRUCT, 'e', (AlertServiceException, AlertServiceException.thrift_spec), None, ), # 1)def __init__(self, success=None, e=None,):self.success = successself.e = edef 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))returniprot.readStructBegin()while True:(fname, ftype, fid) = iprot.readFieldBegin()if ftype == TType.STOP:breakif fid == 0:if ftype == TType.LIST:self.success = [](_etype10, _size7) = iprot.readListBegin()for _i11 in xrange(_size7):_elem12 = AlertedEntity()_elem12.read(iprot)self.success.append(_elem12)iprot.readListEnd()else:iprot.skip(ftype)elif fid == 1:if ftype == TType.STRUCT:self.e = AlertServiceException()self.e.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)))returnoprot.writeStructBegin('getAlertedEntities_result')if self.success is not None:oprot.writeFieldBegin('success', TType.LIST, 0)oprot.writeListBegin(TType.STRUCT, len(self.success))for iter13 in self.success:iter13.write(oprot)oprot.writeListEnd()oprot.writeFieldEnd()if self.e is not None:oprot.writeFieldBegin('e', TType.STRUCT, 1)self.e.write(oprot)oprot.writeFieldEnd()oprot.writeFieldStop()oprot.writeStructEnd()def validate(self):returndef __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 getAlertMapper_args:"""Attributes:- entityType- eventType"""thrift_spec = (None, # 0(1, TType.I32, 'entityType', None, None, ), # 1(2, TType.I32, 'eventType', None, None, ), # 2)def __init__(self, entityType=None, eventType=None,):self.entityType = entityTypeself.eventType = eventTypedef 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))returniprot.readStructBegin()while True:(fname, ftype, fid) = iprot.readFieldBegin()if ftype == TType.STOP:breakif fid == 1:if ftype == TType.I32:self.entityType = iprot.readI32();else:iprot.skip(ftype)elif fid == 2:if ftype == TType.I32:self.eventType = 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)))returnoprot.writeStructBegin('getAlertMapper_args')if self.entityType is not None:oprot.writeFieldBegin('entityType', TType.I32, 1)oprot.writeI32(self.entityType)oprot.writeFieldEnd()if self.eventType is not None:oprot.writeFieldBegin('eventType', TType.I32, 2)oprot.writeI32(self.eventType)oprot.writeFieldEnd()oprot.writeFieldStop()oprot.writeStructEnd()def validate(self):returndef __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 getAlertMapper_result:"""Attributes:- success- e"""thrift_spec = ((0, TType.STRUCT, 'success', (AlertMapper, AlertMapper.thrift_spec), None, ), # 0(1, TType.STRUCT, 'e', (AlertServiceException, AlertServiceException.thrift_spec), None, ), # 1)def __init__(self, success=None, e=None,):self.success = successself.e = edef 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))returniprot.readStructBegin()while True:(fname, ftype, fid) = iprot.readFieldBegin()if ftype == TType.STOP:breakif fid == 0:if ftype == TType.STRUCT:self.success = AlertMapper()self.success.read(iprot)else:iprot.skip(ftype)elif fid == 1:if ftype == TType.STRUCT:self.e = AlertServiceException()self.e.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)))returnoprot.writeStructBegin('getAlertMapper_result')if self.success is not None:oprot.writeFieldBegin('success', TType.STRUCT, 0)self.success.write(oprot)oprot.writeFieldEnd()if self.e is not None:oprot.writeFieldBegin('e', TType.STRUCT, 1)self.e.write(oprot)oprot.writeFieldEnd()oprot.writeFieldStop()oprot.writeStructEnd()def validate(self):returndef __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 activateEntityMonitoring_args:"""Attributes:- entityType- userIds"""thrift_spec = (None, # 0(1, TType.I32, 'entityType', None, None, ), # 1(2, TType.STRING, 'userIds', None, None, ), # 2)def __init__(self, entityType=None, userIds=None,):self.entityType = entityTypeself.userIds = userIdsdef 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))returniprot.readStructBegin()while True:(fname, ftype, fid) = iprot.readFieldBegin()if ftype == TType.STOP:breakif fid == 1:if ftype == TType.I32:self.entityType = iprot.readI32();else:iprot.skip(ftype)elif fid == 2:if ftype == TType.STRING:self.userIds = 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)))returnoprot.writeStructBegin('activateEntityMonitoring_args')if self.entityType is not None:oprot.writeFieldBegin('entityType', TType.I32, 1)oprot.writeI32(self.entityType)oprot.writeFieldEnd()if self.userIds is not None:oprot.writeFieldBegin('userIds', TType.STRING, 2)oprot.writeString(self.userIds)oprot.writeFieldEnd()oprot.writeFieldStop()oprot.writeStructEnd()def validate(self):returndef __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 activateEntityMonitoring_result:"""Attributes:- e"""thrift_spec = (None, # 0(1, TType.STRUCT, 'e', (AlertServiceException, AlertServiceException.thrift_spec), None, ), # 1)def __init__(self, e=None,):self.e = edef 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))returniprot.readStructBegin()while True:(fname, ftype, fid) = iprot.readFieldBegin()if ftype == TType.STOP:breakif fid == 1:if ftype == TType.STRUCT:self.e = AlertServiceException()self.e.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)))returnoprot.writeStructBegin('activateEntityMonitoring_result')if self.e is not None:oprot.writeFieldBegin('e', TType.STRUCT, 1)self.e.write(oprot)oprot.writeFieldEnd()oprot.writeFieldStop()oprot.writeStructEnd()def validate(self):returndef __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 deActivateEntityMonitoring_args:"""Attributes:- entityType"""thrift_spec = (None, # 0(1, TType.I32, 'entityType', None, None, ), # 1)def __init__(self, entityType=None,):self.entityType = entityTypedef 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))returniprot.readStructBegin()while True:(fname, ftype, fid) = iprot.readFieldBegin()if ftype == TType.STOP:breakif fid == 1:if ftype == TType.I32:self.entityType = 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)))returnoprot.writeStructBegin('deActivateEntityMonitoring_args')if self.entityType is not None:oprot.writeFieldBegin('entityType', TType.I32, 1)oprot.writeI32(self.entityType)oprot.writeFieldEnd()oprot.writeFieldStop()oprot.writeStructEnd()def validate(self):returndef __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 deActivateEntityMonitoring_result:"""Attributes:- e"""thrift_spec = (None, # 0(1, TType.STRUCT, 'e', (AlertServiceException, AlertServiceException.thrift_spec), None, ), # 1)def __init__(self, e=None,):self.e = edef 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))returniprot.readStructBegin()while True:(fname, ftype, fid) = iprot.readFieldBegin()if ftype == TType.STOP:breakif fid == 1:if ftype == TType.STRUCT:self.e = AlertServiceException()self.e.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)))returnoprot.writeStructBegin('deActivateEntityMonitoring_result')if self.e is not None:oprot.writeFieldBegin('e', TType.STRUCT, 1)self.e.write(oprot)oprot.writeFieldEnd()oprot.writeFieldStop()oprot.writeStructEnd()def validate(self):returndef __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 registerEventType_args:"""Attributes:- alertMap"""thrift_spec = (None, # 0(1, TType.STRUCT, 'alertMap', (AlertMapper, AlertMapper.thrift_spec), None, ), # 1)def __init__(self, alertMap=None,):self.alertMap = alertMapdef 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))returniprot.readStructBegin()while True:(fname, ftype, fid) = iprot.readFieldBegin()if ftype == TType.STOP:breakif fid == 1:if ftype == TType.STRUCT:self.alertMap = AlertMapper()self.alertMap.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)))returnoprot.writeStructBegin('registerEventType_args')if self.alertMap is not None:oprot.writeFieldBegin('alertMap', TType.STRUCT, 1)self.alertMap.write(oprot)oprot.writeFieldEnd()oprot.writeFieldStop()oprot.writeStructEnd()def validate(self):returndef __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 registerEventType_result:"""Attributes:- e"""thrift_spec = (None, # 0(1, TType.STRUCT, 'e', (AlertServiceException, AlertServiceException.thrift_spec), None, ), # 1)def __init__(self, e=None,):self.e = edef 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))returniprot.readStructBegin()while True:(fname, ftype, fid) = iprot.readFieldBegin()if ftype == TType.STOP:breakif fid == 1:if ftype == TType.STRUCT:self.e = AlertServiceException()self.e.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)))returnoprot.writeStructBegin('registerEventType_result')if self.e is not None:oprot.writeFieldBegin('e', TType.STRUCT, 1)self.e.write(oprot)oprot.writeFieldEnd()oprot.writeFieldStop()oprot.writeStructEnd()def validate(self):returndef __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)