Subversion Repositories SmartDukaan

Rev

Rev 3376 | Rev 3431 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 3376 Rev 3385
Line 77... Line 77...
77
     - couponCode
77
     - couponCode
78
     - userId
78
     - userId
79
    """
79
    """
80
    pass
80
    pass
81
 
81
 
-
 
82
  def getActiveCoupons(self, ):
-
 
83
    """
-
 
84
    Returns a list of active coupons
-
 
85
    """
-
 
86
    pass
-
 
87
 
-
 
88
  def getSuccessfulPaymentCountForCoupon(self, couponCode):
-
 
89
    """
-
 
90
    Returns the count of successful payments done using a given coupon
-
 
91
    
-
 
92
    Parameters:
-
 
93
     - couponCode
-
 
94
    """
-
 
95
    pass
-
 
96
 
-
 
97
  def getRuleDocString(self, ruleName):
-
 
98
    """
-
 
99
    Returns the doc string of the rule module
-
 
100
    
-
 
101
    Parameters:
-
 
102
     - ruleName
-
 
103
    """
-
 
104
    pass
-
 
105
 
82
 
106
 
83
class Client(shop2020.thriftpy.generic.GenericService.Client, Iface):
107
class Client(shop2020.thriftpy.generic.GenericService.Client, Iface):
84
  """
108
  """
85
  Promotion Service
109
  Promotion Service
86
  """
110
  """
Line 340... Line 364...
340
      return result.success
364
      return result.success
341
    if result.pex != None:
365
    if result.pex != None:
342
      raise result.pex
366
      raise result.pex
343
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getCouponUsageCountByUser failed: unknown result");
367
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getCouponUsageCountByUser failed: unknown result");
344
 
368
 
-
 
369
  def getActiveCoupons(self, ):
-
 
370
    """
-
 
371
    Returns a list of active coupons
-
 
372
    """
-
 
373
    self.send_getActiveCoupons()
-
 
374
    return self.recv_getActiveCoupons()
-
 
375
 
-
 
376
  def send_getActiveCoupons(self, ):
-
 
377
    self._oprot.writeMessageBegin('getActiveCoupons', TMessageType.CALL, self._seqid)
-
 
378
    args = getActiveCoupons_args()
-
 
379
    args.write(self._oprot)
-
 
380
    self._oprot.writeMessageEnd()
-
 
381
    self._oprot.trans.flush()
-
 
382
 
-
 
383
  def recv_getActiveCoupons(self, ):
-
 
384
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
-
 
385
    if mtype == TMessageType.EXCEPTION:
-
 
386
      x = TApplicationException()
-
 
387
      x.read(self._iprot)
-
 
388
      self._iprot.readMessageEnd()
-
 
389
      raise x
-
 
390
    result = getActiveCoupons_result()
-
 
391
    result.read(self._iprot)
-
 
392
    self._iprot.readMessageEnd()
-
 
393
    if result.success != None:
-
 
394
      return result.success
-
 
395
    if result.pex != None:
-
 
396
      raise result.pex
-
 
397
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getActiveCoupons failed: unknown result");
-
 
398
 
-
 
399
  def getSuccessfulPaymentCountForCoupon(self, couponCode):
-
 
400
    """
-
 
401
    Returns the count of successful payments done using a given coupon
-
 
402
    
-
 
403
    Parameters:
-
 
404
     - couponCode
-
 
405
    """
-
 
406
    self.send_getSuccessfulPaymentCountForCoupon(couponCode)
-
 
407
    return self.recv_getSuccessfulPaymentCountForCoupon()
-
 
408
 
-
 
409
  def send_getSuccessfulPaymentCountForCoupon(self, couponCode):
-
 
410
    self._oprot.writeMessageBegin('getSuccessfulPaymentCountForCoupon', TMessageType.CALL, self._seqid)
-
 
411
    args = getSuccessfulPaymentCountForCoupon_args()
-
 
412
    args.couponCode = couponCode
-
 
413
    args.write(self._oprot)
-
 
414
    self._oprot.writeMessageEnd()
-
 
415
    self._oprot.trans.flush()
-
 
416
 
-
 
417
  def recv_getSuccessfulPaymentCountForCoupon(self, ):
-
 
418
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
-
 
419
    if mtype == TMessageType.EXCEPTION:
-
 
420
      x = TApplicationException()
-
 
421
      x.read(self._iprot)
-
 
422
      self._iprot.readMessageEnd()
-
 
423
      raise x
-
 
424
    result = getSuccessfulPaymentCountForCoupon_result()
-
 
425
    result.read(self._iprot)
-
 
426
    self._iprot.readMessageEnd()
-
 
427
    if result.success != None:
-
 
428
      return result.success
-
 
429
    if result.pex != None:
-
 
430
      raise result.pex
-
 
431
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getSuccessfulPaymentCountForCoupon failed: unknown result");
-
 
432
 
-
 
433
  def getRuleDocString(self, ruleName):
-
 
434
    """
-
 
435
    Returns the doc string of the rule module
-
 
436
    
-
 
437
    Parameters:
-
 
438
     - ruleName
-
 
439
    """
-
 
440
    self.send_getRuleDocString(ruleName)
-
 
441
    return self.recv_getRuleDocString()
-
 
442
 
-
 
443
  def send_getRuleDocString(self, ruleName):
-
 
444
    self._oprot.writeMessageBegin('getRuleDocString', TMessageType.CALL, self._seqid)
-
 
445
    args = getRuleDocString_args()
-
 
446
    args.ruleName = ruleName
-
 
447
    args.write(self._oprot)
-
 
448
    self._oprot.writeMessageEnd()
-
 
449
    self._oprot.trans.flush()
-
 
450
 
-
 
451
  def recv_getRuleDocString(self, ):
-
 
452
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
-
 
453
    if mtype == TMessageType.EXCEPTION:
-
 
454
      x = TApplicationException()
-
 
455
      x.read(self._iprot)
-
 
456
      self._iprot.readMessageEnd()
-
 
457
      raise x
-
 
458
    result = getRuleDocString_result()
-
 
459
    result.read(self._iprot)
-
 
460
    self._iprot.readMessageEnd()
-
 
461
    if result.success != None:
-
 
462
      return result.success
-
 
463
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getRuleDocString failed: unknown result");
-
 
464
 
345
 
465
 
346
class Processor(shop2020.thriftpy.generic.GenericService.Processor, Iface, TProcessor):
466
class Processor(shop2020.thriftpy.generic.GenericService.Processor, Iface, TProcessor):
347
  def __init__(self, handler):
467
  def __init__(self, handler):
348
    shop2020.thriftpy.generic.GenericService.Processor.__init__(self, handler)
468
    shop2020.thriftpy.generic.GenericService.Processor.__init__(self, handler)
349
    self._processMap["closeSession"] = Processor.process_closeSession
469
    self._processMap["closeSession"] = Processor.process_closeSession
Line 352... Line 472...
352
    self._processMap["getPromotionById"] = Processor.process_getPromotionById
472
    self._processMap["getPromotionById"] = Processor.process_getPromotionById
353
    self._processMap["generateCouponsForPromotion"] = Processor.process_generateCouponsForPromotion
473
    self._processMap["generateCouponsForPromotion"] = Processor.process_generateCouponsForPromotion
354
    self._processMap["applyCoupon"] = Processor.process_applyCoupon
474
    self._processMap["applyCoupon"] = Processor.process_applyCoupon
355
    self._processMap["trackCouponUsage"] = Processor.process_trackCouponUsage
475
    self._processMap["trackCouponUsage"] = Processor.process_trackCouponUsage
356
    self._processMap["getCouponUsageCountByUser"] = Processor.process_getCouponUsageCountByUser
476
    self._processMap["getCouponUsageCountByUser"] = Processor.process_getCouponUsageCountByUser
-
 
477
    self._processMap["getActiveCoupons"] = Processor.process_getActiveCoupons
-
 
478
    self._processMap["getSuccessfulPaymentCountForCoupon"] = Processor.process_getSuccessfulPaymentCountForCoupon
-
 
479
    self._processMap["getRuleDocString"] = Processor.process_getRuleDocString
357
 
480
 
358
  def process(self, iprot, oprot):
481
  def process(self, iprot, oprot):
359
    (name, type, seqid) = iprot.readMessageBegin()
482
    (name, type, seqid) = iprot.readMessageBegin()
360
    if name not in self._processMap:
483
    if name not in self._processMap:
361
      iprot.skip(TType.STRUCT)
484
      iprot.skip(TType.STRUCT)
Line 477... Line 600...
477
    oprot.writeMessageBegin("getCouponUsageCountByUser", TMessageType.REPLY, seqid)
600
    oprot.writeMessageBegin("getCouponUsageCountByUser", TMessageType.REPLY, seqid)
478
    result.write(oprot)
601
    result.write(oprot)
479
    oprot.writeMessageEnd()
602
    oprot.writeMessageEnd()
480
    oprot.trans.flush()
603
    oprot.trans.flush()
481
 
604
 
-
 
605
  def process_getActiveCoupons(self, seqid, iprot, oprot):
-
 
606
    args = getActiveCoupons_args()
-
 
607
    args.read(iprot)
-
 
608
    iprot.readMessageEnd()
-
 
609
    result = getActiveCoupons_result()
-
 
610
    try:
-
 
611
      result.success = self._handler.getActiveCoupons()
-
 
612
    except PromotionException, pex:
-
 
613
      result.pex = pex
-
 
614
    oprot.writeMessageBegin("getActiveCoupons", TMessageType.REPLY, seqid)
-
 
615
    result.write(oprot)
-
 
616
    oprot.writeMessageEnd()
-
 
617
    oprot.trans.flush()
-
 
618
 
-
 
619
  def process_getSuccessfulPaymentCountForCoupon(self, seqid, iprot, oprot):
-
 
620
    args = getSuccessfulPaymentCountForCoupon_args()
-
 
621
    args.read(iprot)
-
 
622
    iprot.readMessageEnd()
-
 
623
    result = getSuccessfulPaymentCountForCoupon_result()
-
 
624
    try:
-
 
625
      result.success = self._handler.getSuccessfulPaymentCountForCoupon(args.couponCode)
-
 
626
    except PromotionException, pex:
-
 
627
      result.pex = pex
-
 
628
    oprot.writeMessageBegin("getSuccessfulPaymentCountForCoupon", TMessageType.REPLY, seqid)
-
 
629
    result.write(oprot)
-
 
630
    oprot.writeMessageEnd()
-
 
631
    oprot.trans.flush()
-
 
632
 
-
 
633
  def process_getRuleDocString(self, seqid, iprot, oprot):
-
 
634
    args = getRuleDocString_args()
-
 
635
    args.read(iprot)
-
 
636
    iprot.readMessageEnd()
-
 
637
    result = getRuleDocString_result()
-
 
638
    result.success = self._handler.getRuleDocString(args.ruleName)
-
 
639
    oprot.writeMessageBegin("getRuleDocString", TMessageType.REPLY, seqid)
-
 
640
    result.write(oprot)
-
 
641
    oprot.writeMessageEnd()
-
 
642
    oprot.trans.flush()
-
 
643
 
482
 
644
 
483
# HELPER FUNCTIONS AND STRUCTURES
645
# HELPER FUNCTIONS AND STRUCTURES
484
 
646
 
485
class closeSession_args:
647
class closeSession_args:
486
 
648
 
Line 1470... Line 1632...
1470
      oprot.writeFieldEnd()
1632
      oprot.writeFieldEnd()
1471
    oprot.writeFieldStop()
1633
    oprot.writeFieldStop()
1472
    oprot.writeStructEnd()
1634
    oprot.writeStructEnd()
1473
 
1635
 
1474
  def __repr__(self):
1636
  def __repr__(self):
-
 
1637
    L = ['%s=%r' % (key, value)
-
 
1638
      for key, value in self.__dict__.iteritems()]
-
 
1639
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
1640
 
-
 
1641
  def __eq__(self, other):
-
 
1642
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
1643
 
-
 
1644
  def __ne__(self, other):
-
 
1645
    return not (self == other)
-
 
1646
 
-
 
1647
class getActiveCoupons_args:
-
 
1648
 
-
 
1649
  thrift_spec = (
-
 
1650
  )
-
 
1651
 
-
 
1652
  def read(self, iprot):
-
 
1653
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
1654
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
1655
      return
-
 
1656
    iprot.readStructBegin()
-
 
1657
    while True:
-
 
1658
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
1659
      if ftype == TType.STOP:
-
 
1660
        break
-
 
1661
      else:
-
 
1662
        iprot.skip(ftype)
-
 
1663
      iprot.readFieldEnd()
-
 
1664
    iprot.readStructEnd()
-
 
1665
 
-
 
1666
  def write(self, oprot):
-
 
1667
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
1668
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
1669
      return
-
 
1670
    oprot.writeStructBegin('getActiveCoupons_args')
-
 
1671
    oprot.writeFieldStop()
-
 
1672
    oprot.writeStructEnd()
-
 
1673
 
-
 
1674
  def __repr__(self):
-
 
1675
    L = ['%s=%r' % (key, value)
-
 
1676
      for key, value in self.__dict__.iteritems()]
-
 
1677
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
1678
 
-
 
1679
  def __eq__(self, other):
-
 
1680
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
1681
 
-
 
1682
  def __ne__(self, other):
-
 
1683
    return not (self == other)
-
 
1684
 
-
 
1685
class getActiveCoupons_result:
-
 
1686
  """
-
 
1687
  Attributes:
-
 
1688
   - success
-
 
1689
   - pex
-
 
1690
  """
-
 
1691
 
-
 
1692
  thrift_spec = (
-
 
1693
    (0, TType.LIST, 'success', (TType.STRUCT,(Coupon, Coupon.thrift_spec)), None, ), # 0
-
 
1694
    (1, TType.STRUCT, 'pex', (PromotionException, PromotionException.thrift_spec), None, ), # 1
-
 
1695
  )
-
 
1696
 
-
 
1697
  def __init__(self, success=None, pex=None,):
-
 
1698
    self.success = success
-
 
1699
    self.pex = pex
-
 
1700
 
-
 
1701
  def read(self, iprot):
-
 
1702
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
1703
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
1704
      return
-
 
1705
    iprot.readStructBegin()
-
 
1706
    while True:
-
 
1707
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
1708
      if ftype == TType.STOP:
-
 
1709
        break
-
 
1710
      if fid == 0:
-
 
1711
        if ftype == TType.LIST:
-
 
1712
          self.success = []
-
 
1713
          (_etype31, _size28) = iprot.readListBegin()
-
 
1714
          for _i32 in xrange(_size28):
-
 
1715
            _elem33 = Coupon()
-
 
1716
            _elem33.read(iprot)
-
 
1717
            self.success.append(_elem33)
-
 
1718
          iprot.readListEnd()
-
 
1719
        else:
-
 
1720
          iprot.skip(ftype)
-
 
1721
      elif fid == 1:
-
 
1722
        if ftype == TType.STRUCT:
-
 
1723
          self.pex = PromotionException()
-
 
1724
          self.pex.read(iprot)
-
 
1725
        else:
-
 
1726
          iprot.skip(ftype)
-
 
1727
      else:
-
 
1728
        iprot.skip(ftype)
-
 
1729
      iprot.readFieldEnd()
-
 
1730
    iprot.readStructEnd()
-
 
1731
 
-
 
1732
  def write(self, oprot):
-
 
1733
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
1734
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
1735
      return
-
 
1736
    oprot.writeStructBegin('getActiveCoupons_result')
-
 
1737
    if self.success != None:
-
 
1738
      oprot.writeFieldBegin('success', TType.LIST, 0)
-
 
1739
      oprot.writeListBegin(TType.STRUCT, len(self.success))
-
 
1740
      for iter34 in self.success:
-
 
1741
        iter34.write(oprot)
-
 
1742
      oprot.writeListEnd()
-
 
1743
      oprot.writeFieldEnd()
-
 
1744
    if self.pex != None:
-
 
1745
      oprot.writeFieldBegin('pex', TType.STRUCT, 1)
-
 
1746
      self.pex.write(oprot)
-
 
1747
      oprot.writeFieldEnd()
-
 
1748
    oprot.writeFieldStop()
-
 
1749
    oprot.writeStructEnd()
-
 
1750
 
-
 
1751
  def __repr__(self):
-
 
1752
    L = ['%s=%r' % (key, value)
-
 
1753
      for key, value in self.__dict__.iteritems()]
-
 
1754
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
1755
 
-
 
1756
  def __eq__(self, other):
-
 
1757
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
1758
 
-
 
1759
  def __ne__(self, other):
-
 
1760
    return not (self == other)
-
 
1761
 
-
 
1762
class getSuccessfulPaymentCountForCoupon_args:
-
 
1763
  """
-
 
1764
  Attributes:
-
 
1765
   - couponCode
-
 
1766
  """
-
 
1767
 
-
 
1768
  thrift_spec = (
-
 
1769
    None, # 0
-
 
1770
    (1, TType.STRING, 'couponCode', None, None, ), # 1
-
 
1771
  )
-
 
1772
 
-
 
1773
  def __init__(self, couponCode=None,):
-
 
1774
    self.couponCode = couponCode
-
 
1775
 
-
 
1776
  def read(self, iprot):
-
 
1777
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
1778
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
1779
      return
-
 
1780
    iprot.readStructBegin()
-
 
1781
    while True:
-
 
1782
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
1783
      if ftype == TType.STOP:
-
 
1784
        break
-
 
1785
      if fid == 1:
-
 
1786
        if ftype == TType.STRING:
-
 
1787
          self.couponCode = iprot.readString();
-
 
1788
        else:
-
 
1789
          iprot.skip(ftype)
-
 
1790
      else:
-
 
1791
        iprot.skip(ftype)
-
 
1792
      iprot.readFieldEnd()
-
 
1793
    iprot.readStructEnd()
-
 
1794
 
-
 
1795
  def write(self, oprot):
-
 
1796
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
1797
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
1798
      return
-
 
1799
    oprot.writeStructBegin('getSuccessfulPaymentCountForCoupon_args')
-
 
1800
    if self.couponCode != None:
-
 
1801
      oprot.writeFieldBegin('couponCode', TType.STRING, 1)
-
 
1802
      oprot.writeString(self.couponCode)
-
 
1803
      oprot.writeFieldEnd()
-
 
1804
    oprot.writeFieldStop()
-
 
1805
    oprot.writeStructEnd()
-
 
1806
 
-
 
1807
  def __repr__(self):
-
 
1808
    L = ['%s=%r' % (key, value)
-
 
1809
      for key, value in self.__dict__.iteritems()]
-
 
1810
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
1811
 
-
 
1812
  def __eq__(self, other):
-
 
1813
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
1814
 
-
 
1815
  def __ne__(self, other):
-
 
1816
    return not (self == other)
-
 
1817
 
-
 
1818
class getSuccessfulPaymentCountForCoupon_result:
-
 
1819
  """
-
 
1820
  Attributes:
-
 
1821
   - success
-
 
1822
   - pex
-
 
1823
  """
-
 
1824
 
-
 
1825
  thrift_spec = (
-
 
1826
    (0, TType.I64, 'success', None, None, ), # 0
-
 
1827
    (1, TType.STRUCT, 'pex', (PromotionException, PromotionException.thrift_spec), None, ), # 1
-
 
1828
  )
-
 
1829
 
-
 
1830
  def __init__(self, success=None, pex=None,):
-
 
1831
    self.success = success
-
 
1832
    self.pex = pex
-
 
1833
 
-
 
1834
  def read(self, iprot):
-
 
1835
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
1836
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
1837
      return
-
 
1838
    iprot.readStructBegin()
-
 
1839
    while True:
-
 
1840
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
1841
      if ftype == TType.STOP:
-
 
1842
        break
-
 
1843
      if fid == 0:
-
 
1844
        if ftype == TType.I64:
-
 
1845
          self.success = iprot.readI64();
-
 
1846
        else:
-
 
1847
          iprot.skip(ftype)
-
 
1848
      elif fid == 1:
-
 
1849
        if ftype == TType.STRUCT:
-
 
1850
          self.pex = PromotionException()
-
 
1851
          self.pex.read(iprot)
-
 
1852
        else:
-
 
1853
          iprot.skip(ftype)
-
 
1854
      else:
-
 
1855
        iprot.skip(ftype)
-
 
1856
      iprot.readFieldEnd()
-
 
1857
    iprot.readStructEnd()
-
 
1858
 
-
 
1859
  def write(self, oprot):
-
 
1860
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
1861
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
1862
      return
-
 
1863
    oprot.writeStructBegin('getSuccessfulPaymentCountForCoupon_result')
-
 
1864
    if self.success != None:
-
 
1865
      oprot.writeFieldBegin('success', TType.I64, 0)
-
 
1866
      oprot.writeI64(self.success)
-
 
1867
      oprot.writeFieldEnd()
-
 
1868
    if self.pex != None:
-
 
1869
      oprot.writeFieldBegin('pex', TType.STRUCT, 1)
-
 
1870
      self.pex.write(oprot)
-
 
1871
      oprot.writeFieldEnd()
-
 
1872
    oprot.writeFieldStop()
-
 
1873
    oprot.writeStructEnd()
-
 
1874
 
-
 
1875
  def __repr__(self):
-
 
1876
    L = ['%s=%r' % (key, value)
-
 
1877
      for key, value in self.__dict__.iteritems()]
-
 
1878
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
1879
 
-
 
1880
  def __eq__(self, other):
-
 
1881
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
1882
 
-
 
1883
  def __ne__(self, other):
-
 
1884
    return not (self == other)
-
 
1885
 
-
 
1886
class getRuleDocString_args:
-
 
1887
  """
-
 
1888
  Attributes:
-
 
1889
   - ruleName
-
 
1890
  """
-
 
1891
 
-
 
1892
  thrift_spec = (
-
 
1893
    None, # 0
-
 
1894
    (1, TType.STRING, 'ruleName', None, None, ), # 1
-
 
1895
  )
-
 
1896
 
-
 
1897
  def __init__(self, ruleName=None,):
-
 
1898
    self.ruleName = ruleName
-
 
1899
 
-
 
1900
  def read(self, iprot):
-
 
1901
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
1902
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
1903
      return
-
 
1904
    iprot.readStructBegin()
-
 
1905
    while True:
-
 
1906
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
1907
      if ftype == TType.STOP:
-
 
1908
        break
-
 
1909
      if fid == 1:
-
 
1910
        if ftype == TType.STRING:
-
 
1911
          self.ruleName = iprot.readString();
-
 
1912
        else:
-
 
1913
          iprot.skip(ftype)
-
 
1914
      else:
-
 
1915
        iprot.skip(ftype)
-
 
1916
      iprot.readFieldEnd()
-
 
1917
    iprot.readStructEnd()
-
 
1918
 
-
 
1919
  def write(self, oprot):
-
 
1920
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
1921
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
1922
      return
-
 
1923
    oprot.writeStructBegin('getRuleDocString_args')
-
 
1924
    if self.ruleName != None:
-
 
1925
      oprot.writeFieldBegin('ruleName', TType.STRING, 1)
-
 
1926
      oprot.writeString(self.ruleName)
-
 
1927
      oprot.writeFieldEnd()
-
 
1928
    oprot.writeFieldStop()
-
 
1929
    oprot.writeStructEnd()
-
 
1930
 
-
 
1931
  def __repr__(self):
-
 
1932
    L = ['%s=%r' % (key, value)
-
 
1933
      for key, value in self.__dict__.iteritems()]
-
 
1934
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
1935
 
-
 
1936
  def __eq__(self, other):
-
 
1937
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
1938
 
-
 
1939
  def __ne__(self, other):
-
 
1940
    return not (self == other)
-
 
1941
 
-
 
1942
class getRuleDocString_result:
-
 
1943
  """
-
 
1944
  Attributes:
-
 
1945
   - success
-
 
1946
  """
-
 
1947
 
-
 
1948
  thrift_spec = (
-
 
1949
    (0, TType.STRING, 'success', None, None, ), # 0
-
 
1950
  )
-
 
1951
 
-
 
1952
  def __init__(self, success=None,):
-
 
1953
    self.success = success
-
 
1954
 
-
 
1955
  def read(self, iprot):
-
 
1956
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
1957
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
1958
      return
-
 
1959
    iprot.readStructBegin()
-
 
1960
    while True:
-
 
1961
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
1962
      if ftype == TType.STOP:
-
 
1963
        break
-
 
1964
      if fid == 0:
-
 
1965
        if ftype == TType.STRING:
-
 
1966
          self.success = iprot.readString();
-
 
1967
        else:
-
 
1968
          iprot.skip(ftype)
-
 
1969
      else:
-
 
1970
        iprot.skip(ftype)
-
 
1971
      iprot.readFieldEnd()
-
 
1972
    iprot.readStructEnd()
-
 
1973
 
-
 
1974
  def write(self, oprot):
-
 
1975
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
1976
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
1977
      return
-
 
1978
    oprot.writeStructBegin('getRuleDocString_result')
-
 
1979
    if self.success != None:
-
 
1980
      oprot.writeFieldBegin('success', TType.STRING, 0)
-
 
1981
      oprot.writeString(self.success)
-
 
1982
      oprot.writeFieldEnd()
-
 
1983
    oprot.writeFieldStop()
-
 
1984
    oprot.writeStructEnd()
-
 
1985
 
-
 
1986
  def __repr__(self):
1475
    L = ['%s=%r' % (key, value)
1987
    L = ['%s=%r' % (key, value)
1476
      for key, value in self.__dict__.iteritems()]
1988
      for key, value in self.__dict__.iteritems()]
1477
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1989
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1478
 
1990
 
1479
  def __eq__(self, other):
1991
  def __eq__(self, other):