Subversion Repositories SmartDukaan

Rev

Rev 358 | Rev 494 | 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
    Parameters:
29
     - id
30
    """
31
    pass
32
 
33
  def getTransactionsForCustomer(self, customerId, from_date, to_date, status):
34
    """
35
    Parameters:
36
     - customerId
37
     - from_date
38
     - to_date
39
     - status
40
    """
41
    pass
42
 
132 ashish 43
  def getTransactionsForShoppingCartId(self, shoppingCartId):
44
    """
45
    Parameters:
46
     - shoppingCartId
47
    """
48
    pass
49
 
94 ashish 50
  def getTransactionStatus(self, transactionId):
51
    """
52
    Parameters:
53
     - transactionId
54
    """
55
    pass
56
 
57
  def changeTransactionStatus(self, transactionId, status, description):
58
    """
59
    Parameters:
60
     - transactionId
61
     - status
62
     - description
63
    """
64
    pass
65
 
483 rajveer 66
  def getAllOrders(self, status, from_date, to_date, warehouse_id):
94 ashish 67
    """
68
    Parameters:
483 rajveer 69
     - status
70
     - from_date
71
     - to_date
72
     - warehouse_id
94 ashish 73
    """
74
    pass
75
 
483 rajveer 76
  def changeOrderStatus(self, orderId, status, description):
94 ashish 77
    """
78
    Parameters:
483 rajveer 79
     - orderId
80
     - status
81
     - description
94 ashish 82
    """
83
    pass
84
 
483 rajveer 85
  def getOrdersForTransaction(self, transactionId):
94 ashish 86
    """
87
    Parameters:
88
     - transactionId
89
    """
90
    pass
91
 
483 rajveer 92
  def getOrdersForCustomer(self, customerId, from_date, to_date, status):
94 ashish 93
    """
94
    Parameters:
483 rajveer 95
     - customerId
96
     - from_date
97
     - to_date
98
     - status
94 ashish 99
    """
100
    pass
101
 
483 rajveer 102
  def createOrder(self, order):
94 ashish 103
    """
104
    Parameters:
483 rajveer 105
     - order
94 ashish 106
    """
107
    pass
108
 
483 rajveer 109
  def getOrder(self, id):
94 ashish 110
    """
111
    Parameters:
483 rajveer 112
     - id
94 ashish 113
    """
114
    pass
115
 
483 rajveer 116
  def getLineItemsForOrder(self, orderId):
94 ashish 117
    """
118
    Parameters:
483 rajveer 119
     - orderId
94 ashish 120
    """
121
    pass
122
 
483 rajveer 123
  def getAlerts(self, orderId, valid):
94 ashish 124
    """
125
    Parameters:
483 rajveer 126
     - orderId
304 ashish 127
     - valid
128
    """
129
    pass
94 ashish 130
 
483 rajveer 131
  def setAlert(self, orderId, unset, type, comment):
304 ashish 132
    """
133
    Parameters:
483 rajveer 134
     - orderId
304 ashish 135
     - unset
136
     - type
137
     - comment
138
    """
139
    pass
140
 
141
 
94 ashish 142
class Client(Iface):
143
  def __init__(self, iprot, oprot=None):
144
    self._iprot = self._oprot = iprot
145
    if oprot != None:
146
      self._oprot = oprot
147
    self._seqid = 0
148
 
149
  def createTransaction(self, transaction):
150
    """
151
    Parameters:
152
     - transaction
153
    """
154
    self.send_createTransaction(transaction)
132 ashish 155
    return self.recv_createTransaction()
94 ashish 156
 
157
  def send_createTransaction(self, transaction):
158
    self._oprot.writeMessageBegin('createTransaction', TMessageType.CALL, self._seqid)
159
    args = createTransaction_args()
160
    args.transaction = transaction
161
    args.write(self._oprot)
162
    self._oprot.writeMessageEnd()
163
    self._oprot.trans.flush()
164
 
165
  def recv_createTransaction(self, ):
166
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
167
    if mtype == TMessageType.EXCEPTION:
168
      x = TApplicationException()
169
      x.read(self._iprot)
170
      self._iprot.readMessageEnd()
171
      raise x
172
    result = createTransaction_result()
173
    result.read(self._iprot)
174
    self._iprot.readMessageEnd()
132 ashish 175
    if result.success != None:
176
      return result.success
94 ashish 177
    if result.ex != None:
178
      raise result.ex
132 ashish 179
    raise TApplicationException(TApplicationException.MISSING_RESULT, "createTransaction failed: unknown result");
94 ashish 180
 
181
  def getTransaction(self, id):
182
    """
183
    Parameters:
184
     - id
185
    """
186
    self.send_getTransaction(id)
187
    return self.recv_getTransaction()
188
 
189
  def send_getTransaction(self, id):
190
    self._oprot.writeMessageBegin('getTransaction', TMessageType.CALL, self._seqid)
191
    args = getTransaction_args()
192
    args.id = id
193
    args.write(self._oprot)
194
    self._oprot.writeMessageEnd()
195
    self._oprot.trans.flush()
196
 
197
  def recv_getTransaction(self, ):
198
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
199
    if mtype == TMessageType.EXCEPTION:
200
      x = TApplicationException()
201
      x.read(self._iprot)
202
      self._iprot.readMessageEnd()
203
      raise x
204
    result = getTransaction_result()
205
    result.read(self._iprot)
206
    self._iprot.readMessageEnd()
207
    if result.success != None:
208
      return result.success
209
    if result.ex != None:
210
      raise result.ex
211
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getTransaction failed: unknown result");
212
 
213
  def getTransactionsForCustomer(self, customerId, from_date, to_date, status):
214
    """
215
    Parameters:
216
     - customerId
217
     - from_date
218
     - to_date
219
     - status
220
    """
221
    self.send_getTransactionsForCustomer(customerId, from_date, to_date, status)
222
    return self.recv_getTransactionsForCustomer()
223
 
224
  def send_getTransactionsForCustomer(self, customerId, from_date, to_date, status):
225
    self._oprot.writeMessageBegin('getTransactionsForCustomer', TMessageType.CALL, self._seqid)
226
    args = getTransactionsForCustomer_args()
227
    args.customerId = customerId
228
    args.from_date = from_date
229
    args.to_date = to_date
230
    args.status = status
231
    args.write(self._oprot)
232
    self._oprot.writeMessageEnd()
233
    self._oprot.trans.flush()
234
 
235
  def recv_getTransactionsForCustomer(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 = getTransactionsForCustomer_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, "getTransactionsForCustomer failed: unknown result");
250
 
132 ashish 251
  def getTransactionsForShoppingCartId(self, shoppingCartId):
252
    """
253
    Parameters:
254
     - shoppingCartId
255
    """
256
    self.send_getTransactionsForShoppingCartId(shoppingCartId)
257
    return self.recv_getTransactionsForShoppingCartId()
258
 
259
  def send_getTransactionsForShoppingCartId(self, shoppingCartId):
260
    self._oprot.writeMessageBegin('getTransactionsForShoppingCartId', TMessageType.CALL, self._seqid)
261
    args = getTransactionsForShoppingCartId_args()
262
    args.shoppingCartId = shoppingCartId
263
    args.write(self._oprot)
264
    self._oprot.writeMessageEnd()
265
    self._oprot.trans.flush()
266
 
267
  def recv_getTransactionsForShoppingCartId(self, ):
268
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
269
    if mtype == TMessageType.EXCEPTION:
270
      x = TApplicationException()
271
      x.read(self._iprot)
272
      self._iprot.readMessageEnd()
273
      raise x
274
    result = getTransactionsForShoppingCartId_result()
275
    result.read(self._iprot)
276
    self._iprot.readMessageEnd()
277
    if result.success != None:
278
      return result.success
279
    if result.ex != None:
280
      raise result.ex
281
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getTransactionsForShoppingCartId failed: unknown result");
282
 
94 ashish 283
  def getTransactionStatus(self, transactionId):
284
    """
285
    Parameters:
286
     - transactionId
287
    """
288
    self.send_getTransactionStatus(transactionId)
289
    return self.recv_getTransactionStatus()
290
 
291
  def send_getTransactionStatus(self, transactionId):
292
    self._oprot.writeMessageBegin('getTransactionStatus', TMessageType.CALL, self._seqid)
293
    args = getTransactionStatus_args()
294
    args.transactionId = transactionId
295
    args.write(self._oprot)
296
    self._oprot.writeMessageEnd()
297
    self._oprot.trans.flush()
298
 
299
  def recv_getTransactionStatus(self, ):
300
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
301
    if mtype == TMessageType.EXCEPTION:
302
      x = TApplicationException()
303
      x.read(self._iprot)
304
      self._iprot.readMessageEnd()
305
      raise x
306
    result = getTransactionStatus_result()
307
    result.read(self._iprot)
308
    self._iprot.readMessageEnd()
309
    if result.success != None:
310
      return result.success
311
    if result.ex != None:
312
      raise result.ex
313
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getTransactionStatus failed: unknown result");
314
 
315
  def changeTransactionStatus(self, transactionId, status, description):
316
    """
317
    Parameters:
318
     - transactionId
319
     - status
320
     - description
321
    """
322
    self.send_changeTransactionStatus(transactionId, status, description)
323
    return self.recv_changeTransactionStatus()
324
 
325
  def send_changeTransactionStatus(self, transactionId, status, description):
326
    self._oprot.writeMessageBegin('changeTransactionStatus', TMessageType.CALL, self._seqid)
327
    args = changeTransactionStatus_args()
328
    args.transactionId = transactionId
329
    args.status = status
330
    args.description = description
331
    args.write(self._oprot)
332
    self._oprot.writeMessageEnd()
333
    self._oprot.trans.flush()
334
 
335
  def recv_changeTransactionStatus(self, ):
336
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
337
    if mtype == TMessageType.EXCEPTION:
338
      x = TApplicationException()
339
      x.read(self._iprot)
340
      self._iprot.readMessageEnd()
341
      raise x
342
    result = changeTransactionStatus_result()
343
    result.read(self._iprot)
344
    self._iprot.readMessageEnd()
345
    if result.success != None:
346
      return result.success
347
    if result.ex != None:
348
      raise result.ex
349
    raise TApplicationException(TApplicationException.MISSING_RESULT, "changeTransactionStatus failed: unknown result");
350
 
483 rajveer 351
  def getAllOrders(self, status, from_date, to_date, warehouse_id):
94 ashish 352
    """
353
    Parameters:
483 rajveer 354
     - status
355
     - from_date
356
     - to_date
357
     - warehouse_id
94 ashish 358
    """
483 rajveer 359
    self.send_getAllOrders(status, from_date, to_date, warehouse_id)
360
    return self.recv_getAllOrders()
94 ashish 361
 
483 rajveer 362
  def send_getAllOrders(self, status, from_date, to_date, warehouse_id):
363
    self._oprot.writeMessageBegin('getAllOrders', TMessageType.CALL, self._seqid)
364
    args = getAllOrders_args()
365
    args.status = status
366
    args.from_date = from_date
367
    args.to_date = to_date
368
    args.warehouse_id = warehouse_id
94 ashish 369
    args.write(self._oprot)
370
    self._oprot.writeMessageEnd()
371
    self._oprot.trans.flush()
372
 
483 rajveer 373
  def recv_getAllOrders(self, ):
94 ashish 374
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
375
    if mtype == TMessageType.EXCEPTION:
376
      x = TApplicationException()
377
      x.read(self._iprot)
378
      self._iprot.readMessageEnd()
379
      raise x
483 rajveer 380
    result = getAllOrders_result()
94 ashish 381
    result.read(self._iprot)
382
    self._iprot.readMessageEnd()
383
    if result.success != None:
384
      return result.success
385
    if result.ex != None:
386
      raise result.ex
483 rajveer 387
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getAllOrders failed: unknown result");
94 ashish 388
 
483 rajveer 389
  def changeOrderStatus(self, orderId, status, description):
94 ashish 390
    """
391
    Parameters:
483 rajveer 392
     - orderId
393
     - status
394
     - description
94 ashish 395
    """
483 rajveer 396
    self.send_changeOrderStatus(orderId, status, description)
397
    return self.recv_changeOrderStatus()
94 ashish 398
 
483 rajveer 399
  def send_changeOrderStatus(self, orderId, status, description):
400
    self._oprot.writeMessageBegin('changeOrderStatus', TMessageType.CALL, self._seqid)
401
    args = changeOrderStatus_args()
402
    args.orderId = orderId
403
    args.status = status
404
    args.description = description
94 ashish 405
    args.write(self._oprot)
406
    self._oprot.writeMessageEnd()
407
    self._oprot.trans.flush()
408
 
483 rajveer 409
  def recv_changeOrderStatus(self, ):
94 ashish 410
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
411
    if mtype == TMessageType.EXCEPTION:
412
      x = TApplicationException()
413
      x.read(self._iprot)
414
      self._iprot.readMessageEnd()
415
      raise x
483 rajveer 416
    result = changeOrderStatus_result()
94 ashish 417
    result.read(self._iprot)
418
    self._iprot.readMessageEnd()
419
    if result.success != None:
420
      return result.success
421
    if result.ex != None:
422
      raise result.ex
483 rajveer 423
    raise TApplicationException(TApplicationException.MISSING_RESULT, "changeOrderStatus failed: unknown result");
94 ashish 424
 
483 rajveer 425
  def getOrdersForTransaction(self, transactionId):
94 ashish 426
    """
427
    Parameters:
428
     - transactionId
429
    """
483 rajveer 430
    self.send_getOrdersForTransaction(transactionId)
431
    return self.recv_getOrdersForTransaction()
94 ashish 432
 
483 rajveer 433
  def send_getOrdersForTransaction(self, transactionId):
434
    self._oprot.writeMessageBegin('getOrdersForTransaction', TMessageType.CALL, self._seqid)
435
    args = getOrdersForTransaction_args()
94 ashish 436
    args.transactionId = transactionId
437
    args.write(self._oprot)
438
    self._oprot.writeMessageEnd()
439
    self._oprot.trans.flush()
440
 
483 rajveer 441
  def recv_getOrdersForTransaction(self, ):
94 ashish 442
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
443
    if mtype == TMessageType.EXCEPTION:
444
      x = TApplicationException()
445
      x.read(self._iprot)
446
      self._iprot.readMessageEnd()
447
      raise x
483 rajveer 448
    result = getOrdersForTransaction_result()
94 ashish 449
    result.read(self._iprot)
450
    self._iprot.readMessageEnd()
451
    if result.success != None:
452
      return result.success
453
    if result.ex != None:
454
      raise result.ex
483 rajveer 455
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getOrdersForTransaction failed: unknown result");
94 ashish 456
 
483 rajveer 457
  def getOrdersForCustomer(self, customerId, from_date, to_date, status):
94 ashish 458
    """
459
    Parameters:
483 rajveer 460
     - customerId
461
     - from_date
462
     - to_date
463
     - status
94 ashish 464
    """
483 rajveer 465
    self.send_getOrdersForCustomer(customerId, from_date, to_date, status)
466
    return self.recv_getOrdersForCustomer()
94 ashish 467
 
483 rajveer 468
  def send_getOrdersForCustomer(self, customerId, from_date, to_date, status):
469
    self._oprot.writeMessageBegin('getOrdersForCustomer', TMessageType.CALL, self._seqid)
470
    args = getOrdersForCustomer_args()
471
    args.customerId = customerId
472
    args.from_date = from_date
473
    args.to_date = to_date
474
    args.status = status
94 ashish 475
    args.write(self._oprot)
476
    self._oprot.writeMessageEnd()
477
    self._oprot.trans.flush()
478
 
483 rajveer 479
  def recv_getOrdersForCustomer(self, ):
94 ashish 480
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
481
    if mtype == TMessageType.EXCEPTION:
482
      x = TApplicationException()
483
      x.read(self._iprot)
484
      self._iprot.readMessageEnd()
485
      raise x
483 rajveer 486
    result = getOrdersForCustomer_result()
94 ashish 487
    result.read(self._iprot)
488
    self._iprot.readMessageEnd()
489
    if result.success != None:
490
      return result.success
491
    if result.ex != None:
492
      raise result.ex
483 rajveer 493
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getOrdersForCustomer failed: unknown result");
94 ashish 494
 
483 rajveer 495
  def createOrder(self, order):
94 ashish 496
    """
497
    Parameters:
483 rajveer 498
     - order
94 ashish 499
    """
483 rajveer 500
    self.send_createOrder(order)
501
    return self.recv_createOrder()
94 ashish 502
 
483 rajveer 503
  def send_createOrder(self, order):
504
    self._oprot.writeMessageBegin('createOrder', TMessageType.CALL, self._seqid)
505
    args = createOrder_args()
506
    args.order = order
94 ashish 507
    args.write(self._oprot)
508
    self._oprot.writeMessageEnd()
509
    self._oprot.trans.flush()
510
 
483 rajveer 511
  def recv_createOrder(self, ):
94 ashish 512
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
513
    if mtype == TMessageType.EXCEPTION:
514
      x = TApplicationException()
515
      x.read(self._iprot)
516
      self._iprot.readMessageEnd()
517
      raise x
483 rajveer 518
    result = createOrder_result()
94 ashish 519
    result.read(self._iprot)
520
    self._iprot.readMessageEnd()
521
    if result.success != None:
522
      return result.success
523
    if result.ex != None:
524
      raise result.ex
483 rajveer 525
    raise TApplicationException(TApplicationException.MISSING_RESULT, "createOrder failed: unknown result");
94 ashish 526
 
483 rajveer 527
  def getOrder(self, id):
94 ashish 528
    """
529
    Parameters:
483 rajveer 530
     - id
94 ashish 531
    """
483 rajveer 532
    self.send_getOrder(id)
533
    return self.recv_getOrder()
94 ashish 534
 
483 rajveer 535
  def send_getOrder(self, id):
536
    self._oprot.writeMessageBegin('getOrder', TMessageType.CALL, self._seqid)
537
    args = getOrder_args()
538
    args.id = id
94 ashish 539
    args.write(self._oprot)
540
    self._oprot.writeMessageEnd()
541
    self._oprot.trans.flush()
542
 
483 rajveer 543
  def recv_getOrder(self, ):
94 ashish 544
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
545
    if mtype == TMessageType.EXCEPTION:
546
      x = TApplicationException()
547
      x.read(self._iprot)
548
      self._iprot.readMessageEnd()
549
      raise x
483 rajveer 550
    result = getOrder_result()
94 ashish 551
    result.read(self._iprot)
552
    self._iprot.readMessageEnd()
553
    if result.success != None:
554
      return result.success
555
    if result.ex != None:
556
      raise result.ex
483 rajveer 557
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getOrder failed: unknown result");
94 ashish 558
 
483 rajveer 559
  def getLineItemsForOrder(self, orderId):
94 ashish 560
    """
561
    Parameters:
483 rajveer 562
     - orderId
94 ashish 563
    """
483 rajveer 564
    self.send_getLineItemsForOrder(orderId)
565
    return self.recv_getLineItemsForOrder()
94 ashish 566
 
483 rajveer 567
  def send_getLineItemsForOrder(self, orderId):
568
    self._oprot.writeMessageBegin('getLineItemsForOrder', TMessageType.CALL, self._seqid)
569
    args = getLineItemsForOrder_args()
570
    args.orderId = orderId
94 ashish 571
    args.write(self._oprot)
572
    self._oprot.writeMessageEnd()
573
    self._oprot.trans.flush()
574
 
483 rajveer 575
  def recv_getLineItemsForOrder(self, ):
94 ashish 576
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
577
    if mtype == TMessageType.EXCEPTION:
578
      x = TApplicationException()
579
      x.read(self._iprot)
580
      self._iprot.readMessageEnd()
581
      raise x
483 rajveer 582
    result = getLineItemsForOrder_result()
94 ashish 583
    result.read(self._iprot)
584
    self._iprot.readMessageEnd()
585
    if result.success != None:
586
      return result.success
587
    if result.ex != None:
588
      raise result.ex
483 rajveer 589
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getLineItemsForOrder failed: unknown result");
94 ashish 590
 
483 rajveer 591
  def getAlerts(self, orderId, valid):
94 ashish 592
    """
593
    Parameters:
483 rajveer 594
     - orderId
304 ashish 595
     - valid
596
    """
483 rajveer 597
    self.send_getAlerts(orderId, valid)
304 ashish 598
    return self.recv_getAlerts()
94 ashish 599
 
483 rajveer 600
  def send_getAlerts(self, orderId, valid):
304 ashish 601
    self._oprot.writeMessageBegin('getAlerts', TMessageType.CALL, self._seqid)
602
    args = getAlerts_args()
483 rajveer 603
    args.orderId = orderId
304 ashish 604
    args.valid = valid
605
    args.write(self._oprot)
606
    self._oprot.writeMessageEnd()
607
    self._oprot.trans.flush()
608
 
609
  def recv_getAlerts(self, ):
610
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
611
    if mtype == TMessageType.EXCEPTION:
612
      x = TApplicationException()
613
      x.read(self._iprot)
614
      self._iprot.readMessageEnd()
615
      raise x
616
    result = getAlerts_result()
617
    result.read(self._iprot)
618
    self._iprot.readMessageEnd()
619
    if result.success != None:
620
      return result.success
621
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getAlerts failed: unknown result");
622
 
483 rajveer 623
  def setAlert(self, orderId, unset, type, comment):
304 ashish 624
    """
625
    Parameters:
483 rajveer 626
     - orderId
304 ashish 627
     - unset
628
     - type
629
     - comment
630
    """
483 rajveer 631
    self.send_setAlert(orderId, unset, type, comment)
304 ashish 632
    self.recv_setAlert()
633
 
483 rajveer 634
  def send_setAlert(self, orderId, unset, type, comment):
304 ashish 635
    self._oprot.writeMessageBegin('setAlert', TMessageType.CALL, self._seqid)
636
    args = setAlert_args()
483 rajveer 637
    args.orderId = orderId
304 ashish 638
    args.unset = unset
639
    args.type = type
640
    args.comment = comment
641
    args.write(self._oprot)
642
    self._oprot.writeMessageEnd()
643
    self._oprot.trans.flush()
644
 
645
  def recv_setAlert(self, ):
646
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
647
    if mtype == TMessageType.EXCEPTION:
648
      x = TApplicationException()
649
      x.read(self._iprot)
650
      self._iprot.readMessageEnd()
651
      raise x
652
    result = setAlert_result()
653
    result.read(self._iprot)
654
    self._iprot.readMessageEnd()
655
    return
656
 
657
 
94 ashish 658
class Processor(Iface, TProcessor):
659
  def __init__(self, handler):
660
    self._handler = handler
661
    self._processMap = {}
662
    self._processMap["createTransaction"] = Processor.process_createTransaction
663
    self._processMap["getTransaction"] = Processor.process_getTransaction
664
    self._processMap["getTransactionsForCustomer"] = Processor.process_getTransactionsForCustomer
132 ashish 665
    self._processMap["getTransactionsForShoppingCartId"] = Processor.process_getTransactionsForShoppingCartId
94 ashish 666
    self._processMap["getTransactionStatus"] = Processor.process_getTransactionStatus
667
    self._processMap["changeTransactionStatus"] = Processor.process_changeTransactionStatus
483 rajveer 668
    self._processMap["getAllOrders"] = Processor.process_getAllOrders
669
    self._processMap["changeOrderStatus"] = Processor.process_changeOrderStatus
670
    self._processMap["getOrdersForTransaction"] = Processor.process_getOrdersForTransaction
671
    self._processMap["getOrdersForCustomer"] = Processor.process_getOrdersForCustomer
672
    self._processMap["createOrder"] = Processor.process_createOrder
673
    self._processMap["getOrder"] = Processor.process_getOrder
674
    self._processMap["getLineItemsForOrder"] = Processor.process_getLineItemsForOrder
304 ashish 675
    self._processMap["getAlerts"] = Processor.process_getAlerts
676
    self._processMap["setAlert"] = Processor.process_setAlert
94 ashish 677
 
678
  def process(self, iprot, oprot):
679
    (name, type, seqid) = iprot.readMessageBegin()
680
    if name not in self._processMap:
681
      iprot.skip(TType.STRUCT)
682
      iprot.readMessageEnd()
683
      x = TApplicationException(TApplicationException.UNKNOWN_METHOD, 'Unknown function %s' % (name))
684
      oprot.writeMessageBegin(name, TMessageType.EXCEPTION, seqid)
685
      x.write(oprot)
686
      oprot.writeMessageEnd()
687
      oprot.trans.flush()
688
      return
689
    else:
690
      self._processMap[name](self, seqid, iprot, oprot)
691
    return True
692
 
693
  def process_createTransaction(self, seqid, iprot, oprot):
694
    args = createTransaction_args()
695
    args.read(iprot)
696
    iprot.readMessageEnd()
697
    result = createTransaction_result()
698
    try:
132 ashish 699
      result.success = self._handler.createTransaction(args.transaction)
94 ashish 700
    except TransactionServiceException, ex:
701
      result.ex = ex
702
    oprot.writeMessageBegin("createTransaction", TMessageType.REPLY, seqid)
703
    result.write(oprot)
704
    oprot.writeMessageEnd()
705
    oprot.trans.flush()
706
 
707
  def process_getTransaction(self, seqid, iprot, oprot):
708
    args = getTransaction_args()
709
    args.read(iprot)
710
    iprot.readMessageEnd()
711
    result = getTransaction_result()
712
    try:
713
      result.success = self._handler.getTransaction(args.id)
714
    except TransactionServiceException, ex:
715
      result.ex = ex
716
    oprot.writeMessageBegin("getTransaction", TMessageType.REPLY, seqid)
717
    result.write(oprot)
718
    oprot.writeMessageEnd()
719
    oprot.trans.flush()
720
 
721
  def process_getTransactionsForCustomer(self, seqid, iprot, oprot):
722
    args = getTransactionsForCustomer_args()
723
    args.read(iprot)
724
    iprot.readMessageEnd()
725
    result = getTransactionsForCustomer_result()
726
    try:
727
      result.success = self._handler.getTransactionsForCustomer(args.customerId, args.from_date, args.to_date, args.status)
728
    except TransactionServiceException, ex:
729
      result.ex = ex
730
    oprot.writeMessageBegin("getTransactionsForCustomer", TMessageType.REPLY, seqid)
731
    result.write(oprot)
732
    oprot.writeMessageEnd()
733
    oprot.trans.flush()
734
 
132 ashish 735
  def process_getTransactionsForShoppingCartId(self, seqid, iprot, oprot):
736
    args = getTransactionsForShoppingCartId_args()
737
    args.read(iprot)
738
    iprot.readMessageEnd()
739
    result = getTransactionsForShoppingCartId_result()
740
    try:
741
      result.success = self._handler.getTransactionsForShoppingCartId(args.shoppingCartId)
742
    except TransactionServiceException, ex:
743
      result.ex = ex
744
    oprot.writeMessageBegin("getTransactionsForShoppingCartId", TMessageType.REPLY, seqid)
745
    result.write(oprot)
746
    oprot.writeMessageEnd()
747
    oprot.trans.flush()
748
 
94 ashish 749
  def process_getTransactionStatus(self, seqid, iprot, oprot):
750
    args = getTransactionStatus_args()
751
    args.read(iprot)
752
    iprot.readMessageEnd()
753
    result = getTransactionStatus_result()
754
    try:
755
      result.success = self._handler.getTransactionStatus(args.transactionId)
756
    except TransactionServiceException, ex:
757
      result.ex = ex
758
    oprot.writeMessageBegin("getTransactionStatus", TMessageType.REPLY, seqid)
759
    result.write(oprot)
760
    oprot.writeMessageEnd()
761
    oprot.trans.flush()
762
 
763
  def process_changeTransactionStatus(self, seqid, iprot, oprot):
764
    args = changeTransactionStatus_args()
765
    args.read(iprot)
766
    iprot.readMessageEnd()
767
    result = changeTransactionStatus_result()
768
    try:
769
      result.success = self._handler.changeTransactionStatus(args.transactionId, args.status, args.description)
770
    except TransactionServiceException, ex:
771
      result.ex = ex
772
    oprot.writeMessageBegin("changeTransactionStatus", TMessageType.REPLY, seqid)
773
    result.write(oprot)
774
    oprot.writeMessageEnd()
775
    oprot.trans.flush()
776
 
483 rajveer 777
  def process_getAllOrders(self, seqid, iprot, oprot):
778
    args = getAllOrders_args()
94 ashish 779
    args.read(iprot)
780
    iprot.readMessageEnd()
483 rajveer 781
    result = getAllOrders_result()
94 ashish 782
    try:
483 rajveer 783
      result.success = self._handler.getAllOrders(args.status, args.from_date, args.to_date, args.warehouse_id)
94 ashish 784
    except TransactionServiceException, ex:
785
      result.ex = ex
483 rajveer 786
    oprot.writeMessageBegin("getAllOrders", TMessageType.REPLY, seqid)
94 ashish 787
    result.write(oprot)
788
    oprot.writeMessageEnd()
789
    oprot.trans.flush()
790
 
483 rajveer 791
  def process_changeOrderStatus(self, seqid, iprot, oprot):
792
    args = changeOrderStatus_args()
94 ashish 793
    args.read(iprot)
794
    iprot.readMessageEnd()
483 rajveer 795
    result = changeOrderStatus_result()
94 ashish 796
    try:
483 rajveer 797
      result.success = self._handler.changeOrderStatus(args.orderId, args.status, args.description)
94 ashish 798
    except TransactionServiceException, ex:
799
      result.ex = ex
483 rajveer 800
    oprot.writeMessageBegin("changeOrderStatus", TMessageType.REPLY, seqid)
94 ashish 801
    result.write(oprot)
802
    oprot.writeMessageEnd()
803
    oprot.trans.flush()
804
 
483 rajveer 805
  def process_getOrdersForTransaction(self, seqid, iprot, oprot):
806
    args = getOrdersForTransaction_args()
94 ashish 807
    args.read(iprot)
808
    iprot.readMessageEnd()
483 rajveer 809
    result = getOrdersForTransaction_result()
94 ashish 810
    try:
483 rajveer 811
      result.success = self._handler.getOrdersForTransaction(args.transactionId)
94 ashish 812
    except TransactionServiceException, ex:
813
      result.ex = ex
483 rajveer 814
    oprot.writeMessageBegin("getOrdersForTransaction", TMessageType.REPLY, seqid)
94 ashish 815
    result.write(oprot)
816
    oprot.writeMessageEnd()
817
    oprot.trans.flush()
818
 
483 rajveer 819
  def process_getOrdersForCustomer(self, seqid, iprot, oprot):
820
    args = getOrdersForCustomer_args()
94 ashish 821
    args.read(iprot)
822
    iprot.readMessageEnd()
483 rajveer 823
    result = getOrdersForCustomer_result()
94 ashish 824
    try:
483 rajveer 825
      result.success = self._handler.getOrdersForCustomer(args.customerId, args.from_date, args.to_date, args.status)
94 ashish 826
    except TransactionServiceException, ex:
827
      result.ex = ex
483 rajveer 828
    oprot.writeMessageBegin("getOrdersForCustomer", TMessageType.REPLY, seqid)
94 ashish 829
    result.write(oprot)
830
    oprot.writeMessageEnd()
831
    oprot.trans.flush()
832
 
483 rajveer 833
  def process_createOrder(self, seqid, iprot, oprot):
834
    args = createOrder_args()
94 ashish 835
    args.read(iprot)
836
    iprot.readMessageEnd()
483 rajveer 837
    result = createOrder_result()
94 ashish 838
    try:
483 rajveer 839
      result.success = self._handler.createOrder(args.order)
94 ashish 840
    except TransactionServiceException, ex:
841
      result.ex = ex
483 rajveer 842
    oprot.writeMessageBegin("createOrder", TMessageType.REPLY, seqid)
94 ashish 843
    result.write(oprot)
844
    oprot.writeMessageEnd()
845
    oprot.trans.flush()
846
 
483 rajveer 847
  def process_getOrder(self, seqid, iprot, oprot):
848
    args = getOrder_args()
94 ashish 849
    args.read(iprot)
850
    iprot.readMessageEnd()
483 rajveer 851
    result = getOrder_result()
94 ashish 852
    try:
483 rajveer 853
      result.success = self._handler.getOrder(args.id)
94 ashish 854
    except TransactionServiceException, ex:
855
      result.ex = ex
483 rajveer 856
    oprot.writeMessageBegin("getOrder", TMessageType.REPLY, seqid)
94 ashish 857
    result.write(oprot)
858
    oprot.writeMessageEnd()
859
    oprot.trans.flush()
860
 
483 rajveer 861
  def process_getLineItemsForOrder(self, seqid, iprot, oprot):
862
    args = getLineItemsForOrder_args()
94 ashish 863
    args.read(iprot)
864
    iprot.readMessageEnd()
483 rajveer 865
    result = getLineItemsForOrder_result()
94 ashish 866
    try:
483 rajveer 867
      result.success = self._handler.getLineItemsForOrder(args.orderId)
94 ashish 868
    except TransactionServiceException, ex:
869
      result.ex = ex
483 rajveer 870
    oprot.writeMessageBegin("getLineItemsForOrder", TMessageType.REPLY, seqid)
94 ashish 871
    result.write(oprot)
872
    oprot.writeMessageEnd()
873
    oprot.trans.flush()
874
 
304 ashish 875
  def process_getAlerts(self, seqid, iprot, oprot):
876
    args = getAlerts_args()
877
    args.read(iprot)
878
    iprot.readMessageEnd()
879
    result = getAlerts_result()
483 rajveer 880
    result.success = self._handler.getAlerts(args.orderId, args.valid)
304 ashish 881
    oprot.writeMessageBegin("getAlerts", TMessageType.REPLY, seqid)
882
    result.write(oprot)
883
    oprot.writeMessageEnd()
884
    oprot.trans.flush()
94 ashish 885
 
304 ashish 886
  def process_setAlert(self, seqid, iprot, oprot):
887
    args = setAlert_args()
888
    args.read(iprot)
889
    iprot.readMessageEnd()
890
    result = setAlert_result()
483 rajveer 891
    self._handler.setAlert(args.orderId, args.unset, args.type, args.comment)
304 ashish 892
    oprot.writeMessageBegin("setAlert", TMessageType.REPLY, seqid)
893
    result.write(oprot)
894
    oprot.writeMessageEnd()
895
    oprot.trans.flush()
896
 
897
 
94 ashish 898
# HELPER FUNCTIONS AND STRUCTURES
899
 
900
class createTransaction_args:
901
  """
902
  Attributes:
903
   - transaction
904
  """
905
 
906
  thrift_spec = (
907
    None, # 0
908
    (1, TType.STRUCT, 'transaction', (Transaction, Transaction.thrift_spec), None, ), # 1
909
  )
910
 
911
  def __init__(self, transaction=None,):
912
    self.transaction = transaction
913
 
914
  def read(self, iprot):
915
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
916
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
917
      return
918
    iprot.readStructBegin()
919
    while True:
920
      (fname, ftype, fid) = iprot.readFieldBegin()
921
      if ftype == TType.STOP:
922
        break
923
      if fid == 1:
924
        if ftype == TType.STRUCT:
925
          self.transaction = Transaction()
926
          self.transaction.read(iprot)
927
        else:
928
          iprot.skip(ftype)
929
      else:
930
        iprot.skip(ftype)
931
      iprot.readFieldEnd()
932
    iprot.readStructEnd()
933
 
934
  def write(self, oprot):
935
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
936
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
937
      return
938
    oprot.writeStructBegin('createTransaction_args')
939
    if self.transaction != None:
940
      oprot.writeFieldBegin('transaction', TType.STRUCT, 1)
941
      self.transaction.write(oprot)
942
      oprot.writeFieldEnd()
943
    oprot.writeFieldStop()
944
    oprot.writeStructEnd()
945
 
946
  def __repr__(self):
947
    L = ['%s=%r' % (key, value)
948
      for key, value in self.__dict__.iteritems()]
949
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
950
 
951
  def __eq__(self, other):
952
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
953
 
954
  def __ne__(self, other):
955
    return not (self == other)
956
 
957
class createTransaction_result:
958
  """
959
  Attributes:
132 ashish 960
   - success
94 ashish 961
   - ex
962
  """
963
 
964
  thrift_spec = (
132 ashish 965
    (0, TType.I64, 'success', None, None, ), # 0
94 ashish 966
    (1, TType.STRUCT, 'ex', (TransactionServiceException, TransactionServiceException.thrift_spec), None, ), # 1
967
  )
968
 
132 ashish 969
  def __init__(self, success=None, ex=None,):
970
    self.success = success
94 ashish 971
    self.ex = ex
972
 
973
  def read(self, iprot):
974
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
975
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
976
      return
977
    iprot.readStructBegin()
978
    while True:
979
      (fname, ftype, fid) = iprot.readFieldBegin()
980
      if ftype == TType.STOP:
981
        break
132 ashish 982
      if fid == 0:
983
        if ftype == TType.I64:
984
          self.success = iprot.readI64();
985
        else:
986
          iprot.skip(ftype)
987
      elif fid == 1:
94 ashish 988
        if ftype == TType.STRUCT:
989
          self.ex = TransactionServiceException()
990
          self.ex.read(iprot)
991
        else:
992
          iprot.skip(ftype)
993
      else:
994
        iprot.skip(ftype)
995
      iprot.readFieldEnd()
996
    iprot.readStructEnd()
997
 
998
  def write(self, oprot):
999
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1000
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1001
      return
1002
    oprot.writeStructBegin('createTransaction_result')
132 ashish 1003
    if self.success != None:
1004
      oprot.writeFieldBegin('success', TType.I64, 0)
1005
      oprot.writeI64(self.success)
1006
      oprot.writeFieldEnd()
94 ashish 1007
    if self.ex != None:
1008
      oprot.writeFieldBegin('ex', TType.STRUCT, 1)
1009
      self.ex.write(oprot)
1010
      oprot.writeFieldEnd()
1011
    oprot.writeFieldStop()
1012
    oprot.writeStructEnd()
1013
 
1014
  def __repr__(self):
1015
    L = ['%s=%r' % (key, value)
1016
      for key, value in self.__dict__.iteritems()]
1017
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1018
 
1019
  def __eq__(self, other):
1020
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1021
 
1022
  def __ne__(self, other):
1023
    return not (self == other)
1024
 
1025
class getTransaction_args:
1026
  """
1027
  Attributes:
1028
   - id
1029
  """
1030
 
1031
  thrift_spec = (
1032
    None, # 0
1033
    (1, TType.I64, 'id', None, None, ), # 1
1034
  )
1035
 
1036
  def __init__(self, id=None,):
1037
    self.id = id
1038
 
1039
  def read(self, iprot):
1040
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1041
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1042
      return
1043
    iprot.readStructBegin()
1044
    while True:
1045
      (fname, ftype, fid) = iprot.readFieldBegin()
1046
      if ftype == TType.STOP:
1047
        break
1048
      if fid == 1:
1049
        if ftype == TType.I64:
1050
          self.id = iprot.readI64();
1051
        else:
1052
          iprot.skip(ftype)
1053
      else:
1054
        iprot.skip(ftype)
1055
      iprot.readFieldEnd()
1056
    iprot.readStructEnd()
1057
 
1058
  def write(self, oprot):
1059
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1060
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1061
      return
1062
    oprot.writeStructBegin('getTransaction_args')
1063
    if self.id != None:
1064
      oprot.writeFieldBegin('id', TType.I64, 1)
1065
      oprot.writeI64(self.id)
1066
      oprot.writeFieldEnd()
1067
    oprot.writeFieldStop()
1068
    oprot.writeStructEnd()
1069
 
1070
  def __repr__(self):
1071
    L = ['%s=%r' % (key, value)
1072
      for key, value in self.__dict__.iteritems()]
1073
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1074
 
1075
  def __eq__(self, other):
1076
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1077
 
1078
  def __ne__(self, other):
1079
    return not (self == other)
1080
 
1081
class getTransaction_result:
1082
  """
1083
  Attributes:
1084
   - success
1085
   - ex
1086
  """
1087
 
1088
  thrift_spec = (
1089
    (0, TType.STRUCT, 'success', (Transaction, Transaction.thrift_spec), None, ), # 0
1090
    (1, TType.STRUCT, 'ex', (TransactionServiceException, TransactionServiceException.thrift_spec), None, ), # 1
1091
  )
1092
 
1093
  def __init__(self, success=None, ex=None,):
1094
    self.success = success
1095
    self.ex = ex
1096
 
1097
  def read(self, iprot):
1098
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1099
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1100
      return
1101
    iprot.readStructBegin()
1102
    while True:
1103
      (fname, ftype, fid) = iprot.readFieldBegin()
1104
      if ftype == TType.STOP:
1105
        break
1106
      if fid == 0:
1107
        if ftype == TType.STRUCT:
1108
          self.success = Transaction()
1109
          self.success.read(iprot)
1110
        else:
1111
          iprot.skip(ftype)
1112
      elif fid == 1:
1113
        if ftype == TType.STRUCT:
1114
          self.ex = TransactionServiceException()
1115
          self.ex.read(iprot)
1116
        else:
1117
          iprot.skip(ftype)
1118
      else:
1119
        iprot.skip(ftype)
1120
      iprot.readFieldEnd()
1121
    iprot.readStructEnd()
1122
 
1123
  def write(self, oprot):
1124
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1125
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1126
      return
1127
    oprot.writeStructBegin('getTransaction_result')
1128
    if self.success != None:
1129
      oprot.writeFieldBegin('success', TType.STRUCT, 0)
1130
      self.success.write(oprot)
1131
      oprot.writeFieldEnd()
1132
    if self.ex != None:
1133
      oprot.writeFieldBegin('ex', TType.STRUCT, 1)
1134
      self.ex.write(oprot)
1135
      oprot.writeFieldEnd()
1136
    oprot.writeFieldStop()
1137
    oprot.writeStructEnd()
1138
 
1139
  def __repr__(self):
1140
    L = ['%s=%r' % (key, value)
1141
      for key, value in self.__dict__.iteritems()]
1142
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1143
 
1144
  def __eq__(self, other):
1145
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1146
 
1147
  def __ne__(self, other):
1148
    return not (self == other)
1149
 
1150
class getTransactionsForCustomer_args:
1151
  """
1152
  Attributes:
1153
   - customerId
1154
   - from_date
1155
   - to_date
1156
   - status
1157
  """
1158
 
1159
  thrift_spec = (
1160
    None, # 0
1161
    (1, TType.I64, 'customerId', None, None, ), # 1
1162
    (2, TType.I64, 'from_date', None, None, ), # 2
1163
    (3, TType.I64, 'to_date', None, None, ), # 3
1164
    (4, TType.I32, 'status', None, None, ), # 4
1165
  )
1166
 
1167
  def __init__(self, customerId=None, from_date=None, to_date=None, status=None,):
1168
    self.customerId = customerId
1169
    self.from_date = from_date
1170
    self.to_date = to_date
1171
    self.status = status
1172
 
1173
  def read(self, iprot):
1174
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1175
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1176
      return
1177
    iprot.readStructBegin()
1178
    while True:
1179
      (fname, ftype, fid) = iprot.readFieldBegin()
1180
      if ftype == TType.STOP:
1181
        break
1182
      if fid == 1:
1183
        if ftype == TType.I64:
1184
          self.customerId = iprot.readI64();
1185
        else:
1186
          iprot.skip(ftype)
1187
      elif fid == 2:
1188
        if ftype == TType.I64:
1189
          self.from_date = iprot.readI64();
1190
        else:
1191
          iprot.skip(ftype)
1192
      elif fid == 3:
1193
        if ftype == TType.I64:
1194
          self.to_date = iprot.readI64();
1195
        else:
1196
          iprot.skip(ftype)
1197
      elif fid == 4:
1198
        if ftype == TType.I32:
1199
          self.status = iprot.readI32();
1200
        else:
1201
          iprot.skip(ftype)
1202
      else:
1203
        iprot.skip(ftype)
1204
      iprot.readFieldEnd()
1205
    iprot.readStructEnd()
1206
 
1207
  def write(self, oprot):
1208
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1209
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1210
      return
1211
    oprot.writeStructBegin('getTransactionsForCustomer_args')
1212
    if self.customerId != None:
1213
      oprot.writeFieldBegin('customerId', TType.I64, 1)
1214
      oprot.writeI64(self.customerId)
1215
      oprot.writeFieldEnd()
1216
    if self.from_date != None:
1217
      oprot.writeFieldBegin('from_date', TType.I64, 2)
1218
      oprot.writeI64(self.from_date)
1219
      oprot.writeFieldEnd()
1220
    if self.to_date != None:
1221
      oprot.writeFieldBegin('to_date', TType.I64, 3)
1222
      oprot.writeI64(self.to_date)
1223
      oprot.writeFieldEnd()
1224
    if self.status != None:
1225
      oprot.writeFieldBegin('status', TType.I32, 4)
1226
      oprot.writeI32(self.status)
1227
      oprot.writeFieldEnd()
1228
    oprot.writeFieldStop()
1229
    oprot.writeStructEnd()
1230
 
1231
  def __repr__(self):
1232
    L = ['%s=%r' % (key, value)
1233
      for key, value in self.__dict__.iteritems()]
1234
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1235
 
1236
  def __eq__(self, other):
1237
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1238
 
1239
  def __ne__(self, other):
1240
    return not (self == other)
1241
 
1242
class getTransactionsForCustomer_result:
1243
  """
1244
  Attributes:
1245
   - success
1246
   - ex
1247
  """
1248
 
1249
  thrift_spec = (
1250
    (0, TType.LIST, 'success', (TType.STRUCT,(Transaction, Transaction.thrift_spec)), None, ), # 0
1251
    (1, TType.STRUCT, 'ex', (TransactionServiceException, TransactionServiceException.thrift_spec), None, ), # 1
1252
  )
1253
 
1254
  def __init__(self, success=None, ex=None,):
1255
    self.success = success
1256
    self.ex = ex
1257
 
1258
  def read(self, iprot):
1259
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1260
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1261
      return
1262
    iprot.readStructBegin()
1263
    while True:
1264
      (fname, ftype, fid) = iprot.readFieldBegin()
1265
      if ftype == TType.STOP:
1266
        break
1267
      if fid == 0:
1268
        if ftype == TType.LIST:
1269
          self.success = []
483 rajveer 1270
          (_etype26, _size23) = iprot.readListBegin()
1271
          for _i27 in xrange(_size23):
1272
            _elem28 = Transaction()
1273
            _elem28.read(iprot)
1274
            self.success.append(_elem28)
94 ashish 1275
          iprot.readListEnd()
1276
        else:
1277
          iprot.skip(ftype)
1278
      elif fid == 1:
1279
        if ftype == TType.STRUCT:
1280
          self.ex = TransactionServiceException()
1281
          self.ex.read(iprot)
1282
        else:
1283
          iprot.skip(ftype)
1284
      else:
1285
        iprot.skip(ftype)
1286
      iprot.readFieldEnd()
1287
    iprot.readStructEnd()
1288
 
1289
  def write(self, oprot):
1290
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1291
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1292
      return
1293
    oprot.writeStructBegin('getTransactionsForCustomer_result')
1294
    if self.success != None:
1295
      oprot.writeFieldBegin('success', TType.LIST, 0)
1296
      oprot.writeListBegin(TType.STRUCT, len(self.success))
483 rajveer 1297
      for iter29 in self.success:
1298
        iter29.write(oprot)
94 ashish 1299
      oprot.writeListEnd()
1300
      oprot.writeFieldEnd()
1301
    if self.ex != None:
1302
      oprot.writeFieldBegin('ex', TType.STRUCT, 1)
1303
      self.ex.write(oprot)
1304
      oprot.writeFieldEnd()
1305
    oprot.writeFieldStop()
1306
    oprot.writeStructEnd()
1307
 
1308
  def __repr__(self):
1309
    L = ['%s=%r' % (key, value)
1310
      for key, value in self.__dict__.iteritems()]
1311
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1312
 
1313
  def __eq__(self, other):
1314
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1315
 
1316
  def __ne__(self, other):
1317
    return not (self == other)
1318
 
132 ashish 1319
class getTransactionsForShoppingCartId_args:
1320
  """
1321
  Attributes:
1322
   - shoppingCartId
1323
  """
1324
 
1325
  thrift_spec = (
1326
    None, # 0
1327
    (1, TType.I64, 'shoppingCartId', None, None, ), # 1
1328
  )
1329
 
1330
  def __init__(self, shoppingCartId=None,):
1331
    self.shoppingCartId = shoppingCartId
1332
 
1333
  def read(self, iprot):
1334
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1335
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1336
      return
1337
    iprot.readStructBegin()
1338
    while True:
1339
      (fname, ftype, fid) = iprot.readFieldBegin()
1340
      if ftype == TType.STOP:
1341
        break
1342
      if fid == 1:
1343
        if ftype == TType.I64:
1344
          self.shoppingCartId = iprot.readI64();
1345
        else:
1346
          iprot.skip(ftype)
1347
      else:
1348
        iprot.skip(ftype)
1349
      iprot.readFieldEnd()
1350
    iprot.readStructEnd()
1351
 
1352
  def write(self, oprot):
1353
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1354
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1355
      return
1356
    oprot.writeStructBegin('getTransactionsForShoppingCartId_args')
1357
    if self.shoppingCartId != None:
1358
      oprot.writeFieldBegin('shoppingCartId', TType.I64, 1)
1359
      oprot.writeI64(self.shoppingCartId)
1360
      oprot.writeFieldEnd()
1361
    oprot.writeFieldStop()
1362
    oprot.writeStructEnd()
1363
 
1364
  def __repr__(self):
1365
    L = ['%s=%r' % (key, value)
1366
      for key, value in self.__dict__.iteritems()]
1367
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1368
 
1369
  def __eq__(self, other):
1370
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1371
 
1372
  def __ne__(self, other):
1373
    return not (self == other)
1374
 
1375
class getTransactionsForShoppingCartId_result:
1376
  """
1377
  Attributes:
1378
   - success
1379
   - ex
1380
  """
1381
 
1382
  thrift_spec = (
1383
    (0, TType.LIST, 'success', (TType.STRUCT,(Transaction, Transaction.thrift_spec)), None, ), # 0
1384
    (1, TType.STRUCT, 'ex', (TransactionServiceException, TransactionServiceException.thrift_spec), None, ), # 1
1385
  )
1386
 
1387
  def __init__(self, success=None, ex=None,):
1388
    self.success = success
1389
    self.ex = ex
1390
 
1391
  def read(self, iprot):
1392
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1393
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1394
      return
1395
    iprot.readStructBegin()
1396
    while True:
1397
      (fname, ftype, fid) = iprot.readFieldBegin()
1398
      if ftype == TType.STOP:
1399
        break
1400
      if fid == 0:
1401
        if ftype == TType.LIST:
1402
          self.success = []
483 rajveer 1403
          (_etype33, _size30) = iprot.readListBegin()
1404
          for _i34 in xrange(_size30):
1405
            _elem35 = Transaction()
1406
            _elem35.read(iprot)
1407
            self.success.append(_elem35)
132 ashish 1408
          iprot.readListEnd()
1409
        else:
1410
          iprot.skip(ftype)
1411
      elif fid == 1:
1412
        if ftype == TType.STRUCT:
1413
          self.ex = TransactionServiceException()
1414
          self.ex.read(iprot)
1415
        else:
1416
          iprot.skip(ftype)
1417
      else:
1418
        iprot.skip(ftype)
1419
      iprot.readFieldEnd()
1420
    iprot.readStructEnd()
1421
 
1422
  def write(self, oprot):
1423
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1424
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1425
      return
1426
    oprot.writeStructBegin('getTransactionsForShoppingCartId_result')
1427
    if self.success != None:
1428
      oprot.writeFieldBegin('success', TType.LIST, 0)
1429
      oprot.writeListBegin(TType.STRUCT, len(self.success))
483 rajveer 1430
      for iter36 in self.success:
1431
        iter36.write(oprot)
132 ashish 1432
      oprot.writeListEnd()
1433
      oprot.writeFieldEnd()
1434
    if self.ex != None:
1435
      oprot.writeFieldBegin('ex', TType.STRUCT, 1)
1436
      self.ex.write(oprot)
1437
      oprot.writeFieldEnd()
1438
    oprot.writeFieldStop()
1439
    oprot.writeStructEnd()
1440
 
1441
  def __repr__(self):
1442
    L = ['%s=%r' % (key, value)
1443
      for key, value in self.__dict__.iteritems()]
1444
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1445
 
1446
  def __eq__(self, other):
1447
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1448
 
1449
  def __ne__(self, other):
1450
    return not (self == other)
1451
 
94 ashish 1452
class getTransactionStatus_args:
1453
  """
1454
  Attributes:
1455
   - transactionId
1456
  """
1457
 
1458
  thrift_spec = (
1459
    None, # 0
1460
    (1, TType.I64, 'transactionId', None, None, ), # 1
1461
  )
1462
 
1463
  def __init__(self, transactionId=None,):
1464
    self.transactionId = transactionId
1465
 
1466
  def read(self, iprot):
1467
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1468
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1469
      return
1470
    iprot.readStructBegin()
1471
    while True:
1472
      (fname, ftype, fid) = iprot.readFieldBegin()
1473
      if ftype == TType.STOP:
1474
        break
1475
      if fid == 1:
1476
        if ftype == TType.I64:
1477
          self.transactionId = iprot.readI64();
1478
        else:
1479
          iprot.skip(ftype)
1480
      else:
1481
        iprot.skip(ftype)
1482
      iprot.readFieldEnd()
1483
    iprot.readStructEnd()
1484
 
1485
  def write(self, oprot):
1486
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1487
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1488
      return
1489
    oprot.writeStructBegin('getTransactionStatus_args')
1490
    if self.transactionId != None:
1491
      oprot.writeFieldBegin('transactionId', TType.I64, 1)
1492
      oprot.writeI64(self.transactionId)
1493
      oprot.writeFieldEnd()
1494
    oprot.writeFieldStop()
1495
    oprot.writeStructEnd()
1496
 
1497
  def __repr__(self):
1498
    L = ['%s=%r' % (key, value)
1499
      for key, value in self.__dict__.iteritems()]
1500
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1501
 
1502
  def __eq__(self, other):
1503
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1504
 
1505
  def __ne__(self, other):
1506
    return not (self == other)
1507
 
1508
class getTransactionStatus_result:
1509
  """
1510
  Attributes:
1511
   - success
1512
   - ex
1513
  """
1514
 
1515
  thrift_spec = (
1516
    (0, TType.I32, 'success', None, None, ), # 0
1517
    (1, TType.STRUCT, 'ex', (TransactionServiceException, TransactionServiceException.thrift_spec), None, ), # 1
1518
  )
1519
 
1520
  def __init__(self, success=None, ex=None,):
1521
    self.success = success
1522
    self.ex = ex
1523
 
1524
  def read(self, iprot):
1525
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1526
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1527
      return
1528
    iprot.readStructBegin()
1529
    while True:
1530
      (fname, ftype, fid) = iprot.readFieldBegin()
1531
      if ftype == TType.STOP:
1532
        break
1533
      if fid == 0:
1534
        if ftype == TType.I32:
1535
          self.success = iprot.readI32();
1536
        else:
1537
          iprot.skip(ftype)
1538
      elif fid == 1:
1539
        if ftype == TType.STRUCT:
1540
          self.ex = TransactionServiceException()
1541
          self.ex.read(iprot)
1542
        else:
1543
          iprot.skip(ftype)
1544
      else:
1545
        iprot.skip(ftype)
1546
      iprot.readFieldEnd()
1547
    iprot.readStructEnd()
1548
 
1549
  def write(self, oprot):
1550
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1551
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1552
      return
1553
    oprot.writeStructBegin('getTransactionStatus_result')
1554
    if self.success != None:
1555
      oprot.writeFieldBegin('success', TType.I32, 0)
1556
      oprot.writeI32(self.success)
1557
      oprot.writeFieldEnd()
1558
    if self.ex != None:
1559
      oprot.writeFieldBegin('ex', TType.STRUCT, 1)
1560
      self.ex.write(oprot)
1561
      oprot.writeFieldEnd()
1562
    oprot.writeFieldStop()
1563
    oprot.writeStructEnd()
1564
 
1565
  def __repr__(self):
1566
    L = ['%s=%r' % (key, value)
1567
      for key, value in self.__dict__.iteritems()]
1568
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1569
 
1570
  def __eq__(self, other):
1571
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1572
 
1573
  def __ne__(self, other):
1574
    return not (self == other)
1575
 
1576
class changeTransactionStatus_args:
1577
  """
1578
  Attributes:
1579
   - transactionId
1580
   - status
1581
   - description
1582
  """
1583
 
1584
  thrift_spec = (
1585
    None, # 0
1586
    (1, TType.I64, 'transactionId', None, None, ), # 1
1587
    (2, TType.I32, 'status', None, None, ), # 2
1588
    (3, TType.STRING, 'description', None, None, ), # 3
1589
  )
1590
 
1591
  def __init__(self, transactionId=None, status=None, description=None,):
1592
    self.transactionId = transactionId
1593
    self.status = status
1594
    self.description = description
1595
 
1596
  def read(self, iprot):
1597
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1598
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1599
      return
1600
    iprot.readStructBegin()
1601
    while True:
1602
      (fname, ftype, fid) = iprot.readFieldBegin()
1603
      if ftype == TType.STOP:
1604
        break
1605
      if fid == 1:
1606
        if ftype == TType.I64:
1607
          self.transactionId = iprot.readI64();
1608
        else:
1609
          iprot.skip(ftype)
1610
      elif fid == 2:
1611
        if ftype == TType.I32:
1612
          self.status = iprot.readI32();
1613
        else:
1614
          iprot.skip(ftype)
1615
      elif fid == 3:
1616
        if ftype == TType.STRING:
1617
          self.description = iprot.readString();
1618
        else:
1619
          iprot.skip(ftype)
1620
      else:
1621
        iprot.skip(ftype)
1622
      iprot.readFieldEnd()
1623
    iprot.readStructEnd()
1624
 
1625
  def write(self, oprot):
1626
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1627
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1628
      return
1629
    oprot.writeStructBegin('changeTransactionStatus_args')
1630
    if self.transactionId != None:
1631
      oprot.writeFieldBegin('transactionId', TType.I64, 1)
1632
      oprot.writeI64(self.transactionId)
1633
      oprot.writeFieldEnd()
1634
    if self.status != None:
1635
      oprot.writeFieldBegin('status', TType.I32, 2)
1636
      oprot.writeI32(self.status)
1637
      oprot.writeFieldEnd()
1638
    if self.description != None:
1639
      oprot.writeFieldBegin('description', TType.STRING, 3)
1640
      oprot.writeString(self.description)
1641
      oprot.writeFieldEnd()
1642
    oprot.writeFieldStop()
1643
    oprot.writeStructEnd()
1644
 
1645
  def __repr__(self):
1646
    L = ['%s=%r' % (key, value)
1647
      for key, value in self.__dict__.iteritems()]
1648
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1649
 
1650
  def __eq__(self, other):
1651
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1652
 
1653
  def __ne__(self, other):
1654
    return not (self == other)
1655
 
1656
class changeTransactionStatus_result:
1657
  """
1658
  Attributes:
1659
   - success
1660
   - ex
1661
  """
1662
 
1663
  thrift_spec = (
1664
    (0, TType.BOOL, 'success', None, None, ), # 0
1665
    (1, TType.STRUCT, 'ex', (TransactionServiceException, TransactionServiceException.thrift_spec), None, ), # 1
1666
  )
1667
 
1668
  def __init__(self, success=None, ex=None,):
1669
    self.success = success
1670
    self.ex = ex
1671
 
1672
  def read(self, iprot):
1673
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1674
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1675
      return
1676
    iprot.readStructBegin()
1677
    while True:
1678
      (fname, ftype, fid) = iprot.readFieldBegin()
1679
      if ftype == TType.STOP:
1680
        break
1681
      if fid == 0:
1682
        if ftype == TType.BOOL:
1683
          self.success = iprot.readBool();
1684
        else:
1685
          iprot.skip(ftype)
1686
      elif fid == 1:
1687
        if ftype == TType.STRUCT:
1688
          self.ex = TransactionServiceException()
1689
          self.ex.read(iprot)
1690
        else:
1691
          iprot.skip(ftype)
1692
      else:
1693
        iprot.skip(ftype)
1694
      iprot.readFieldEnd()
1695
    iprot.readStructEnd()
1696
 
1697
  def write(self, oprot):
1698
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1699
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1700
      return
1701
    oprot.writeStructBegin('changeTransactionStatus_result')
1702
    if self.success != None:
1703
      oprot.writeFieldBegin('success', TType.BOOL, 0)
1704
      oprot.writeBool(self.success)
1705
      oprot.writeFieldEnd()
1706
    if self.ex != None:
1707
      oprot.writeFieldBegin('ex', TType.STRUCT, 1)
1708
      self.ex.write(oprot)
1709
      oprot.writeFieldEnd()
1710
    oprot.writeFieldStop()
1711
    oprot.writeStructEnd()
1712
 
1713
  def __repr__(self):
1714
    L = ['%s=%r' % (key, value)
1715
      for key, value in self.__dict__.iteritems()]
1716
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1717
 
1718
  def __eq__(self, other):
1719
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1720
 
1721
  def __ne__(self, other):
1722
    return not (self == other)
1723
 
483 rajveer 1724
class getAllOrders_args:
94 ashish 1725
  """
1726
  Attributes:
483 rajveer 1727
   - status
1728
   - from_date
1729
   - to_date
1730
   - warehouse_id
94 ashish 1731
  """
1732
 
1733
  thrift_spec = (
1734
    None, # 0
483 rajveer 1735
    (1, TType.I32, 'status', None, None, ), # 1
1736
    (2, TType.I64, 'from_date', None, None, ), # 2
1737
    (3, TType.I64, 'to_date', None, None, ), # 3
1738
    (4, TType.I64, 'warehouse_id', None, None, ), # 4
94 ashish 1739
  )
1740
 
483 rajveer 1741
  def __init__(self, status=None, from_date=None, to_date=None, warehouse_id=None,):
1742
    self.status = status
1743
    self.from_date = from_date
1744
    self.to_date = to_date
1745
    self.warehouse_id = warehouse_id
94 ashish 1746
 
1747
  def read(self, iprot):
1748
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1749
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1750
      return
1751
    iprot.readStructBegin()
1752
    while True:
1753
      (fname, ftype, fid) = iprot.readFieldBegin()
1754
      if ftype == TType.STOP:
1755
        break
1756
      if fid == 1:
483 rajveer 1757
        if ftype == TType.I32:
1758
          self.status = iprot.readI32();
94 ashish 1759
        else:
1760
          iprot.skip(ftype)
483 rajveer 1761
      elif fid == 2:
1762
        if ftype == TType.I64:
1763
          self.from_date = iprot.readI64();
94 ashish 1764
        else:
1765
          iprot.skip(ftype)
483 rajveer 1766
      elif fid == 3:
1767
        if ftype == TType.I64:
1768
          self.to_date = iprot.readI64();
94 ashish 1769
        else:
1770
          iprot.skip(ftype)
483 rajveer 1771
      elif fid == 4:
94 ashish 1772
        if ftype == TType.I64:
483 rajveer 1773
          self.warehouse_id = iprot.readI64();
94 ashish 1774
        else:
1775
          iprot.skip(ftype)
1776
      else:
1777
        iprot.skip(ftype)
1778
      iprot.readFieldEnd()
1779
    iprot.readStructEnd()
1780
 
1781
  def write(self, oprot):
1782
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1783
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1784
      return
483 rajveer 1785
    oprot.writeStructBegin('getAllOrders_args')
1786
    if self.status != None:
1787
      oprot.writeFieldBegin('status', TType.I32, 1)
1788
      oprot.writeI32(self.status)
94 ashish 1789
      oprot.writeFieldEnd()
483 rajveer 1790
    if self.from_date != None:
1791
      oprot.writeFieldBegin('from_date', TType.I64, 2)
1792
      oprot.writeI64(self.from_date)
94 ashish 1793
      oprot.writeFieldEnd()
483 rajveer 1794
    if self.to_date != None:
1795
      oprot.writeFieldBegin('to_date', TType.I64, 3)
1796
      oprot.writeI64(self.to_date)
94 ashish 1797
      oprot.writeFieldEnd()
483 rajveer 1798
    if self.warehouse_id != None:
1799
      oprot.writeFieldBegin('warehouse_id', TType.I64, 4)
1800
      oprot.writeI64(self.warehouse_id)
94 ashish 1801
      oprot.writeFieldEnd()
1802
    oprot.writeFieldStop()
1803
    oprot.writeStructEnd()
1804
 
1805
  def __repr__(self):
1806
    L = ['%s=%r' % (key, value)
1807
      for key, value in self.__dict__.iteritems()]
1808
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1809
 
1810
  def __eq__(self, other):
1811
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1812
 
1813
  def __ne__(self, other):
1814
    return not (self == other)
1815
 
483 rajveer 1816
class getAllOrders_result:
94 ashish 1817
  """
1818
  Attributes:
1819
   - success
1820
   - ex
1821
  """
1822
 
1823
  thrift_spec = (
483 rajveer 1824
    (0, TType.LIST, 'success', (TType.STRUCT,(Order, Order.thrift_spec)), None, ), # 0
94 ashish 1825
    (1, TType.STRUCT, 'ex', (TransactionServiceException, TransactionServiceException.thrift_spec), None, ), # 1
1826
  )
1827
 
1828
  def __init__(self, success=None, ex=None,):
1829
    self.success = success
1830
    self.ex = ex
1831
 
1832
  def read(self, iprot):
1833
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1834
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1835
      return
1836
    iprot.readStructBegin()
1837
    while True:
1838
      (fname, ftype, fid) = iprot.readFieldBegin()
1839
      if ftype == TType.STOP:
1840
        break
1841
      if fid == 0:
483 rajveer 1842
        if ftype == TType.LIST:
1843
          self.success = []
1844
          (_etype40, _size37) = iprot.readListBegin()
1845
          for _i41 in xrange(_size37):
1846
            _elem42 = Order()
1847
            _elem42.read(iprot)
1848
            self.success.append(_elem42)
1849
          iprot.readListEnd()
94 ashish 1850
        else:
1851
          iprot.skip(ftype)
1852
      elif fid == 1:
1853
        if ftype == TType.STRUCT:
1854
          self.ex = TransactionServiceException()
1855
          self.ex.read(iprot)
1856
        else:
1857
          iprot.skip(ftype)
1858
      else:
1859
        iprot.skip(ftype)
1860
      iprot.readFieldEnd()
1861
    iprot.readStructEnd()
1862
 
1863
  def write(self, oprot):
1864
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1865
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1866
      return
483 rajveer 1867
    oprot.writeStructBegin('getAllOrders_result')
94 ashish 1868
    if self.success != None:
483 rajveer 1869
      oprot.writeFieldBegin('success', TType.LIST, 0)
1870
      oprot.writeListBegin(TType.STRUCT, len(self.success))
1871
      for iter43 in self.success:
1872
        iter43.write(oprot)
1873
      oprot.writeListEnd()
94 ashish 1874
      oprot.writeFieldEnd()
1875
    if self.ex != None:
1876
      oprot.writeFieldBegin('ex', TType.STRUCT, 1)
1877
      self.ex.write(oprot)
1878
      oprot.writeFieldEnd()
1879
    oprot.writeFieldStop()
1880
    oprot.writeStructEnd()
1881
 
1882
  def __repr__(self):
1883
    L = ['%s=%r' % (key, value)
1884
      for key, value in self.__dict__.iteritems()]
1885
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1886
 
1887
  def __eq__(self, other):
1888
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1889
 
1890
  def __ne__(self, other):
1891
    return not (self == other)
1892
 
483 rajveer 1893
class changeOrderStatus_args:
94 ashish 1894
  """
1895
  Attributes:
483 rajveer 1896
   - orderId
1897
   - status
1898
   - description
94 ashish 1899
  """
1900
 
1901
  thrift_spec = (
1902
    None, # 0
483 rajveer 1903
    (1, TType.I64, 'orderId', None, None, ), # 1
1904
    (2, TType.I32, 'status', None, None, ), # 2
1905
    (3, TType.STRING, 'description', None, None, ), # 3
94 ashish 1906
  )
1907
 
483 rajveer 1908
  def __init__(self, orderId=None, status=None, description=None,):
1909
    self.orderId = orderId
1910
    self.status = status
1911
    self.description = description
94 ashish 1912
 
1913
  def read(self, iprot):
1914
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1915
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1916
      return
1917
    iprot.readStructBegin()
1918
    while True:
1919
      (fname, ftype, fid) = iprot.readFieldBegin()
1920
      if ftype == TType.STOP:
1921
        break
1922
      if fid == 1:
1923
        if ftype == TType.I64:
483 rajveer 1924
          self.orderId = iprot.readI64();
94 ashish 1925
        else:
1926
          iprot.skip(ftype)
1927
      elif fid == 2:
483 rajveer 1928
        if ftype == TType.I32:
1929
          self.status = iprot.readI32();
94 ashish 1930
        else:
1931
          iprot.skip(ftype)
483 rajveer 1932
      elif fid == 3:
1933
        if ftype == TType.STRING:
1934
          self.description = iprot.readString();
1935
        else:
1936
          iprot.skip(ftype)
94 ashish 1937
      else:
1938
        iprot.skip(ftype)
1939
      iprot.readFieldEnd()
1940
    iprot.readStructEnd()
1941
 
1942
  def write(self, oprot):
1943
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1944
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1945
      return
483 rajveer 1946
    oprot.writeStructBegin('changeOrderStatus_args')
1947
    if self.orderId != None:
1948
      oprot.writeFieldBegin('orderId', TType.I64, 1)
1949
      oprot.writeI64(self.orderId)
94 ashish 1950
      oprot.writeFieldEnd()
483 rajveer 1951
    if self.status != None:
1952
      oprot.writeFieldBegin('status', TType.I32, 2)
1953
      oprot.writeI32(self.status)
94 ashish 1954
      oprot.writeFieldEnd()
483 rajveer 1955
    if self.description != None:
1956
      oprot.writeFieldBegin('description', TType.STRING, 3)
1957
      oprot.writeString(self.description)
1958
      oprot.writeFieldEnd()
94 ashish 1959
    oprot.writeFieldStop()
1960
    oprot.writeStructEnd()
1961
 
1962
  def __repr__(self):
1963
    L = ['%s=%r' % (key, value)
1964
      for key, value in self.__dict__.iteritems()]
1965
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1966
 
1967
  def __eq__(self, other):
1968
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1969
 
1970
  def __ne__(self, other):
1971
    return not (self == other)
1972
 
483 rajveer 1973
class changeOrderStatus_result:
94 ashish 1974
  """
1975
  Attributes:
1976
   - success
1977
   - ex
1978
  """
1979
 
1980
  thrift_spec = (
1981
    (0, TType.BOOL, 'success', None, None, ), # 0
1982
    (1, TType.STRUCT, 'ex', (TransactionServiceException, TransactionServiceException.thrift_spec), None, ), # 1
1983
  )
1984
 
1985
  def __init__(self, success=None, ex=None,):
1986
    self.success = success
1987
    self.ex = ex
1988
 
1989
  def read(self, iprot):
1990
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1991
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1992
      return
1993
    iprot.readStructBegin()
1994
    while True:
1995
      (fname, ftype, fid) = iprot.readFieldBegin()
1996
      if ftype == TType.STOP:
1997
        break
1998
      if fid == 0:
1999
        if ftype == TType.BOOL:
2000
          self.success = iprot.readBool();
2001
        else:
2002
          iprot.skip(ftype)
2003
      elif fid == 1:
2004
        if ftype == TType.STRUCT:
2005
          self.ex = TransactionServiceException()
2006
          self.ex.read(iprot)
2007
        else:
2008
          iprot.skip(ftype)
2009
      else:
2010
        iprot.skip(ftype)
2011
      iprot.readFieldEnd()
2012
    iprot.readStructEnd()
2013
 
2014
  def write(self, oprot):
2015
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
2016
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
2017
      return
483 rajveer 2018
    oprot.writeStructBegin('changeOrderStatus_result')
94 ashish 2019
    if self.success != None:
2020
      oprot.writeFieldBegin('success', TType.BOOL, 0)
2021
      oprot.writeBool(self.success)
2022
      oprot.writeFieldEnd()
2023
    if self.ex != None:
2024
      oprot.writeFieldBegin('ex', TType.STRUCT, 1)
2025
      self.ex.write(oprot)
2026
      oprot.writeFieldEnd()
2027
    oprot.writeFieldStop()
2028
    oprot.writeStructEnd()
2029
 
2030
  def __repr__(self):
2031
    L = ['%s=%r' % (key, value)
2032
      for key, value in self.__dict__.iteritems()]
2033
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
2034
 
2035
  def __eq__(self, other):
2036
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
2037
 
2038
  def __ne__(self, other):
2039
    return not (self == other)
2040
 
483 rajveer 2041
class getOrdersForTransaction_args:
94 ashish 2042
  """
2043
  Attributes:
2044
   - transactionId
2045
  """
2046
 
2047
  thrift_spec = (
2048
    None, # 0
2049
    (1, TType.I64, 'transactionId', None, None, ), # 1
2050
  )
2051
 
483 rajveer 2052
  def __init__(self, transactionId=None,):
94 ashish 2053
    self.transactionId = transactionId
2054
 
2055
  def read(self, iprot):
2056
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
2057
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
2058
      return
2059
    iprot.readStructBegin()
2060
    while True:
2061
      (fname, ftype, fid) = iprot.readFieldBegin()
2062
      if ftype == TType.STOP:
2063
        break
2064
      if fid == 1:
2065
        if ftype == TType.I64:
2066
          self.transactionId = iprot.readI64();
2067
        else:
2068
          iprot.skip(ftype)
2069
      else:
2070
        iprot.skip(ftype)
2071
      iprot.readFieldEnd()
2072
    iprot.readStructEnd()
2073
 
2074
  def write(self, oprot):
2075
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
2076
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
2077
      return
483 rajveer 2078
    oprot.writeStructBegin('getOrdersForTransaction_args')
94 ashish 2079
    if self.transactionId != None:
2080
      oprot.writeFieldBegin('transactionId', TType.I64, 1)
2081
      oprot.writeI64(self.transactionId)
2082
      oprot.writeFieldEnd()
2083
    oprot.writeFieldStop()
2084
    oprot.writeStructEnd()
2085
 
2086
  def __repr__(self):
2087
    L = ['%s=%r' % (key, value)
2088
      for key, value in self.__dict__.iteritems()]
2089
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
2090
 
2091
  def __eq__(self, other):
2092
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
2093
 
2094
  def __ne__(self, other):
2095
    return not (self == other)
2096
 
483 rajveer 2097
class getOrdersForTransaction_result:
94 ashish 2098
  """
2099
  Attributes:
2100
   - success
2101
   - ex
2102
  """
2103
 
2104
  thrift_spec = (
483 rajveer 2105
    (0, TType.LIST, 'success', (TType.STRUCT,(Order, Order.thrift_spec)), None, ), # 0
94 ashish 2106
    (1, TType.STRUCT, 'ex', (TransactionServiceException, TransactionServiceException.thrift_spec), None, ), # 1
2107
  )
2108
 
2109
  def __init__(self, success=None, ex=None,):
2110
    self.success = success
2111
    self.ex = ex
2112
 
2113
  def read(self, iprot):
2114
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
2115
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
2116
      return
2117
    iprot.readStructBegin()
2118
    while True:
2119
      (fname, ftype, fid) = iprot.readFieldBegin()
2120
      if ftype == TType.STOP:
2121
        break
2122
      if fid == 0:
483 rajveer 2123
        if ftype == TType.LIST:
2124
          self.success = []
2125
          (_etype47, _size44) = iprot.readListBegin()
2126
          for _i48 in xrange(_size44):
2127
            _elem49 = Order()
2128
            _elem49.read(iprot)
2129
            self.success.append(_elem49)
2130
          iprot.readListEnd()
94 ashish 2131
        else:
2132
          iprot.skip(ftype)
2133
      elif fid == 1:
2134
        if ftype == TType.STRUCT:
2135
          self.ex = TransactionServiceException()
2136
          self.ex.read(iprot)
2137
        else:
2138
          iprot.skip(ftype)
2139
      else:
2140
        iprot.skip(ftype)
2141
      iprot.readFieldEnd()
2142
    iprot.readStructEnd()
2143
 
2144
  def write(self, oprot):
2145
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
2146
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
2147
      return
483 rajveer 2148
    oprot.writeStructBegin('getOrdersForTransaction_result')
94 ashish 2149
    if self.success != None:
483 rajveer 2150
      oprot.writeFieldBegin('success', TType.LIST, 0)
2151
      oprot.writeListBegin(TType.STRUCT, len(self.success))
2152
      for iter50 in self.success:
2153
        iter50.write(oprot)
2154
      oprot.writeListEnd()
94 ashish 2155
      oprot.writeFieldEnd()
2156
    if self.ex != None:
2157
      oprot.writeFieldBegin('ex', TType.STRUCT, 1)
2158
      self.ex.write(oprot)
2159
      oprot.writeFieldEnd()
2160
    oprot.writeFieldStop()
2161
    oprot.writeStructEnd()
2162
 
2163
  def __repr__(self):
2164
    L = ['%s=%r' % (key, value)
2165
      for key, value in self.__dict__.iteritems()]
2166
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
2167
 
2168
  def __eq__(self, other):
2169
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
2170
 
2171
  def __ne__(self, other):
2172
    return not (self == other)
2173
 
483 rajveer 2174
class getOrdersForCustomer_args:
94 ashish 2175
  """
2176
  Attributes:
483 rajveer 2177
   - customerId
2178
   - from_date
2179
   - to_date
2180
   - status
94 ashish 2181
  """
2182
 
2183
  thrift_spec = (
2184
    None, # 0
483 rajveer 2185
    (1, TType.I64, 'customerId', None, None, ), # 1
2186
    (2, TType.I64, 'from_date', None, None, ), # 2
2187
    (3, TType.I64, 'to_date', None, None, ), # 3
2188
    (4, TType.I32, 'status', None, None, ), # 4
94 ashish 2189
  )
2190
 
483 rajveer 2191
  def __init__(self, customerId=None, from_date=None, to_date=None, status=None,):
2192
    self.customerId = customerId
2193
    self.from_date = from_date
2194
    self.to_date = to_date
2195
    self.status = status
94 ashish 2196
 
2197
  def read(self, iprot):
2198
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
2199
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
2200
      return
2201
    iprot.readStructBegin()
2202
    while True:
2203
      (fname, ftype, fid) = iprot.readFieldBegin()
2204
      if ftype == TType.STOP:
2205
        break
2206
      if fid == 1:
2207
        if ftype == TType.I64:
483 rajveer 2208
          self.customerId = iprot.readI64();
94 ashish 2209
        else:
2210
          iprot.skip(ftype)
2211
      elif fid == 2:
2212
        if ftype == TType.I64:
483 rajveer 2213
          self.from_date = iprot.readI64();
94 ashish 2214
        else:
2215
          iprot.skip(ftype)
2216
      elif fid == 3:
2217
        if ftype == TType.I64:
483 rajveer 2218
          self.to_date = iprot.readI64();
94 ashish 2219
        else:
2220
          iprot.skip(ftype)
483 rajveer 2221
      elif fid == 4:
2222
        if ftype == TType.I32:
2223
          self.status = iprot.readI32();
2224
        else:
2225
          iprot.skip(ftype)
94 ashish 2226
      else:
2227
        iprot.skip(ftype)
2228
      iprot.readFieldEnd()
2229
    iprot.readStructEnd()
2230
 
2231
  def write(self, oprot):
2232
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
2233
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
2234
      return
483 rajveer 2235
    oprot.writeStructBegin('getOrdersForCustomer_args')
2236
    if self.customerId != None:
2237
      oprot.writeFieldBegin('customerId', TType.I64, 1)
2238
      oprot.writeI64(self.customerId)
94 ashish 2239
      oprot.writeFieldEnd()
483 rajveer 2240
    if self.from_date != None:
2241
      oprot.writeFieldBegin('from_date', TType.I64, 2)
2242
      oprot.writeI64(self.from_date)
94 ashish 2243
      oprot.writeFieldEnd()
483 rajveer 2244
    if self.to_date != None:
2245
      oprot.writeFieldBegin('to_date', TType.I64, 3)
2246
      oprot.writeI64(self.to_date)
94 ashish 2247
      oprot.writeFieldEnd()
483 rajveer 2248
    if self.status != None:
2249
      oprot.writeFieldBegin('status', TType.I32, 4)
2250
      oprot.writeI32(self.status)
2251
      oprot.writeFieldEnd()
94 ashish 2252
    oprot.writeFieldStop()
2253
    oprot.writeStructEnd()
2254
 
2255
  def __repr__(self):
2256
    L = ['%s=%r' % (key, value)
2257
      for key, value in self.__dict__.iteritems()]
2258
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
2259
 
2260
  def __eq__(self, other):
2261
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
2262
 
2263
  def __ne__(self, other):
2264
    return not (self == other)
2265
 
483 rajveer 2266
class getOrdersForCustomer_result:
94 ashish 2267
  """
2268
  Attributes:
2269
   - success
2270
   - ex
2271
  """
2272
 
2273
  thrift_spec = (
483 rajveer 2274
    (0, TType.LIST, 'success', (TType.STRUCT,(Order, Order.thrift_spec)), None, ), # 0
94 ashish 2275
    (1, TType.STRUCT, 'ex', (TransactionServiceException, TransactionServiceException.thrift_spec), None, ), # 1
2276
  )
2277
 
2278
  def __init__(self, success=None, ex=None,):
2279
    self.success = success
2280
    self.ex = ex
2281
 
2282
  def read(self, iprot):
2283
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
2284
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
2285
      return
2286
    iprot.readStructBegin()
2287
    while True:
2288
      (fname, ftype, fid) = iprot.readFieldBegin()
2289
      if ftype == TType.STOP:
2290
        break
2291
      if fid == 0:
483 rajveer 2292
        if ftype == TType.LIST:
2293
          self.success = []
2294
          (_etype54, _size51) = iprot.readListBegin()
2295
          for _i55 in xrange(_size51):
2296
            _elem56 = Order()
2297
            _elem56.read(iprot)
2298
            self.success.append(_elem56)
2299
          iprot.readListEnd()
94 ashish 2300
        else:
2301
          iprot.skip(ftype)
2302
      elif fid == 1:
2303
        if ftype == TType.STRUCT:
2304
          self.ex = TransactionServiceException()
2305
          self.ex.read(iprot)
2306
        else:
2307
          iprot.skip(ftype)
2308
      else:
2309
        iprot.skip(ftype)
2310
      iprot.readFieldEnd()
2311
    iprot.readStructEnd()
2312
 
2313
  def write(self, oprot):
2314
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
2315
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
2316
      return
483 rajveer 2317
    oprot.writeStructBegin('getOrdersForCustomer_result')
94 ashish 2318
    if self.success != None:
483 rajveer 2319
      oprot.writeFieldBegin('success', TType.LIST, 0)
2320
      oprot.writeListBegin(TType.STRUCT, len(self.success))
2321
      for iter57 in self.success:
2322
        iter57.write(oprot)
2323
      oprot.writeListEnd()
94 ashish 2324
      oprot.writeFieldEnd()
2325
    if self.ex != None:
2326
      oprot.writeFieldBegin('ex', TType.STRUCT, 1)
2327
      self.ex.write(oprot)
2328
      oprot.writeFieldEnd()
2329
    oprot.writeFieldStop()
2330
    oprot.writeStructEnd()
2331
 
2332
  def __repr__(self):
2333
    L = ['%s=%r' % (key, value)
2334
      for key, value in self.__dict__.iteritems()]
2335
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
2336
 
2337
  def __eq__(self, other):
2338
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
2339
 
2340
  def __ne__(self, other):
2341
    return not (self == other)
2342
 
483 rajveer 2343
class createOrder_args:
94 ashish 2344
  """
2345
  Attributes:
483 rajveer 2346
   - order
94 ashish 2347
  """
2348
 
2349
  thrift_spec = (
2350
    None, # 0
483 rajveer 2351
    (1, TType.STRUCT, 'order', (Order, Order.thrift_spec), None, ), # 1
94 ashish 2352
  )
2353
 
483 rajveer 2354
  def __init__(self, order=None,):
2355
    self.order = order
94 ashish 2356
 
2357
  def read(self, iprot):
2358
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
2359
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
2360
      return
2361
    iprot.readStructBegin()
2362
    while True:
2363
      (fname, ftype, fid) = iprot.readFieldBegin()
2364
      if ftype == TType.STOP:
2365
        break
2366
      if fid == 1:
483 rajveer 2367
        if ftype == TType.STRUCT:
2368
          self.order = Order()
2369
          self.order.read(iprot)
94 ashish 2370
        else:
2371
          iprot.skip(ftype)
2372
      else:
2373
        iprot.skip(ftype)
2374
      iprot.readFieldEnd()
2375
    iprot.readStructEnd()
2376
 
2377
  def write(self, oprot):
2378
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
2379
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
2380
      return
483 rajveer 2381
    oprot.writeStructBegin('createOrder_args')
2382
    if self.order != None:
2383
      oprot.writeFieldBegin('order', TType.STRUCT, 1)
2384
      self.order.write(oprot)
94 ashish 2385
      oprot.writeFieldEnd()
2386
    oprot.writeFieldStop()
2387
    oprot.writeStructEnd()
2388
 
2389
  def __repr__(self):
2390
    L = ['%s=%r' % (key, value)
2391
      for key, value in self.__dict__.iteritems()]
2392
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
2393
 
2394
  def __eq__(self, other):
2395
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
2396
 
2397
  def __ne__(self, other):
2398
    return not (self == other)
2399
 
483 rajveer 2400
class createOrder_result:
94 ashish 2401
  """
2402
  Attributes:
2403
   - success
2404
   - ex
2405
  """
2406
 
2407
  thrift_spec = (
483 rajveer 2408
    (0, TType.I64, 'success', None, None, ), # 0
94 ashish 2409
    (1, TType.STRUCT, 'ex', (TransactionServiceException, TransactionServiceException.thrift_spec), None, ), # 1
2410
  )
2411
 
2412
  def __init__(self, success=None, ex=None,):
2413
    self.success = success
2414
    self.ex = ex
2415
 
2416
  def read(self, iprot):
2417
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
2418
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
2419
      return
2420
    iprot.readStructBegin()
2421
    while True:
2422
      (fname, ftype, fid) = iprot.readFieldBegin()
2423
      if ftype == TType.STOP:
2424
        break
2425
      if fid == 0:
483 rajveer 2426
        if ftype == TType.I64:
2427
          self.success = iprot.readI64();
94 ashish 2428
        else:
2429
          iprot.skip(ftype)
2430
      elif fid == 1:
2431
        if ftype == TType.STRUCT:
2432
          self.ex = TransactionServiceException()
2433
          self.ex.read(iprot)
2434
        else:
2435
          iprot.skip(ftype)
2436
      else:
2437
        iprot.skip(ftype)
2438
      iprot.readFieldEnd()
2439
    iprot.readStructEnd()
2440
 
2441
  def write(self, oprot):
2442
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
2443
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
2444
      return
483 rajveer 2445
    oprot.writeStructBegin('createOrder_result')
94 ashish 2446
    if self.success != None:
483 rajveer 2447
      oprot.writeFieldBegin('success', TType.I64, 0)
2448
      oprot.writeI64(self.success)
94 ashish 2449
      oprot.writeFieldEnd()
2450
    if self.ex != None:
2451
      oprot.writeFieldBegin('ex', TType.STRUCT, 1)
2452
      self.ex.write(oprot)
2453
      oprot.writeFieldEnd()
2454
    oprot.writeFieldStop()
2455
    oprot.writeStructEnd()
2456
 
2457
  def __repr__(self):
2458
    L = ['%s=%r' % (key, value)
2459
      for key, value in self.__dict__.iteritems()]
2460
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
2461
 
2462
  def __eq__(self, other):
2463
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
2464
 
2465
  def __ne__(self, other):
2466
    return not (self == other)
2467
 
483 rajveer 2468
class getOrder_args:
94 ashish 2469
  """
2470
  Attributes:
483 rajveer 2471
   - id
94 ashish 2472
  """
2473
 
2474
  thrift_spec = (
2475
    None, # 0
483 rajveer 2476
    (1, TType.I64, 'id', None, None, ), # 1
94 ashish 2477
  )
2478
 
483 rajveer 2479
  def __init__(self, id=None,):
2480
    self.id = id
94 ashish 2481
 
2482
  def read(self, iprot):
2483
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
2484
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
2485
      return
2486
    iprot.readStructBegin()
2487
    while True:
2488
      (fname, ftype, fid) = iprot.readFieldBegin()
2489
      if ftype == TType.STOP:
2490
        break
2491
      if fid == 1:
2492
        if ftype == TType.I64:
483 rajveer 2493
          self.id = iprot.readI64();
94 ashish 2494
        else:
2495
          iprot.skip(ftype)
2496
      else:
2497
        iprot.skip(ftype)
2498
      iprot.readFieldEnd()
2499
    iprot.readStructEnd()
2500
 
2501
  def write(self, oprot):
2502
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
2503
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
2504
      return
483 rajveer 2505
    oprot.writeStructBegin('getOrder_args')
2506
    if self.id != None:
2507
      oprot.writeFieldBegin('id', TType.I64, 1)
2508
      oprot.writeI64(self.id)
94 ashish 2509
      oprot.writeFieldEnd()
2510
    oprot.writeFieldStop()
2511
    oprot.writeStructEnd()
2512
 
2513
  def __repr__(self):
2514
    L = ['%s=%r' % (key, value)
2515
      for key, value in self.__dict__.iteritems()]
2516
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
2517
 
2518
  def __eq__(self, other):
2519
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
2520
 
2521
  def __ne__(self, other):
2522
    return not (self == other)
2523
 
483 rajveer 2524
class getOrder_result:
94 ashish 2525
  """
2526
  Attributes:
2527
   - success
2528
   - ex
2529
  """
2530
 
2531
  thrift_spec = (
483 rajveer 2532
    (0, TType.STRUCT, 'success', (Order, Order.thrift_spec), None, ), # 0
94 ashish 2533
    (1, TType.STRUCT, 'ex', (TransactionServiceException, TransactionServiceException.thrift_spec), None, ), # 1
2534
  )
2535
 
2536
  def __init__(self, success=None, ex=None,):
2537
    self.success = success
2538
    self.ex = ex
2539
 
2540
  def read(self, iprot):
2541
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
2542
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
2543
      return
2544
    iprot.readStructBegin()
2545
    while True:
2546
      (fname, ftype, fid) = iprot.readFieldBegin()
2547
      if ftype == TType.STOP:
2548
        break
2549
      if fid == 0:
483 rajveer 2550
        if ftype == TType.STRUCT:
2551
          self.success = Order()
2552
          self.success.read(iprot)
94 ashish 2553
        else:
2554
          iprot.skip(ftype)
2555
      elif fid == 1:
2556
        if ftype == TType.STRUCT:
2557
          self.ex = TransactionServiceException()
2558
          self.ex.read(iprot)
2559
        else:
2560
          iprot.skip(ftype)
2561
      else:
2562
        iprot.skip(ftype)
2563
      iprot.readFieldEnd()
2564
    iprot.readStructEnd()
2565
 
2566
  def write(self, oprot):
2567
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
2568
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
2569
      return
483 rajveer 2570
    oprot.writeStructBegin('getOrder_result')
94 ashish 2571
    if self.success != None:
483 rajveer 2572
      oprot.writeFieldBegin('success', TType.STRUCT, 0)
2573
      self.success.write(oprot)
94 ashish 2574
      oprot.writeFieldEnd()
2575
    if self.ex != None:
2576
      oprot.writeFieldBegin('ex', TType.STRUCT, 1)
2577
      self.ex.write(oprot)
2578
      oprot.writeFieldEnd()
2579
    oprot.writeFieldStop()
2580
    oprot.writeStructEnd()
2581
 
2582
  def __repr__(self):
2583
    L = ['%s=%r' % (key, value)
2584
      for key, value in self.__dict__.iteritems()]
2585
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
2586
 
2587
  def __eq__(self, other):
2588
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
2589
 
2590
  def __ne__(self, other):
2591
    return not (self == other)
2592
 
483 rajveer 2593
class getLineItemsForOrder_args:
94 ashish 2594
  """
2595
  Attributes:
483 rajveer 2596
   - orderId
94 ashish 2597
  """
2598
 
2599
  thrift_spec = (
2600
    None, # 0
483 rajveer 2601
    (1, TType.I64, 'orderId', None, None, ), # 1
94 ashish 2602
  )
2603
 
483 rajveer 2604
  def __init__(self, orderId=None,):
2605
    self.orderId = orderId
94 ashish 2606
 
2607
  def read(self, iprot):
2608
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
2609
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
2610
      return
2611
    iprot.readStructBegin()
2612
    while True:
2613
      (fname, ftype, fid) = iprot.readFieldBegin()
2614
      if ftype == TType.STOP:
2615
        break
2616
      if fid == 1:
2617
        if ftype == TType.I64:
483 rajveer 2618
          self.orderId = iprot.readI64();
94 ashish 2619
        else:
2620
          iprot.skip(ftype)
2621
      else:
2622
        iprot.skip(ftype)
2623
      iprot.readFieldEnd()
2624
    iprot.readStructEnd()
2625
 
2626
  def write(self, oprot):
2627
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
2628
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
2629
      return
483 rajveer 2630
    oprot.writeStructBegin('getLineItemsForOrder_args')
2631
    if self.orderId != None:
2632
      oprot.writeFieldBegin('orderId', TType.I64, 1)
2633
      oprot.writeI64(self.orderId)
94 ashish 2634
      oprot.writeFieldEnd()
2635
    oprot.writeFieldStop()
2636
    oprot.writeStructEnd()
2637
 
2638
  def __repr__(self):
2639
    L = ['%s=%r' % (key, value)
2640
      for key, value in self.__dict__.iteritems()]
2641
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
2642
 
2643
  def __eq__(self, other):
2644
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
2645
 
2646
  def __ne__(self, other):
2647
    return not (self == other)
2648
 
483 rajveer 2649
class getLineItemsForOrder_result:
94 ashish 2650
  """
2651
  Attributes:
2652
   - success
2653
   - ex
2654
  """
2655
 
2656
  thrift_spec = (
483 rajveer 2657
    (0, TType.LIST, 'success', (TType.STRUCT,(LineItem, LineItem.thrift_spec)), None, ), # 0
94 ashish 2658
    (1, TType.STRUCT, 'ex', (TransactionServiceException, TransactionServiceException.thrift_spec), None, ), # 1
2659
  )
2660
 
2661
  def __init__(self, success=None, ex=None,):
2662
    self.success = success
2663
    self.ex = ex
2664
 
2665
  def read(self, iprot):
2666
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
2667
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
2668
      return
2669
    iprot.readStructBegin()
2670
    while True:
2671
      (fname, ftype, fid) = iprot.readFieldBegin()
2672
      if ftype == TType.STOP:
2673
        break
2674
      if fid == 0:
483 rajveer 2675
        if ftype == TType.LIST:
2676
          self.success = []
2677
          (_etype61, _size58) = iprot.readListBegin()
2678
          for _i62 in xrange(_size58):
2679
            _elem63 = LineItem()
2680
            _elem63.read(iprot)
2681
            self.success.append(_elem63)
2682
          iprot.readListEnd()
94 ashish 2683
        else:
2684
          iprot.skip(ftype)
2685
      elif fid == 1:
2686
        if ftype == TType.STRUCT:
2687
          self.ex = TransactionServiceException()
2688
          self.ex.read(iprot)
2689
        else:
2690
          iprot.skip(ftype)
2691
      else:
2692
        iprot.skip(ftype)
2693
      iprot.readFieldEnd()
2694
    iprot.readStructEnd()
2695
 
2696
  def write(self, oprot):
2697
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
2698
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
2699
      return
483 rajveer 2700
    oprot.writeStructBegin('getLineItemsForOrder_result')
94 ashish 2701
    if self.success != None:
483 rajveer 2702
      oprot.writeFieldBegin('success', TType.LIST, 0)
2703
      oprot.writeListBegin(TType.STRUCT, len(self.success))
2704
      for iter64 in self.success:
2705
        iter64.write(oprot)
2706
      oprot.writeListEnd()
94 ashish 2707
      oprot.writeFieldEnd()
2708
    if self.ex != None:
2709
      oprot.writeFieldBegin('ex', TType.STRUCT, 1)
2710
      self.ex.write(oprot)
2711
      oprot.writeFieldEnd()
2712
    oprot.writeFieldStop()
2713
    oprot.writeStructEnd()
2714
 
2715
  def __repr__(self):
2716
    L = ['%s=%r' % (key, value)
2717
      for key, value in self.__dict__.iteritems()]
2718
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
2719
 
2720
  def __eq__(self, other):
2721
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
2722
 
2723
  def __ne__(self, other):
2724
    return not (self == other)
2725
 
304 ashish 2726
class getAlerts_args:
2727
  """
2728
  Attributes:
483 rajveer 2729
   - orderId
304 ashish 2730
   - valid
2731
  """
94 ashish 2732
 
304 ashish 2733
  thrift_spec = (
2734
    None, # 0
483 rajveer 2735
    (1, TType.I64, 'orderId', None, None, ), # 1
304 ashish 2736
    (2, TType.BOOL, 'valid', None, None, ), # 2
2737
  )
2738
 
483 rajveer 2739
  def __init__(self, orderId=None, valid=None,):
2740
    self.orderId = orderId
304 ashish 2741
    self.valid = valid
2742
 
2743
  def read(self, iprot):
2744
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
2745
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
2746
      return
2747
    iprot.readStructBegin()
2748
    while True:
2749
      (fname, ftype, fid) = iprot.readFieldBegin()
2750
      if ftype == TType.STOP:
2751
        break
2752
      if fid == 1:
2753
        if ftype == TType.I64:
483 rajveer 2754
          self.orderId = iprot.readI64();
304 ashish 2755
        else:
2756
          iprot.skip(ftype)
2757
      elif fid == 2:
2758
        if ftype == TType.BOOL:
2759
          self.valid = iprot.readBool();
2760
        else:
2761
          iprot.skip(ftype)
2762
      else:
2763
        iprot.skip(ftype)
2764
      iprot.readFieldEnd()
2765
    iprot.readStructEnd()
2766
 
2767
  def write(self, oprot):
2768
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
2769
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
2770
      return
2771
    oprot.writeStructBegin('getAlerts_args')
483 rajveer 2772
    if self.orderId != None:
2773
      oprot.writeFieldBegin('orderId', TType.I64, 1)
2774
      oprot.writeI64(self.orderId)
304 ashish 2775
      oprot.writeFieldEnd()
2776
    if self.valid != None:
2777
      oprot.writeFieldBegin('valid', TType.BOOL, 2)
2778
      oprot.writeBool(self.valid)
2779
      oprot.writeFieldEnd()
2780
    oprot.writeFieldStop()
2781
    oprot.writeStructEnd()
2782
 
2783
  def __repr__(self):
2784
    L = ['%s=%r' % (key, value)
2785
      for key, value in self.__dict__.iteritems()]
2786
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
2787
 
2788
  def __eq__(self, other):
2789
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
2790
 
2791
  def __ne__(self, other):
2792
    return not (self == other)
2793
 
2794
class getAlerts_result:
2795
  """
2796
  Attributes:
2797
   - success
2798
  """
2799
 
2800
  thrift_spec = (
2801
    (0, TType.LIST, 'success', (TType.STRUCT,(Alert, Alert.thrift_spec)), None, ), # 0
2802
  )
2803
 
2804
  def __init__(self, success=None,):
2805
    self.success = success
2806
 
2807
  def read(self, iprot):
2808
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
2809
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
2810
      return
2811
    iprot.readStructBegin()
2812
    while True:
2813
      (fname, ftype, fid) = iprot.readFieldBegin()
2814
      if ftype == TType.STOP:
2815
        break
2816
      if fid == 0:
2817
        if ftype == TType.LIST:
2818
          self.success = []
483 rajveer 2819
          (_etype68, _size65) = iprot.readListBegin()
2820
          for _i69 in xrange(_size65):
2821
            _elem70 = Alert()
2822
            _elem70.read(iprot)
2823
            self.success.append(_elem70)
304 ashish 2824
          iprot.readListEnd()
2825
        else:
2826
          iprot.skip(ftype)
2827
      else:
2828
        iprot.skip(ftype)
2829
      iprot.readFieldEnd()
2830
    iprot.readStructEnd()
2831
 
2832
  def write(self, oprot):
2833
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
2834
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
2835
      return
2836
    oprot.writeStructBegin('getAlerts_result')
2837
    if self.success != None:
2838
      oprot.writeFieldBegin('success', TType.LIST, 0)
2839
      oprot.writeListBegin(TType.STRUCT, len(self.success))
483 rajveer 2840
      for iter71 in self.success:
2841
        iter71.write(oprot)
304 ashish 2842
      oprot.writeListEnd()
2843
      oprot.writeFieldEnd()
2844
    oprot.writeFieldStop()
2845
    oprot.writeStructEnd()
2846
 
2847
  def __repr__(self):
2848
    L = ['%s=%r' % (key, value)
2849
      for key, value in self.__dict__.iteritems()]
2850
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
2851
 
2852
  def __eq__(self, other):
2853
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
2854
 
2855
  def __ne__(self, other):
2856
    return not (self == other)
2857
 
2858
class setAlert_args:
2859
  """
2860
  Attributes:
483 rajveer 2861
   - orderId
304 ashish 2862
   - unset
2863
   - type
2864
   - comment
2865
  """
2866
 
2867
  thrift_spec = (
2868
    None, # 0
483 rajveer 2869
    (1, TType.I64, 'orderId', None, None, ), # 1
304 ashish 2870
    (2, TType.BOOL, 'unset', None, None, ), # 2
2871
    (3, TType.I64, 'type', None, None, ), # 3
2872
    (4, TType.STRING, 'comment', None, None, ), # 4
2873
  )
2874
 
483 rajveer 2875
  def __init__(self, orderId=None, unset=None, type=None, comment=None,):
2876
    self.orderId = orderId
304 ashish 2877
    self.unset = unset
2878
    self.type = type
2879
    self.comment = comment
2880
 
2881
  def read(self, iprot):
2882
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
2883
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
2884
      return
2885
    iprot.readStructBegin()
2886
    while True:
2887
      (fname, ftype, fid) = iprot.readFieldBegin()
2888
      if ftype == TType.STOP:
2889
        break
2890
      if fid == 1:
2891
        if ftype == TType.I64:
483 rajveer 2892
          self.orderId = iprot.readI64();
304 ashish 2893
        else:
2894
          iprot.skip(ftype)
2895
      elif fid == 2:
2896
        if ftype == TType.BOOL:
2897
          self.unset = iprot.readBool();
2898
        else:
2899
          iprot.skip(ftype)
2900
      elif fid == 3:
2901
        if ftype == TType.I64:
2902
          self.type = iprot.readI64();
2903
        else:
2904
          iprot.skip(ftype)
2905
      elif fid == 4:
2906
        if ftype == TType.STRING:
2907
          self.comment = iprot.readString();
2908
        else:
2909
          iprot.skip(ftype)
2910
      else:
2911
        iprot.skip(ftype)
2912
      iprot.readFieldEnd()
2913
    iprot.readStructEnd()
2914
 
2915
  def write(self, oprot):
2916
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
2917
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
2918
      return
2919
    oprot.writeStructBegin('setAlert_args')
483 rajveer 2920
    if self.orderId != None:
2921
      oprot.writeFieldBegin('orderId', TType.I64, 1)
2922
      oprot.writeI64(self.orderId)
304 ashish 2923
      oprot.writeFieldEnd()
2924
    if self.unset != None:
2925
      oprot.writeFieldBegin('unset', TType.BOOL, 2)
2926
      oprot.writeBool(self.unset)
2927
      oprot.writeFieldEnd()
2928
    if self.type != None:
2929
      oprot.writeFieldBegin('type', TType.I64, 3)
2930
      oprot.writeI64(self.type)
2931
      oprot.writeFieldEnd()
2932
    if self.comment != None:
2933
      oprot.writeFieldBegin('comment', TType.STRING, 4)
2934
      oprot.writeString(self.comment)
2935
      oprot.writeFieldEnd()
2936
    oprot.writeFieldStop()
2937
    oprot.writeStructEnd()
2938
 
2939
  def __repr__(self):
2940
    L = ['%s=%r' % (key, value)
2941
      for key, value in self.__dict__.iteritems()]
2942
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
2943
 
2944
  def __eq__(self, other):
2945
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
2946
 
2947
  def __ne__(self, other):
2948
    return not (self == other)
2949
 
2950
class setAlert_result:
2951
 
2952
  thrift_spec = (
2953
  )
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
      else:
2965
        iprot.skip(ftype)
2966
      iprot.readFieldEnd()
2967
    iprot.readStructEnd()
2968
 
2969
  def write(self, oprot):
2970
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
2971
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
2972
      return
2973
    oprot.writeStructBegin('setAlert_result')
2974
    oprot.writeFieldStop()
2975
    oprot.writeStructEnd()
2976
 
2977
  def __repr__(self):
2978
    L = ['%s=%r' % (key, value)
2979
      for key, value in self.__dict__.iteritems()]
2980
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
2981
 
2982
  def __eq__(self, other):
2983
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
2984
 
2985
  def __ne__(self, other):
2986
    return not (self == other)
2987
 
2988