Subversion Repositories SmartDukaan

Rev

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

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