2 # Autogenerated by Thrift Compiler (0.9.3)
4 # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
9 from thrift.Thrift import TType, TMessageType, TException, TApplicationException
12 from thrift.Thrift import TProcessor
13 from thrift.transport import TTransport
14 from thrift.protocol import TBinaryProtocol, TProtocol
16 from thrift.protocol import fastbinary
22 def d_heartbeat(self, msg):
24 A method definition looks like C code. It has a return type, arguments,
25 and optionally a list of exceptions that it may throw. Note that argument
26 lists and exception lists are specified using the exact same syntax as
27 field lists in struct or exception definitions.
34 def d_register(self, msg):
41 def d_subscribe(self, msg):
48 def d_publish(self, msg):
55 def d_push(self, msg):
62 def d_query(self, msg):
71 def __init__(self, iprot, oprot=None):
72 self._iprot = self._oprot = iprot
77 def d_heartbeat(self, msg):
79 A method definition looks like C code. It has a return type, arguments,
80 and optionally a list of exceptions that it may throw. Note that argument
81 lists and exception lists are specified using the exact same syntax as
82 field lists in struct or exception definitions.
87 self.send_d_heartbeat(msg)
88 return self.recv_d_heartbeat()
90 def send_d_heartbeat(self, msg):
91 self._oprot.writeMessageBegin('d_heartbeat', TMessageType.CALL, self._seqid)
92 args = d_heartbeat_args()
94 args.write(self._oprot)
95 self._oprot.writeMessageEnd()
96 self._oprot.trans.flush()
98 def recv_d_heartbeat(self):
100 (fname, mtype, rseqid) = iprot.readMessageBegin()
101 if mtype == TMessageType.EXCEPTION:
102 x = TApplicationException()
104 iprot.readMessageEnd()
106 result = d_heartbeat_result()
108 iprot.readMessageEnd()
109 if result.success is not None:
110 return result.success
111 raise TApplicationException(TApplicationException.MISSING_RESULT, "d_heartbeat failed: unknown result")
113 def d_register(self, msg):
118 self.send_d_register(msg)
119 return self.recv_d_register()
121 def send_d_register(self, msg):
122 self._oprot.writeMessageBegin('d_register', TMessageType.CALL, self._seqid)
123 args = d_register_args()
125 args.write(self._oprot)
126 self._oprot.writeMessageEnd()
127 self._oprot.trans.flush()
129 def recv_d_register(self):
131 (fname, mtype, rseqid) = iprot.readMessageBegin()
132 if mtype == TMessageType.EXCEPTION:
133 x = TApplicationException()
135 iprot.readMessageEnd()
137 result = d_register_result()
139 iprot.readMessageEnd()
140 if result.success is not None:
141 return result.success
142 raise TApplicationException(TApplicationException.MISSING_RESULT, "d_register failed: unknown result")
144 def d_subscribe(self, msg):
149 self.send_d_subscribe(msg)
150 return self.recv_d_subscribe()
152 def send_d_subscribe(self, msg):
153 self._oprot.writeMessageBegin('d_subscribe', TMessageType.CALL, self._seqid)
154 args = d_subscribe_args()
156 args.write(self._oprot)
157 self._oprot.writeMessageEnd()
158 self._oprot.trans.flush()
160 def recv_d_subscribe(self):
162 (fname, mtype, rseqid) = iprot.readMessageBegin()
163 if mtype == TMessageType.EXCEPTION:
164 x = TApplicationException()
166 iprot.readMessageEnd()
168 result = d_subscribe_result()
170 iprot.readMessageEnd()
171 if result.success is not None:
172 return result.success
173 raise TApplicationException(TApplicationException.MISSING_RESULT, "d_subscribe failed: unknown result")
175 def d_publish(self, msg):
180 self.send_d_publish(msg)
181 return self.recv_d_publish()
183 def send_d_publish(self, msg):
184 self._oprot.writeMessageBegin('d_publish', TMessageType.CALL, self._seqid)
185 args = d_publish_args()
187 args.write(self._oprot)
188 self._oprot.writeMessageEnd()
189 self._oprot.trans.flush()
191 def recv_d_publish(self):
193 (fname, mtype, rseqid) = iprot.readMessageBegin()
194 if mtype == TMessageType.EXCEPTION:
195 x = TApplicationException()
197 iprot.readMessageEnd()
199 result = d_publish_result()
201 iprot.readMessageEnd()
202 if result.success is not None:
203 return result.success
204 raise TApplicationException(TApplicationException.MISSING_RESULT, "d_publish failed: unknown result")
206 def d_push(self, msg):
211 self.send_d_push(msg)
212 return self.recv_d_push()
214 def send_d_push(self, msg):
215 self._oprot.writeMessageBegin('d_push', TMessageType.CALL, self._seqid)
218 args.write(self._oprot)
219 self._oprot.writeMessageEnd()
220 self._oprot.trans.flush()
222 def recv_d_push(self):
224 (fname, mtype, rseqid) = iprot.readMessageBegin()
225 if mtype == TMessageType.EXCEPTION:
226 x = TApplicationException()
228 iprot.readMessageEnd()
230 result = d_push_result()
232 iprot.readMessageEnd()
233 if result.success is not None:
234 return result.success
235 raise TApplicationException(TApplicationException.MISSING_RESULT, "d_push failed: unknown result")
237 def d_query(self, msg):
242 self.send_d_query(msg)
243 return self.recv_d_query()
245 def send_d_query(self, msg):
246 self._oprot.writeMessageBegin('d_query', TMessageType.CALL, self._seqid)
247 args = d_query_args()
249 args.write(self._oprot)
250 self._oprot.writeMessageEnd()
251 self._oprot.trans.flush()
253 def recv_d_query(self):
255 (fname, mtype, rseqid) = iprot.readMessageBegin()
256 if mtype == TMessageType.EXCEPTION:
257 x = TApplicationException()
259 iprot.readMessageEnd()
261 result = d_query_result()
263 iprot.readMessageEnd()
264 if result.success is not None:
265 return result.success
266 raise TApplicationException(TApplicationException.MISSING_RESULT, "d_query failed: unknown result")
269 class Processor(Iface, TProcessor):
270 def __init__(self, handler):
271 self._handler = handler
272 self._processMap = {}
273 self._processMap["d_heartbeat"] = Processor.process_d_heartbeat
274 self._processMap["d_register"] = Processor.process_d_register
275 self._processMap["d_subscribe"] = Processor.process_d_subscribe
276 self._processMap["d_publish"] = Processor.process_d_publish
277 self._processMap["d_push"] = Processor.process_d_push
278 self._processMap["d_query"] = Processor.process_d_query
280 def process(self, iprot, oprot):
281 (name, type, seqid) = iprot.readMessageBegin()
282 if name not in self._processMap:
283 iprot.skip(TType.STRUCT)
284 iprot.readMessageEnd()
285 x = TApplicationException(TApplicationException.UNKNOWN_METHOD, 'Unknown function %s' % (name))
286 oprot.writeMessageBegin(name, TMessageType.EXCEPTION, seqid)
288 oprot.writeMessageEnd()
292 self._processMap[name](self, seqid, iprot, oprot)
295 def process_d_heartbeat(self, seqid, iprot, oprot):
296 args = d_heartbeat_args()
298 iprot.readMessageEnd()
299 result = d_heartbeat_result()
301 result.success = self._handler.d_heartbeat(args.msg)
302 msg_type = TMessageType.REPLY
303 except (TTransport.TTransportException, KeyboardInterrupt, SystemExit):
305 except Exception as ex:
306 msg_type = TMessageType.EXCEPTION
307 logging.exception(ex)
308 result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
309 oprot.writeMessageBegin("d_heartbeat", msg_type, seqid)
311 oprot.writeMessageEnd()
314 def process_d_register(self, seqid, iprot, oprot):
315 args = d_register_args()
317 iprot.readMessageEnd()
318 result = d_register_result()
320 result.success = self._handler.d_register(args.msg)
321 msg_type = TMessageType.REPLY
322 except (TTransport.TTransportException, KeyboardInterrupt, SystemExit):
324 except Exception as ex:
325 msg_type = TMessageType.EXCEPTION
326 logging.exception(ex)
327 result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
328 oprot.writeMessageBegin("d_register", msg_type, seqid)
330 oprot.writeMessageEnd()
333 def process_d_subscribe(self, seqid, iprot, oprot):
334 args = d_subscribe_args()
336 iprot.readMessageEnd()
337 result = d_subscribe_result()
339 result.success = self._handler.d_subscribe(args.msg)
340 msg_type = TMessageType.REPLY
341 except (TTransport.TTransportException, KeyboardInterrupt, SystemExit):
343 except Exception as ex:
344 msg_type = TMessageType.EXCEPTION
345 logging.exception(ex)
346 result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
347 oprot.writeMessageBegin("d_subscribe", msg_type, seqid)
349 oprot.writeMessageEnd()
352 def process_d_publish(self, seqid, iprot, oprot):
353 args = d_publish_args()
355 iprot.readMessageEnd()
356 result = d_publish_result()
358 result.success = self._handler.d_publish(args.msg)
359 msg_type = TMessageType.REPLY
360 except (TTransport.TTransportException, KeyboardInterrupt, SystemExit):
362 except Exception as ex:
363 msg_type = TMessageType.EXCEPTION
364 logging.exception(ex)
365 result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
366 oprot.writeMessageBegin("d_publish", msg_type, seqid)
368 oprot.writeMessageEnd()
371 def process_d_push(self, seqid, iprot, oprot):
374 iprot.readMessageEnd()
375 result = d_push_result()
377 result.success = self._handler.d_push(args.msg)
378 msg_type = TMessageType.REPLY
379 except (TTransport.TTransportException, KeyboardInterrupt, SystemExit):
381 except Exception as ex:
382 msg_type = TMessageType.EXCEPTION
383 logging.exception(ex)
384 result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
385 oprot.writeMessageBegin("d_push", msg_type, seqid)
387 oprot.writeMessageEnd()
390 def process_d_query(self, seqid, iprot, oprot):
391 args = d_query_args()
393 iprot.readMessageEnd()
394 result = d_query_result()
396 result.success = self._handler.d_query(args.msg)
397 msg_type = TMessageType.REPLY
398 except (TTransport.TTransportException, KeyboardInterrupt, SystemExit):
400 except Exception as ex:
401 msg_type = TMessageType.EXCEPTION
402 logging.exception(ex)
403 result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
404 oprot.writeMessageBegin("d_query", msg_type, seqid)
406 oprot.writeMessageEnd()
410 # HELPER FUNCTIONS AND STRUCTURES
412 class d_heartbeat_args:
420 (1, TType.STRUCT, 'msg', (HeartBeatMessage, HeartBeatMessage.thrift_spec), None, ), # 1
423 def __init__(self, msg=None,):
426 def read(self, iprot):
427 if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
428 fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
430 iprot.readStructBegin()
432 (fname, ftype, fid) = iprot.readFieldBegin()
433 if ftype == TType.STOP:
436 if ftype == TType.STRUCT:
437 self.msg = HeartBeatMessage()
444 iprot.readStructEnd()
446 def write(self, oprot):
447 if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
448 oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
450 oprot.writeStructBegin('d_heartbeat_args')
451 if self.msg is not None:
452 oprot.writeFieldBegin('msg', TType.STRUCT, 1)
453 self.msg.write(oprot)
454 oprot.writeFieldEnd()
455 oprot.writeFieldStop()
456 oprot.writeStructEnd()
464 value = (value * 31) ^ hash(self.msg)
468 L = ['%s=%r' % (key, value)
469 for key, value in self.__dict__.iteritems()]
470 return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
472 def __eq__(self, other):
473 return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
475 def __ne__(self, other):
476 return not (self == other)
478 class d_heartbeat_result:
485 (0, TType.STRUCT, 'success', (HeartBeatMessage, HeartBeatMessage.thrift_spec), None, ), # 0
488 def __init__(self, success=None,):
489 self.success = success
491 def read(self, iprot):
492 if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
493 fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
495 iprot.readStructBegin()
497 (fname, ftype, fid) = iprot.readFieldBegin()
498 if ftype == TType.STOP:
501 if ftype == TType.STRUCT:
502 self.success = HeartBeatMessage()
503 self.success.read(iprot)
509 iprot.readStructEnd()
511 def write(self, oprot):
512 if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
513 oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
515 oprot.writeStructBegin('d_heartbeat_result')
516 if self.success is not None:
517 oprot.writeFieldBegin('success', TType.STRUCT, 0)
518 self.success.write(oprot)
519 oprot.writeFieldEnd()
520 oprot.writeFieldStop()
521 oprot.writeStructEnd()
529 value = (value * 31) ^ hash(self.success)
533 L = ['%s=%r' % (key, value)
534 for key, value in self.__dict__.iteritems()]
535 return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
537 def __eq__(self, other):
538 return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
540 def __ne__(self, other):
541 return not (self == other)
543 class d_register_args:
551 (1, TType.STRUCT, 'msg', (RegisterMessage, RegisterMessage.thrift_spec), None, ), # 1
554 def __init__(self, msg=None,):
557 def read(self, iprot):
558 if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
559 fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
561 iprot.readStructBegin()
563 (fname, ftype, fid) = iprot.readFieldBegin()
564 if ftype == TType.STOP:
567 if ftype == TType.STRUCT:
568 self.msg = RegisterMessage()
575 iprot.readStructEnd()
577 def write(self, oprot):
578 if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
579 oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
581 oprot.writeStructBegin('d_register_args')
582 if self.msg is not None:
583 oprot.writeFieldBegin('msg', TType.STRUCT, 1)
584 self.msg.write(oprot)
585 oprot.writeFieldEnd()
586 oprot.writeFieldStop()
587 oprot.writeStructEnd()
595 value = (value * 31) ^ hash(self.msg)
599 L = ['%s=%r' % (key, value)
600 for key, value in self.__dict__.iteritems()]
601 return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
603 def __eq__(self, other):
604 return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
606 def __ne__(self, other):
607 return not (self == other)
609 class d_register_result:
616 (0, TType.STRUCT, 'success', (RegisterResponseMessage, RegisterResponseMessage.thrift_spec), None, ), # 0
619 def __init__(self, success=None,):
620 self.success = success
622 def read(self, iprot):
623 if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
624 fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
626 iprot.readStructBegin()
628 (fname, ftype, fid) = iprot.readFieldBegin()
629 if ftype == TType.STOP:
632 if ftype == TType.STRUCT:
633 self.success = RegisterResponseMessage()
634 self.success.read(iprot)
640 iprot.readStructEnd()
642 def write(self, oprot):
643 if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
644 oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
646 oprot.writeStructBegin('d_register_result')
647 if self.success is not None:
648 oprot.writeFieldBegin('success', TType.STRUCT, 0)
649 self.success.write(oprot)
650 oprot.writeFieldEnd()
651 oprot.writeFieldStop()
652 oprot.writeStructEnd()
660 value = (value * 31) ^ hash(self.success)
664 L = ['%s=%r' % (key, value)
665 for key, value in self.__dict__.iteritems()]
666 return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
668 def __eq__(self, other):
669 return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
671 def __ne__(self, other):
672 return not (self == other)
674 class d_subscribe_args:
682 (1, TType.STRUCT, 'msg', (SubscribeMessage, SubscribeMessage.thrift_spec), None, ), # 1
685 def __init__(self, msg=None,):
688 def read(self, iprot):
689 if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
690 fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
692 iprot.readStructBegin()
694 (fname, ftype, fid) = iprot.readFieldBegin()
695 if ftype == TType.STOP:
698 if ftype == TType.STRUCT:
699 self.msg = SubscribeMessage()
706 iprot.readStructEnd()
708 def write(self, oprot):
709 if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
710 oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
712 oprot.writeStructBegin('d_subscribe_args')
713 if self.msg is not None:
714 oprot.writeFieldBegin('msg', TType.STRUCT, 1)
715 self.msg.write(oprot)
716 oprot.writeFieldEnd()
717 oprot.writeFieldStop()
718 oprot.writeStructEnd()
726 value = (value * 31) ^ hash(self.msg)
730 L = ['%s=%r' % (key, value)
731 for key, value in self.__dict__.iteritems()]
732 return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
734 def __eq__(self, other):
735 return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
737 def __ne__(self, other):
738 return not (self == other)
740 class d_subscribe_result:
747 (0, TType.STRUCT, 'success', (SubscribeResponseMessage, SubscribeResponseMessage.thrift_spec), None, ), # 0
750 def __init__(self, success=None,):
751 self.success = success
753 def read(self, iprot):
754 if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
755 fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
757 iprot.readStructBegin()
759 (fname, ftype, fid) = iprot.readFieldBegin()
760 if ftype == TType.STOP:
763 if ftype == TType.STRUCT:
764 self.success = SubscribeResponseMessage()
765 self.success.read(iprot)
771 iprot.readStructEnd()
773 def write(self, oprot):
774 if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
775 oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
777 oprot.writeStructBegin('d_subscribe_result')
778 if self.success is not None:
779 oprot.writeFieldBegin('success', TType.STRUCT, 0)
780 self.success.write(oprot)
781 oprot.writeFieldEnd()
782 oprot.writeFieldStop()
783 oprot.writeStructEnd()
791 value = (value * 31) ^ hash(self.success)
795 L = ['%s=%r' % (key, value)
796 for key, value in self.__dict__.iteritems()]
797 return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
799 def __eq__(self, other):
800 return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
802 def __ne__(self, other):
803 return not (self == other)
805 class d_publish_args:
813 (1, TType.STRUCT, 'msg', (PublishMessage, PublishMessage.thrift_spec), None, ), # 1
816 def __init__(self, msg=None,):
819 def read(self, iprot):
820 if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
821 fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
823 iprot.readStructBegin()
825 (fname, ftype, fid) = iprot.readFieldBegin()
826 if ftype == TType.STOP:
829 if ftype == TType.STRUCT:
830 self.msg = PublishMessage()
837 iprot.readStructEnd()
839 def write(self, oprot):
840 if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
841 oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
843 oprot.writeStructBegin('d_publish_args')
844 if self.msg is not None:
845 oprot.writeFieldBegin('msg', TType.STRUCT, 1)
846 self.msg.write(oprot)
847 oprot.writeFieldEnd()
848 oprot.writeFieldStop()
849 oprot.writeStructEnd()
857 value = (value * 31) ^ hash(self.msg)
861 L = ['%s=%r' % (key, value)
862 for key, value in self.__dict__.iteritems()]
863 return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
865 def __eq__(self, other):
866 return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
868 def __ne__(self, other):
869 return not (self == other)
871 class d_publish_result:
878 (0, TType.STRUCT, 'success', (PublishResponseMessage, PublishResponseMessage.thrift_spec), None, ), # 0
881 def __init__(self, success=None,):
882 self.success = success
884 def read(self, iprot):
885 if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
886 fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
888 iprot.readStructBegin()
890 (fname, ftype, fid) = iprot.readFieldBegin()
891 if ftype == TType.STOP:
894 if ftype == TType.STRUCT:
895 self.success = PublishResponseMessage()
896 self.success.read(iprot)
902 iprot.readStructEnd()
904 def write(self, oprot):
905 if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
906 oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
908 oprot.writeStructBegin('d_publish_result')
909 if self.success is not None:
910 oprot.writeFieldBegin('success', TType.STRUCT, 0)
911 self.success.write(oprot)
912 oprot.writeFieldEnd()
913 oprot.writeFieldStop()
914 oprot.writeStructEnd()
922 value = (value * 31) ^ hash(self.success)
926 L = ['%s=%r' % (key, value)
927 for key, value in self.__dict__.iteritems()]
928 return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
930 def __eq__(self, other):
931 return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
933 def __ne__(self, other):
934 return not (self == other)
944 (1, TType.STRUCT, 'msg', (PushMessage, PushMessage.thrift_spec), None, ), # 1
947 def __init__(self, msg=None,):
950 def read(self, iprot):
951 if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
952 fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
954 iprot.readStructBegin()
956 (fname, ftype, fid) = iprot.readFieldBegin()
957 if ftype == TType.STOP:
960 if ftype == TType.STRUCT:
961 self.msg = PushMessage()
968 iprot.readStructEnd()
970 def write(self, oprot):
971 if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
972 oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
974 oprot.writeStructBegin('d_push_args')
975 if self.msg is not None:
976 oprot.writeFieldBegin('msg', TType.STRUCT, 1)
977 self.msg.write(oprot)
978 oprot.writeFieldEnd()
979 oprot.writeFieldStop()
980 oprot.writeStructEnd()
988 value = (value * 31) ^ hash(self.msg)
992 L = ['%s=%r' % (key, value)
993 for key, value in self.__dict__.iteritems()]
994 return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
996 def __eq__(self, other):
997 return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
999 def __ne__(self, other):
1000 return not (self == other)
1002 class d_push_result:
1009 (0, TType.STRUCT, 'success', (PushResponseMessage, PushResponseMessage.thrift_spec), None, ), # 0
1012 def __init__(self, success=None,):
1013 self.success = success
1015 def read(self, iprot):
1016 if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1017 fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1019 iprot.readStructBegin()
1021 (fname, ftype, fid) = iprot.readFieldBegin()
1022 if ftype == TType.STOP:
1025 if ftype == TType.STRUCT:
1026 self.success = PushResponseMessage()
1027 self.success.read(iprot)
1032 iprot.readFieldEnd()
1033 iprot.readStructEnd()
1035 def write(self, oprot):
1036 if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1037 oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1039 oprot.writeStructBegin('d_push_result')
1040 if self.success is not None:
1041 oprot.writeFieldBegin('success', TType.STRUCT, 0)
1042 self.success.write(oprot)
1043 oprot.writeFieldEnd()
1044 oprot.writeFieldStop()
1045 oprot.writeStructEnd()
1053 value = (value * 31) ^ hash(self.success)
1057 L = ['%s=%r' % (key, value)
1058 for key, value in self.__dict__.iteritems()]
1059 return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1061 def __eq__(self, other):
1062 return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1064 def __ne__(self, other):
1065 return not (self == other)
1075 (1, TType.STRUCT, 'msg', (QueryMessage, QueryMessage.thrift_spec), None, ), # 1
1078 def __init__(self, msg=None,):
1081 def read(self, iprot):
1082 if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1083 fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1085 iprot.readStructBegin()
1087 (fname, ftype, fid) = iprot.readFieldBegin()
1088 if ftype == TType.STOP:
1091 if ftype == TType.STRUCT:
1092 self.msg = QueryMessage()
1093 self.msg.read(iprot)
1098 iprot.readFieldEnd()
1099 iprot.readStructEnd()
1101 def write(self, oprot):
1102 if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1103 oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1105 oprot.writeStructBegin('d_query_args')
1106 if self.msg is not None:
1107 oprot.writeFieldBegin('msg', TType.STRUCT, 1)
1108 self.msg.write(oprot)
1109 oprot.writeFieldEnd()
1110 oprot.writeFieldStop()
1111 oprot.writeStructEnd()
1119 value = (value * 31) ^ hash(self.msg)
1123 L = ['%s=%r' % (key, value)
1124 for key, value in self.__dict__.iteritems()]
1125 return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1127 def __eq__(self, other):
1128 return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1130 def __ne__(self, other):
1131 return not (self == other)
1133 class d_query_result:
1140 (0, TType.STRUCT, 'success', (QueryResponseMessage, QueryResponseMessage.thrift_spec), None, ), # 0
1143 def __init__(self, success=None,):
1144 self.success = success
1146 def read(self, iprot):
1147 if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1148 fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1150 iprot.readStructBegin()
1152 (fname, ftype, fid) = iprot.readFieldBegin()
1153 if ftype == TType.STOP:
1156 if ftype == TType.STRUCT:
1157 self.success = QueryResponseMessage()
1158 self.success.read(iprot)
1163 iprot.readFieldEnd()
1164 iprot.readStructEnd()
1166 def write(self, oprot):
1167 if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1168 oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1170 oprot.writeStructBegin('d_query_result')
1171 if self.success is not None:
1172 oprot.writeFieldBegin('success', TType.STRUCT, 0)
1173 self.success.write(oprot)
1174 oprot.writeFieldEnd()
1175 oprot.writeFieldStop()
1176 oprot.writeStructEnd()
1184 value = (value * 31) ^ hash(self.success)
1188 L = ['%s=%r' % (key, value)
1189 for key, value in self.__dict__.iteritems()]
1190 return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1192 def __eq__(self, other):
1193 return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1195 def __ne__(self, other):
1196 return not (self == other)