Subversion Repositories SmartDukaan

Rev

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