Subversion Repositories SmartDukaan

Rev

Rev 94 | Rev 304 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
94 ashish 1
#
2
# Autogenerated by Thrift
3
#
4
# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
5
#
6
 
7
from thrift.Thrift import *
8
from ttypes import *
9
from thrift.Thrift import TProcessor
10
from thrift.transport import TTransport
11
from thrift.protocol import TBinaryProtocol
12
try:
13
  from thrift.protocol import fastbinary
14
except:
15
  fastbinary = None
16
 
17
 
18
class Iface:
19
  def createTransaction(self, transaction):
20
    """
21
    Parameters:
22
     - transaction
23
    """
24
    pass
25
 
26
  def getTransaction(self, id):
27
    """
28
    	Get transaction methods.
29
    *
30
 
31
    Parameters:
32
     - id
33
    """
34
    pass
35
 
36
  def getAllTransactions(self, status, from_date, to_date):
37
    """
38
    Parameters:
39
     - status
40
     - from_date
41
     - to_date
42
    """
43
    pass
44
 
45
  def getTransactionsForShipmentStatus(self, status, from_date, to_date):
46
    """
47
    Parameters:
48
     - status
49
     - from_date
50
     - to_date
51
    """
52
    pass
53
 
54
  def getTransactionsForCustomer(self, customerId, from_date, to_date, status):
55
    """
56
    Parameters:
57
     - customerId
58
     - from_date
59
     - to_date
60
     - status
61
    """
62
    pass
63
 
64
  def getTransactionsForCustomerAndShipmentStatus(self, customerId, from_date, to_date, status):
65
    """
66
    Parameters:
67
     - customerId
68
     - from_date
69
     - to_date
70
     - status
71
    """
72
    pass
73
 
132 ashish 74
  def getTransactionsForShoppingCartId(self, shoppingCartId):
75
    """
76
    Parameters:
77
     - shoppingCartId
78
    """
79
    pass
80
 
94 ashish 81
  def getTransactionStatus(self, transactionId):
82
    """
83
    Parameters:
84
     - transactionId
85
    """
86
    pass
87
 
88
  def changeTransactionStatus(self, transactionId, status, description):
89
    """
90
    Parameters:
91
     - transactionId
92
     - status
93
     - description
94
    """
95
    pass
96
 
97
  def getOrderInfo(self, transactionId):
98
    """
99
    	Get and set individual objects in it
100
    *
101
 
102
    Parameters:
103
     - transactionId
104
    """
105
    pass
106
 
107
  def getShippingInfo(self, transactionId):
108
    """
109
    Parameters:
110
     - transactionId
111
    """
112
    pass
113
 
114
  def getBillingInfo(self, transactionId):
115
    """
116
    Parameters:
117
     - transactionId
118
    """
119
    pass
120
 
121
  def addBilling(self, tranactionId, billing):
122
    """
123
    Parameters:
124
     - tranactionId
125
     - billing
126
    """
127
    pass
128
 
129
  def setShippingTracker(self, transactionId, shippingId, trackingId, airwayBillNo, provider):
130
    """
131
    Parameters:
132
     - transactionId
133
     - shippingId
134
     - trackingId
135
     - airwayBillNo
136
     - provider
137
    """
138
    pass
139
 
140
  def setShippingDate(self, transactionId, shippingId, timestamp):
141
    """
142
    Parameters:
143
     - transactionId
144
     - shippingId
145
     - timestamp
146
    """
147
    pass
148
 
149
  def setDeliveryDate(self, transactionId, shippingid, timestamp):
150
    """
151
    Parameters:
152
     - transactionId
153
     - shippingid
154
     - timestamp
155
    """
156
    pass
157
 
158
  def changeShippingStatus(self, transactionId, shippingId, status, description):
159
    """
160
    Parameters:
161
     - transactionId
162
     - shippingId
163
     - status
164
     - description
165
    """
166
    pass
167
 
168
  def addTrail(self, transactionId, description):
169
    """
170
    Parameters:
171
     - transactionId
172
     - description
173
    """
174
    pass
175
 
176
 
177
class Client(Iface):
178
  def __init__(self, iprot, oprot=None):
179
    self._iprot = self._oprot = iprot
180
    if oprot != None:
181
      self._oprot = oprot
182
    self._seqid = 0
183
 
184
  def createTransaction(self, transaction):
185
    """
186
    Parameters:
187
     - transaction
188
    """
189
    self.send_createTransaction(transaction)
132 ashish 190
    return self.recv_createTransaction()
94 ashish 191
 
192
  def send_createTransaction(self, transaction):
193
    self._oprot.writeMessageBegin('createTransaction', TMessageType.CALL, self._seqid)
194
    args = createTransaction_args()
195
    args.transaction = transaction
196
    args.write(self._oprot)
197
    self._oprot.writeMessageEnd()
198
    self._oprot.trans.flush()
199
 
200
  def recv_createTransaction(self, ):
201
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
202
    if mtype == TMessageType.EXCEPTION:
203
      x = TApplicationException()
204
      x.read(self._iprot)
205
      self._iprot.readMessageEnd()
206
      raise x
207
    result = createTransaction_result()
208
    result.read(self._iprot)
209
    self._iprot.readMessageEnd()
132 ashish 210
    if result.success != None:
211
      return result.success
94 ashish 212
    if result.ex != None:
213
      raise result.ex
132 ashish 214
    raise TApplicationException(TApplicationException.MISSING_RESULT, "createTransaction failed: unknown result");
94 ashish 215
 
216
  def getTransaction(self, id):
217
    """
218
    	Get transaction methods.
219
    *
220
 
221
    Parameters:
222
     - id
223
    """
224
    self.send_getTransaction(id)
225
    return self.recv_getTransaction()
226
 
227
  def send_getTransaction(self, id):
228
    self._oprot.writeMessageBegin('getTransaction', TMessageType.CALL, self._seqid)
229
    args = getTransaction_args()
230
    args.id = id
231
    args.write(self._oprot)
232
    self._oprot.writeMessageEnd()
233
    self._oprot.trans.flush()
234
 
235
  def recv_getTransaction(self, ):
236
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
237
    if mtype == TMessageType.EXCEPTION:
238
      x = TApplicationException()
239
      x.read(self._iprot)
240
      self._iprot.readMessageEnd()
241
      raise x
242
    result = getTransaction_result()
243
    result.read(self._iprot)
244
    self._iprot.readMessageEnd()
245
    if result.success != None:
246
      return result.success
247
    if result.ex != None:
248
      raise result.ex
249
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getTransaction failed: unknown result");
250
 
251
  def getAllTransactions(self, status, from_date, to_date):
252
    """
253
    Parameters:
254
     - status
255
     - from_date
256
     - to_date
257
    """
258
    self.send_getAllTransactions(status, from_date, to_date)
259
    return self.recv_getAllTransactions()
260
 
261
  def send_getAllTransactions(self, status, from_date, to_date):
262
    self._oprot.writeMessageBegin('getAllTransactions', TMessageType.CALL, self._seqid)
263
    args = getAllTransactions_args()
264
    args.status = status
265
    args.from_date = from_date
266
    args.to_date = to_date
267
    args.write(self._oprot)
268
    self._oprot.writeMessageEnd()
269
    self._oprot.trans.flush()
270
 
271
  def recv_getAllTransactions(self, ):
272
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
273
    if mtype == TMessageType.EXCEPTION:
274
      x = TApplicationException()
275
      x.read(self._iprot)
276
      self._iprot.readMessageEnd()
277
      raise x
278
    result = getAllTransactions_result()
279
    result.read(self._iprot)
280
    self._iprot.readMessageEnd()
281
    if result.success != None:
282
      return result.success
283
    if result.ex != None:
284
      raise result.ex
285
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getAllTransactions failed: unknown result");
286
 
287
  def getTransactionsForShipmentStatus(self, status, from_date, to_date):
288
    """
289
    Parameters:
290
     - status
291
     - from_date
292
     - to_date
293
    """
294
    self.send_getTransactionsForShipmentStatus(status, from_date, to_date)
295
    return self.recv_getTransactionsForShipmentStatus()
296
 
297
  def send_getTransactionsForShipmentStatus(self, status, from_date, to_date):
298
    self._oprot.writeMessageBegin('getTransactionsForShipmentStatus', TMessageType.CALL, self._seqid)
299
    args = getTransactionsForShipmentStatus_args()
300
    args.status = status
301
    args.from_date = from_date
302
    args.to_date = to_date
303
    args.write(self._oprot)
304
    self._oprot.writeMessageEnd()
305
    self._oprot.trans.flush()
306
 
307
  def recv_getTransactionsForShipmentStatus(self, ):
308
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
309
    if mtype == TMessageType.EXCEPTION:
310
      x = TApplicationException()
311
      x.read(self._iprot)
312
      self._iprot.readMessageEnd()
313
      raise x
314
    result = getTransactionsForShipmentStatus_result()
315
    result.read(self._iprot)
316
    self._iprot.readMessageEnd()
317
    if result.success != None:
318
      return result.success
319
    if result.ex != None:
320
      raise result.ex
321
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getTransactionsForShipmentStatus failed: unknown result");
322
 
323
  def getTransactionsForCustomer(self, customerId, from_date, to_date, status):
324
    """
325
    Parameters:
326
     - customerId
327
     - from_date
328
     - to_date
329
     - status
330
    """
331
    self.send_getTransactionsForCustomer(customerId, from_date, to_date, status)
332
    return self.recv_getTransactionsForCustomer()
333
 
334
  def send_getTransactionsForCustomer(self, customerId, from_date, to_date, status):
335
    self._oprot.writeMessageBegin('getTransactionsForCustomer', TMessageType.CALL, self._seqid)
336
    args = getTransactionsForCustomer_args()
337
    args.customerId = customerId
338
    args.from_date = from_date
339
    args.to_date = to_date
340
    args.status = status
341
    args.write(self._oprot)
342
    self._oprot.writeMessageEnd()
343
    self._oprot.trans.flush()
344
 
345
  def recv_getTransactionsForCustomer(self, ):
346
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
347
    if mtype == TMessageType.EXCEPTION:
348
      x = TApplicationException()
349
      x.read(self._iprot)
350
      self._iprot.readMessageEnd()
351
      raise x
352
    result = getTransactionsForCustomer_result()
353
    result.read(self._iprot)
354
    self._iprot.readMessageEnd()
355
    if result.success != None:
356
      return result.success
357
    if result.ex != None:
358
      raise result.ex
359
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getTransactionsForCustomer failed: unknown result");
360
 
361
  def getTransactionsForCustomerAndShipmentStatus(self, customerId, from_date, to_date, status):
362
    """
363
    Parameters:
364
     - customerId
365
     - from_date
366
     - to_date
367
     - status
368
    """
369
    self.send_getTransactionsForCustomerAndShipmentStatus(customerId, from_date, to_date, status)
370
    return self.recv_getTransactionsForCustomerAndShipmentStatus()
371
 
372
  def send_getTransactionsForCustomerAndShipmentStatus(self, customerId, from_date, to_date, status):
373
    self._oprot.writeMessageBegin('getTransactionsForCustomerAndShipmentStatus', TMessageType.CALL, self._seqid)
374
    args = getTransactionsForCustomerAndShipmentStatus_args()
375
    args.customerId = customerId
376
    args.from_date = from_date
377
    args.to_date = to_date
378
    args.status = status
379
    args.write(self._oprot)
380
    self._oprot.writeMessageEnd()
381
    self._oprot.trans.flush()
382
 
383
  def recv_getTransactionsForCustomerAndShipmentStatus(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 = getTransactionsForCustomerAndShipmentStatus_result()
391
    result.read(self._iprot)
392
    self._iprot.readMessageEnd()
393
    if result.success != None:
394
      return result.success
395
    if result.ex != None:
396
      raise result.ex
397
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getTransactionsForCustomerAndShipmentStatus failed: unknown result");
398
 
132 ashish 399
  def getTransactionsForShoppingCartId(self, shoppingCartId):
400
    """
401
    Parameters:
402
     - shoppingCartId
403
    """
404
    self.send_getTransactionsForShoppingCartId(shoppingCartId)
405
    return self.recv_getTransactionsForShoppingCartId()
406
 
407
  def send_getTransactionsForShoppingCartId(self, shoppingCartId):
408
    self._oprot.writeMessageBegin('getTransactionsForShoppingCartId', TMessageType.CALL, self._seqid)
409
    args = getTransactionsForShoppingCartId_args()
410
    args.shoppingCartId = shoppingCartId
411
    args.write(self._oprot)
412
    self._oprot.writeMessageEnd()
413
    self._oprot.trans.flush()
414
 
415
  def recv_getTransactionsForShoppingCartId(self, ):
416
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
417
    if mtype == TMessageType.EXCEPTION:
418
      x = TApplicationException()
419
      x.read(self._iprot)
420
      self._iprot.readMessageEnd()
421
      raise x
422
    result = getTransactionsForShoppingCartId_result()
423
    result.read(self._iprot)
424
    self._iprot.readMessageEnd()
425
    if result.success != None:
426
      return result.success
427
    if result.ex != None:
428
      raise result.ex
429
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getTransactionsForShoppingCartId failed: unknown result");
430
 
94 ashish 431
  def getTransactionStatus(self, transactionId):
432
    """
433
    Parameters:
434
     - transactionId
435
    """
436
    self.send_getTransactionStatus(transactionId)
437
    return self.recv_getTransactionStatus()
438
 
439
  def send_getTransactionStatus(self, transactionId):
440
    self._oprot.writeMessageBegin('getTransactionStatus', TMessageType.CALL, self._seqid)
441
    args = getTransactionStatus_args()
442
    args.transactionId = transactionId
443
    args.write(self._oprot)
444
    self._oprot.writeMessageEnd()
445
    self._oprot.trans.flush()
446
 
447
  def recv_getTransactionStatus(self, ):
448
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
449
    if mtype == TMessageType.EXCEPTION:
450
      x = TApplicationException()
451
      x.read(self._iprot)
452
      self._iprot.readMessageEnd()
453
      raise x
454
    result = getTransactionStatus_result()
455
    result.read(self._iprot)
456
    self._iprot.readMessageEnd()
457
    if result.success != None:
458
      return result.success
459
    if result.ex != None:
460
      raise result.ex
461
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getTransactionStatus failed: unknown result");
462
 
463
  def changeTransactionStatus(self, transactionId, status, description):
464
    """
465
    Parameters:
466
     - transactionId
467
     - status
468
     - description
469
    """
470
    self.send_changeTransactionStatus(transactionId, status, description)
471
    return self.recv_changeTransactionStatus()
472
 
473
  def send_changeTransactionStatus(self, transactionId, status, description):
474
    self._oprot.writeMessageBegin('changeTransactionStatus', TMessageType.CALL, self._seqid)
475
    args = changeTransactionStatus_args()
476
    args.transactionId = transactionId
477
    args.status = status
478
    args.description = description
479
    args.write(self._oprot)
480
    self._oprot.writeMessageEnd()
481
    self._oprot.trans.flush()
482
 
483
  def recv_changeTransactionStatus(self, ):
484
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
485
    if mtype == TMessageType.EXCEPTION:
486
      x = TApplicationException()
487
      x.read(self._iprot)
488
      self._iprot.readMessageEnd()
489
      raise x
490
    result = changeTransactionStatus_result()
491
    result.read(self._iprot)
492
    self._iprot.readMessageEnd()
493
    if result.success != None:
494
      return result.success
495
    if result.ex != None:
496
      raise result.ex
497
    raise TApplicationException(TApplicationException.MISSING_RESULT, "changeTransactionStatus failed: unknown result");
498
 
499
  def getOrderInfo(self, transactionId):
500
    """
501
    	Get and set individual objects in it
502
    *
503
 
504
    Parameters:
505
     - transactionId
506
    """
507
    self.send_getOrderInfo(transactionId)
508
    return self.recv_getOrderInfo()
509
 
510
  def send_getOrderInfo(self, transactionId):
511
    self._oprot.writeMessageBegin('getOrderInfo', TMessageType.CALL, self._seqid)
512
    args = getOrderInfo_args()
513
    args.transactionId = transactionId
514
    args.write(self._oprot)
515
    self._oprot.writeMessageEnd()
516
    self._oprot.trans.flush()
517
 
518
  def recv_getOrderInfo(self, ):
519
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
520
    if mtype == TMessageType.EXCEPTION:
521
      x = TApplicationException()
522
      x.read(self._iprot)
523
      self._iprot.readMessageEnd()
524
      raise x
525
    result = getOrderInfo_result()
526
    result.read(self._iprot)
527
    self._iprot.readMessageEnd()
528
    if result.success != None:
529
      return result.success
530
    if result.ex != None:
531
      raise result.ex
532
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getOrderInfo failed: unknown result");
533
 
534
  def getShippingInfo(self, transactionId):
535
    """
536
    Parameters:
537
     - transactionId
538
    """
539
    self.send_getShippingInfo(transactionId)
540
    return self.recv_getShippingInfo()
541
 
542
  def send_getShippingInfo(self, transactionId):
543
    self._oprot.writeMessageBegin('getShippingInfo', TMessageType.CALL, self._seqid)
544
    args = getShippingInfo_args()
545
    args.transactionId = transactionId
546
    args.write(self._oprot)
547
    self._oprot.writeMessageEnd()
548
    self._oprot.trans.flush()
549
 
550
  def recv_getShippingInfo(self, ):
551
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
552
    if mtype == TMessageType.EXCEPTION:
553
      x = TApplicationException()
554
      x.read(self._iprot)
555
      self._iprot.readMessageEnd()
556
      raise x
557
    result = getShippingInfo_result()
558
    result.read(self._iprot)
559
    self._iprot.readMessageEnd()
560
    if result.success != None:
561
      return result.success
562
    if result.ex != None:
563
      raise result.ex
564
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getShippingInfo failed: unknown result");
565
 
566
  def getBillingInfo(self, transactionId):
567
    """
568
    Parameters:
569
     - transactionId
570
    """
571
    self.send_getBillingInfo(transactionId)
572
    return self.recv_getBillingInfo()
573
 
574
  def send_getBillingInfo(self, transactionId):
575
    self._oprot.writeMessageBegin('getBillingInfo', TMessageType.CALL, self._seqid)
576
    args = getBillingInfo_args()
577
    args.transactionId = transactionId
578
    args.write(self._oprot)
579
    self._oprot.writeMessageEnd()
580
    self._oprot.trans.flush()
581
 
582
  def recv_getBillingInfo(self, ):
583
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
584
    if mtype == TMessageType.EXCEPTION:
585
      x = TApplicationException()
586
      x.read(self._iprot)
587
      self._iprot.readMessageEnd()
588
      raise x
589
    result = getBillingInfo_result()
590
    result.read(self._iprot)
591
    self._iprot.readMessageEnd()
592
    if result.success != None:
593
      return result.success
594
    if result.ex != None:
595
      raise result.ex
596
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getBillingInfo failed: unknown result");
597
 
598
  def addBilling(self, tranactionId, billing):
599
    """
600
    Parameters:
601
     - tranactionId
602
     - billing
603
    """
604
    self.send_addBilling(tranactionId, billing)
605
    return self.recv_addBilling()
606
 
607
  def send_addBilling(self, tranactionId, billing):
608
    self._oprot.writeMessageBegin('addBilling', TMessageType.CALL, self._seqid)
609
    args = addBilling_args()
610
    args.tranactionId = tranactionId
611
    args.billing = billing
612
    args.write(self._oprot)
613
    self._oprot.writeMessageEnd()
614
    self._oprot.trans.flush()
615
 
616
  def recv_addBilling(self, ):
617
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
618
    if mtype == TMessageType.EXCEPTION:
619
      x = TApplicationException()
620
      x.read(self._iprot)
621
      self._iprot.readMessageEnd()
622
      raise x
623
    result = addBilling_result()
624
    result.read(self._iprot)
625
    self._iprot.readMessageEnd()
626
    if result.success != None:
627
      return result.success
628
    if result.ex != None:
629
      raise result.ex
630
    raise TApplicationException(TApplicationException.MISSING_RESULT, "addBilling failed: unknown result");
631
 
632
  def setShippingTracker(self, transactionId, shippingId, trackingId, airwayBillNo, provider):
633
    """
634
    Parameters:
635
     - transactionId
636
     - shippingId
637
     - trackingId
638
     - airwayBillNo
639
     - provider
640
    """
641
    self.send_setShippingTracker(transactionId, shippingId, trackingId, airwayBillNo, provider)
642
    return self.recv_setShippingTracker()
643
 
644
  def send_setShippingTracker(self, transactionId, shippingId, trackingId, airwayBillNo, provider):
645
    self._oprot.writeMessageBegin('setShippingTracker', TMessageType.CALL, self._seqid)
646
    args = setShippingTracker_args()
647
    args.transactionId = transactionId
648
    args.shippingId = shippingId
649
    args.trackingId = trackingId
650
    args.airwayBillNo = airwayBillNo
651
    args.provider = provider
652
    args.write(self._oprot)
653
    self._oprot.writeMessageEnd()
654
    self._oprot.trans.flush()
655
 
656
  def recv_setShippingTracker(self, ):
657
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
658
    if mtype == TMessageType.EXCEPTION:
659
      x = TApplicationException()
660
      x.read(self._iprot)
661
      self._iprot.readMessageEnd()
662
      raise x
663
    result = setShippingTracker_result()
664
    result.read(self._iprot)
665
    self._iprot.readMessageEnd()
666
    if result.success != None:
667
      return result.success
668
    if result.ex != None:
669
      raise result.ex
670
    raise TApplicationException(TApplicationException.MISSING_RESULT, "setShippingTracker failed: unknown result");
671
 
672
  def setShippingDate(self, transactionId, shippingId, timestamp):
673
    """
674
    Parameters:
675
     - transactionId
676
     - shippingId
677
     - timestamp
678
    """
679
    self.send_setShippingDate(transactionId, shippingId, timestamp)
680
    return self.recv_setShippingDate()
681
 
682
  def send_setShippingDate(self, transactionId, shippingId, timestamp):
683
    self._oprot.writeMessageBegin('setShippingDate', TMessageType.CALL, self._seqid)
684
    args = setShippingDate_args()
685
    args.transactionId = transactionId
686
    args.shippingId = shippingId
687
    args.timestamp = timestamp
688
    args.write(self._oprot)
689
    self._oprot.writeMessageEnd()
690
    self._oprot.trans.flush()
691
 
692
  def recv_setShippingDate(self, ):
693
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
694
    if mtype == TMessageType.EXCEPTION:
695
      x = TApplicationException()
696
      x.read(self._iprot)
697
      self._iprot.readMessageEnd()
698
      raise x
699
    result = setShippingDate_result()
700
    result.read(self._iprot)
701
    self._iprot.readMessageEnd()
702
    if result.success != None:
703
      return result.success
704
    if result.ex != None:
705
      raise result.ex
706
    raise TApplicationException(TApplicationException.MISSING_RESULT, "setShippingDate failed: unknown result");
707
 
708
  def setDeliveryDate(self, transactionId, shippingid, timestamp):
709
    """
710
    Parameters:
711
     - transactionId
712
     - shippingid
713
     - timestamp
714
    """
715
    self.send_setDeliveryDate(transactionId, shippingid, timestamp)
716
    return self.recv_setDeliveryDate()
717
 
718
  def send_setDeliveryDate(self, transactionId, shippingid, timestamp):
719
    self._oprot.writeMessageBegin('setDeliveryDate', TMessageType.CALL, self._seqid)
720
    args = setDeliveryDate_args()
721
    args.transactionId = transactionId
722
    args.shippingid = shippingid
723
    args.timestamp = timestamp
724
    args.write(self._oprot)
725
    self._oprot.writeMessageEnd()
726
    self._oprot.trans.flush()
727
 
728
  def recv_setDeliveryDate(self, ):
729
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
730
    if mtype == TMessageType.EXCEPTION:
731
      x = TApplicationException()
732
      x.read(self._iprot)
733
      self._iprot.readMessageEnd()
734
      raise x
735
    result = setDeliveryDate_result()
736
    result.read(self._iprot)
737
    self._iprot.readMessageEnd()
738
    if result.success != None:
739
      return result.success
740
    if result.ex != None:
741
      raise result.ex
742
    raise TApplicationException(TApplicationException.MISSING_RESULT, "setDeliveryDate failed: unknown result");
743
 
744
  def changeShippingStatus(self, transactionId, shippingId, status, description):
745
    """
746
    Parameters:
747
     - transactionId
748
     - shippingId
749
     - status
750
     - description
751
    """
752
    self.send_changeShippingStatus(transactionId, shippingId, status, description)
753
    return self.recv_changeShippingStatus()
754
 
755
  def send_changeShippingStatus(self, transactionId, shippingId, status, description):
756
    self._oprot.writeMessageBegin('changeShippingStatus', TMessageType.CALL, self._seqid)
757
    args = changeShippingStatus_args()
758
    args.transactionId = transactionId
759
    args.shippingId = shippingId
760
    args.status = status
761
    args.description = description
762
    args.write(self._oprot)
763
    self._oprot.writeMessageEnd()
764
    self._oprot.trans.flush()
765
 
766
  def recv_changeShippingStatus(self, ):
767
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
768
    if mtype == TMessageType.EXCEPTION:
769
      x = TApplicationException()
770
      x.read(self._iprot)
771
      self._iprot.readMessageEnd()
772
      raise x
773
    result = changeShippingStatus_result()
774
    result.read(self._iprot)
775
    self._iprot.readMessageEnd()
776
    if result.success != None:
777
      return result.success
778
    if result.ex != None:
779
      raise result.ex
780
    raise TApplicationException(TApplicationException.MISSING_RESULT, "changeShippingStatus failed: unknown result");
781
 
782
  def addTrail(self, transactionId, description):
783
    """
784
    Parameters:
785
     - transactionId
786
     - description
787
    """
788
    self.send_addTrail(transactionId, description)
789
    return self.recv_addTrail()
790
 
791
  def send_addTrail(self, transactionId, description):
792
    self._oprot.writeMessageBegin('addTrail', TMessageType.CALL, self._seqid)
793
    args = addTrail_args()
794
    args.transactionId = transactionId
795
    args.description = description
796
    args.write(self._oprot)
797
    self._oprot.writeMessageEnd()
798
    self._oprot.trans.flush()
799
 
800
  def recv_addTrail(self, ):
801
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
802
    if mtype == TMessageType.EXCEPTION:
803
      x = TApplicationException()
804
      x.read(self._iprot)
805
      self._iprot.readMessageEnd()
806
      raise x
807
    result = addTrail_result()
808
    result.read(self._iprot)
809
    self._iprot.readMessageEnd()
810
    if result.success != None:
811
      return result.success
812
    if result.ex != None:
813
      raise result.ex
814
    raise TApplicationException(TApplicationException.MISSING_RESULT, "addTrail failed: unknown result");
815
 
816
 
817
class Processor(Iface, TProcessor):
818
  def __init__(self, handler):
819
    self._handler = handler
820
    self._processMap = {}
821
    self._processMap["createTransaction"] = Processor.process_createTransaction
822
    self._processMap["getTransaction"] = Processor.process_getTransaction
823
    self._processMap["getAllTransactions"] = Processor.process_getAllTransactions
824
    self._processMap["getTransactionsForShipmentStatus"] = Processor.process_getTransactionsForShipmentStatus
825
    self._processMap["getTransactionsForCustomer"] = Processor.process_getTransactionsForCustomer
826
    self._processMap["getTransactionsForCustomerAndShipmentStatus"] = Processor.process_getTransactionsForCustomerAndShipmentStatus
132 ashish 827
    self._processMap["getTransactionsForShoppingCartId"] = Processor.process_getTransactionsForShoppingCartId
94 ashish 828
    self._processMap["getTransactionStatus"] = Processor.process_getTransactionStatus
829
    self._processMap["changeTransactionStatus"] = Processor.process_changeTransactionStatus
830
    self._processMap["getOrderInfo"] = Processor.process_getOrderInfo
831
    self._processMap["getShippingInfo"] = Processor.process_getShippingInfo
832
    self._processMap["getBillingInfo"] = Processor.process_getBillingInfo
833
    self._processMap["addBilling"] = Processor.process_addBilling
834
    self._processMap["setShippingTracker"] = Processor.process_setShippingTracker
835
    self._processMap["setShippingDate"] = Processor.process_setShippingDate
836
    self._processMap["setDeliveryDate"] = Processor.process_setDeliveryDate
837
    self._processMap["changeShippingStatus"] = Processor.process_changeShippingStatus
838
    self._processMap["addTrail"] = Processor.process_addTrail
839
 
840
  def process(self, iprot, oprot):
841
    (name, type, seqid) = iprot.readMessageBegin()
842
    if name not in self._processMap:
843
      iprot.skip(TType.STRUCT)
844
      iprot.readMessageEnd()
845
      x = TApplicationException(TApplicationException.UNKNOWN_METHOD, 'Unknown function %s' % (name))
846
      oprot.writeMessageBegin(name, TMessageType.EXCEPTION, seqid)
847
      x.write(oprot)
848
      oprot.writeMessageEnd()
849
      oprot.trans.flush()
850
      return
851
    else:
852
      self._processMap[name](self, seqid, iprot, oprot)
853
    return True
854
 
855
  def process_createTransaction(self, seqid, iprot, oprot):
856
    args = createTransaction_args()
857
    args.read(iprot)
858
    iprot.readMessageEnd()
859
    result = createTransaction_result()
860
    try:
132 ashish 861
      result.success = self._handler.createTransaction(args.transaction)
94 ashish 862
    except TransactionServiceException, ex:
863
      result.ex = ex
864
    oprot.writeMessageBegin("createTransaction", TMessageType.REPLY, seqid)
865
    result.write(oprot)
866
    oprot.writeMessageEnd()
867
    oprot.trans.flush()
868
 
869
  def process_getTransaction(self, seqid, iprot, oprot):
870
    args = getTransaction_args()
871
    args.read(iprot)
872
    iprot.readMessageEnd()
873
    result = getTransaction_result()
874
    try:
875
      result.success = self._handler.getTransaction(args.id)
876
    except TransactionServiceException, ex:
877
      result.ex = ex
878
    oprot.writeMessageBegin("getTransaction", TMessageType.REPLY, seqid)
879
    result.write(oprot)
880
    oprot.writeMessageEnd()
881
    oprot.trans.flush()
882
 
883
  def process_getAllTransactions(self, seqid, iprot, oprot):
884
    args = getAllTransactions_args()
885
    args.read(iprot)
886
    iprot.readMessageEnd()
887
    result = getAllTransactions_result()
888
    try:
889
      result.success = self._handler.getAllTransactions(args.status, args.from_date, args.to_date)
890
    except TransactionServiceException, ex:
891
      result.ex = ex
892
    oprot.writeMessageBegin("getAllTransactions", TMessageType.REPLY, seqid)
893
    result.write(oprot)
894
    oprot.writeMessageEnd()
895
    oprot.trans.flush()
896
 
897
  def process_getTransactionsForShipmentStatus(self, seqid, iprot, oprot):
898
    args = getTransactionsForShipmentStatus_args()
899
    args.read(iprot)
900
    iprot.readMessageEnd()
901
    result = getTransactionsForShipmentStatus_result()
902
    try:
903
      result.success = self._handler.getTransactionsForShipmentStatus(args.status, args.from_date, args.to_date)
904
    except TransactionServiceException, ex:
905
      result.ex = ex
906
    oprot.writeMessageBegin("getTransactionsForShipmentStatus", TMessageType.REPLY, seqid)
907
    result.write(oprot)
908
    oprot.writeMessageEnd()
909
    oprot.trans.flush()
910
 
911
  def process_getTransactionsForCustomer(self, seqid, iprot, oprot):
912
    args = getTransactionsForCustomer_args()
913
    args.read(iprot)
914
    iprot.readMessageEnd()
915
    result = getTransactionsForCustomer_result()
916
    try:
917
      result.success = self._handler.getTransactionsForCustomer(args.customerId, args.from_date, args.to_date, args.status)
918
    except TransactionServiceException, ex:
919
      result.ex = ex
920
    oprot.writeMessageBegin("getTransactionsForCustomer", TMessageType.REPLY, seqid)
921
    result.write(oprot)
922
    oprot.writeMessageEnd()
923
    oprot.trans.flush()
924
 
925
  def process_getTransactionsForCustomerAndShipmentStatus(self, seqid, iprot, oprot):
926
    args = getTransactionsForCustomerAndShipmentStatus_args()
927
    args.read(iprot)
928
    iprot.readMessageEnd()
929
    result = getTransactionsForCustomerAndShipmentStatus_result()
930
    try:
931
      result.success = self._handler.getTransactionsForCustomerAndShipmentStatus(args.customerId, args.from_date, args.to_date, args.status)
932
    except TransactionServiceException, ex:
933
      result.ex = ex
934
    oprot.writeMessageBegin("getTransactionsForCustomerAndShipmentStatus", TMessageType.REPLY, seqid)
935
    result.write(oprot)
936
    oprot.writeMessageEnd()
937
    oprot.trans.flush()
938
 
132 ashish 939
  def process_getTransactionsForShoppingCartId(self, seqid, iprot, oprot):
940
    args = getTransactionsForShoppingCartId_args()
941
    args.read(iprot)
942
    iprot.readMessageEnd()
943
    result = getTransactionsForShoppingCartId_result()
944
    try:
945
      result.success = self._handler.getTransactionsForShoppingCartId(args.shoppingCartId)
946
    except TransactionServiceException, ex:
947
      result.ex = ex
948
    oprot.writeMessageBegin("getTransactionsForShoppingCartId", TMessageType.REPLY, seqid)
949
    result.write(oprot)
950
    oprot.writeMessageEnd()
951
    oprot.trans.flush()
952
 
94 ashish 953
  def process_getTransactionStatus(self, seqid, iprot, oprot):
954
    args = getTransactionStatus_args()
955
    args.read(iprot)
956
    iprot.readMessageEnd()
957
    result = getTransactionStatus_result()
958
    try:
959
      result.success = self._handler.getTransactionStatus(args.transactionId)
960
    except TransactionServiceException, ex:
961
      result.ex = ex
962
    oprot.writeMessageBegin("getTransactionStatus", TMessageType.REPLY, seqid)
963
    result.write(oprot)
964
    oprot.writeMessageEnd()
965
    oprot.trans.flush()
966
 
967
  def process_changeTransactionStatus(self, seqid, iprot, oprot):
968
    args = changeTransactionStatus_args()
969
    args.read(iprot)
970
    iprot.readMessageEnd()
971
    result = changeTransactionStatus_result()
972
    try:
973
      result.success = self._handler.changeTransactionStatus(args.transactionId, args.status, args.description)
974
    except TransactionServiceException, ex:
975
      result.ex = ex
976
    oprot.writeMessageBegin("changeTransactionStatus", TMessageType.REPLY, seqid)
977
    result.write(oprot)
978
    oprot.writeMessageEnd()
979
    oprot.trans.flush()
980
 
981
  def process_getOrderInfo(self, seqid, iprot, oprot):
982
    args = getOrderInfo_args()
983
    args.read(iprot)
984
    iprot.readMessageEnd()
985
    result = getOrderInfo_result()
986
    try:
987
      result.success = self._handler.getOrderInfo(args.transactionId)
988
    except TransactionServiceException, ex:
989
      result.ex = ex
990
    oprot.writeMessageBegin("getOrderInfo", TMessageType.REPLY, seqid)
991
    result.write(oprot)
992
    oprot.writeMessageEnd()
993
    oprot.trans.flush()
994
 
995
  def process_getShippingInfo(self, seqid, iprot, oprot):
996
    args = getShippingInfo_args()
997
    args.read(iprot)
998
    iprot.readMessageEnd()
999
    result = getShippingInfo_result()
1000
    try:
1001
      result.success = self._handler.getShippingInfo(args.transactionId)
1002
    except TransactionServiceException, ex:
1003
      result.ex = ex
1004
    oprot.writeMessageBegin("getShippingInfo", TMessageType.REPLY, seqid)
1005
    result.write(oprot)
1006
    oprot.writeMessageEnd()
1007
    oprot.trans.flush()
1008
 
1009
  def process_getBillingInfo(self, seqid, iprot, oprot):
1010
    args = getBillingInfo_args()
1011
    args.read(iprot)
1012
    iprot.readMessageEnd()
1013
    result = getBillingInfo_result()
1014
    try:
1015
      result.success = self._handler.getBillingInfo(args.transactionId)
1016
    except TransactionServiceException, ex:
1017
      result.ex = ex
1018
    oprot.writeMessageBegin("getBillingInfo", TMessageType.REPLY, seqid)
1019
    result.write(oprot)
1020
    oprot.writeMessageEnd()
1021
    oprot.trans.flush()
1022
 
1023
  def process_addBilling(self, seqid, iprot, oprot):
1024
    args = addBilling_args()
1025
    args.read(iprot)
1026
    iprot.readMessageEnd()
1027
    result = addBilling_result()
1028
    try:
1029
      result.success = self._handler.addBilling(args.tranactionId, args.billing)
1030
    except TransactionServiceException, ex:
1031
      result.ex = ex
1032
    oprot.writeMessageBegin("addBilling", TMessageType.REPLY, seqid)
1033
    result.write(oprot)
1034
    oprot.writeMessageEnd()
1035
    oprot.trans.flush()
1036
 
1037
  def process_setShippingTracker(self, seqid, iprot, oprot):
1038
    args = setShippingTracker_args()
1039
    args.read(iprot)
1040
    iprot.readMessageEnd()
1041
    result = setShippingTracker_result()
1042
    try:
1043
      result.success = self._handler.setShippingTracker(args.transactionId, args.shippingId, args.trackingId, args.airwayBillNo, args.provider)
1044
    except TransactionServiceException, ex:
1045
      result.ex = ex
1046
    oprot.writeMessageBegin("setShippingTracker", TMessageType.REPLY, seqid)
1047
    result.write(oprot)
1048
    oprot.writeMessageEnd()
1049
    oprot.trans.flush()
1050
 
1051
  def process_setShippingDate(self, seqid, iprot, oprot):
1052
    args = setShippingDate_args()
1053
    args.read(iprot)
1054
    iprot.readMessageEnd()
1055
    result = setShippingDate_result()
1056
    try:
1057
      result.success = self._handler.setShippingDate(args.transactionId, args.shippingId, args.timestamp)
1058
    except TransactionServiceException, ex:
1059
      result.ex = ex
1060
    oprot.writeMessageBegin("setShippingDate", TMessageType.REPLY, seqid)
1061
    result.write(oprot)
1062
    oprot.writeMessageEnd()
1063
    oprot.trans.flush()
1064
 
1065
  def process_setDeliveryDate(self, seqid, iprot, oprot):
1066
    args = setDeliveryDate_args()
1067
    args.read(iprot)
1068
    iprot.readMessageEnd()
1069
    result = setDeliveryDate_result()
1070
    try:
1071
      result.success = self._handler.setDeliveryDate(args.transactionId, args.shippingid, args.timestamp)
1072
    except TransactionServiceException, ex:
1073
      result.ex = ex
1074
    oprot.writeMessageBegin("setDeliveryDate", TMessageType.REPLY, seqid)
1075
    result.write(oprot)
1076
    oprot.writeMessageEnd()
1077
    oprot.trans.flush()
1078
 
1079
  def process_changeShippingStatus(self, seqid, iprot, oprot):
1080
    args = changeShippingStatus_args()
1081
    args.read(iprot)
1082
    iprot.readMessageEnd()
1083
    result = changeShippingStatus_result()
1084
    try:
1085
      result.success = self._handler.changeShippingStatus(args.transactionId, args.shippingId, args.status, args.description)
1086
    except TransactionServiceException, ex:
1087
      result.ex = ex
1088
    oprot.writeMessageBegin("changeShippingStatus", TMessageType.REPLY, seqid)
1089
    result.write(oprot)
1090
    oprot.writeMessageEnd()
1091
    oprot.trans.flush()
1092
 
1093
  def process_addTrail(self, seqid, iprot, oprot):
1094
    args = addTrail_args()
1095
    args.read(iprot)
1096
    iprot.readMessageEnd()
1097
    result = addTrail_result()
1098
    try:
1099
      result.success = self._handler.addTrail(args.transactionId, args.description)
1100
    except TransactionServiceException, ex:
1101
      result.ex = ex
1102
    oprot.writeMessageBegin("addTrail", TMessageType.REPLY, seqid)
1103
    result.write(oprot)
1104
    oprot.writeMessageEnd()
1105
    oprot.trans.flush()
1106
 
1107
 
1108
# HELPER FUNCTIONS AND STRUCTURES
1109
 
1110
class createTransaction_args:
1111
  """
1112
  Attributes:
1113
   - transaction
1114
  """
1115
 
1116
  thrift_spec = (
1117
    None, # 0
1118
    (1, TType.STRUCT, 'transaction', (Transaction, Transaction.thrift_spec), None, ), # 1
1119
  )
1120
 
1121
  def __init__(self, transaction=None,):
1122
    self.transaction = transaction
1123
 
1124
  def read(self, iprot):
1125
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1126
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1127
      return
1128
    iprot.readStructBegin()
1129
    while True:
1130
      (fname, ftype, fid) = iprot.readFieldBegin()
1131
      if ftype == TType.STOP:
1132
        break
1133
      if fid == 1:
1134
        if ftype == TType.STRUCT:
1135
          self.transaction = Transaction()
1136
          self.transaction.read(iprot)
1137
        else:
1138
          iprot.skip(ftype)
1139
      else:
1140
        iprot.skip(ftype)
1141
      iprot.readFieldEnd()
1142
    iprot.readStructEnd()
1143
 
1144
  def write(self, oprot):
1145
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1146
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1147
      return
1148
    oprot.writeStructBegin('createTransaction_args')
1149
    if self.transaction != None:
1150
      oprot.writeFieldBegin('transaction', TType.STRUCT, 1)
1151
      self.transaction.write(oprot)
1152
      oprot.writeFieldEnd()
1153
    oprot.writeFieldStop()
1154
    oprot.writeStructEnd()
1155
 
1156
  def __repr__(self):
1157
    L = ['%s=%r' % (key, value)
1158
      for key, value in self.__dict__.iteritems()]
1159
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1160
 
1161
  def __eq__(self, other):
1162
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1163
 
1164
  def __ne__(self, other):
1165
    return not (self == other)
1166
 
1167
class createTransaction_result:
1168
  """
1169
  Attributes:
132 ashish 1170
   - success
94 ashish 1171
   - ex
1172
  """
1173
 
1174
  thrift_spec = (
132 ashish 1175
    (0, TType.I64, 'success', None, None, ), # 0
94 ashish 1176
    (1, TType.STRUCT, 'ex', (TransactionServiceException, TransactionServiceException.thrift_spec), None, ), # 1
1177
  )
1178
 
132 ashish 1179
  def __init__(self, success=None, ex=None,):
1180
    self.success = success
94 ashish 1181
    self.ex = ex
1182
 
1183
  def read(self, iprot):
1184
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1185
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1186
      return
1187
    iprot.readStructBegin()
1188
    while True:
1189
      (fname, ftype, fid) = iprot.readFieldBegin()
1190
      if ftype == TType.STOP:
1191
        break
132 ashish 1192
      if fid == 0:
1193
        if ftype == TType.I64:
1194
          self.success = iprot.readI64();
1195
        else:
1196
          iprot.skip(ftype)
1197
      elif fid == 1:
94 ashish 1198
        if ftype == TType.STRUCT:
1199
          self.ex = TransactionServiceException()
1200
          self.ex.read(iprot)
1201
        else:
1202
          iprot.skip(ftype)
1203
      else:
1204
        iprot.skip(ftype)
1205
      iprot.readFieldEnd()
1206
    iprot.readStructEnd()
1207
 
1208
  def write(self, oprot):
1209
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1210
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1211
      return
1212
    oprot.writeStructBegin('createTransaction_result')
132 ashish 1213
    if self.success != None:
1214
      oprot.writeFieldBegin('success', TType.I64, 0)
1215
      oprot.writeI64(self.success)
1216
      oprot.writeFieldEnd()
94 ashish 1217
    if self.ex != None:
1218
      oprot.writeFieldBegin('ex', TType.STRUCT, 1)
1219
      self.ex.write(oprot)
1220
      oprot.writeFieldEnd()
1221
    oprot.writeFieldStop()
1222
    oprot.writeStructEnd()
1223
 
1224
  def __repr__(self):
1225
    L = ['%s=%r' % (key, value)
1226
      for key, value in self.__dict__.iteritems()]
1227
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1228
 
1229
  def __eq__(self, other):
1230
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1231
 
1232
  def __ne__(self, other):
1233
    return not (self == other)
1234
 
1235
class getTransaction_args:
1236
  """
1237
  Attributes:
1238
   - id
1239
  """
1240
 
1241
  thrift_spec = (
1242
    None, # 0
1243
    (1, TType.I64, 'id', None, None, ), # 1
1244
  )
1245
 
1246
  def __init__(self, id=None,):
1247
    self.id = id
1248
 
1249
  def read(self, iprot):
1250
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1251
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1252
      return
1253
    iprot.readStructBegin()
1254
    while True:
1255
      (fname, ftype, fid) = iprot.readFieldBegin()
1256
      if ftype == TType.STOP:
1257
        break
1258
      if fid == 1:
1259
        if ftype == TType.I64:
1260
          self.id = iprot.readI64();
1261
        else:
1262
          iprot.skip(ftype)
1263
      else:
1264
        iprot.skip(ftype)
1265
      iprot.readFieldEnd()
1266
    iprot.readStructEnd()
1267
 
1268
  def write(self, oprot):
1269
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1270
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1271
      return
1272
    oprot.writeStructBegin('getTransaction_args')
1273
    if self.id != None:
1274
      oprot.writeFieldBegin('id', TType.I64, 1)
1275
      oprot.writeI64(self.id)
1276
      oprot.writeFieldEnd()
1277
    oprot.writeFieldStop()
1278
    oprot.writeStructEnd()
1279
 
1280
  def __repr__(self):
1281
    L = ['%s=%r' % (key, value)
1282
      for key, value in self.__dict__.iteritems()]
1283
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1284
 
1285
  def __eq__(self, other):
1286
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1287
 
1288
  def __ne__(self, other):
1289
    return not (self == other)
1290
 
1291
class getTransaction_result:
1292
  """
1293
  Attributes:
1294
   - success
1295
   - ex
1296
  """
1297
 
1298
  thrift_spec = (
1299
    (0, TType.STRUCT, 'success', (Transaction, Transaction.thrift_spec), None, ), # 0
1300
    (1, TType.STRUCT, 'ex', (TransactionServiceException, TransactionServiceException.thrift_spec), None, ), # 1
1301
  )
1302
 
1303
  def __init__(self, success=None, ex=None,):
1304
    self.success = success
1305
    self.ex = ex
1306
 
1307
  def read(self, iprot):
1308
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1309
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1310
      return
1311
    iprot.readStructBegin()
1312
    while True:
1313
      (fname, ftype, fid) = iprot.readFieldBegin()
1314
      if ftype == TType.STOP:
1315
        break
1316
      if fid == 0:
1317
        if ftype == TType.STRUCT:
1318
          self.success = Transaction()
1319
          self.success.read(iprot)
1320
        else:
1321
          iprot.skip(ftype)
1322
      elif fid == 1:
1323
        if ftype == TType.STRUCT:
1324
          self.ex = TransactionServiceException()
1325
          self.ex.read(iprot)
1326
        else:
1327
          iprot.skip(ftype)
1328
      else:
1329
        iprot.skip(ftype)
1330
      iprot.readFieldEnd()
1331
    iprot.readStructEnd()
1332
 
1333
  def write(self, oprot):
1334
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1335
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1336
      return
1337
    oprot.writeStructBegin('getTransaction_result')
1338
    if self.success != None:
1339
      oprot.writeFieldBegin('success', TType.STRUCT, 0)
1340
      self.success.write(oprot)
1341
      oprot.writeFieldEnd()
1342
    if self.ex != None:
1343
      oprot.writeFieldBegin('ex', TType.STRUCT, 1)
1344
      self.ex.write(oprot)
1345
      oprot.writeFieldEnd()
1346
    oprot.writeFieldStop()
1347
    oprot.writeStructEnd()
1348
 
1349
  def __repr__(self):
1350
    L = ['%s=%r' % (key, value)
1351
      for key, value in self.__dict__.iteritems()]
1352
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1353
 
1354
  def __eq__(self, other):
1355
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1356
 
1357
  def __ne__(self, other):
1358
    return not (self == other)
1359
 
1360
class getAllTransactions_args:
1361
  """
1362
  Attributes:
1363
   - status
1364
   - from_date
1365
   - to_date
1366
  """
1367
 
1368
  thrift_spec = (
1369
    None, # 0
1370
    (1, TType.I32, 'status', None, None, ), # 1
1371
    (2, TType.I64, 'from_date', None, None, ), # 2
1372
    (3, TType.I64, 'to_date', None, None, ), # 3
1373
  )
1374
 
1375
  def __init__(self, status=None, from_date=None, to_date=None,):
1376
    self.status = status
1377
    self.from_date = from_date
1378
    self.to_date = to_date
1379
 
1380
  def read(self, iprot):
1381
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1382
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1383
      return
1384
    iprot.readStructBegin()
1385
    while True:
1386
      (fname, ftype, fid) = iprot.readFieldBegin()
1387
      if ftype == TType.STOP:
1388
        break
1389
      if fid == 1:
1390
        if ftype == TType.I32:
1391
          self.status = iprot.readI32();
1392
        else:
1393
          iprot.skip(ftype)
1394
      elif fid == 2:
1395
        if ftype == TType.I64:
1396
          self.from_date = iprot.readI64();
1397
        else:
1398
          iprot.skip(ftype)
1399
      elif fid == 3:
1400
        if ftype == TType.I64:
1401
          self.to_date = iprot.readI64();
1402
        else:
1403
          iprot.skip(ftype)
1404
      else:
1405
        iprot.skip(ftype)
1406
      iprot.readFieldEnd()
1407
    iprot.readStructEnd()
1408
 
1409
  def write(self, oprot):
1410
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1411
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1412
      return
1413
    oprot.writeStructBegin('getAllTransactions_args')
1414
    if self.status != None:
1415
      oprot.writeFieldBegin('status', TType.I32, 1)
1416
      oprot.writeI32(self.status)
1417
      oprot.writeFieldEnd()
1418
    if self.from_date != None:
1419
      oprot.writeFieldBegin('from_date', TType.I64, 2)
1420
      oprot.writeI64(self.from_date)
1421
      oprot.writeFieldEnd()
1422
    if self.to_date != None:
1423
      oprot.writeFieldBegin('to_date', TType.I64, 3)
1424
      oprot.writeI64(self.to_date)
1425
      oprot.writeFieldEnd()
1426
    oprot.writeFieldStop()
1427
    oprot.writeStructEnd()
1428
 
1429
  def __repr__(self):
1430
    L = ['%s=%r' % (key, value)
1431
      for key, value in self.__dict__.iteritems()]
1432
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1433
 
1434
  def __eq__(self, other):
1435
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1436
 
1437
  def __ne__(self, other):
1438
    return not (self == other)
1439
 
1440
class getAllTransactions_result:
1441
  """
1442
  Attributes:
1443
   - success
1444
   - ex
1445
  """
1446
 
1447
  thrift_spec = (
1448
    (0, TType.LIST, 'success', (TType.STRUCT,(Transaction, Transaction.thrift_spec)), None, ), # 0
1449
    (1, TType.STRUCT, 'ex', (TransactionServiceException, TransactionServiceException.thrift_spec), None, ), # 1
1450
  )
1451
 
1452
  def __init__(self, success=None, ex=None,):
1453
    self.success = success
1454
    self.ex = ex
1455
 
1456
  def read(self, iprot):
1457
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1458
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1459
      return
1460
    iprot.readStructBegin()
1461
    while True:
1462
      (fname, ftype, fid) = iprot.readFieldBegin()
1463
      if ftype == TType.STOP:
1464
        break
1465
      if fid == 0:
1466
        if ftype == TType.LIST:
1467
          self.success = []
132 ashish 1468
          (_etype56, _size53) = iprot.readListBegin()
1469
          for _i57 in xrange(_size53):
1470
            _elem58 = Transaction()
1471
            _elem58.read(iprot)
1472
            self.success.append(_elem58)
94 ashish 1473
          iprot.readListEnd()
1474
        else:
1475
          iprot.skip(ftype)
1476
      elif fid == 1:
1477
        if ftype == TType.STRUCT:
1478
          self.ex = TransactionServiceException()
1479
          self.ex.read(iprot)
1480
        else:
1481
          iprot.skip(ftype)
1482
      else:
1483
        iprot.skip(ftype)
1484
      iprot.readFieldEnd()
1485
    iprot.readStructEnd()
1486
 
1487
  def write(self, oprot):
1488
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1489
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1490
      return
1491
    oprot.writeStructBegin('getAllTransactions_result')
1492
    if self.success != None:
1493
      oprot.writeFieldBegin('success', TType.LIST, 0)
1494
      oprot.writeListBegin(TType.STRUCT, len(self.success))
132 ashish 1495
      for iter59 in self.success:
1496
        iter59.write(oprot)
94 ashish 1497
      oprot.writeListEnd()
1498
      oprot.writeFieldEnd()
1499
    if self.ex != None:
1500
      oprot.writeFieldBegin('ex', TType.STRUCT, 1)
1501
      self.ex.write(oprot)
1502
      oprot.writeFieldEnd()
1503
    oprot.writeFieldStop()
1504
    oprot.writeStructEnd()
1505
 
1506
  def __repr__(self):
1507
    L = ['%s=%r' % (key, value)
1508
      for key, value in self.__dict__.iteritems()]
1509
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1510
 
1511
  def __eq__(self, other):
1512
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1513
 
1514
  def __ne__(self, other):
1515
    return not (self == other)
1516
 
1517
class getTransactionsForShipmentStatus_args:
1518
  """
1519
  Attributes:
1520
   - status
1521
   - from_date
1522
   - to_date
1523
  """
1524
 
1525
  thrift_spec = (
1526
    None, # 0
1527
    (1, TType.I32, 'status', None, None, ), # 1
1528
    (2, TType.I64, 'from_date', None, None, ), # 2
1529
    (3, TType.I64, 'to_date', None, None, ), # 3
1530
  )
1531
 
1532
  def __init__(self, status=None, from_date=None, to_date=None,):
1533
    self.status = status
1534
    self.from_date = from_date
1535
    self.to_date = to_date
1536
 
1537
  def read(self, iprot):
1538
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1539
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1540
      return
1541
    iprot.readStructBegin()
1542
    while True:
1543
      (fname, ftype, fid) = iprot.readFieldBegin()
1544
      if ftype == TType.STOP:
1545
        break
1546
      if fid == 1:
1547
        if ftype == TType.I32:
1548
          self.status = iprot.readI32();
1549
        else:
1550
          iprot.skip(ftype)
1551
      elif fid == 2:
1552
        if ftype == TType.I64:
1553
          self.from_date = iprot.readI64();
1554
        else:
1555
          iprot.skip(ftype)
1556
      elif fid == 3:
1557
        if ftype == TType.I64:
1558
          self.to_date = iprot.readI64();
1559
        else:
1560
          iprot.skip(ftype)
1561
      else:
1562
        iprot.skip(ftype)
1563
      iprot.readFieldEnd()
1564
    iprot.readStructEnd()
1565
 
1566
  def write(self, oprot):
1567
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1568
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1569
      return
1570
    oprot.writeStructBegin('getTransactionsForShipmentStatus_args')
1571
    if self.status != None:
1572
      oprot.writeFieldBegin('status', TType.I32, 1)
1573
      oprot.writeI32(self.status)
1574
      oprot.writeFieldEnd()
1575
    if self.from_date != None:
1576
      oprot.writeFieldBegin('from_date', TType.I64, 2)
1577
      oprot.writeI64(self.from_date)
1578
      oprot.writeFieldEnd()
1579
    if self.to_date != None:
1580
      oprot.writeFieldBegin('to_date', TType.I64, 3)
1581
      oprot.writeI64(self.to_date)
1582
      oprot.writeFieldEnd()
1583
    oprot.writeFieldStop()
1584
    oprot.writeStructEnd()
1585
 
1586
  def __repr__(self):
1587
    L = ['%s=%r' % (key, value)
1588
      for key, value in self.__dict__.iteritems()]
1589
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1590
 
1591
  def __eq__(self, other):
1592
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1593
 
1594
  def __ne__(self, other):
1595
    return not (self == other)
1596
 
1597
class getTransactionsForShipmentStatus_result:
1598
  """
1599
  Attributes:
1600
   - success
1601
   - ex
1602
  """
1603
 
1604
  thrift_spec = (
1605
    (0, TType.LIST, 'success', (TType.STRUCT,(Transaction, Transaction.thrift_spec)), None, ), # 0
1606
    (1, TType.STRUCT, 'ex', (TransactionServiceException, TransactionServiceException.thrift_spec), None, ), # 1
1607
  )
1608
 
1609
  def __init__(self, success=None, ex=None,):
1610
    self.success = success
1611
    self.ex = ex
1612
 
1613
  def read(self, iprot):
1614
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1615
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1616
      return
1617
    iprot.readStructBegin()
1618
    while True:
1619
      (fname, ftype, fid) = iprot.readFieldBegin()
1620
      if ftype == TType.STOP:
1621
        break
1622
      if fid == 0:
1623
        if ftype == TType.LIST:
1624
          self.success = []
132 ashish 1625
          (_etype63, _size60) = iprot.readListBegin()
1626
          for _i64 in xrange(_size60):
1627
            _elem65 = Transaction()
1628
            _elem65.read(iprot)
1629
            self.success.append(_elem65)
94 ashish 1630
          iprot.readListEnd()
1631
        else:
1632
          iprot.skip(ftype)
1633
      elif fid == 1:
1634
        if ftype == TType.STRUCT:
1635
          self.ex = TransactionServiceException()
1636
          self.ex.read(iprot)
1637
        else:
1638
          iprot.skip(ftype)
1639
      else:
1640
        iprot.skip(ftype)
1641
      iprot.readFieldEnd()
1642
    iprot.readStructEnd()
1643
 
1644
  def write(self, oprot):
1645
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1646
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1647
      return
1648
    oprot.writeStructBegin('getTransactionsForShipmentStatus_result')
1649
    if self.success != None:
1650
      oprot.writeFieldBegin('success', TType.LIST, 0)
1651
      oprot.writeListBegin(TType.STRUCT, len(self.success))
132 ashish 1652
      for iter66 in self.success:
1653
        iter66.write(oprot)
94 ashish 1654
      oprot.writeListEnd()
1655
      oprot.writeFieldEnd()
1656
    if self.ex != None:
1657
      oprot.writeFieldBegin('ex', TType.STRUCT, 1)
1658
      self.ex.write(oprot)
1659
      oprot.writeFieldEnd()
1660
    oprot.writeFieldStop()
1661
    oprot.writeStructEnd()
1662
 
1663
  def __repr__(self):
1664
    L = ['%s=%r' % (key, value)
1665
      for key, value in self.__dict__.iteritems()]
1666
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1667
 
1668
  def __eq__(self, other):
1669
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1670
 
1671
  def __ne__(self, other):
1672
    return not (self == other)
1673
 
1674
class getTransactionsForCustomer_args:
1675
  """
1676
  Attributes:
1677
   - customerId
1678
   - from_date
1679
   - to_date
1680
   - status
1681
  """
1682
 
1683
  thrift_spec = (
1684
    None, # 0
1685
    (1, TType.I64, 'customerId', None, None, ), # 1
1686
    (2, TType.I64, 'from_date', None, None, ), # 2
1687
    (3, TType.I64, 'to_date', None, None, ), # 3
1688
    (4, TType.I32, 'status', None, None, ), # 4
1689
  )
1690
 
1691
  def __init__(self, customerId=None, from_date=None, to_date=None, status=None,):
1692
    self.customerId = customerId
1693
    self.from_date = from_date
1694
    self.to_date = to_date
1695
    self.status = status
1696
 
1697
  def read(self, iprot):
1698
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1699
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1700
      return
1701
    iprot.readStructBegin()
1702
    while True:
1703
      (fname, ftype, fid) = iprot.readFieldBegin()
1704
      if ftype == TType.STOP:
1705
        break
1706
      if fid == 1:
1707
        if ftype == TType.I64:
1708
          self.customerId = iprot.readI64();
1709
        else:
1710
          iprot.skip(ftype)
1711
      elif fid == 2:
1712
        if ftype == TType.I64:
1713
          self.from_date = iprot.readI64();
1714
        else:
1715
          iprot.skip(ftype)
1716
      elif fid == 3:
1717
        if ftype == TType.I64:
1718
          self.to_date = iprot.readI64();
1719
        else:
1720
          iprot.skip(ftype)
1721
      elif fid == 4:
1722
        if ftype == TType.I32:
1723
          self.status = iprot.readI32();
1724
        else:
1725
          iprot.skip(ftype)
1726
      else:
1727
        iprot.skip(ftype)
1728
      iprot.readFieldEnd()
1729
    iprot.readStructEnd()
1730
 
1731
  def write(self, oprot):
1732
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1733
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1734
      return
1735
    oprot.writeStructBegin('getTransactionsForCustomer_args')
1736
    if self.customerId != None:
1737
      oprot.writeFieldBegin('customerId', TType.I64, 1)
1738
      oprot.writeI64(self.customerId)
1739
      oprot.writeFieldEnd()
1740
    if self.from_date != None:
1741
      oprot.writeFieldBegin('from_date', TType.I64, 2)
1742
      oprot.writeI64(self.from_date)
1743
      oprot.writeFieldEnd()
1744
    if self.to_date != None:
1745
      oprot.writeFieldBegin('to_date', TType.I64, 3)
1746
      oprot.writeI64(self.to_date)
1747
      oprot.writeFieldEnd()
1748
    if self.status != None:
1749
      oprot.writeFieldBegin('status', TType.I32, 4)
1750
      oprot.writeI32(self.status)
1751
      oprot.writeFieldEnd()
1752
    oprot.writeFieldStop()
1753
    oprot.writeStructEnd()
1754
 
1755
  def __repr__(self):
1756
    L = ['%s=%r' % (key, value)
1757
      for key, value in self.__dict__.iteritems()]
1758
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1759
 
1760
  def __eq__(self, other):
1761
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1762
 
1763
  def __ne__(self, other):
1764
    return not (self == other)
1765
 
1766
class getTransactionsForCustomer_result:
1767
  """
1768
  Attributes:
1769
   - success
1770
   - ex
1771
  """
1772
 
1773
  thrift_spec = (
1774
    (0, TType.LIST, 'success', (TType.STRUCT,(Transaction, Transaction.thrift_spec)), None, ), # 0
1775
    (1, TType.STRUCT, 'ex', (TransactionServiceException, TransactionServiceException.thrift_spec), None, ), # 1
1776
  )
1777
 
1778
  def __init__(self, success=None, ex=None,):
1779
    self.success = success
1780
    self.ex = ex
1781
 
1782
  def read(self, iprot):
1783
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1784
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1785
      return
1786
    iprot.readStructBegin()
1787
    while True:
1788
      (fname, ftype, fid) = iprot.readFieldBegin()
1789
      if ftype == TType.STOP:
1790
        break
1791
      if fid == 0:
1792
        if ftype == TType.LIST:
1793
          self.success = []
132 ashish 1794
          (_etype70, _size67) = iprot.readListBegin()
1795
          for _i71 in xrange(_size67):
1796
            _elem72 = Transaction()
1797
            _elem72.read(iprot)
1798
            self.success.append(_elem72)
94 ashish 1799
          iprot.readListEnd()
1800
        else:
1801
          iprot.skip(ftype)
1802
      elif fid == 1:
1803
        if ftype == TType.STRUCT:
1804
          self.ex = TransactionServiceException()
1805
          self.ex.read(iprot)
1806
        else:
1807
          iprot.skip(ftype)
1808
      else:
1809
        iprot.skip(ftype)
1810
      iprot.readFieldEnd()
1811
    iprot.readStructEnd()
1812
 
1813
  def write(self, oprot):
1814
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1815
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1816
      return
1817
    oprot.writeStructBegin('getTransactionsForCustomer_result')
1818
    if self.success != None:
1819
      oprot.writeFieldBegin('success', TType.LIST, 0)
1820
      oprot.writeListBegin(TType.STRUCT, len(self.success))
132 ashish 1821
      for iter73 in self.success:
1822
        iter73.write(oprot)
94 ashish 1823
      oprot.writeListEnd()
1824
      oprot.writeFieldEnd()
1825
    if self.ex != None:
1826
      oprot.writeFieldBegin('ex', TType.STRUCT, 1)
1827
      self.ex.write(oprot)
1828
      oprot.writeFieldEnd()
1829
    oprot.writeFieldStop()
1830
    oprot.writeStructEnd()
1831
 
1832
  def __repr__(self):
1833
    L = ['%s=%r' % (key, value)
1834
      for key, value in self.__dict__.iteritems()]
1835
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1836
 
1837
  def __eq__(self, other):
1838
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1839
 
1840
  def __ne__(self, other):
1841
    return not (self == other)
1842
 
1843
class getTransactionsForCustomerAndShipmentStatus_args:
1844
  """
1845
  Attributes:
1846
   - customerId
1847
   - from_date
1848
   - to_date
1849
   - status
1850
  """
1851
 
1852
  thrift_spec = (
1853
    None, # 0
1854
    (1, TType.I64, 'customerId', None, None, ), # 1
1855
    (2, TType.I64, 'from_date', None, None, ), # 2
1856
    (3, TType.I64, 'to_date', None, None, ), # 3
1857
    (4, TType.I32, 'status', None, None, ), # 4
1858
  )
1859
 
1860
  def __init__(self, customerId=None, from_date=None, to_date=None, status=None,):
1861
    self.customerId = customerId
1862
    self.from_date = from_date
1863
    self.to_date = to_date
1864
    self.status = status
1865
 
1866
  def read(self, iprot):
1867
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1868
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1869
      return
1870
    iprot.readStructBegin()
1871
    while True:
1872
      (fname, ftype, fid) = iprot.readFieldBegin()
1873
      if ftype == TType.STOP:
1874
        break
1875
      if fid == 1:
1876
        if ftype == TType.I64:
1877
          self.customerId = iprot.readI64();
1878
        else:
1879
          iprot.skip(ftype)
1880
      elif fid == 2:
1881
        if ftype == TType.I64:
1882
          self.from_date = iprot.readI64();
1883
        else:
1884
          iprot.skip(ftype)
1885
      elif fid == 3:
1886
        if ftype == TType.I64:
1887
          self.to_date = iprot.readI64();
1888
        else:
1889
          iprot.skip(ftype)
1890
      elif fid == 4:
1891
        if ftype == TType.I32:
1892
          self.status = iprot.readI32();
1893
        else:
1894
          iprot.skip(ftype)
1895
      else:
1896
        iprot.skip(ftype)
1897
      iprot.readFieldEnd()
1898
    iprot.readStructEnd()
1899
 
1900
  def write(self, oprot):
1901
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1902
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1903
      return
1904
    oprot.writeStructBegin('getTransactionsForCustomerAndShipmentStatus_args')
1905
    if self.customerId != None:
1906
      oprot.writeFieldBegin('customerId', TType.I64, 1)
1907
      oprot.writeI64(self.customerId)
1908
      oprot.writeFieldEnd()
1909
    if self.from_date != None:
1910
      oprot.writeFieldBegin('from_date', TType.I64, 2)
1911
      oprot.writeI64(self.from_date)
1912
      oprot.writeFieldEnd()
1913
    if self.to_date != None:
1914
      oprot.writeFieldBegin('to_date', TType.I64, 3)
1915
      oprot.writeI64(self.to_date)
1916
      oprot.writeFieldEnd()
1917
    if self.status != None:
1918
      oprot.writeFieldBegin('status', TType.I32, 4)
1919
      oprot.writeI32(self.status)
1920
      oprot.writeFieldEnd()
1921
    oprot.writeFieldStop()
1922
    oprot.writeStructEnd()
1923
 
1924
  def __repr__(self):
1925
    L = ['%s=%r' % (key, value)
1926
      for key, value in self.__dict__.iteritems()]
1927
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1928
 
1929
  def __eq__(self, other):
1930
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1931
 
1932
  def __ne__(self, other):
1933
    return not (self == other)
1934
 
1935
class getTransactionsForCustomerAndShipmentStatus_result:
1936
  """
1937
  Attributes:
1938
   - success
1939
   - ex
1940
  """
1941
 
1942
  thrift_spec = (
1943
    (0, TType.LIST, 'success', (TType.STRUCT,(Transaction, Transaction.thrift_spec)), None, ), # 0
1944
    (1, TType.STRUCT, 'ex', (TransactionServiceException, TransactionServiceException.thrift_spec), None, ), # 1
1945
  )
1946
 
1947
  def __init__(self, success=None, ex=None,):
1948
    self.success = success
1949
    self.ex = ex
1950
 
1951
  def read(self, iprot):
1952
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1953
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1954
      return
1955
    iprot.readStructBegin()
1956
    while True:
1957
      (fname, ftype, fid) = iprot.readFieldBegin()
1958
      if ftype == TType.STOP:
1959
        break
1960
      if fid == 0:
1961
        if ftype == TType.LIST:
1962
          self.success = []
132 ashish 1963
          (_etype77, _size74) = iprot.readListBegin()
1964
          for _i78 in xrange(_size74):
1965
            _elem79 = Transaction()
1966
            _elem79.read(iprot)
1967
            self.success.append(_elem79)
94 ashish 1968
          iprot.readListEnd()
1969
        else:
1970
          iprot.skip(ftype)
1971
      elif fid == 1:
1972
        if ftype == TType.STRUCT:
1973
          self.ex = TransactionServiceException()
1974
          self.ex.read(iprot)
1975
        else:
1976
          iprot.skip(ftype)
1977
      else:
1978
        iprot.skip(ftype)
1979
      iprot.readFieldEnd()
1980
    iprot.readStructEnd()
1981
 
1982
  def write(self, oprot):
1983
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1984
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1985
      return
1986
    oprot.writeStructBegin('getTransactionsForCustomerAndShipmentStatus_result')
1987
    if self.success != None:
1988
      oprot.writeFieldBegin('success', TType.LIST, 0)
1989
      oprot.writeListBegin(TType.STRUCT, len(self.success))
132 ashish 1990
      for iter80 in self.success:
1991
        iter80.write(oprot)
94 ashish 1992
      oprot.writeListEnd()
1993
      oprot.writeFieldEnd()
1994
    if self.ex != None:
1995
      oprot.writeFieldBegin('ex', TType.STRUCT, 1)
1996
      self.ex.write(oprot)
1997
      oprot.writeFieldEnd()
1998
    oprot.writeFieldStop()
1999
    oprot.writeStructEnd()
2000
 
2001
  def __repr__(self):
2002
    L = ['%s=%r' % (key, value)
2003
      for key, value in self.__dict__.iteritems()]
2004
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
2005
 
2006
  def __eq__(self, other):
2007
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
2008
 
2009
  def __ne__(self, other):
2010
    return not (self == other)
2011
 
132 ashish 2012
class getTransactionsForShoppingCartId_args:
2013
  """
2014
  Attributes:
2015
   - shoppingCartId
2016
  """
2017
 
2018
  thrift_spec = (
2019
    None, # 0
2020
    (1, TType.I64, 'shoppingCartId', None, None, ), # 1
2021
  )
2022
 
2023
  def __init__(self, shoppingCartId=None,):
2024
    self.shoppingCartId = shoppingCartId
2025
 
2026
  def read(self, iprot):
2027
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
2028
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
2029
      return
2030
    iprot.readStructBegin()
2031
    while True:
2032
      (fname, ftype, fid) = iprot.readFieldBegin()
2033
      if ftype == TType.STOP:
2034
        break
2035
      if fid == 1:
2036
        if ftype == TType.I64:
2037
          self.shoppingCartId = iprot.readI64();
2038
        else:
2039
          iprot.skip(ftype)
2040
      else:
2041
        iprot.skip(ftype)
2042
      iprot.readFieldEnd()
2043
    iprot.readStructEnd()
2044
 
2045
  def write(self, oprot):
2046
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
2047
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
2048
      return
2049
    oprot.writeStructBegin('getTransactionsForShoppingCartId_args')
2050
    if self.shoppingCartId != None:
2051
      oprot.writeFieldBegin('shoppingCartId', TType.I64, 1)
2052
      oprot.writeI64(self.shoppingCartId)
2053
      oprot.writeFieldEnd()
2054
    oprot.writeFieldStop()
2055
    oprot.writeStructEnd()
2056
 
2057
  def __repr__(self):
2058
    L = ['%s=%r' % (key, value)
2059
      for key, value in self.__dict__.iteritems()]
2060
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
2061
 
2062
  def __eq__(self, other):
2063
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
2064
 
2065
  def __ne__(self, other):
2066
    return not (self == other)
2067
 
2068
class getTransactionsForShoppingCartId_result:
2069
  """
2070
  Attributes:
2071
   - success
2072
   - ex
2073
  """
2074
 
2075
  thrift_spec = (
2076
    (0, TType.LIST, 'success', (TType.STRUCT,(Transaction, Transaction.thrift_spec)), None, ), # 0
2077
    (1, TType.STRUCT, 'ex', (TransactionServiceException, TransactionServiceException.thrift_spec), None, ), # 1
2078
  )
2079
 
2080
  def __init__(self, success=None, ex=None,):
2081
    self.success = success
2082
    self.ex = ex
2083
 
2084
  def read(self, iprot):
2085
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
2086
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
2087
      return
2088
    iprot.readStructBegin()
2089
    while True:
2090
      (fname, ftype, fid) = iprot.readFieldBegin()
2091
      if ftype == TType.STOP:
2092
        break
2093
      if fid == 0:
2094
        if ftype == TType.LIST:
2095
          self.success = []
2096
          (_etype84, _size81) = iprot.readListBegin()
2097
          for _i85 in xrange(_size81):
2098
            _elem86 = Transaction()
2099
            _elem86.read(iprot)
2100
            self.success.append(_elem86)
2101
          iprot.readListEnd()
2102
        else:
2103
          iprot.skip(ftype)
2104
      elif fid == 1:
2105
        if ftype == TType.STRUCT:
2106
          self.ex = TransactionServiceException()
2107
          self.ex.read(iprot)
2108
        else:
2109
          iprot.skip(ftype)
2110
      else:
2111
        iprot.skip(ftype)
2112
      iprot.readFieldEnd()
2113
    iprot.readStructEnd()
2114
 
2115
  def write(self, oprot):
2116
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
2117
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
2118
      return
2119
    oprot.writeStructBegin('getTransactionsForShoppingCartId_result')
2120
    if self.success != None:
2121
      oprot.writeFieldBegin('success', TType.LIST, 0)
2122
      oprot.writeListBegin(TType.STRUCT, len(self.success))
2123
      for iter87 in self.success:
2124
        iter87.write(oprot)
2125
      oprot.writeListEnd()
2126
      oprot.writeFieldEnd()
2127
    if self.ex != None:
2128
      oprot.writeFieldBegin('ex', TType.STRUCT, 1)
2129
      self.ex.write(oprot)
2130
      oprot.writeFieldEnd()
2131
    oprot.writeFieldStop()
2132
    oprot.writeStructEnd()
2133
 
2134
  def __repr__(self):
2135
    L = ['%s=%r' % (key, value)
2136
      for key, value in self.__dict__.iteritems()]
2137
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
2138
 
2139
  def __eq__(self, other):
2140
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
2141
 
2142
  def __ne__(self, other):
2143
    return not (self == other)
2144
 
94 ashish 2145
class getTransactionStatus_args:
2146
  """
2147
  Attributes:
2148
   - transactionId
2149
  """
2150
 
2151
  thrift_spec = (
2152
    None, # 0
2153
    (1, TType.I64, 'transactionId', None, None, ), # 1
2154
  )
2155
 
2156
  def __init__(self, transactionId=None,):
2157
    self.transactionId = transactionId
2158
 
2159
  def read(self, iprot):
2160
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
2161
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
2162
      return
2163
    iprot.readStructBegin()
2164
    while True:
2165
      (fname, ftype, fid) = iprot.readFieldBegin()
2166
      if ftype == TType.STOP:
2167
        break
2168
      if fid == 1:
2169
        if ftype == TType.I64:
2170
          self.transactionId = iprot.readI64();
2171
        else:
2172
          iprot.skip(ftype)
2173
      else:
2174
        iprot.skip(ftype)
2175
      iprot.readFieldEnd()
2176
    iprot.readStructEnd()
2177
 
2178
  def write(self, oprot):
2179
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
2180
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
2181
      return
2182
    oprot.writeStructBegin('getTransactionStatus_args')
2183
    if self.transactionId != None:
2184
      oprot.writeFieldBegin('transactionId', TType.I64, 1)
2185
      oprot.writeI64(self.transactionId)
2186
      oprot.writeFieldEnd()
2187
    oprot.writeFieldStop()
2188
    oprot.writeStructEnd()
2189
 
2190
  def __repr__(self):
2191
    L = ['%s=%r' % (key, value)
2192
      for key, value in self.__dict__.iteritems()]
2193
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
2194
 
2195
  def __eq__(self, other):
2196
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
2197
 
2198
  def __ne__(self, other):
2199
    return not (self == other)
2200
 
2201
class getTransactionStatus_result:
2202
  """
2203
  Attributes:
2204
   - success
2205
   - ex
2206
  """
2207
 
2208
  thrift_spec = (
2209
    (0, TType.I32, 'success', None, None, ), # 0
2210
    (1, TType.STRUCT, 'ex', (TransactionServiceException, TransactionServiceException.thrift_spec), None, ), # 1
2211
  )
2212
 
2213
  def __init__(self, success=None, ex=None,):
2214
    self.success = success
2215
    self.ex = ex
2216
 
2217
  def read(self, iprot):
2218
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
2219
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
2220
      return
2221
    iprot.readStructBegin()
2222
    while True:
2223
      (fname, ftype, fid) = iprot.readFieldBegin()
2224
      if ftype == TType.STOP:
2225
        break
2226
      if fid == 0:
2227
        if ftype == TType.I32:
2228
          self.success = iprot.readI32();
2229
        else:
2230
          iprot.skip(ftype)
2231
      elif fid == 1:
2232
        if ftype == TType.STRUCT:
2233
          self.ex = TransactionServiceException()
2234
          self.ex.read(iprot)
2235
        else:
2236
          iprot.skip(ftype)
2237
      else:
2238
        iprot.skip(ftype)
2239
      iprot.readFieldEnd()
2240
    iprot.readStructEnd()
2241
 
2242
  def write(self, oprot):
2243
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
2244
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
2245
      return
2246
    oprot.writeStructBegin('getTransactionStatus_result')
2247
    if self.success != None:
2248
      oprot.writeFieldBegin('success', TType.I32, 0)
2249
      oprot.writeI32(self.success)
2250
      oprot.writeFieldEnd()
2251
    if self.ex != None:
2252
      oprot.writeFieldBegin('ex', TType.STRUCT, 1)
2253
      self.ex.write(oprot)
2254
      oprot.writeFieldEnd()
2255
    oprot.writeFieldStop()
2256
    oprot.writeStructEnd()
2257
 
2258
  def __repr__(self):
2259
    L = ['%s=%r' % (key, value)
2260
      for key, value in self.__dict__.iteritems()]
2261
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
2262
 
2263
  def __eq__(self, other):
2264
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
2265
 
2266
  def __ne__(self, other):
2267
    return not (self == other)
2268
 
2269
class changeTransactionStatus_args:
2270
  """
2271
  Attributes:
2272
   - transactionId
2273
   - status
2274
   - description
2275
  """
2276
 
2277
  thrift_spec = (
2278
    None, # 0
2279
    (1, TType.I64, 'transactionId', None, None, ), # 1
2280
    (2, TType.I32, 'status', None, None, ), # 2
2281
    (3, TType.STRING, 'description', None, None, ), # 3
2282
  )
2283
 
2284
  def __init__(self, transactionId=None, status=None, description=None,):
2285
    self.transactionId = transactionId
2286
    self.status = status
2287
    self.description = description
2288
 
2289
  def read(self, iprot):
2290
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
2291
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
2292
      return
2293
    iprot.readStructBegin()
2294
    while True:
2295
      (fname, ftype, fid) = iprot.readFieldBegin()
2296
      if ftype == TType.STOP:
2297
        break
2298
      if fid == 1:
2299
        if ftype == TType.I64:
2300
          self.transactionId = iprot.readI64();
2301
        else:
2302
          iprot.skip(ftype)
2303
      elif fid == 2:
2304
        if ftype == TType.I32:
2305
          self.status = iprot.readI32();
2306
        else:
2307
          iprot.skip(ftype)
2308
      elif fid == 3:
2309
        if ftype == TType.STRING:
2310
          self.description = iprot.readString();
2311
        else:
2312
          iprot.skip(ftype)
2313
      else:
2314
        iprot.skip(ftype)
2315
      iprot.readFieldEnd()
2316
    iprot.readStructEnd()
2317
 
2318
  def write(self, oprot):
2319
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
2320
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
2321
      return
2322
    oprot.writeStructBegin('changeTransactionStatus_args')
2323
    if self.transactionId != None:
2324
      oprot.writeFieldBegin('transactionId', TType.I64, 1)
2325
      oprot.writeI64(self.transactionId)
2326
      oprot.writeFieldEnd()
2327
    if self.status != None:
2328
      oprot.writeFieldBegin('status', TType.I32, 2)
2329
      oprot.writeI32(self.status)
2330
      oprot.writeFieldEnd()
2331
    if self.description != None:
2332
      oprot.writeFieldBegin('description', TType.STRING, 3)
2333
      oprot.writeString(self.description)
2334
      oprot.writeFieldEnd()
2335
    oprot.writeFieldStop()
2336
    oprot.writeStructEnd()
2337
 
2338
  def __repr__(self):
2339
    L = ['%s=%r' % (key, value)
2340
      for key, value in self.__dict__.iteritems()]
2341
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
2342
 
2343
  def __eq__(self, other):
2344
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
2345
 
2346
  def __ne__(self, other):
2347
    return not (self == other)
2348
 
2349
class changeTransactionStatus_result:
2350
  """
2351
  Attributes:
2352
   - success
2353
   - ex
2354
  """
2355
 
2356
  thrift_spec = (
2357
    (0, TType.BOOL, 'success', None, None, ), # 0
2358
    (1, TType.STRUCT, 'ex', (TransactionServiceException, TransactionServiceException.thrift_spec), None, ), # 1
2359
  )
2360
 
2361
  def __init__(self, success=None, ex=None,):
2362
    self.success = success
2363
    self.ex = ex
2364
 
2365
  def read(self, iprot):
2366
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
2367
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
2368
      return
2369
    iprot.readStructBegin()
2370
    while True:
2371
      (fname, ftype, fid) = iprot.readFieldBegin()
2372
      if ftype == TType.STOP:
2373
        break
2374
      if fid == 0:
2375
        if ftype == TType.BOOL:
2376
          self.success = iprot.readBool();
2377
        else:
2378
          iprot.skip(ftype)
2379
      elif fid == 1:
2380
        if ftype == TType.STRUCT:
2381
          self.ex = TransactionServiceException()
2382
          self.ex.read(iprot)
2383
        else:
2384
          iprot.skip(ftype)
2385
      else:
2386
        iprot.skip(ftype)
2387
      iprot.readFieldEnd()
2388
    iprot.readStructEnd()
2389
 
2390
  def write(self, oprot):
2391
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
2392
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
2393
      return
2394
    oprot.writeStructBegin('changeTransactionStatus_result')
2395
    if self.success != None:
2396
      oprot.writeFieldBegin('success', TType.BOOL, 0)
2397
      oprot.writeBool(self.success)
2398
      oprot.writeFieldEnd()
2399
    if self.ex != None:
2400
      oprot.writeFieldBegin('ex', TType.STRUCT, 1)
2401
      self.ex.write(oprot)
2402
      oprot.writeFieldEnd()
2403
    oprot.writeFieldStop()
2404
    oprot.writeStructEnd()
2405
 
2406
  def __repr__(self):
2407
    L = ['%s=%r' % (key, value)
2408
      for key, value in self.__dict__.iteritems()]
2409
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
2410
 
2411
  def __eq__(self, other):
2412
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
2413
 
2414
  def __ne__(self, other):
2415
    return not (self == other)
2416
 
2417
class getOrderInfo_args:
2418
  """
2419
  Attributes:
2420
   - transactionId
2421
  """
2422
 
2423
  thrift_spec = (
2424
    None, # 0
2425
    (1, TType.I64, 'transactionId', None, None, ), # 1
2426
  )
2427
 
2428
  def __init__(self, transactionId=None,):
2429
    self.transactionId = transactionId
2430
 
2431
  def read(self, iprot):
2432
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
2433
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
2434
      return
2435
    iprot.readStructBegin()
2436
    while True:
2437
      (fname, ftype, fid) = iprot.readFieldBegin()
2438
      if ftype == TType.STOP:
2439
        break
2440
      if fid == 1:
2441
        if ftype == TType.I64:
2442
          self.transactionId = iprot.readI64();
2443
        else:
2444
          iprot.skip(ftype)
2445
      else:
2446
        iprot.skip(ftype)
2447
      iprot.readFieldEnd()
2448
    iprot.readStructEnd()
2449
 
2450
  def write(self, oprot):
2451
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
2452
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
2453
      return
2454
    oprot.writeStructBegin('getOrderInfo_args')
2455
    if self.transactionId != None:
2456
      oprot.writeFieldBegin('transactionId', TType.I64, 1)
2457
      oprot.writeI64(self.transactionId)
2458
      oprot.writeFieldEnd()
2459
    oprot.writeFieldStop()
2460
    oprot.writeStructEnd()
2461
 
2462
  def __repr__(self):
2463
    L = ['%s=%r' % (key, value)
2464
      for key, value in self.__dict__.iteritems()]
2465
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
2466
 
2467
  def __eq__(self, other):
2468
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
2469
 
2470
  def __ne__(self, other):
2471
    return not (self == other)
2472
 
2473
class getOrderInfo_result:
2474
  """
2475
  Attributes:
2476
   - success
2477
   - ex
2478
  """
2479
 
2480
  thrift_spec = (
2481
    (0, TType.STRUCT, 'success', (OrderInfo, OrderInfo.thrift_spec), None, ), # 0
2482
    (1, TType.STRUCT, 'ex', (TransactionServiceException, TransactionServiceException.thrift_spec), None, ), # 1
2483
  )
2484
 
2485
  def __init__(self, success=None, ex=None,):
2486
    self.success = success
2487
    self.ex = ex
2488
 
2489
  def read(self, iprot):
2490
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
2491
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
2492
      return
2493
    iprot.readStructBegin()
2494
    while True:
2495
      (fname, ftype, fid) = iprot.readFieldBegin()
2496
      if ftype == TType.STOP:
2497
        break
2498
      if fid == 0:
2499
        if ftype == TType.STRUCT:
2500
          self.success = OrderInfo()
2501
          self.success.read(iprot)
2502
        else:
2503
          iprot.skip(ftype)
2504
      elif fid == 1:
2505
        if ftype == TType.STRUCT:
2506
          self.ex = TransactionServiceException()
2507
          self.ex.read(iprot)
2508
        else:
2509
          iprot.skip(ftype)
2510
      else:
2511
        iprot.skip(ftype)
2512
      iprot.readFieldEnd()
2513
    iprot.readStructEnd()
2514
 
2515
  def write(self, oprot):
2516
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
2517
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
2518
      return
2519
    oprot.writeStructBegin('getOrderInfo_result')
2520
    if self.success != None:
2521
      oprot.writeFieldBegin('success', TType.STRUCT, 0)
2522
      self.success.write(oprot)
2523
      oprot.writeFieldEnd()
2524
    if self.ex != None:
2525
      oprot.writeFieldBegin('ex', TType.STRUCT, 1)
2526
      self.ex.write(oprot)
2527
      oprot.writeFieldEnd()
2528
    oprot.writeFieldStop()
2529
    oprot.writeStructEnd()
2530
 
2531
  def __repr__(self):
2532
    L = ['%s=%r' % (key, value)
2533
      for key, value in self.__dict__.iteritems()]
2534
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
2535
 
2536
  def __eq__(self, other):
2537
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
2538
 
2539
  def __ne__(self, other):
2540
    return not (self == other)
2541
 
2542
class getShippingInfo_args:
2543
  """
2544
  Attributes:
2545
   - transactionId
2546
  """
2547
 
2548
  thrift_spec = (
2549
    None, # 0
2550
    (1, TType.I64, 'transactionId', None, None, ), # 1
2551
  )
2552
 
2553
  def __init__(self, transactionId=None,):
2554
    self.transactionId = transactionId
2555
 
2556
  def read(self, iprot):
2557
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
2558
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
2559
      return
2560
    iprot.readStructBegin()
2561
    while True:
2562
      (fname, ftype, fid) = iprot.readFieldBegin()
2563
      if ftype == TType.STOP:
2564
        break
2565
      if fid == 1:
2566
        if ftype == TType.I64:
2567
          self.transactionId = iprot.readI64();
2568
        else:
2569
          iprot.skip(ftype)
2570
      else:
2571
        iprot.skip(ftype)
2572
      iprot.readFieldEnd()
2573
    iprot.readStructEnd()
2574
 
2575
  def write(self, oprot):
2576
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
2577
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
2578
      return
2579
    oprot.writeStructBegin('getShippingInfo_args')
2580
    if self.transactionId != None:
2581
      oprot.writeFieldBegin('transactionId', TType.I64, 1)
2582
      oprot.writeI64(self.transactionId)
2583
      oprot.writeFieldEnd()
2584
    oprot.writeFieldStop()
2585
    oprot.writeStructEnd()
2586
 
2587
  def __repr__(self):
2588
    L = ['%s=%r' % (key, value)
2589
      for key, value in self.__dict__.iteritems()]
2590
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
2591
 
2592
  def __eq__(self, other):
2593
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
2594
 
2595
  def __ne__(self, other):
2596
    return not (self == other)
2597
 
2598
class getShippingInfo_result:
2599
  """
2600
  Attributes:
2601
   - success
2602
   - ex
2603
  """
2604
 
2605
  thrift_spec = (
2606
    (0, TType.STRUCT, 'success', (ShipmentInfo, ShipmentInfo.thrift_spec), None, ), # 0
2607
    (1, TType.STRUCT, 'ex', (TransactionServiceException, TransactionServiceException.thrift_spec), None, ), # 1
2608
  )
2609
 
2610
  def __init__(self, success=None, ex=None,):
2611
    self.success = success
2612
    self.ex = ex
2613
 
2614
  def read(self, iprot):
2615
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
2616
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
2617
      return
2618
    iprot.readStructBegin()
2619
    while True:
2620
      (fname, ftype, fid) = iprot.readFieldBegin()
2621
      if ftype == TType.STOP:
2622
        break
2623
      if fid == 0:
2624
        if ftype == TType.STRUCT:
2625
          self.success = ShipmentInfo()
2626
          self.success.read(iprot)
2627
        else:
2628
          iprot.skip(ftype)
2629
      elif fid == 1:
2630
        if ftype == TType.STRUCT:
2631
          self.ex = TransactionServiceException()
2632
          self.ex.read(iprot)
2633
        else:
2634
          iprot.skip(ftype)
2635
      else:
2636
        iprot.skip(ftype)
2637
      iprot.readFieldEnd()
2638
    iprot.readStructEnd()
2639
 
2640
  def write(self, oprot):
2641
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
2642
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
2643
      return
2644
    oprot.writeStructBegin('getShippingInfo_result')
2645
    if self.success != None:
2646
      oprot.writeFieldBegin('success', TType.STRUCT, 0)
2647
      self.success.write(oprot)
2648
      oprot.writeFieldEnd()
2649
    if self.ex != None:
2650
      oprot.writeFieldBegin('ex', TType.STRUCT, 1)
2651
      self.ex.write(oprot)
2652
      oprot.writeFieldEnd()
2653
    oprot.writeFieldStop()
2654
    oprot.writeStructEnd()
2655
 
2656
  def __repr__(self):
2657
    L = ['%s=%r' % (key, value)
2658
      for key, value in self.__dict__.iteritems()]
2659
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
2660
 
2661
  def __eq__(self, other):
2662
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
2663
 
2664
  def __ne__(self, other):
2665
    return not (self == other)
2666
 
2667
class getBillingInfo_args:
2668
  """
2669
  Attributes:
2670
   - transactionId
2671
  """
2672
 
2673
  thrift_spec = (
2674
    None, # 0
2675
    (1, TType.I64, 'transactionId', None, None, ), # 1
2676
  )
2677
 
2678
  def __init__(self, transactionId=None,):
2679
    self.transactionId = transactionId
2680
 
2681
  def read(self, iprot):
2682
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
2683
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
2684
      return
2685
    iprot.readStructBegin()
2686
    while True:
2687
      (fname, ftype, fid) = iprot.readFieldBegin()
2688
      if ftype == TType.STOP:
2689
        break
2690
      if fid == 1:
2691
        if ftype == TType.I64:
2692
          self.transactionId = iprot.readI64();
2693
        else:
2694
          iprot.skip(ftype)
2695
      else:
2696
        iprot.skip(ftype)
2697
      iprot.readFieldEnd()
2698
    iprot.readStructEnd()
2699
 
2700
  def write(self, oprot):
2701
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
2702
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
2703
      return
2704
    oprot.writeStructBegin('getBillingInfo_args')
2705
    if self.transactionId != None:
2706
      oprot.writeFieldBegin('transactionId', TType.I64, 1)
2707
      oprot.writeI64(self.transactionId)
2708
      oprot.writeFieldEnd()
2709
    oprot.writeFieldStop()
2710
    oprot.writeStructEnd()
2711
 
2712
  def __repr__(self):
2713
    L = ['%s=%r' % (key, value)
2714
      for key, value in self.__dict__.iteritems()]
2715
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
2716
 
2717
  def __eq__(self, other):
2718
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
2719
 
2720
  def __ne__(self, other):
2721
    return not (self == other)
2722
 
2723
class getBillingInfo_result:
2724
  """
2725
  Attributes:
2726
   - success
2727
   - ex
2728
  """
2729
 
2730
  thrift_spec = (
2731
    (0, TType.STRUCT, 'success', (BillingInfo, BillingInfo.thrift_spec), None, ), # 0
2732
    (1, TType.STRUCT, 'ex', (TransactionServiceException, TransactionServiceException.thrift_spec), None, ), # 1
2733
  )
2734
 
2735
  def __init__(self, success=None, ex=None,):
2736
    self.success = success
2737
    self.ex = ex
2738
 
2739
  def read(self, iprot):
2740
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
2741
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
2742
      return
2743
    iprot.readStructBegin()
2744
    while True:
2745
      (fname, ftype, fid) = iprot.readFieldBegin()
2746
      if ftype == TType.STOP:
2747
        break
2748
      if fid == 0:
2749
        if ftype == TType.STRUCT:
2750
          self.success = BillingInfo()
2751
          self.success.read(iprot)
2752
        else:
2753
          iprot.skip(ftype)
2754
      elif fid == 1:
2755
        if ftype == TType.STRUCT:
2756
          self.ex = TransactionServiceException()
2757
          self.ex.read(iprot)
2758
        else:
2759
          iprot.skip(ftype)
2760
      else:
2761
        iprot.skip(ftype)
2762
      iprot.readFieldEnd()
2763
    iprot.readStructEnd()
2764
 
2765
  def write(self, oprot):
2766
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
2767
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
2768
      return
2769
    oprot.writeStructBegin('getBillingInfo_result')
2770
    if self.success != None:
2771
      oprot.writeFieldBegin('success', TType.STRUCT, 0)
2772
      self.success.write(oprot)
2773
      oprot.writeFieldEnd()
2774
    if self.ex != None:
2775
      oprot.writeFieldBegin('ex', TType.STRUCT, 1)
2776
      self.ex.write(oprot)
2777
      oprot.writeFieldEnd()
2778
    oprot.writeFieldStop()
2779
    oprot.writeStructEnd()
2780
 
2781
  def __repr__(self):
2782
    L = ['%s=%r' % (key, value)
2783
      for key, value in self.__dict__.iteritems()]
2784
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
2785
 
2786
  def __eq__(self, other):
2787
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
2788
 
2789
  def __ne__(self, other):
2790
    return not (self == other)
2791
 
2792
class addBilling_args:
2793
  """
2794
  Attributes:
2795
   - tranactionId
2796
   - billing
2797
  """
2798
 
2799
  thrift_spec = (
2800
    None, # 0
2801
    (1, TType.I64, 'tranactionId', None, None, ), # 1
2802
    (2, TType.STRUCT, 'billing', (Billing, Billing.thrift_spec), None, ), # 2
2803
  )
2804
 
2805
  def __init__(self, tranactionId=None, billing=None,):
2806
    self.tranactionId = tranactionId
2807
    self.billing = billing
2808
 
2809
  def read(self, iprot):
2810
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
2811
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
2812
      return
2813
    iprot.readStructBegin()
2814
    while True:
2815
      (fname, ftype, fid) = iprot.readFieldBegin()
2816
      if ftype == TType.STOP:
2817
        break
2818
      if fid == 1:
2819
        if ftype == TType.I64:
2820
          self.tranactionId = iprot.readI64();
2821
        else:
2822
          iprot.skip(ftype)
2823
      elif fid == 2:
2824
        if ftype == TType.STRUCT:
2825
          self.billing = Billing()
2826
          self.billing.read(iprot)
2827
        else:
2828
          iprot.skip(ftype)
2829
      else:
2830
        iprot.skip(ftype)
2831
      iprot.readFieldEnd()
2832
    iprot.readStructEnd()
2833
 
2834
  def write(self, oprot):
2835
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
2836
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
2837
      return
2838
    oprot.writeStructBegin('addBilling_args')
2839
    if self.tranactionId != None:
2840
      oprot.writeFieldBegin('tranactionId', TType.I64, 1)
2841
      oprot.writeI64(self.tranactionId)
2842
      oprot.writeFieldEnd()
2843
    if self.billing != None:
2844
      oprot.writeFieldBegin('billing', TType.STRUCT, 2)
2845
      self.billing.write(oprot)
2846
      oprot.writeFieldEnd()
2847
    oprot.writeFieldStop()
2848
    oprot.writeStructEnd()
2849
 
2850
  def __repr__(self):
2851
    L = ['%s=%r' % (key, value)
2852
      for key, value in self.__dict__.iteritems()]
2853
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
2854
 
2855
  def __eq__(self, other):
2856
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
2857
 
2858
  def __ne__(self, other):
2859
    return not (self == other)
2860
 
2861
class addBilling_result:
2862
  """
2863
  Attributes:
2864
   - success
2865
   - ex
2866
  """
2867
 
2868
  thrift_spec = (
2869
    (0, TType.BOOL, 'success', None, None, ), # 0
2870
    (1, TType.STRUCT, 'ex', (TransactionServiceException, TransactionServiceException.thrift_spec), None, ), # 1
2871
  )
2872
 
2873
  def __init__(self, success=None, ex=None,):
2874
    self.success = success
2875
    self.ex = ex
2876
 
2877
  def read(self, iprot):
2878
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
2879
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
2880
      return
2881
    iprot.readStructBegin()
2882
    while True:
2883
      (fname, ftype, fid) = iprot.readFieldBegin()
2884
      if ftype == TType.STOP:
2885
        break
2886
      if fid == 0:
2887
        if ftype == TType.BOOL:
2888
          self.success = iprot.readBool();
2889
        else:
2890
          iprot.skip(ftype)
2891
      elif fid == 1:
2892
        if ftype == TType.STRUCT:
2893
          self.ex = TransactionServiceException()
2894
          self.ex.read(iprot)
2895
        else:
2896
          iprot.skip(ftype)
2897
      else:
2898
        iprot.skip(ftype)
2899
      iprot.readFieldEnd()
2900
    iprot.readStructEnd()
2901
 
2902
  def write(self, oprot):
2903
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
2904
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
2905
      return
2906
    oprot.writeStructBegin('addBilling_result')
2907
    if self.success != None:
2908
      oprot.writeFieldBegin('success', TType.BOOL, 0)
2909
      oprot.writeBool(self.success)
2910
      oprot.writeFieldEnd()
2911
    if self.ex != None:
2912
      oprot.writeFieldBegin('ex', TType.STRUCT, 1)
2913
      self.ex.write(oprot)
2914
      oprot.writeFieldEnd()
2915
    oprot.writeFieldStop()
2916
    oprot.writeStructEnd()
2917
 
2918
  def __repr__(self):
2919
    L = ['%s=%r' % (key, value)
2920
      for key, value in self.__dict__.iteritems()]
2921
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
2922
 
2923
  def __eq__(self, other):
2924
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
2925
 
2926
  def __ne__(self, other):
2927
    return not (self == other)
2928
 
2929
class setShippingTracker_args:
2930
  """
2931
  Attributes:
2932
   - transactionId
2933
   - shippingId
2934
   - trackingId
2935
   - airwayBillNo
2936
   - provider
2937
  """
2938
 
2939
  thrift_spec = (
2940
    None, # 0
2941
    (1, TType.I64, 'transactionId', None, None, ), # 1
2942
    (2, TType.I64, 'shippingId', None, None, ), # 2
2943
    (3, TType.STRING, 'trackingId', None, None, ), # 3
2944
    (4, TType.STRING, 'airwayBillNo', None, None, ), # 4
2945
    (5, TType.STRING, 'provider', None, None, ), # 5
2946
  )
2947
 
2948
  def __init__(self, transactionId=None, shippingId=None, trackingId=None, airwayBillNo=None, provider=None,):
2949
    self.transactionId = transactionId
2950
    self.shippingId = shippingId
2951
    self.trackingId = trackingId
2952
    self.airwayBillNo = airwayBillNo
2953
    self.provider = provider
2954
 
2955
  def read(self, iprot):
2956
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
2957
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
2958
      return
2959
    iprot.readStructBegin()
2960
    while True:
2961
      (fname, ftype, fid) = iprot.readFieldBegin()
2962
      if ftype == TType.STOP:
2963
        break
2964
      if fid == 1:
2965
        if ftype == TType.I64:
2966
          self.transactionId = iprot.readI64();
2967
        else:
2968
          iprot.skip(ftype)
2969
      elif fid == 2:
2970
        if ftype == TType.I64:
2971
          self.shippingId = iprot.readI64();
2972
        else:
2973
          iprot.skip(ftype)
2974
      elif fid == 3:
2975
        if ftype == TType.STRING:
2976
          self.trackingId = iprot.readString();
2977
        else:
2978
          iprot.skip(ftype)
2979
      elif fid == 4:
2980
        if ftype == TType.STRING:
2981
          self.airwayBillNo = iprot.readString();
2982
        else:
2983
          iprot.skip(ftype)
2984
      elif fid == 5:
2985
        if ftype == TType.STRING:
2986
          self.provider = iprot.readString();
2987
        else:
2988
          iprot.skip(ftype)
2989
      else:
2990
        iprot.skip(ftype)
2991
      iprot.readFieldEnd()
2992
    iprot.readStructEnd()
2993
 
2994
  def write(self, oprot):
2995
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
2996
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
2997
      return
2998
    oprot.writeStructBegin('setShippingTracker_args')
2999
    if self.transactionId != None:
3000
      oprot.writeFieldBegin('transactionId', TType.I64, 1)
3001
      oprot.writeI64(self.transactionId)
3002
      oprot.writeFieldEnd()
3003
    if self.shippingId != None:
3004
      oprot.writeFieldBegin('shippingId', TType.I64, 2)
3005
      oprot.writeI64(self.shippingId)
3006
      oprot.writeFieldEnd()
3007
    if self.trackingId != None:
3008
      oprot.writeFieldBegin('trackingId', TType.STRING, 3)
3009
      oprot.writeString(self.trackingId)
3010
      oprot.writeFieldEnd()
3011
    if self.airwayBillNo != None:
3012
      oprot.writeFieldBegin('airwayBillNo', TType.STRING, 4)
3013
      oprot.writeString(self.airwayBillNo)
3014
      oprot.writeFieldEnd()
3015
    if self.provider != None:
3016
      oprot.writeFieldBegin('provider', TType.STRING, 5)
3017
      oprot.writeString(self.provider)
3018
      oprot.writeFieldEnd()
3019
    oprot.writeFieldStop()
3020
    oprot.writeStructEnd()
3021
 
3022
  def __repr__(self):
3023
    L = ['%s=%r' % (key, value)
3024
      for key, value in self.__dict__.iteritems()]
3025
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
3026
 
3027
  def __eq__(self, other):
3028
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
3029
 
3030
  def __ne__(self, other):
3031
    return not (self == other)
3032
 
3033
class setShippingTracker_result:
3034
  """
3035
  Attributes:
3036
   - success
3037
   - ex
3038
  """
3039
 
3040
  thrift_spec = (
3041
    (0, TType.BOOL, 'success', None, None, ), # 0
3042
    (1, TType.STRUCT, 'ex', (TransactionServiceException, TransactionServiceException.thrift_spec), None, ), # 1
3043
  )
3044
 
3045
  def __init__(self, success=None, ex=None,):
3046
    self.success = success
3047
    self.ex = ex
3048
 
3049
  def read(self, iprot):
3050
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
3051
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
3052
      return
3053
    iprot.readStructBegin()
3054
    while True:
3055
      (fname, ftype, fid) = iprot.readFieldBegin()
3056
      if ftype == TType.STOP:
3057
        break
3058
      if fid == 0:
3059
        if ftype == TType.BOOL:
3060
          self.success = iprot.readBool();
3061
        else:
3062
          iprot.skip(ftype)
3063
      elif fid == 1:
3064
        if ftype == TType.STRUCT:
3065
          self.ex = TransactionServiceException()
3066
          self.ex.read(iprot)
3067
        else:
3068
          iprot.skip(ftype)
3069
      else:
3070
        iprot.skip(ftype)
3071
      iprot.readFieldEnd()
3072
    iprot.readStructEnd()
3073
 
3074
  def write(self, oprot):
3075
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
3076
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
3077
      return
3078
    oprot.writeStructBegin('setShippingTracker_result')
3079
    if self.success != None:
3080
      oprot.writeFieldBegin('success', TType.BOOL, 0)
3081
      oprot.writeBool(self.success)
3082
      oprot.writeFieldEnd()
3083
    if self.ex != None:
3084
      oprot.writeFieldBegin('ex', TType.STRUCT, 1)
3085
      self.ex.write(oprot)
3086
      oprot.writeFieldEnd()
3087
    oprot.writeFieldStop()
3088
    oprot.writeStructEnd()
3089
 
3090
  def __repr__(self):
3091
    L = ['%s=%r' % (key, value)
3092
      for key, value in self.__dict__.iteritems()]
3093
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
3094
 
3095
  def __eq__(self, other):
3096
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
3097
 
3098
  def __ne__(self, other):
3099
    return not (self == other)
3100
 
3101
class setShippingDate_args:
3102
  """
3103
  Attributes:
3104
   - transactionId
3105
   - shippingId
3106
   - timestamp
3107
  """
3108
 
3109
  thrift_spec = (
3110
    None, # 0
3111
    (1, TType.I64, 'transactionId', None, None, ), # 1
3112
    (2, TType.I64, 'shippingId', None, None, ), # 2
3113
    (3, TType.I64, 'timestamp', None, None, ), # 3
3114
  )
3115
 
3116
  def __init__(self, transactionId=None, shippingId=None, timestamp=None,):
3117
    self.transactionId = transactionId
3118
    self.shippingId = shippingId
3119
    self.timestamp = timestamp
3120
 
3121
  def read(self, iprot):
3122
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
3123
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
3124
      return
3125
    iprot.readStructBegin()
3126
    while True:
3127
      (fname, ftype, fid) = iprot.readFieldBegin()
3128
      if ftype == TType.STOP:
3129
        break
3130
      if fid == 1:
3131
        if ftype == TType.I64:
3132
          self.transactionId = iprot.readI64();
3133
        else:
3134
          iprot.skip(ftype)
3135
      elif fid == 2:
3136
        if ftype == TType.I64:
3137
          self.shippingId = iprot.readI64();
3138
        else:
3139
          iprot.skip(ftype)
3140
      elif fid == 3:
3141
        if ftype == TType.I64:
3142
          self.timestamp = iprot.readI64();
3143
        else:
3144
          iprot.skip(ftype)
3145
      else:
3146
        iprot.skip(ftype)
3147
      iprot.readFieldEnd()
3148
    iprot.readStructEnd()
3149
 
3150
  def write(self, oprot):
3151
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
3152
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
3153
      return
3154
    oprot.writeStructBegin('setShippingDate_args')
3155
    if self.transactionId != None:
3156
      oprot.writeFieldBegin('transactionId', TType.I64, 1)
3157
      oprot.writeI64(self.transactionId)
3158
      oprot.writeFieldEnd()
3159
    if self.shippingId != None:
3160
      oprot.writeFieldBegin('shippingId', TType.I64, 2)
3161
      oprot.writeI64(self.shippingId)
3162
      oprot.writeFieldEnd()
3163
    if self.timestamp != None:
3164
      oprot.writeFieldBegin('timestamp', TType.I64, 3)
3165
      oprot.writeI64(self.timestamp)
3166
      oprot.writeFieldEnd()
3167
    oprot.writeFieldStop()
3168
    oprot.writeStructEnd()
3169
 
3170
  def __repr__(self):
3171
    L = ['%s=%r' % (key, value)
3172
      for key, value in self.__dict__.iteritems()]
3173
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
3174
 
3175
  def __eq__(self, other):
3176
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
3177
 
3178
  def __ne__(self, other):
3179
    return not (self == other)
3180
 
3181
class setShippingDate_result:
3182
  """
3183
  Attributes:
3184
   - success
3185
   - ex
3186
  """
3187
 
3188
  thrift_spec = (
3189
    (0, TType.BOOL, 'success', None, None, ), # 0
3190
    (1, TType.STRUCT, 'ex', (TransactionServiceException, TransactionServiceException.thrift_spec), None, ), # 1
3191
  )
3192
 
3193
  def __init__(self, success=None, ex=None,):
3194
    self.success = success
3195
    self.ex = ex
3196
 
3197
  def read(self, iprot):
3198
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
3199
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
3200
      return
3201
    iprot.readStructBegin()
3202
    while True:
3203
      (fname, ftype, fid) = iprot.readFieldBegin()
3204
      if ftype == TType.STOP:
3205
        break
3206
      if fid == 0:
3207
        if ftype == TType.BOOL:
3208
          self.success = iprot.readBool();
3209
        else:
3210
          iprot.skip(ftype)
3211
      elif fid == 1:
3212
        if ftype == TType.STRUCT:
3213
          self.ex = TransactionServiceException()
3214
          self.ex.read(iprot)
3215
        else:
3216
          iprot.skip(ftype)
3217
      else:
3218
        iprot.skip(ftype)
3219
      iprot.readFieldEnd()
3220
    iprot.readStructEnd()
3221
 
3222
  def write(self, oprot):
3223
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
3224
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
3225
      return
3226
    oprot.writeStructBegin('setShippingDate_result')
3227
    if self.success != None:
3228
      oprot.writeFieldBegin('success', TType.BOOL, 0)
3229
      oprot.writeBool(self.success)
3230
      oprot.writeFieldEnd()
3231
    if self.ex != None:
3232
      oprot.writeFieldBegin('ex', TType.STRUCT, 1)
3233
      self.ex.write(oprot)
3234
      oprot.writeFieldEnd()
3235
    oprot.writeFieldStop()
3236
    oprot.writeStructEnd()
3237
 
3238
  def __repr__(self):
3239
    L = ['%s=%r' % (key, value)
3240
      for key, value in self.__dict__.iteritems()]
3241
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
3242
 
3243
  def __eq__(self, other):
3244
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
3245
 
3246
  def __ne__(self, other):
3247
    return not (self == other)
3248
 
3249
class setDeliveryDate_args:
3250
  """
3251
  Attributes:
3252
   - transactionId
3253
   - shippingid
3254
   - timestamp
3255
  """
3256
 
3257
  thrift_spec = (
3258
    None, # 0
3259
    (1, TType.I64, 'transactionId', None, None, ), # 1
3260
    (2, TType.I64, 'shippingid', None, None, ), # 2
3261
    (3, TType.I64, 'timestamp', None, None, ), # 3
3262
  )
3263
 
3264
  def __init__(self, transactionId=None, shippingid=None, timestamp=None,):
3265
    self.transactionId = transactionId
3266
    self.shippingid = shippingid
3267
    self.timestamp = timestamp
3268
 
3269
  def read(self, iprot):
3270
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
3271
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
3272
      return
3273
    iprot.readStructBegin()
3274
    while True:
3275
      (fname, ftype, fid) = iprot.readFieldBegin()
3276
      if ftype == TType.STOP:
3277
        break
3278
      if fid == 1:
3279
        if ftype == TType.I64:
3280
          self.transactionId = iprot.readI64();
3281
        else:
3282
          iprot.skip(ftype)
3283
      elif fid == 2:
3284
        if ftype == TType.I64:
3285
          self.shippingid = iprot.readI64();
3286
        else:
3287
          iprot.skip(ftype)
3288
      elif fid == 3:
3289
        if ftype == TType.I64:
3290
          self.timestamp = iprot.readI64();
3291
        else:
3292
          iprot.skip(ftype)
3293
      else:
3294
        iprot.skip(ftype)
3295
      iprot.readFieldEnd()
3296
    iprot.readStructEnd()
3297
 
3298
  def write(self, oprot):
3299
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
3300
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
3301
      return
3302
    oprot.writeStructBegin('setDeliveryDate_args')
3303
    if self.transactionId != None:
3304
      oprot.writeFieldBegin('transactionId', TType.I64, 1)
3305
      oprot.writeI64(self.transactionId)
3306
      oprot.writeFieldEnd()
3307
    if self.shippingid != None:
3308
      oprot.writeFieldBegin('shippingid', TType.I64, 2)
3309
      oprot.writeI64(self.shippingid)
3310
      oprot.writeFieldEnd()
3311
    if self.timestamp != None:
3312
      oprot.writeFieldBegin('timestamp', TType.I64, 3)
3313
      oprot.writeI64(self.timestamp)
3314
      oprot.writeFieldEnd()
3315
    oprot.writeFieldStop()
3316
    oprot.writeStructEnd()
3317
 
3318
  def __repr__(self):
3319
    L = ['%s=%r' % (key, value)
3320
      for key, value in self.__dict__.iteritems()]
3321
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
3322
 
3323
  def __eq__(self, other):
3324
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
3325
 
3326
  def __ne__(self, other):
3327
    return not (self == other)
3328
 
3329
class setDeliveryDate_result:
3330
  """
3331
  Attributes:
3332
   - success
3333
   - ex
3334
  """
3335
 
3336
  thrift_spec = (
3337
    (0, TType.BOOL, 'success', None, None, ), # 0
3338
    (1, TType.STRUCT, 'ex', (TransactionServiceException, TransactionServiceException.thrift_spec), None, ), # 1
3339
  )
3340
 
3341
  def __init__(self, success=None, ex=None,):
3342
    self.success = success
3343
    self.ex = ex
3344
 
3345
  def read(self, iprot):
3346
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
3347
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
3348
      return
3349
    iprot.readStructBegin()
3350
    while True:
3351
      (fname, ftype, fid) = iprot.readFieldBegin()
3352
      if ftype == TType.STOP:
3353
        break
3354
      if fid == 0:
3355
        if ftype == TType.BOOL:
3356
          self.success = iprot.readBool();
3357
        else:
3358
          iprot.skip(ftype)
3359
      elif fid == 1:
3360
        if ftype == TType.STRUCT:
3361
          self.ex = TransactionServiceException()
3362
          self.ex.read(iprot)
3363
        else:
3364
          iprot.skip(ftype)
3365
      else:
3366
        iprot.skip(ftype)
3367
      iprot.readFieldEnd()
3368
    iprot.readStructEnd()
3369
 
3370
  def write(self, oprot):
3371
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
3372
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
3373
      return
3374
    oprot.writeStructBegin('setDeliveryDate_result')
3375
    if self.success != None:
3376
      oprot.writeFieldBegin('success', TType.BOOL, 0)
3377
      oprot.writeBool(self.success)
3378
      oprot.writeFieldEnd()
3379
    if self.ex != None:
3380
      oprot.writeFieldBegin('ex', TType.STRUCT, 1)
3381
      self.ex.write(oprot)
3382
      oprot.writeFieldEnd()
3383
    oprot.writeFieldStop()
3384
    oprot.writeStructEnd()
3385
 
3386
  def __repr__(self):
3387
    L = ['%s=%r' % (key, value)
3388
      for key, value in self.__dict__.iteritems()]
3389
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
3390
 
3391
  def __eq__(self, other):
3392
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
3393
 
3394
  def __ne__(self, other):
3395
    return not (self == other)
3396
 
3397
class changeShippingStatus_args:
3398
  """
3399
  Attributes:
3400
   - transactionId
3401
   - shippingId
3402
   - status
3403
   - description
3404
  """
3405
 
3406
  thrift_spec = (
3407
    None, # 0
3408
    (1, TType.I64, 'transactionId', None, None, ), # 1
3409
    (2, TType.I64, 'shippingId', None, None, ), # 2
3410
    (3, TType.I32, 'status', None, None, ), # 3
3411
    (4, TType.STRING, 'description', None, None, ), # 4
3412
  )
3413
 
3414
  def __init__(self, transactionId=None, shippingId=None, status=None, description=None,):
3415
    self.transactionId = transactionId
3416
    self.shippingId = shippingId
3417
    self.status = status
3418
    self.description = description
3419
 
3420
  def read(self, iprot):
3421
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
3422
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
3423
      return
3424
    iprot.readStructBegin()
3425
    while True:
3426
      (fname, ftype, fid) = iprot.readFieldBegin()
3427
      if ftype == TType.STOP:
3428
        break
3429
      if fid == 1:
3430
        if ftype == TType.I64:
3431
          self.transactionId = iprot.readI64();
3432
        else:
3433
          iprot.skip(ftype)
3434
      elif fid == 2:
3435
        if ftype == TType.I64:
3436
          self.shippingId = iprot.readI64();
3437
        else:
3438
          iprot.skip(ftype)
3439
      elif fid == 3:
3440
        if ftype == TType.I32:
3441
          self.status = iprot.readI32();
3442
        else:
3443
          iprot.skip(ftype)
3444
      elif fid == 4:
3445
        if ftype == TType.STRING:
3446
          self.description = iprot.readString();
3447
        else:
3448
          iprot.skip(ftype)
3449
      else:
3450
        iprot.skip(ftype)
3451
      iprot.readFieldEnd()
3452
    iprot.readStructEnd()
3453
 
3454
  def write(self, oprot):
3455
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
3456
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
3457
      return
3458
    oprot.writeStructBegin('changeShippingStatus_args')
3459
    if self.transactionId != None:
3460
      oprot.writeFieldBegin('transactionId', TType.I64, 1)
3461
      oprot.writeI64(self.transactionId)
3462
      oprot.writeFieldEnd()
3463
    if self.shippingId != None:
3464
      oprot.writeFieldBegin('shippingId', TType.I64, 2)
3465
      oprot.writeI64(self.shippingId)
3466
      oprot.writeFieldEnd()
3467
    if self.status != None:
3468
      oprot.writeFieldBegin('status', TType.I32, 3)
3469
      oprot.writeI32(self.status)
3470
      oprot.writeFieldEnd()
3471
    if self.description != None:
3472
      oprot.writeFieldBegin('description', TType.STRING, 4)
3473
      oprot.writeString(self.description)
3474
      oprot.writeFieldEnd()
3475
    oprot.writeFieldStop()
3476
    oprot.writeStructEnd()
3477
 
3478
  def __repr__(self):
3479
    L = ['%s=%r' % (key, value)
3480
      for key, value in self.__dict__.iteritems()]
3481
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
3482
 
3483
  def __eq__(self, other):
3484
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
3485
 
3486
  def __ne__(self, other):
3487
    return not (self == other)
3488
 
3489
class changeShippingStatus_result:
3490
  """
3491
  Attributes:
3492
   - success
3493
   - ex
3494
  """
3495
 
3496
  thrift_spec = (
3497
    (0, TType.BOOL, 'success', None, None, ), # 0
3498
    (1, TType.STRUCT, 'ex', (TransactionServiceException, TransactionServiceException.thrift_spec), None, ), # 1
3499
  )
3500
 
3501
  def __init__(self, success=None, ex=None,):
3502
    self.success = success
3503
    self.ex = ex
3504
 
3505
  def read(self, iprot):
3506
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
3507
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
3508
      return
3509
    iprot.readStructBegin()
3510
    while True:
3511
      (fname, ftype, fid) = iprot.readFieldBegin()
3512
      if ftype == TType.STOP:
3513
        break
3514
      if fid == 0:
3515
        if ftype == TType.BOOL:
3516
          self.success = iprot.readBool();
3517
        else:
3518
          iprot.skip(ftype)
3519
      elif fid == 1:
3520
        if ftype == TType.STRUCT:
3521
          self.ex = TransactionServiceException()
3522
          self.ex.read(iprot)
3523
        else:
3524
          iprot.skip(ftype)
3525
      else:
3526
        iprot.skip(ftype)
3527
      iprot.readFieldEnd()
3528
    iprot.readStructEnd()
3529
 
3530
  def write(self, oprot):
3531
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
3532
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
3533
      return
3534
    oprot.writeStructBegin('changeShippingStatus_result')
3535
    if self.success != None:
3536
      oprot.writeFieldBegin('success', TType.BOOL, 0)
3537
      oprot.writeBool(self.success)
3538
      oprot.writeFieldEnd()
3539
    if self.ex != None:
3540
      oprot.writeFieldBegin('ex', TType.STRUCT, 1)
3541
      self.ex.write(oprot)
3542
      oprot.writeFieldEnd()
3543
    oprot.writeFieldStop()
3544
    oprot.writeStructEnd()
3545
 
3546
  def __repr__(self):
3547
    L = ['%s=%r' % (key, value)
3548
      for key, value in self.__dict__.iteritems()]
3549
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
3550
 
3551
  def __eq__(self, other):
3552
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
3553
 
3554
  def __ne__(self, other):
3555
    return not (self == other)
3556
 
3557
class addTrail_args:
3558
  """
3559
  Attributes:
3560
   - transactionId
3561
   - description
3562
  """
3563
 
3564
  thrift_spec = (
3565
    None, # 0
3566
    (1, TType.I64, 'transactionId', None, None, ), # 1
3567
    (2, TType.STRING, 'description', None, None, ), # 2
3568
  )
3569
 
3570
  def __init__(self, transactionId=None, description=None,):
3571
    self.transactionId = transactionId
3572
    self.description = description
3573
 
3574
  def read(self, iprot):
3575
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
3576
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
3577
      return
3578
    iprot.readStructBegin()
3579
    while True:
3580
      (fname, ftype, fid) = iprot.readFieldBegin()
3581
      if ftype == TType.STOP:
3582
        break
3583
      if fid == 1:
3584
        if ftype == TType.I64:
3585
          self.transactionId = iprot.readI64();
3586
        else:
3587
          iprot.skip(ftype)
3588
      elif fid == 2:
3589
        if ftype == TType.STRING:
3590
          self.description = iprot.readString();
3591
        else:
3592
          iprot.skip(ftype)
3593
      else:
3594
        iprot.skip(ftype)
3595
      iprot.readFieldEnd()
3596
    iprot.readStructEnd()
3597
 
3598
  def write(self, oprot):
3599
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
3600
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
3601
      return
3602
    oprot.writeStructBegin('addTrail_args')
3603
    if self.transactionId != None:
3604
      oprot.writeFieldBegin('transactionId', TType.I64, 1)
3605
      oprot.writeI64(self.transactionId)
3606
      oprot.writeFieldEnd()
3607
    if self.description != None:
3608
      oprot.writeFieldBegin('description', TType.STRING, 2)
3609
      oprot.writeString(self.description)
3610
      oprot.writeFieldEnd()
3611
    oprot.writeFieldStop()
3612
    oprot.writeStructEnd()
3613
 
3614
  def __repr__(self):
3615
    L = ['%s=%r' % (key, value)
3616
      for key, value in self.__dict__.iteritems()]
3617
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
3618
 
3619
  def __eq__(self, other):
3620
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
3621
 
3622
  def __ne__(self, other):
3623
    return not (self == other)
3624
 
3625
class addTrail_result:
3626
  """
3627
  Attributes:
3628
   - success
3629
   - ex
3630
  """
3631
 
3632
  thrift_spec = (
3633
    (0, TType.BOOL, 'success', None, None, ), # 0
3634
    (1, TType.STRUCT, 'ex', (TransactionServiceException, TransactionServiceException.thrift_spec), None, ), # 1
3635
  )
3636
 
3637
  def __init__(self, success=None, ex=None,):
3638
    self.success = success
3639
    self.ex = ex
3640
 
3641
  def read(self, iprot):
3642
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
3643
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
3644
      return
3645
    iprot.readStructBegin()
3646
    while True:
3647
      (fname, ftype, fid) = iprot.readFieldBegin()
3648
      if ftype == TType.STOP:
3649
        break
3650
      if fid == 0:
3651
        if ftype == TType.BOOL:
3652
          self.success = iprot.readBool();
3653
        else:
3654
          iprot.skip(ftype)
3655
      elif fid == 1:
3656
        if ftype == TType.STRUCT:
3657
          self.ex = TransactionServiceException()
3658
          self.ex.read(iprot)
3659
        else:
3660
          iprot.skip(ftype)
3661
      else:
3662
        iprot.skip(ftype)
3663
      iprot.readFieldEnd()
3664
    iprot.readStructEnd()
3665
 
3666
  def write(self, oprot):
3667
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
3668
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
3669
      return
3670
    oprot.writeStructBegin('addTrail_result')
3671
    if self.success != None:
3672
      oprot.writeFieldBegin('success', TType.BOOL, 0)
3673
      oprot.writeBool(self.success)
3674
      oprot.writeFieldEnd()
3675
    if self.ex != None:
3676
      oprot.writeFieldBegin('ex', TType.STRUCT, 1)
3677
      self.ex.write(oprot)
3678
      oprot.writeFieldEnd()
3679
    oprot.writeFieldStop()
3680
    oprot.writeStructEnd()
3681
 
3682
  def __repr__(self):
3683
    L = ['%s=%r' % (key, value)
3684
      for key, value in self.__dict__.iteritems()]
3685
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
3686
 
3687
  def __eq__(self, other):
3688
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
3689
 
3690
  def __ne__(self, other):
3691
    return not (self == other)
3692
 
3693