Subversion Repositories SmartDukaan

Rev

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

Rev 3385 Rev 3431
Line 1... Line 1...
1
#
1
#
2
# Autogenerated by Thrift
2
# Autogenerated by Thrift Compiler (0.7.0)
3
#
3
#
4
# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
4
# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
5
#
5
#
6
 
6
 
7
from thrift.Thrift import *
7
from thrift.Thrift import *
8
import shop2020.thriftpy.generic.GenericService
8
import shop2020.thriftpy.generic.GenericService
9
from ttypes import *
9
from ttypes import *
10
from thrift.Thrift import TProcessor
10
from thrift.Thrift import TProcessor
11
from thrift.transport import TTransport
11
from thrift.transport import TTransport
12
from thrift.protocol import TBinaryProtocol
12
from thrift.protocol import TBinaryProtocol, TProtocol
13
try:
13
try:
14
  from thrift.protocol import fastbinary
14
  from thrift.protocol import fastbinary
15
except:
15
except:
16
  fastbinary = None
16
  fastbinary = None
17
 
17
 
18
 
18
 
19
class Iface(shop2020.thriftpy.generic.GenericService.Iface):
19
class Iface(shop2020.thriftpy.generic.GenericService.Iface):
20
  """
20
  """
21
  Promotion Service
21
  Promotion Service
22
  """
22
  """
23
  def closeSession(self, ):
-
 
24
    """
-
 
25
    For closing the open session in sqlalchemy
-
 
26
    """
-
 
27
    pass
-
 
28
 
-
 
29
  def createPromotion(self, name, ruleExecutionSrc, startOn, endOn):
23
  def createPromotion(self, name, ruleExecutionSrc, startOn, endOn):
30
    """
24
    """
31
    Parameters:
25
    Parameters:
32
     - name
26
     - name
33
     - ruleExecutionSrc
27
     - ruleExecutionSrc
Line 86... Line 80...
86
    pass
80
    pass
87
 
81
 
88
  def getSuccessfulPaymentCountForCoupon(self, couponCode):
82
  def getSuccessfulPaymentCountForCoupon(self, couponCode):
89
    """
83
    """
90
    Returns the count of successful payments done using a given coupon
84
    Returns the count of successful payments done using a given coupon
91
    
85
 
92
    Parameters:
86
    Parameters:
93
     - couponCode
87
     - couponCode
94
    """
88
    """
95
    pass
89
    pass
96
 
90
 
97
  def getRuleDocString(self, ruleName):
91
  def getRuleDocString(self, ruleName):
98
    """
92
    """
99
    Returns the doc string of the rule module
93
    Returns the doc string of the rule module
100
    
94
 
101
    Parameters:
95
    Parameters:
102
     - ruleName
96
     - ruleName
103
    """
97
    """
104
    pass
98
    pass
105
 
99
 
Line 109... Line 103...
109
  Promotion Service
103
  Promotion Service
110
  """
104
  """
111
  def __init__(self, iprot, oprot=None):
105
  def __init__(self, iprot, oprot=None):
112
    shop2020.thriftpy.generic.GenericService.Client.__init__(self, iprot, oprot)
106
    shop2020.thriftpy.generic.GenericService.Client.__init__(self, iprot, oprot)
113
 
107
 
114
  def closeSession(self, ):
-
 
115
    """
-
 
116
    For closing the open session in sqlalchemy
-
 
117
    """
-
 
118
    self.send_closeSession()
-
 
119
    self.recv_closeSession()
-
 
120
 
-
 
121
  def send_closeSession(self, ):
-
 
122
    self._oprot.writeMessageBegin('closeSession', TMessageType.CALL, self._seqid)
-
 
123
    args = closeSession_args()
-
 
124
    args.write(self._oprot)
-
 
125
    self._oprot.writeMessageEnd()
-
 
126
    self._oprot.trans.flush()
-
 
127
 
-
 
128
  def recv_closeSession(self, ):
-
 
129
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
-
 
130
    if mtype == TMessageType.EXCEPTION:
-
 
131
      x = TApplicationException()
-
 
132
      x.read(self._iprot)
-
 
133
      self._iprot.readMessageEnd()
-
 
134
      raise x
-
 
135
    result = closeSession_result()
-
 
136
    result.read(self._iprot)
-
 
137
    self._iprot.readMessageEnd()
-
 
138
    return
-
 
139
 
-
 
140
  def createPromotion(self, name, ruleExecutionSrc, startOn, endOn):
108
  def createPromotion(self, name, ruleExecutionSrc, startOn, endOn):
141
    """
109
    """
142
    Parameters:
110
    Parameters:
143
     - name
111
     - name
144
     - ruleExecutionSrc
112
     - ruleExecutionSrc
Line 167... Line 135...
167
      self._iprot.readMessageEnd()
135
      self._iprot.readMessageEnd()
168
      raise x
136
      raise x
169
    result = createPromotion_result()
137
    result = createPromotion_result()
170
    result.read(self._iprot)
138
    result.read(self._iprot)
171
    self._iprot.readMessageEnd()
139
    self._iprot.readMessageEnd()
172
    if result.pex != None:
140
    if result.pex is not None:
173
      raise result.pex
141
      raise result.pex
174
    return
142
    return
175
 
143
 
176
  def getAllPromotions(self, ):
144
  def getAllPromotions(self, ):
177
    self.send_getAllPromotions()
145
    self.send_getAllPromotions()
Line 192... Line 160...
192
      self._iprot.readMessageEnd()
160
      self._iprot.readMessageEnd()
193
      raise x
161
      raise x
194
    result = getAllPromotions_result()
162
    result = getAllPromotions_result()
195
    result.read(self._iprot)
163
    result.read(self._iprot)
196
    self._iprot.readMessageEnd()
164
    self._iprot.readMessageEnd()
197
    if result.success != None:
165
    if result.success is not None:
198
      return result.success
166
      return result.success
199
    if result.pex != None:
167
    if result.pex is not None:
200
      raise result.pex
168
      raise result.pex
201
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getAllPromotions failed: unknown result");
169
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getAllPromotions failed: unknown result");
202
 
170
 
203
  def getPromotionById(self, promotionId):
171
  def getPromotionById(self, promotionId):
204
    """
172
    """
Line 224... Line 192...
224
      self._iprot.readMessageEnd()
192
      self._iprot.readMessageEnd()
225
      raise x
193
      raise x
226
    result = getPromotionById_result()
194
    result = getPromotionById_result()
227
    result.read(self._iprot)
195
    result.read(self._iprot)
228
    self._iprot.readMessageEnd()
196
    self._iprot.readMessageEnd()
229
    if result.success != None:
197
    if result.success is not None:
230
      return result.success
198
      return result.success
231
    if result.pex != None:
199
    if result.pex is not None:
232
      raise result.pex
200
      raise result.pex
233
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getPromotionById failed: unknown result");
201
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getPromotionById failed: unknown result");
234
 
202
 
235
  def generateCouponsForPromotion(self, promotionId, couponCode):
203
  def generateCouponsForPromotion(self, promotionId, couponCode):
236
    """
204
    """
Line 258... Line 226...
258
      self._iprot.readMessageEnd()
226
      self._iprot.readMessageEnd()
259
      raise x
227
      raise x
260
    result = generateCouponsForPromotion_result()
228
    result = generateCouponsForPromotion_result()
261
    result.read(self._iprot)
229
    result.read(self._iprot)
262
    self._iprot.readMessageEnd()
230
    self._iprot.readMessageEnd()
263
    if result.pex != None:
231
    if result.pex is not None:
264
      raise result.pex
232
      raise result.pex
265
    return
233
    return
266
 
234
 
267
  def applyCoupon(self, couponCode, cartId):
235
  def applyCoupon(self, couponCode, cartId):
268
    """
236
    """
Line 290... Line 258...
290
      self._iprot.readMessageEnd()
258
      self._iprot.readMessageEnd()
291
      raise x
259
      raise x
292
    result = applyCoupon_result()
260
    result = applyCoupon_result()
293
    result.read(self._iprot)
261
    result.read(self._iprot)
294
    self._iprot.readMessageEnd()
262
    self._iprot.readMessageEnd()
295
    if result.success != None:
263
    if result.success is not None:
296
      return result.success
264
      return result.success
297
    if result.pex != None:
265
    if result.pex is not None:
298
      raise result.pex
266
      raise result.pex
299
    raise TApplicationException(TApplicationException.MISSING_RESULT, "applyCoupon failed: unknown result");
267
    raise TApplicationException(TApplicationException.MISSING_RESULT, "applyCoupon failed: unknown result");
300
 
268
 
301
  def trackCouponUsage(self, couponCode, transactionId, userId):
269
  def trackCouponUsage(self, couponCode, transactionId, userId):
302
    """
270
    """
Line 326... Line 294...
326
      self._iprot.readMessageEnd()
294
      self._iprot.readMessageEnd()
327
      raise x
295
      raise x
328
    result = trackCouponUsage_result()
296
    result = trackCouponUsage_result()
329
    result.read(self._iprot)
297
    result.read(self._iprot)
330
    self._iprot.readMessageEnd()
298
    self._iprot.readMessageEnd()
331
    if result.pex != None:
299
    if result.pex is not None:
332
      raise result.pex
300
      raise result.pex
333
    return
301
    return
334
 
302
 
335
  def getCouponUsageCountByUser(self, couponCode, userId):
303
  def getCouponUsageCountByUser(self, couponCode, userId):
336
    """
304
    """
Line 358... Line 326...
358
      self._iprot.readMessageEnd()
326
      self._iprot.readMessageEnd()
359
      raise x
327
      raise x
360
    result = getCouponUsageCountByUser_result()
328
    result = getCouponUsageCountByUser_result()
361
    result.read(self._iprot)
329
    result.read(self._iprot)
362
    self._iprot.readMessageEnd()
330
    self._iprot.readMessageEnd()
363
    if result.success != None:
331
    if result.success is not None:
364
      return result.success
332
      return result.success
365
    if result.pex != None:
333
    if result.pex is not None:
366
      raise result.pex
334
      raise result.pex
367
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getCouponUsageCountByUser failed: unknown result");
335
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getCouponUsageCountByUser failed: unknown result");
368
 
336
 
369
  def getActiveCoupons(self, ):
337
  def getActiveCoupons(self, ):
370
    """
338
    """
Line 388... Line 356...
388
      self._iprot.readMessageEnd()
356
      self._iprot.readMessageEnd()
389
      raise x
357
      raise x
390
    result = getActiveCoupons_result()
358
    result = getActiveCoupons_result()
391
    result.read(self._iprot)
359
    result.read(self._iprot)
392
    self._iprot.readMessageEnd()
360
    self._iprot.readMessageEnd()
393
    if result.success != None:
361
    if result.success is not None:
394
      return result.success
362
      return result.success
395
    if result.pex != None:
363
    if result.pex is not None:
396
      raise result.pex
364
      raise result.pex
397
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getActiveCoupons failed: unknown result");
365
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getActiveCoupons failed: unknown result");
398
 
366
 
399
  def getSuccessfulPaymentCountForCoupon(self, couponCode):
367
  def getSuccessfulPaymentCountForCoupon(self, couponCode):
400
    """
368
    """
401
    Returns the count of successful payments done using a given coupon
369
    Returns the count of successful payments done using a given coupon
402
    
370
 
403
    Parameters:
371
    Parameters:
404
     - couponCode
372
     - couponCode
405
    """
373
    """
406
    self.send_getSuccessfulPaymentCountForCoupon(couponCode)
374
    self.send_getSuccessfulPaymentCountForCoupon(couponCode)
407
    return self.recv_getSuccessfulPaymentCountForCoupon()
375
    return self.recv_getSuccessfulPaymentCountForCoupon()
Line 422... Line 390...
422
      self._iprot.readMessageEnd()
390
      self._iprot.readMessageEnd()
423
      raise x
391
      raise x
424
    result = getSuccessfulPaymentCountForCoupon_result()
392
    result = getSuccessfulPaymentCountForCoupon_result()
425
    result.read(self._iprot)
393
    result.read(self._iprot)
426
    self._iprot.readMessageEnd()
394
    self._iprot.readMessageEnd()
427
    if result.success != None:
395
    if result.success is not None:
428
      return result.success
396
      return result.success
429
    if result.pex != None:
397
    if result.pex is not None:
430
      raise result.pex
398
      raise result.pex
431
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getSuccessfulPaymentCountForCoupon failed: unknown result");
399
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getSuccessfulPaymentCountForCoupon failed: unknown result");
432
 
400
 
433
  def getRuleDocString(self, ruleName):
401
  def getRuleDocString(self, ruleName):
434
    """
402
    """
435
    Returns the doc string of the rule module
403
    Returns the doc string of the rule module
436
    
404
 
437
    Parameters:
405
    Parameters:
438
     - ruleName
406
     - ruleName
439
    """
407
    """
440
    self.send_getRuleDocString(ruleName)
408
    self.send_getRuleDocString(ruleName)
441
    return self.recv_getRuleDocString()
409
    return self.recv_getRuleDocString()
Line 456... Line 424...
456
      self._iprot.readMessageEnd()
424
      self._iprot.readMessageEnd()
457
      raise x
425
      raise x
458
    result = getRuleDocString_result()
426
    result = getRuleDocString_result()
459
    result.read(self._iprot)
427
    result.read(self._iprot)
460
    self._iprot.readMessageEnd()
428
    self._iprot.readMessageEnd()
461
    if result.success != None:
429
    if result.success is not None:
462
      return result.success
430
      return result.success
463
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getRuleDocString failed: unknown result");
431
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getRuleDocString failed: unknown result");
464
 
432
 
465
 
433
 
466
class Processor(shop2020.thriftpy.generic.GenericService.Processor, Iface, TProcessor):
434
class Processor(shop2020.thriftpy.generic.GenericService.Processor, Iface, TProcessor):
467
  def __init__(self, handler):
435
  def __init__(self, handler):
468
    shop2020.thriftpy.generic.GenericService.Processor.__init__(self, handler)
436
    shop2020.thriftpy.generic.GenericService.Processor.__init__(self, handler)
469
    self._processMap["closeSession"] = Processor.process_closeSession
-
 
470
    self._processMap["createPromotion"] = Processor.process_createPromotion
437
    self._processMap["createPromotion"] = Processor.process_createPromotion
471
    self._processMap["getAllPromotions"] = Processor.process_getAllPromotions
438
    self._processMap["getAllPromotions"] = Processor.process_getAllPromotions
472
    self._processMap["getPromotionById"] = Processor.process_getPromotionById
439
    self._processMap["getPromotionById"] = Processor.process_getPromotionById
473
    self._processMap["generateCouponsForPromotion"] = Processor.process_generateCouponsForPromotion
440
    self._processMap["generateCouponsForPromotion"] = Processor.process_generateCouponsForPromotion
474
    self._processMap["applyCoupon"] = Processor.process_applyCoupon
441
    self._processMap["applyCoupon"] = Processor.process_applyCoupon
Line 491... Line 458...
491
      return
458
      return
492
    else:
459
    else:
493
      self._processMap[name](self, seqid, iprot, oprot)
460
      self._processMap[name](self, seqid, iprot, oprot)
494
    return True
461
    return True
495
 
462
 
496
  def process_closeSession(self, seqid, iprot, oprot):
-
 
497
    args = closeSession_args()
-
 
498
    args.read(iprot)
-
 
499
    iprot.readMessageEnd()
-
 
500
    result = closeSession_result()
-
 
501
    self._handler.closeSession()
-
 
502
    oprot.writeMessageBegin("closeSession", TMessageType.REPLY, seqid)
-
 
503
    result.write(oprot)
-
 
504
    oprot.writeMessageEnd()
-
 
505
    oprot.trans.flush()
-
 
506
 
-
 
507
  def process_createPromotion(self, seqid, iprot, oprot):
463
  def process_createPromotion(self, seqid, iprot, oprot):
508
    args = createPromotion_args()
464
    args = createPromotion_args()
509
    args.read(iprot)
465
    args.read(iprot)
510
    iprot.readMessageEnd()
466
    iprot.readMessageEnd()
511
    result = createPromotion_result()
467
    result = createPromotion_result()
Line 642... Line 598...
642
    oprot.trans.flush()
598
    oprot.trans.flush()
643
 
599
 
644
 
600
 
645
# HELPER FUNCTIONS AND STRUCTURES
601
# HELPER FUNCTIONS AND STRUCTURES
646
 
602
 
647
class closeSession_args:
-
 
648
 
-
 
649
  thrift_spec = (
-
 
650
  )
-
 
651
 
-
 
652
  def read(self, iprot):
-
 
653
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
654
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
655
      return
-
 
656
    iprot.readStructBegin()
-
 
657
    while True:
-
 
658
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
659
      if ftype == TType.STOP:
-
 
660
        break
-
 
661
      else:
-
 
662
        iprot.skip(ftype)
-
 
663
      iprot.readFieldEnd()
-
 
664
    iprot.readStructEnd()
-
 
665
 
-
 
666
  def write(self, oprot):
-
 
667
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
668
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
669
      return
-
 
670
    oprot.writeStructBegin('closeSession_args')
-
 
671
    oprot.writeFieldStop()
-
 
672
    oprot.writeStructEnd()
-
 
673
 
-
 
674
  def __repr__(self):
-
 
675
    L = ['%s=%r' % (key, value)
-
 
676
      for key, value in self.__dict__.iteritems()]
-
 
677
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
678
 
-
 
679
  def __eq__(self, other):
-
 
680
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
681
 
-
 
682
  def __ne__(self, other):
-
 
683
    return not (self == other)
-
 
684
 
-
 
685
class closeSession_result:
-
 
686
 
-
 
687
  thrift_spec = (
-
 
688
  )
-
 
689
 
-
 
690
  def read(self, iprot):
-
 
691
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
692
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
693
      return
-
 
694
    iprot.readStructBegin()
-
 
695
    while True:
-
 
696
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
697
      if ftype == TType.STOP:
-
 
698
        break
-
 
699
      else:
-
 
700
        iprot.skip(ftype)
-
 
701
      iprot.readFieldEnd()
-
 
702
    iprot.readStructEnd()
-
 
703
 
-
 
704
  def write(self, oprot):
-
 
705
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
706
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
707
      return
-
 
708
    oprot.writeStructBegin('closeSession_result')
-
 
709
    oprot.writeFieldStop()
-
 
710
    oprot.writeStructEnd()
-
 
711
 
-
 
712
  def __repr__(self):
-
 
713
    L = ['%s=%r' % (key, value)
-
 
714
      for key, value in self.__dict__.iteritems()]
-
 
715
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
716
 
-
 
717
  def __eq__(self, other):
-
 
718
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
719
 
-
 
720
  def __ne__(self, other):
-
 
721
    return not (self == other)
-
 
722
 
-
 
723
class createPromotion_args:
603
class createPromotion_args:
724
  """
604
  """
725
  Attributes:
605
  Attributes:
726
   - name
606
   - name
727
   - ruleExecutionSrc
607
   - ruleExecutionSrc
Line 780... Line 660...
780
  def write(self, oprot):
660
  def write(self, oprot):
781
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
661
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
782
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
662
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
783
      return
663
      return
784
    oprot.writeStructBegin('createPromotion_args')
664
    oprot.writeStructBegin('createPromotion_args')
785
    if self.name != None:
665
    if self.name is not None:
786
      oprot.writeFieldBegin('name', TType.STRING, 1)
666
      oprot.writeFieldBegin('name', TType.STRING, 1)
787
      oprot.writeString(self.name)
667
      oprot.writeString(self.name)
788
      oprot.writeFieldEnd()
668
      oprot.writeFieldEnd()
789
    if self.ruleExecutionSrc != None:
669
    if self.ruleExecutionSrc is not None:
790
      oprot.writeFieldBegin('ruleExecutionSrc', TType.STRING, 2)
670
      oprot.writeFieldBegin('ruleExecutionSrc', TType.STRING, 2)
791
      oprot.writeString(self.ruleExecutionSrc)
671
      oprot.writeString(self.ruleExecutionSrc)
792
      oprot.writeFieldEnd()
672
      oprot.writeFieldEnd()
793
    if self.startOn != None:
673
    if self.startOn is not None:
794
      oprot.writeFieldBegin('startOn', TType.I64, 3)
674
      oprot.writeFieldBegin('startOn', TType.I64, 3)
795
      oprot.writeI64(self.startOn)
675
      oprot.writeI64(self.startOn)
796
      oprot.writeFieldEnd()
676
      oprot.writeFieldEnd()
797
    if self.endOn != None:
677
    if self.endOn is not None:
798
      oprot.writeFieldBegin('endOn', TType.I64, 4)
678
      oprot.writeFieldBegin('endOn', TType.I64, 4)
799
      oprot.writeI64(self.endOn)
679
      oprot.writeI64(self.endOn)
800
      oprot.writeFieldEnd()
680
      oprot.writeFieldEnd()
801
    oprot.writeFieldStop()
681
    oprot.writeFieldStop()
802
    oprot.writeStructEnd()
682
    oprot.writeStructEnd()
803
 
683
 
-
 
684
  def validate(self):
-
 
685
    return
-
 
686
 
-
 
687
 
804
  def __repr__(self):
688
  def __repr__(self):
805
    L = ['%s=%r' % (key, value)
689
    L = ['%s=%r' % (key, value)
806
      for key, value in self.__dict__.iteritems()]
690
      for key, value in self.__dict__.iteritems()]
807
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
691
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
808
 
692
 
Line 849... Line 733...
849
  def write(self, oprot):
733
  def write(self, oprot):
850
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
734
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
851
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
735
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
852
      return
736
      return
853
    oprot.writeStructBegin('createPromotion_result')
737
    oprot.writeStructBegin('createPromotion_result')
854
    if self.pex != None:
738
    if self.pex is not None:
855
      oprot.writeFieldBegin('pex', TType.STRUCT, 1)
739
      oprot.writeFieldBegin('pex', TType.STRUCT, 1)
856
      self.pex.write(oprot)
740
      self.pex.write(oprot)
857
      oprot.writeFieldEnd()
741
      oprot.writeFieldEnd()
858
    oprot.writeFieldStop()
742
    oprot.writeFieldStop()
859
    oprot.writeStructEnd()
743
    oprot.writeStructEnd()
860
 
744
 
-
 
745
  def validate(self):
-
 
746
    return
-
 
747
 
-
 
748
 
861
  def __repr__(self):
749
  def __repr__(self):
862
    L = ['%s=%r' % (key, value)
750
    L = ['%s=%r' % (key, value)
863
      for key, value in self.__dict__.iteritems()]
751
      for key, value in self.__dict__.iteritems()]
864
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
752
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
865
 
753
 
Line 894... Line 782...
894
      return
782
      return
895
    oprot.writeStructBegin('getAllPromotions_args')
783
    oprot.writeStructBegin('getAllPromotions_args')
896
    oprot.writeFieldStop()
784
    oprot.writeFieldStop()
897
    oprot.writeStructEnd()
785
    oprot.writeStructEnd()
898
 
786
 
-
 
787
  def validate(self):
-
 
788
    return
-
 
789
 
-
 
790
 
899
  def __repr__(self):
791
  def __repr__(self):
900
    L = ['%s=%r' % (key, value)
792
    L = ['%s=%r' % (key, value)
901
      for key, value in self.__dict__.iteritems()]
793
      for key, value in self.__dict__.iteritems()]
902
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
794
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
903
 
795
 
Line 957... Line 849...
957
  def write(self, oprot):
849
  def write(self, oprot):
958
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
850
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
959
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
851
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
960
      return
852
      return
961
    oprot.writeStructBegin('getAllPromotions_result')
853
    oprot.writeStructBegin('getAllPromotions_result')
962
    if self.success != None:
854
    if self.success is not None:
963
      oprot.writeFieldBegin('success', TType.LIST, 0)
855
      oprot.writeFieldBegin('success', TType.LIST, 0)
964
      oprot.writeListBegin(TType.STRUCT, len(self.success))
856
      oprot.writeListBegin(TType.STRUCT, len(self.success))
965
      for iter27 in self.success:
857
      for iter27 in self.success:
966
        iter27.write(oprot)
858
        iter27.write(oprot)
967
      oprot.writeListEnd()
859
      oprot.writeListEnd()
968
      oprot.writeFieldEnd()
860
      oprot.writeFieldEnd()
969
    if self.pex != None:
861
    if self.pex is not None:
970
      oprot.writeFieldBegin('pex', TType.STRUCT, 1)
862
      oprot.writeFieldBegin('pex', TType.STRUCT, 1)
971
      self.pex.write(oprot)
863
      self.pex.write(oprot)
972
      oprot.writeFieldEnd()
864
      oprot.writeFieldEnd()
973
    oprot.writeFieldStop()
865
    oprot.writeFieldStop()
974
    oprot.writeStructEnd()
866
    oprot.writeStructEnd()
975
 
867
 
-
 
868
  def validate(self):
-
 
869
    return
-
 
870
 
-
 
871
 
976
  def __repr__(self):
872
  def __repr__(self):
977
    L = ['%s=%r' % (key, value)
873
    L = ['%s=%r' % (key, value)
978
      for key, value in self.__dict__.iteritems()]
874
      for key, value in self.__dict__.iteritems()]
979
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
875
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
980
 
876
 
Line 1020... Line 916...
1020
  def write(self, oprot):
916
  def write(self, oprot):
1021
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
917
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1022
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
918
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1023
      return
919
      return
1024
    oprot.writeStructBegin('getPromotionById_args')
920
    oprot.writeStructBegin('getPromotionById_args')
1025
    if self.promotionId != None:
921
    if self.promotionId is not None:
1026
      oprot.writeFieldBegin('promotionId', TType.I64, 1)
922
      oprot.writeFieldBegin('promotionId', TType.I64, 1)
1027
      oprot.writeI64(self.promotionId)
923
      oprot.writeI64(self.promotionId)
1028
      oprot.writeFieldEnd()
924
      oprot.writeFieldEnd()
1029
    oprot.writeFieldStop()
925
    oprot.writeFieldStop()
1030
    oprot.writeStructEnd()
926
    oprot.writeStructEnd()
1031
 
927
 
-
 
928
  def validate(self):
-
 
929
    return
-
 
930
 
-
 
931
 
1032
  def __repr__(self):
932
  def __repr__(self):
1033
    L = ['%s=%r' % (key, value)
933
    L = ['%s=%r' % (key, value)
1034
      for key, value in self.__dict__.iteritems()]
934
      for key, value in self.__dict__.iteritems()]
1035
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
935
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1036
 
936
 
Line 1085... Line 985...
1085
  def write(self, oprot):
985
  def write(self, oprot):
1086
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
986
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1087
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
987
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1088
      return
988
      return
1089
    oprot.writeStructBegin('getPromotionById_result')
989
    oprot.writeStructBegin('getPromotionById_result')
1090
    if self.success != None:
990
    if self.success is not None:
1091
      oprot.writeFieldBegin('success', TType.STRUCT, 0)
991
      oprot.writeFieldBegin('success', TType.STRUCT, 0)
1092
      self.success.write(oprot)
992
      self.success.write(oprot)
1093
      oprot.writeFieldEnd()
993
      oprot.writeFieldEnd()
1094
    if self.pex != None:
994
    if self.pex is not None:
1095
      oprot.writeFieldBegin('pex', TType.STRUCT, 1)
995
      oprot.writeFieldBegin('pex', TType.STRUCT, 1)
1096
      self.pex.write(oprot)
996
      self.pex.write(oprot)
1097
      oprot.writeFieldEnd()
997
      oprot.writeFieldEnd()
1098
    oprot.writeFieldStop()
998
    oprot.writeFieldStop()
1099
    oprot.writeStructEnd()
999
    oprot.writeStructEnd()
1100
 
1000
 
-
 
1001
  def validate(self):
-
 
1002
    return
-
 
1003
 
-
 
1004
 
1101
  def __repr__(self):
1005
  def __repr__(self):
1102
    L = ['%s=%r' % (key, value)
1006
    L = ['%s=%r' % (key, value)
1103
      for key, value in self.__dict__.iteritems()]
1007
      for key, value in self.__dict__.iteritems()]
1104
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1008
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1105
 
1009
 
Line 1153... Line 1057...
1153
  def write(self, oprot):
1057
  def write(self, oprot):
1154
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1058
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1155
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1059
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1156
      return
1060
      return
1157
    oprot.writeStructBegin('generateCouponsForPromotion_args')
1061
    oprot.writeStructBegin('generateCouponsForPromotion_args')
1158
    if self.promotionId != None:
1062
    if self.promotionId is not None:
1159
      oprot.writeFieldBegin('promotionId', TType.I64, 1)
1063
      oprot.writeFieldBegin('promotionId', TType.I64, 1)
1160
      oprot.writeI64(self.promotionId)
1064
      oprot.writeI64(self.promotionId)
1161
      oprot.writeFieldEnd()
1065
      oprot.writeFieldEnd()
1162
    if self.couponCode != None:
1066
    if self.couponCode is not None:
1163
      oprot.writeFieldBegin('couponCode', TType.STRING, 2)
1067
      oprot.writeFieldBegin('couponCode', TType.STRING, 2)
1164
      oprot.writeString(self.couponCode)
1068
      oprot.writeString(self.couponCode)
1165
      oprot.writeFieldEnd()
1069
      oprot.writeFieldEnd()
1166
    oprot.writeFieldStop()
1070
    oprot.writeFieldStop()
1167
    oprot.writeStructEnd()
1071
    oprot.writeStructEnd()
1168
 
1072
 
-
 
1073
  def validate(self):
-
 
1074
    return
-
 
1075
 
-
 
1076
 
1169
  def __repr__(self):
1077
  def __repr__(self):
1170
    L = ['%s=%r' % (key, value)
1078
    L = ['%s=%r' % (key, value)
1171
      for key, value in self.__dict__.iteritems()]
1079
      for key, value in self.__dict__.iteritems()]
1172
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1080
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1173
 
1081
 
Line 1214... Line 1122...
1214
  def write(self, oprot):
1122
  def write(self, oprot):
1215
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1123
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1216
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1124
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1217
      return
1125
      return
1218
    oprot.writeStructBegin('generateCouponsForPromotion_result')
1126
    oprot.writeStructBegin('generateCouponsForPromotion_result')
1219
    if self.pex != None:
1127
    if self.pex is not None:
1220
      oprot.writeFieldBegin('pex', TType.STRUCT, 1)
1128
      oprot.writeFieldBegin('pex', TType.STRUCT, 1)
1221
      self.pex.write(oprot)
1129
      self.pex.write(oprot)
1222
      oprot.writeFieldEnd()
1130
      oprot.writeFieldEnd()
1223
    oprot.writeFieldStop()
1131
    oprot.writeFieldStop()
1224
    oprot.writeStructEnd()
1132
    oprot.writeStructEnd()
1225
 
1133
 
-
 
1134
  def validate(self):
-
 
1135
    return
-
 
1136
 
-
 
1137
 
1226
  def __repr__(self):
1138
  def __repr__(self):
1227
    L = ['%s=%r' % (key, value)
1139
    L = ['%s=%r' % (key, value)
1228
      for key, value in self.__dict__.iteritems()]
1140
      for key, value in self.__dict__.iteritems()]
1229
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1141
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1230
 
1142
 
Line 1278... Line 1190...
1278
  def write(self, oprot):
1190
  def write(self, oprot):
1279
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1191
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1280
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1192
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1281
      return
1193
      return
1282
    oprot.writeStructBegin('applyCoupon_args')
1194
    oprot.writeStructBegin('applyCoupon_args')
1283
    if self.couponCode != None:
1195
    if self.couponCode is not None:
1284
      oprot.writeFieldBegin('couponCode', TType.STRING, 1)
1196
      oprot.writeFieldBegin('couponCode', TType.STRING, 1)
1285
      oprot.writeString(self.couponCode)
1197
      oprot.writeString(self.couponCode)
1286
      oprot.writeFieldEnd()
1198
      oprot.writeFieldEnd()
1287
    if self.cartId != None:
1199
    if self.cartId is not None:
1288
      oprot.writeFieldBegin('cartId', TType.I64, 2)
1200
      oprot.writeFieldBegin('cartId', TType.I64, 2)
1289
      oprot.writeI64(self.cartId)
1201
      oprot.writeI64(self.cartId)
1290
      oprot.writeFieldEnd()
1202
      oprot.writeFieldEnd()
1291
    oprot.writeFieldStop()
1203
    oprot.writeFieldStop()
1292
    oprot.writeStructEnd()
1204
    oprot.writeStructEnd()
1293
 
1205
 
-
 
1206
  def validate(self):
-
 
1207
    return
-
 
1208
 
-
 
1209
 
1294
  def __repr__(self):
1210
  def __repr__(self):
1295
    L = ['%s=%r' % (key, value)
1211
    L = ['%s=%r' % (key, value)
1296
      for key, value in self.__dict__.iteritems()]
1212
      for key, value in self.__dict__.iteritems()]
1297
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1213
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1298
 
1214
 
Line 1347... Line 1263...
1347
  def write(self, oprot):
1263
  def write(self, oprot):
1348
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1264
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1349
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1265
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1350
      return
1266
      return
1351
    oprot.writeStructBegin('applyCoupon_result')
1267
    oprot.writeStructBegin('applyCoupon_result')
1352
    if self.success != None:
1268
    if self.success is not None:
1353
      oprot.writeFieldBegin('success', TType.STRUCT, 0)
1269
      oprot.writeFieldBegin('success', TType.STRUCT, 0)
1354
      self.success.write(oprot)
1270
      self.success.write(oprot)
1355
      oprot.writeFieldEnd()
1271
      oprot.writeFieldEnd()
1356
    if self.pex != None:
1272
    if self.pex is not None:
1357
      oprot.writeFieldBegin('pex', TType.STRUCT, 1)
1273
      oprot.writeFieldBegin('pex', TType.STRUCT, 1)
1358
      self.pex.write(oprot)
1274
      self.pex.write(oprot)
1359
      oprot.writeFieldEnd()
1275
      oprot.writeFieldEnd()
1360
    oprot.writeFieldStop()
1276
    oprot.writeFieldStop()
1361
    oprot.writeStructEnd()
1277
    oprot.writeStructEnd()
1362
 
1278
 
-
 
1279
  def validate(self):
-
 
1280
    return
-
 
1281
 
-
 
1282
 
1363
  def __repr__(self):
1283
  def __repr__(self):
1364
    L = ['%s=%r' % (key, value)
1284
    L = ['%s=%r' % (key, value)
1365
      for key, value in self.__dict__.iteritems()]
1285
      for key, value in self.__dict__.iteritems()]
1366
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1286
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1367
 
1287
 
Line 1423... Line 1343...
1423
  def write(self, oprot):
1343
  def write(self, oprot):
1424
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1344
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1425
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1345
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1426
      return
1346
      return
1427
    oprot.writeStructBegin('trackCouponUsage_args')
1347
    oprot.writeStructBegin('trackCouponUsage_args')
1428
    if self.couponCode != None:
1348
    if self.couponCode is not None:
1429
      oprot.writeFieldBegin('couponCode', TType.STRING, 1)
1349
      oprot.writeFieldBegin('couponCode', TType.STRING, 1)
1430
      oprot.writeString(self.couponCode)
1350
      oprot.writeString(self.couponCode)
1431
      oprot.writeFieldEnd()
1351
      oprot.writeFieldEnd()
1432
    if self.transactionId != None:
1352
    if self.transactionId is not None:
1433
      oprot.writeFieldBegin('transactionId', TType.I64, 2)
1353
      oprot.writeFieldBegin('transactionId', TType.I64, 2)
1434
      oprot.writeI64(self.transactionId)
1354
      oprot.writeI64(self.transactionId)
1435
      oprot.writeFieldEnd()
1355
      oprot.writeFieldEnd()
1436
    if self.userId != None:
1356
    if self.userId is not None:
1437
      oprot.writeFieldBegin('userId', TType.I64, 3)
1357
      oprot.writeFieldBegin('userId', TType.I64, 3)
1438
      oprot.writeI64(self.userId)
1358
      oprot.writeI64(self.userId)
1439
      oprot.writeFieldEnd()
1359
      oprot.writeFieldEnd()
1440
    oprot.writeFieldStop()
1360
    oprot.writeFieldStop()
1441
    oprot.writeStructEnd()
1361
    oprot.writeStructEnd()
1442
 
1362
 
-
 
1363
  def validate(self):
-
 
1364
    return
-
 
1365
 
-
 
1366
 
1443
  def __repr__(self):
1367
  def __repr__(self):
1444
    L = ['%s=%r' % (key, value)
1368
    L = ['%s=%r' % (key, value)
1445
      for key, value in self.__dict__.iteritems()]
1369
      for key, value in self.__dict__.iteritems()]
1446
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1370
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1447
 
1371
 
Line 1488... Line 1412...
1488
  def write(self, oprot):
1412
  def write(self, oprot):
1489
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1413
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1490
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1414
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1491
      return
1415
      return
1492
    oprot.writeStructBegin('trackCouponUsage_result')
1416
    oprot.writeStructBegin('trackCouponUsage_result')
1493
    if self.pex != None:
1417
    if self.pex is not None:
1494
      oprot.writeFieldBegin('pex', TType.STRUCT, 1)
1418
      oprot.writeFieldBegin('pex', TType.STRUCT, 1)
1495
      self.pex.write(oprot)
1419
      self.pex.write(oprot)
1496
      oprot.writeFieldEnd()
1420
      oprot.writeFieldEnd()
1497
    oprot.writeFieldStop()
1421
    oprot.writeFieldStop()
1498
    oprot.writeStructEnd()
1422
    oprot.writeStructEnd()
1499
 
1423
 
-
 
1424
  def validate(self):
-
 
1425
    return
-
 
1426
 
-
 
1427
 
1500
  def __repr__(self):
1428
  def __repr__(self):
1501
    L = ['%s=%r' % (key, value)
1429
    L = ['%s=%r' % (key, value)
1502
      for key, value in self.__dict__.iteritems()]
1430
      for key, value in self.__dict__.iteritems()]
1503
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1431
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1504
 
1432
 
Line 1552... Line 1480...
1552
  def write(self, oprot):
1480
  def write(self, oprot):
1553
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1481
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1554
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1482
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1555
      return
1483
      return
1556
    oprot.writeStructBegin('getCouponUsageCountByUser_args')
1484
    oprot.writeStructBegin('getCouponUsageCountByUser_args')
1557
    if self.couponCode != None:
1485
    if self.couponCode is not None:
1558
      oprot.writeFieldBegin('couponCode', TType.STRING, 1)
1486
      oprot.writeFieldBegin('couponCode', TType.STRING, 1)
1559
      oprot.writeString(self.couponCode)
1487
      oprot.writeString(self.couponCode)
1560
      oprot.writeFieldEnd()
1488
      oprot.writeFieldEnd()
1561
    if self.userId != None:
1489
    if self.userId is not None:
1562
      oprot.writeFieldBegin('userId', TType.I64, 2)
1490
      oprot.writeFieldBegin('userId', TType.I64, 2)
1563
      oprot.writeI64(self.userId)
1491
      oprot.writeI64(self.userId)
1564
      oprot.writeFieldEnd()
1492
      oprot.writeFieldEnd()
1565
    oprot.writeFieldStop()
1493
    oprot.writeFieldStop()
1566
    oprot.writeStructEnd()
1494
    oprot.writeStructEnd()
1567
 
1495
 
-
 
1496
  def validate(self):
-
 
1497
    return
-
 
1498
 
-
 
1499
 
1568
  def __repr__(self):
1500
  def __repr__(self):
1569
    L = ['%s=%r' % (key, value)
1501
    L = ['%s=%r' % (key, value)
1570
      for key, value in self.__dict__.iteritems()]
1502
      for key, value in self.__dict__.iteritems()]
1571
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1503
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1572
 
1504
 
Line 1620... Line 1552...
1620
  def write(self, oprot):
1552
  def write(self, oprot):
1621
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1553
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1622
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1554
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1623
      return
1555
      return
1624
    oprot.writeStructBegin('getCouponUsageCountByUser_result')
1556
    oprot.writeStructBegin('getCouponUsageCountByUser_result')
1625
    if self.success != None:
1557
    if self.success is not None:
1626
      oprot.writeFieldBegin('success', TType.I64, 0)
1558
      oprot.writeFieldBegin('success', TType.I64, 0)
1627
      oprot.writeI64(self.success)
1559
      oprot.writeI64(self.success)
1628
      oprot.writeFieldEnd()
1560
      oprot.writeFieldEnd()
1629
    if self.pex != None:
1561
    if self.pex is not None:
1630
      oprot.writeFieldBegin('pex', TType.STRUCT, 1)
1562
      oprot.writeFieldBegin('pex', TType.STRUCT, 1)
1631
      self.pex.write(oprot)
1563
      self.pex.write(oprot)
1632
      oprot.writeFieldEnd()
1564
      oprot.writeFieldEnd()
1633
    oprot.writeFieldStop()
1565
    oprot.writeFieldStop()
1634
    oprot.writeStructEnd()
1566
    oprot.writeStructEnd()
1635
 
1567
 
-
 
1568
  def validate(self):
-
 
1569
    return
-
 
1570
 
-
 
1571
 
1636
  def __repr__(self):
1572
  def __repr__(self):
1637
    L = ['%s=%r' % (key, value)
1573
    L = ['%s=%r' % (key, value)
1638
      for key, value in self.__dict__.iteritems()]
1574
      for key, value in self.__dict__.iteritems()]
1639
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1575
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1640
 
1576
 
Line 1669... Line 1605...
1669
      return
1605
      return
1670
    oprot.writeStructBegin('getActiveCoupons_args')
1606
    oprot.writeStructBegin('getActiveCoupons_args')
1671
    oprot.writeFieldStop()
1607
    oprot.writeFieldStop()
1672
    oprot.writeStructEnd()
1608
    oprot.writeStructEnd()
1673
 
1609
 
-
 
1610
  def validate(self):
-
 
1611
    return
-
 
1612
 
-
 
1613
 
1674
  def __repr__(self):
1614
  def __repr__(self):
1675
    L = ['%s=%r' % (key, value)
1615
    L = ['%s=%r' % (key, value)
1676
      for key, value in self.__dict__.iteritems()]
1616
      for key, value in self.__dict__.iteritems()]
1677
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1617
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1678
 
1618
 
Line 1732... Line 1672...
1732
  def write(self, oprot):
1672
  def write(self, oprot):
1733
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1673
    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)))
1674
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1735
      return
1675
      return
1736
    oprot.writeStructBegin('getActiveCoupons_result')
1676
    oprot.writeStructBegin('getActiveCoupons_result')
1737
    if self.success != None:
1677
    if self.success is not None:
1738
      oprot.writeFieldBegin('success', TType.LIST, 0)
1678
      oprot.writeFieldBegin('success', TType.LIST, 0)
1739
      oprot.writeListBegin(TType.STRUCT, len(self.success))
1679
      oprot.writeListBegin(TType.STRUCT, len(self.success))
1740
      for iter34 in self.success:
1680
      for iter34 in self.success:
1741
        iter34.write(oprot)
1681
        iter34.write(oprot)
1742
      oprot.writeListEnd()
1682
      oprot.writeListEnd()
1743
      oprot.writeFieldEnd()
1683
      oprot.writeFieldEnd()
1744
    if self.pex != None:
1684
    if self.pex is not None:
1745
      oprot.writeFieldBegin('pex', TType.STRUCT, 1)
1685
      oprot.writeFieldBegin('pex', TType.STRUCT, 1)
1746
      self.pex.write(oprot)
1686
      self.pex.write(oprot)
1747
      oprot.writeFieldEnd()
1687
      oprot.writeFieldEnd()
1748
    oprot.writeFieldStop()
1688
    oprot.writeFieldStop()
1749
    oprot.writeStructEnd()
1689
    oprot.writeStructEnd()
1750
 
1690
 
-
 
1691
  def validate(self):
-
 
1692
    return
-
 
1693
 
-
 
1694
 
1751
  def __repr__(self):
1695
  def __repr__(self):
1752
    L = ['%s=%r' % (key, value)
1696
    L = ['%s=%r' % (key, value)
1753
      for key, value in self.__dict__.iteritems()]
1697
      for key, value in self.__dict__.iteritems()]
1754
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1698
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1755
 
1699
 
Line 1795... Line 1739...
1795
  def write(self, oprot):
1739
  def write(self, oprot):
1796
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1740
    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)))
1741
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1798
      return
1742
      return
1799
    oprot.writeStructBegin('getSuccessfulPaymentCountForCoupon_args')
1743
    oprot.writeStructBegin('getSuccessfulPaymentCountForCoupon_args')
1800
    if self.couponCode != None:
1744
    if self.couponCode is not None:
1801
      oprot.writeFieldBegin('couponCode', TType.STRING, 1)
1745
      oprot.writeFieldBegin('couponCode', TType.STRING, 1)
1802
      oprot.writeString(self.couponCode)
1746
      oprot.writeString(self.couponCode)
1803
      oprot.writeFieldEnd()
1747
      oprot.writeFieldEnd()
1804
    oprot.writeFieldStop()
1748
    oprot.writeFieldStop()
1805
    oprot.writeStructEnd()
1749
    oprot.writeStructEnd()
1806
 
1750
 
-
 
1751
  def validate(self):
-
 
1752
    return
-
 
1753
 
-
 
1754
 
1807
  def __repr__(self):
1755
  def __repr__(self):
1808
    L = ['%s=%r' % (key, value)
1756
    L = ['%s=%r' % (key, value)
1809
      for key, value in self.__dict__.iteritems()]
1757
      for key, value in self.__dict__.iteritems()]
1810
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1758
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1811
 
1759
 
Line 1859... Line 1807...
1859
  def write(self, oprot):
1807
  def write(self, oprot):
1860
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1808
    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)))
1809
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1862
      return
1810
      return
1863
    oprot.writeStructBegin('getSuccessfulPaymentCountForCoupon_result')
1811
    oprot.writeStructBegin('getSuccessfulPaymentCountForCoupon_result')
1864
    if self.success != None:
1812
    if self.success is not None:
1865
      oprot.writeFieldBegin('success', TType.I64, 0)
1813
      oprot.writeFieldBegin('success', TType.I64, 0)
1866
      oprot.writeI64(self.success)
1814
      oprot.writeI64(self.success)
1867
      oprot.writeFieldEnd()
1815
      oprot.writeFieldEnd()
1868
    if self.pex != None:
1816
    if self.pex is not None:
1869
      oprot.writeFieldBegin('pex', TType.STRUCT, 1)
1817
      oprot.writeFieldBegin('pex', TType.STRUCT, 1)
1870
      self.pex.write(oprot)
1818
      self.pex.write(oprot)
1871
      oprot.writeFieldEnd()
1819
      oprot.writeFieldEnd()
1872
    oprot.writeFieldStop()
1820
    oprot.writeFieldStop()
1873
    oprot.writeStructEnd()
1821
    oprot.writeStructEnd()
1874
 
1822
 
-
 
1823
  def validate(self):
-
 
1824
    return
-
 
1825
 
-
 
1826
 
1875
  def __repr__(self):
1827
  def __repr__(self):
1876
    L = ['%s=%r' % (key, value)
1828
    L = ['%s=%r' % (key, value)
1877
      for key, value in self.__dict__.iteritems()]
1829
      for key, value in self.__dict__.iteritems()]
1878
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1830
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1879
 
1831
 
Line 1919... Line 1871...
1919
  def write(self, oprot):
1871
  def write(self, oprot):
1920
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1872
    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)))
1873
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1922
      return
1874
      return
1923
    oprot.writeStructBegin('getRuleDocString_args')
1875
    oprot.writeStructBegin('getRuleDocString_args')
1924
    if self.ruleName != None:
1876
    if self.ruleName is not None:
1925
      oprot.writeFieldBegin('ruleName', TType.STRING, 1)
1877
      oprot.writeFieldBegin('ruleName', TType.STRING, 1)
1926
      oprot.writeString(self.ruleName)
1878
      oprot.writeString(self.ruleName)
1927
      oprot.writeFieldEnd()
1879
      oprot.writeFieldEnd()
1928
    oprot.writeFieldStop()
1880
    oprot.writeFieldStop()
1929
    oprot.writeStructEnd()
1881
    oprot.writeStructEnd()
1930
 
1882
 
-
 
1883
  def validate(self):
-
 
1884
    return
-
 
1885
 
-
 
1886
 
1931
  def __repr__(self):
1887
  def __repr__(self):
1932
    L = ['%s=%r' % (key, value)
1888
    L = ['%s=%r' % (key, value)
1933
      for key, value in self.__dict__.iteritems()]
1889
      for key, value in self.__dict__.iteritems()]
1934
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1890
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1935
 
1891
 
Line 1974... Line 1930...
1974
  def write(self, oprot):
1930
  def write(self, oprot):
1975
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1931
    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)))
1932
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1977
      return
1933
      return
1978
    oprot.writeStructBegin('getRuleDocString_result')
1934
    oprot.writeStructBegin('getRuleDocString_result')
1979
    if self.success != None:
1935
    if self.success is not None:
1980
      oprot.writeFieldBegin('success', TType.STRING, 0)
1936
      oprot.writeFieldBegin('success', TType.STRING, 0)
1981
      oprot.writeString(self.success)
1937
      oprot.writeString(self.success)
1982
      oprot.writeFieldEnd()
1938
      oprot.writeFieldEnd()
1983
    oprot.writeFieldStop()
1939
    oprot.writeFieldStop()
1984
    oprot.writeStructEnd()
1940
    oprot.writeStructEnd()
1985
 
1941
 
-
 
1942
  def validate(self):
-
 
1943
    return
-
 
1944
 
-
 
1945
 
1986
  def __repr__(self):
1946
  def __repr__(self):
1987
    L = ['%s=%r' % (key, value)
1947
    L = ['%s=%r' % (key, value)
1988
      for key, value in self.__dict__.iteritems()]
1948
      for key, value in self.__dict__.iteritems()]
1989
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1949
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1990
 
1950
 
1991
  def __eq__(self, other):
1951
  def __eq__(self, other):
1992
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1952
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1993
 
1953
 
1994
  def __ne__(self, other):
1954
  def __ne__(self, other):
1995
    return not (self == other)
1955
    return not (self == other)
1996
 
-
 
1997
 
-