Subversion Repositories SmartDukaan

Rev

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

Rev Author Line No. Line
4502 mandeep.dh 1
#
2
# Autogenerated by Thrift Compiler (0.7.0)
3
#
4
# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
5
#
6
 
7
from thrift.Thrift import *
8
import shop2020.thriftpy.generic.GenericService
9
from ttypes import *
10
from thrift.Thrift import TProcessor
11
from thrift.transport import TTransport
12
from thrift.protocol import TBinaryProtocol, TProtocol
13
try:
14
  from thrift.protocol import fastbinary
15
except:
16
  fastbinary = None
17
 
18
 
19
class Iface(shop2020.thriftpy.generic.GenericService.Iface):
20
  def createPurchaseOrder(self, purchaseOrder):
21
    """
22
    Creates a purchase order based on the data in the given purchase order object.
23
    This method populates a nummber of missing fields
24
 
25
    Parameters:
26
     - purchaseOrder
27
    """
28
    pass
29
 
30
  def getPurchaseOrder(self, id):
31
    """
32
    Returns the purchase order with the given id. Throws an exception if there is no such purchase order.
33
 
34
    Parameters:
35
     - id
36
    """
37
    pass
38
 
39
  def getAllPurchaseOrders(self, status):
40
    """
41
    Returns a list of all the purchase orders in the given state
42
 
43
    Parameters:
44
     - status
45
    """
46
    pass
47
 
48
  def getSupplier(self, id):
49
    """
50
    Returns the supplier with the given order id. Throws an exception if there is no such supplier.
51
 
52
    Parameters:
53
     - id
54
    """
55
    pass
56
 
57
  def startPurchase(self, purchaseOrderId, invoiceNumber, freightCharges):
58
    """
59
    Creates a purchase for the given purchase order.
60
    Throws an exception if no more purchases are allowed against the given purchase order.
61
 
62
    Parameters:
63
     - purchaseOrderId
64
     - invoiceNumber
65
     - freightCharges
66
    """
67
    pass
68
 
69
  def closePurchase(self, purchaseId):
70
    """
71
    Marks a purchase as complete and updates the receivedOn time.
72
    Throws an exception if no such purchase exists.
73
 
74
    Parameters:
75
     - purchaseId
76
    """
77
    pass
78
 
79
  def getAllPurchases(self, purchaseOrderId, open):
80
    """
81
    Returns all open or closed purchases for the given purchase order. Throws an exception if no such purchase order exists
82
 
83
    Parameters:
84
     - purchaseOrderId
85
     - open
86
    """
87
    pass
88
 
6386 amar.kumar 89
  def getPurchasesForPO(self, purchaseOrderId):
90
    """
91
    Returns all purchases for the given purchase order. Throws an exception if no such purchase order exists
92
 
93
    Parameters:
94
     - purchaseOrderId
95
    """
96
    pass
97
 
4555 mandeep.dh 98
  def getPurchaseOrderForPurchase(self, purchaseId):
4502 mandeep.dh 99
    """
4555 mandeep.dh 100
    Returns the purchase order object for a given purchase
4502 mandeep.dh 101
 
102
    Parameters:
103
     - purchaseId
104
    """
105
    pass
106
 
4754 mandeep.dh 107
  def getPendingPurchaseOrders(self, warehouseId):
108
    """
109
    Creates purchase order objects from pending orders
4502 mandeep.dh 110
 
4754 mandeep.dh 111
    Parameters:
112
     - warehouseId
113
    """
114
    pass
115
 
116
  def getSuppliers(self, ):
117
    """
118
    Returns all the valid suppliers
119
    """
120
    pass
121
 
122
  def fulfillPO(self, purchaseOrderId, itemId, quantity):
123
    """
124
    Fulfills a given purchase order with an item.
125
 
126
    Parameters:
127
     - purchaseOrderId
128
     - itemId
129
     - quantity
130
    """
131
    pass
132
 
133
  def updatePurchaseOrder(self, purchaseOrder):
134
    """
135
    Amends a PO as per the new lineitems passed
136
 
137
    Parameters:
138
     - purchaseOrder
139
    """
140
    pass
141
 
5185 mandeep.dh 142
  def unFulfillPO(self, purchaseId, itemId, quantity):
143
    """
144
    Fulfills a given purchase id with an item and its quantity.
4754 mandeep.dh 145
 
5185 mandeep.dh 146
    Parameters:
147
     - purchaseId
148
     - itemId
149
     - quantity
150
    """
151
    pass
152
 
5443 mandeep.dh 153
  def getInvoices(self, date):
154
    """
5530 mandeep.dh 155
    Fetches all invoices after a given date
5185 mandeep.dh 156
 
5443 mandeep.dh 157
    Parameters:
158
     - date
159
    """
160
    pass
161
 
7410 amar.kumar 162
  def getInvoicesForWarehouse(self, warehouseId, supplierId, date):
163
    """
164
    Fetches all invoices after a given date
165
 
166
    Parameters:
167
     - warehouseId
168
     - supplierId
169
     - date
170
    """
171
    pass
172
 
5443 mandeep.dh 173
  def createInvoice(self, invoice):
174
    """
175
    Creates an invoice object
176
 
177
    Parameters:
178
     - invoice
179
    """
180
    pass
181
 
5591 mandeep.dh 182
  def addSupplier(self, supplier):
183
    """
184
    Creates a supplier
5443 mandeep.dh 185
 
5591 mandeep.dh 186
    Parameters:
187
     - supplier
188
    """
189
    pass
190
 
191
  def updateSupplier(self, supplier):
192
    """
193
    Updates a supplier
194
 
195
    Parameters:
196
     - supplier
197
    """
198
    pass
199
 
6467 amar.kumar 200
  def createPurchaseReturn(self, purchaseReturn):
201
    """
202
    Create a new Purchase Return
5591 mandeep.dh 203
 
6467 amar.kumar 204
    Parameters:
205
     - purchaseReturn
206
    """
207
    pass
208
 
209
  def settlePurchaseReturn(self, id):
210
    """
211
    Create a new Purchase Return
212
 
213
    Parameters:
214
     - id
215
    """
216
    pass
217
 
218
  def getUnsettledPurchaseReturns(self, ):
219
    """
220
    Create a new Purchase Return
221
    """
222
    pass
223
 
6630 amar.kumar 224
  def getInvoice(self, invoiceNumber, supplierId):
225
    """
226
    Get invoice with given supplierId and invoiceNumber
6467 amar.kumar 227
 
6630 amar.kumar 228
    Parameters:
229
     - invoiceNumber
230
     - supplierId
231
    """
232
    pass
233
 
7672 rajveer 234
  def createPurchaseForOurExtBilling(self, invoiceNumber, unitPrice, nlc, itemId):
6762 amar.kumar 235
    """
236
     * Inserts new Invoice/LineItem/Purchase Entries for Billed Product done through Our External Billing
237
    *
6630 amar.kumar 238
 
6762 amar.kumar 239
    Parameters:
240
     - invoiceNumber
241
     - unitPrice
7672 rajveer 242
     - nlc
6762 amar.kumar 243
     - itemId
244
    """
245
    pass
246
 
247
  def fulfillPOForExtBilling(self, itemId, quantity):
248
    """
249
    Parameters:
250
     - itemId
251
     - quantity
252
    """
253
    pass
254
 
7410 amar.kumar 255
  def closePO(self, poId):
256
    """
257
    Marks a purchase order as closedcomplete and updates the receivedOn time.
6762 amar.kumar 258
 
7410 amar.kumar 259
    Parameters:
260
     - poId
261
    """
262
    pass
263
 
264
  def isInvoiceReceived(self, invoiceNumber, supplierId):
265
    """
266
    Check if invoice is already received with given supplierId and invoiceNumber
267
 
268
    Parameters:
269
     - invoiceNumber
270
     - supplierId
271
    """
272
    pass
273
 
9829 amar.kumar 274
  def changeWarehouseForPO(self, id, warehouseId):
275
    """
276
    Change warehouseId of PO if no items have been received yet for the PO
7410 amar.kumar 277
 
9829 amar.kumar 278
    Parameters:
279
     - id
280
     - warehouseId
281
    """
282
    pass
283
 
9925 amar.kumar 284
  def changePOStatus(self, id, poStatus):
285
    """
286
    Change status of PO
9829 amar.kumar 287
 
9925 amar.kumar 288
    Parameters:
289
     - id
290
     - poStatus
291
    """
292
    pass
293
 
294
 
4502 mandeep.dh 295
class Client(shop2020.thriftpy.generic.GenericService.Client, Iface):
296
  def __init__(self, iprot, oprot=None):
297
    shop2020.thriftpy.generic.GenericService.Client.__init__(self, iprot, oprot)
298
 
299
  def createPurchaseOrder(self, purchaseOrder):
300
    """
301
    Creates a purchase order based on the data in the given purchase order object.
302
    This method populates a nummber of missing fields
303
 
304
    Parameters:
305
     - purchaseOrder
306
    """
307
    self.send_createPurchaseOrder(purchaseOrder)
308
    return self.recv_createPurchaseOrder()
309
 
310
  def send_createPurchaseOrder(self, purchaseOrder):
311
    self._oprot.writeMessageBegin('createPurchaseOrder', TMessageType.CALL, self._seqid)
312
    args = createPurchaseOrder_args()
313
    args.purchaseOrder = purchaseOrder
314
    args.write(self._oprot)
315
    self._oprot.writeMessageEnd()
316
    self._oprot.trans.flush()
317
 
318
  def recv_createPurchaseOrder(self, ):
319
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
320
    if mtype == TMessageType.EXCEPTION:
321
      x = TApplicationException()
322
      x.read(self._iprot)
323
      self._iprot.readMessageEnd()
324
      raise x
325
    result = createPurchaseOrder_result()
326
    result.read(self._iprot)
327
    self._iprot.readMessageEnd()
328
    if result.success is not None:
329
      return result.success
330
    if result.e is not None:
331
      raise result.e
332
    raise TApplicationException(TApplicationException.MISSING_RESULT, "createPurchaseOrder failed: unknown result");
333
 
334
  def getPurchaseOrder(self, id):
335
    """
336
    Returns the purchase order with the given id. Throws an exception if there is no such purchase order.
337
 
338
    Parameters:
339
     - id
340
    """
341
    self.send_getPurchaseOrder(id)
342
    return self.recv_getPurchaseOrder()
343
 
344
  def send_getPurchaseOrder(self, id):
345
    self._oprot.writeMessageBegin('getPurchaseOrder', TMessageType.CALL, self._seqid)
346
    args = getPurchaseOrder_args()
347
    args.id = id
348
    args.write(self._oprot)
349
    self._oprot.writeMessageEnd()
350
    self._oprot.trans.flush()
351
 
352
  def recv_getPurchaseOrder(self, ):
353
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
354
    if mtype == TMessageType.EXCEPTION:
355
      x = TApplicationException()
356
      x.read(self._iprot)
357
      self._iprot.readMessageEnd()
358
      raise x
359
    result = getPurchaseOrder_result()
360
    result.read(self._iprot)
361
    self._iprot.readMessageEnd()
362
    if result.success is not None:
363
      return result.success
364
    if result.e is not None:
365
      raise result.e
366
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getPurchaseOrder failed: unknown result");
367
 
368
  def getAllPurchaseOrders(self, status):
369
    """
370
    Returns a list of all the purchase orders in the given state
371
 
372
    Parameters:
373
     - status
374
    """
375
    self.send_getAllPurchaseOrders(status)
376
    return self.recv_getAllPurchaseOrders()
377
 
378
  def send_getAllPurchaseOrders(self, status):
379
    self._oprot.writeMessageBegin('getAllPurchaseOrders', TMessageType.CALL, self._seqid)
380
    args = getAllPurchaseOrders_args()
381
    args.status = status
382
    args.write(self._oprot)
383
    self._oprot.writeMessageEnd()
384
    self._oprot.trans.flush()
385
 
386
  def recv_getAllPurchaseOrders(self, ):
387
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
388
    if mtype == TMessageType.EXCEPTION:
389
      x = TApplicationException()
390
      x.read(self._iprot)
391
      self._iprot.readMessageEnd()
392
      raise x
393
    result = getAllPurchaseOrders_result()
394
    result.read(self._iprot)
395
    self._iprot.readMessageEnd()
396
    if result.success is not None:
397
      return result.success
398
    if result.e is not None:
399
      raise result.e
400
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getAllPurchaseOrders failed: unknown result");
401
 
402
  def getSupplier(self, id):
403
    """
404
    Returns the supplier with the given order id. Throws an exception if there is no such supplier.
405
 
406
    Parameters:
407
     - id
408
    """
409
    self.send_getSupplier(id)
410
    return self.recv_getSupplier()
411
 
412
  def send_getSupplier(self, id):
413
    self._oprot.writeMessageBegin('getSupplier', TMessageType.CALL, self._seqid)
414
    args = getSupplier_args()
415
    args.id = id
416
    args.write(self._oprot)
417
    self._oprot.writeMessageEnd()
418
    self._oprot.trans.flush()
419
 
420
  def recv_getSupplier(self, ):
421
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
422
    if mtype == TMessageType.EXCEPTION:
423
      x = TApplicationException()
424
      x.read(self._iprot)
425
      self._iprot.readMessageEnd()
426
      raise x
427
    result = getSupplier_result()
428
    result.read(self._iprot)
429
    self._iprot.readMessageEnd()
430
    if result.success is not None:
431
      return result.success
432
    if result.e is not None:
433
      raise result.e
434
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getSupplier failed: unknown result");
435
 
436
  def startPurchase(self, purchaseOrderId, invoiceNumber, freightCharges):
437
    """
438
    Creates a purchase for the given purchase order.
439
    Throws an exception if no more purchases are allowed against the given purchase order.
440
 
441
    Parameters:
442
     - purchaseOrderId
443
     - invoiceNumber
444
     - freightCharges
445
    """
446
    self.send_startPurchase(purchaseOrderId, invoiceNumber, freightCharges)
447
    return self.recv_startPurchase()
448
 
449
  def send_startPurchase(self, purchaseOrderId, invoiceNumber, freightCharges):
450
    self._oprot.writeMessageBegin('startPurchase', TMessageType.CALL, self._seqid)
451
    args = startPurchase_args()
452
    args.purchaseOrderId = purchaseOrderId
453
    args.invoiceNumber = invoiceNumber
454
    args.freightCharges = freightCharges
455
    args.write(self._oprot)
456
    self._oprot.writeMessageEnd()
457
    self._oprot.trans.flush()
458
 
459
  def recv_startPurchase(self, ):
460
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
461
    if mtype == TMessageType.EXCEPTION:
462
      x = TApplicationException()
463
      x.read(self._iprot)
464
      self._iprot.readMessageEnd()
465
      raise x
466
    result = startPurchase_result()
467
    result.read(self._iprot)
468
    self._iprot.readMessageEnd()
469
    if result.success is not None:
470
      return result.success
471
    if result.e is not None:
472
      raise result.e
473
    raise TApplicationException(TApplicationException.MISSING_RESULT, "startPurchase failed: unknown result");
474
 
475
  def closePurchase(self, purchaseId):
476
    """
477
    Marks a purchase as complete and updates the receivedOn time.
478
    Throws an exception if no such purchase exists.
479
 
480
    Parameters:
481
     - purchaseId
482
    """
483
    self.send_closePurchase(purchaseId)
484
    return self.recv_closePurchase()
485
 
486
  def send_closePurchase(self, purchaseId):
487
    self._oprot.writeMessageBegin('closePurchase', TMessageType.CALL, self._seqid)
488
    args = closePurchase_args()
489
    args.purchaseId = purchaseId
490
    args.write(self._oprot)
491
    self._oprot.writeMessageEnd()
492
    self._oprot.trans.flush()
493
 
494
  def recv_closePurchase(self, ):
495
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
496
    if mtype == TMessageType.EXCEPTION:
497
      x = TApplicationException()
498
      x.read(self._iprot)
499
      self._iprot.readMessageEnd()
500
      raise x
501
    result = closePurchase_result()
502
    result.read(self._iprot)
503
    self._iprot.readMessageEnd()
504
    if result.success is not None:
505
      return result.success
506
    if result.e is not None:
507
      raise result.e
508
    raise TApplicationException(TApplicationException.MISSING_RESULT, "closePurchase failed: unknown result");
509
 
510
  def getAllPurchases(self, purchaseOrderId, open):
511
    """
512
    Returns all open or closed purchases for the given purchase order. Throws an exception if no such purchase order exists
513
 
514
    Parameters:
515
     - purchaseOrderId
516
     - open
517
    """
518
    self.send_getAllPurchases(purchaseOrderId, open)
519
    return self.recv_getAllPurchases()
520
 
521
  def send_getAllPurchases(self, purchaseOrderId, open):
522
    self._oprot.writeMessageBegin('getAllPurchases', TMessageType.CALL, self._seqid)
523
    args = getAllPurchases_args()
524
    args.purchaseOrderId = purchaseOrderId
525
    args.open = open
526
    args.write(self._oprot)
527
    self._oprot.writeMessageEnd()
528
    self._oprot.trans.flush()
529
 
530
  def recv_getAllPurchases(self, ):
531
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
532
    if mtype == TMessageType.EXCEPTION:
533
      x = TApplicationException()
534
      x.read(self._iprot)
535
      self._iprot.readMessageEnd()
536
      raise x
537
    result = getAllPurchases_result()
538
    result.read(self._iprot)
539
    self._iprot.readMessageEnd()
540
    if result.success is not None:
541
      return result.success
542
    if result.e is not None:
543
      raise result.e
544
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getAllPurchases failed: unknown result");
545
 
6386 amar.kumar 546
  def getPurchasesForPO(self, purchaseOrderId):
547
    """
548
    Returns all purchases for the given purchase order. Throws an exception if no such purchase order exists
549
 
550
    Parameters:
551
     - purchaseOrderId
552
    """
553
    self.send_getPurchasesForPO(purchaseOrderId)
554
    return self.recv_getPurchasesForPO()
555
 
556
  def send_getPurchasesForPO(self, purchaseOrderId):
557
    self._oprot.writeMessageBegin('getPurchasesForPO', TMessageType.CALL, self._seqid)
558
    args = getPurchasesForPO_args()
559
    args.purchaseOrderId = purchaseOrderId
560
    args.write(self._oprot)
561
    self._oprot.writeMessageEnd()
562
    self._oprot.trans.flush()
563
 
564
  def recv_getPurchasesForPO(self, ):
565
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
566
    if mtype == TMessageType.EXCEPTION:
567
      x = TApplicationException()
568
      x.read(self._iprot)
569
      self._iprot.readMessageEnd()
570
      raise x
571
    result = getPurchasesForPO_result()
572
    result.read(self._iprot)
573
    self._iprot.readMessageEnd()
574
    if result.success is not None:
575
      return result.success
576
    if result.e is not None:
577
      raise result.e
578
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getPurchasesForPO failed: unknown result");
579
 
4555 mandeep.dh 580
  def getPurchaseOrderForPurchase(self, purchaseId):
4502 mandeep.dh 581
    """
4555 mandeep.dh 582
    Returns the purchase order object for a given purchase
4502 mandeep.dh 583
 
584
    Parameters:
585
     - purchaseId
586
    """
4555 mandeep.dh 587
    self.send_getPurchaseOrderForPurchase(purchaseId)
588
    return self.recv_getPurchaseOrderForPurchase()
4502 mandeep.dh 589
 
4555 mandeep.dh 590
  def send_getPurchaseOrderForPurchase(self, purchaseId):
591
    self._oprot.writeMessageBegin('getPurchaseOrderForPurchase', TMessageType.CALL, self._seqid)
592
    args = getPurchaseOrderForPurchase_args()
4502 mandeep.dh 593
    args.purchaseId = purchaseId
594
    args.write(self._oprot)
595
    self._oprot.writeMessageEnd()
596
    self._oprot.trans.flush()
597
 
4555 mandeep.dh 598
  def recv_getPurchaseOrderForPurchase(self, ):
4502 mandeep.dh 599
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
600
    if mtype == TMessageType.EXCEPTION:
601
      x = TApplicationException()
602
      x.read(self._iprot)
603
      self._iprot.readMessageEnd()
604
      raise x
4555 mandeep.dh 605
    result = getPurchaseOrderForPurchase_result()
4502 mandeep.dh 606
    result.read(self._iprot)
607
    self._iprot.readMessageEnd()
608
    if result.success is not None:
609
      return result.success
4555 mandeep.dh 610
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getPurchaseOrderForPurchase failed: unknown result");
4502 mandeep.dh 611
 
4754 mandeep.dh 612
  def getPendingPurchaseOrders(self, warehouseId):
613
    """
614
    Creates purchase order objects from pending orders
4502 mandeep.dh 615
 
4754 mandeep.dh 616
    Parameters:
617
     - warehouseId
618
    """
619
    self.send_getPendingPurchaseOrders(warehouseId)
620
    return self.recv_getPendingPurchaseOrders()
621
 
622
  def send_getPendingPurchaseOrders(self, warehouseId):
623
    self._oprot.writeMessageBegin('getPendingPurchaseOrders', TMessageType.CALL, self._seqid)
624
    args = getPendingPurchaseOrders_args()
625
    args.warehouseId = warehouseId
626
    args.write(self._oprot)
627
    self._oprot.writeMessageEnd()
628
    self._oprot.trans.flush()
629
 
630
  def recv_getPendingPurchaseOrders(self, ):
631
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
632
    if mtype == TMessageType.EXCEPTION:
633
      x = TApplicationException()
634
      x.read(self._iprot)
635
      self._iprot.readMessageEnd()
636
      raise x
637
    result = getPendingPurchaseOrders_result()
638
    result.read(self._iprot)
639
    self._iprot.readMessageEnd()
640
    if result.success is not None:
641
      return result.success
642
    if result.e is not None:
643
      raise result.e
644
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getPendingPurchaseOrders failed: unknown result");
645
 
646
  def getSuppliers(self, ):
647
    """
648
    Returns all the valid suppliers
649
    """
650
    self.send_getSuppliers()
651
    return self.recv_getSuppliers()
652
 
653
  def send_getSuppliers(self, ):
654
    self._oprot.writeMessageBegin('getSuppliers', TMessageType.CALL, self._seqid)
655
    args = getSuppliers_args()
656
    args.write(self._oprot)
657
    self._oprot.writeMessageEnd()
658
    self._oprot.trans.flush()
659
 
660
  def recv_getSuppliers(self, ):
661
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
662
    if mtype == TMessageType.EXCEPTION:
663
      x = TApplicationException()
664
      x.read(self._iprot)
665
      self._iprot.readMessageEnd()
666
      raise x
667
    result = getSuppliers_result()
668
    result.read(self._iprot)
669
    self._iprot.readMessageEnd()
670
    if result.success is not None:
671
      return result.success
672
    if result.e is not None:
673
      raise result.e
674
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getSuppliers failed: unknown result");
675
 
676
  def fulfillPO(self, purchaseOrderId, itemId, quantity):
677
    """
678
    Fulfills a given purchase order with an item.
679
 
680
    Parameters:
681
     - purchaseOrderId
682
     - itemId
683
     - quantity
684
    """
685
    self.send_fulfillPO(purchaseOrderId, itemId, quantity)
686
    self.recv_fulfillPO()
687
 
688
  def send_fulfillPO(self, purchaseOrderId, itemId, quantity):
689
    self._oprot.writeMessageBegin('fulfillPO', TMessageType.CALL, self._seqid)
690
    args = fulfillPO_args()
691
    args.purchaseOrderId = purchaseOrderId
692
    args.itemId = itemId
693
    args.quantity = quantity
694
    args.write(self._oprot)
695
    self._oprot.writeMessageEnd()
696
    self._oprot.trans.flush()
697
 
698
  def recv_fulfillPO(self, ):
699
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
700
    if mtype == TMessageType.EXCEPTION:
701
      x = TApplicationException()
702
      x.read(self._iprot)
703
      self._iprot.readMessageEnd()
704
      raise x
705
    result = fulfillPO_result()
706
    result.read(self._iprot)
707
    self._iprot.readMessageEnd()
708
    if result.e is not None:
709
      raise result.e
710
    return
711
 
712
  def updatePurchaseOrder(self, purchaseOrder):
713
    """
714
    Amends a PO as per the new lineitems passed
715
 
716
    Parameters:
717
     - purchaseOrder
718
    """
719
    self.send_updatePurchaseOrder(purchaseOrder)
720
    self.recv_updatePurchaseOrder()
721
 
722
  def send_updatePurchaseOrder(self, purchaseOrder):
723
    self._oprot.writeMessageBegin('updatePurchaseOrder', TMessageType.CALL, self._seqid)
724
    args = updatePurchaseOrder_args()
725
    args.purchaseOrder = purchaseOrder
726
    args.write(self._oprot)
727
    self._oprot.writeMessageEnd()
728
    self._oprot.trans.flush()
729
 
730
  def recv_updatePurchaseOrder(self, ):
731
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
732
    if mtype == TMessageType.EXCEPTION:
733
      x = TApplicationException()
734
      x.read(self._iprot)
735
      self._iprot.readMessageEnd()
736
      raise x
737
    result = updatePurchaseOrder_result()
738
    result.read(self._iprot)
739
    self._iprot.readMessageEnd()
740
    if result.e is not None:
741
      raise result.e
742
    return
743
 
5185 mandeep.dh 744
  def unFulfillPO(self, purchaseId, itemId, quantity):
745
    """
746
    Fulfills a given purchase id with an item and its quantity.
4754 mandeep.dh 747
 
5185 mandeep.dh 748
    Parameters:
749
     - purchaseId
750
     - itemId
751
     - quantity
752
    """
753
    self.send_unFulfillPO(purchaseId, itemId, quantity)
754
    self.recv_unFulfillPO()
755
 
756
  def send_unFulfillPO(self, purchaseId, itemId, quantity):
757
    self._oprot.writeMessageBegin('unFulfillPO', TMessageType.CALL, self._seqid)
758
    args = unFulfillPO_args()
759
    args.purchaseId = purchaseId
760
    args.itemId = itemId
761
    args.quantity = quantity
762
    args.write(self._oprot)
763
    self._oprot.writeMessageEnd()
764
    self._oprot.trans.flush()
765
 
766
  def recv_unFulfillPO(self, ):
767
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
768
    if mtype == TMessageType.EXCEPTION:
769
      x = TApplicationException()
770
      x.read(self._iprot)
771
      self._iprot.readMessageEnd()
772
      raise x
773
    result = unFulfillPO_result()
774
    result.read(self._iprot)
775
    self._iprot.readMessageEnd()
776
    if result.e is not None:
777
      raise result.e
778
    return
779
 
5443 mandeep.dh 780
  def getInvoices(self, date):
781
    """
5530 mandeep.dh 782
    Fetches all invoices after a given date
5185 mandeep.dh 783
 
5443 mandeep.dh 784
    Parameters:
785
     - date
786
    """
787
    self.send_getInvoices(date)
788
    return self.recv_getInvoices()
789
 
790
  def send_getInvoices(self, date):
791
    self._oprot.writeMessageBegin('getInvoices', TMessageType.CALL, self._seqid)
792
    args = getInvoices_args()
793
    args.date = date
794
    args.write(self._oprot)
795
    self._oprot.writeMessageEnd()
796
    self._oprot.trans.flush()
797
 
798
  def recv_getInvoices(self, ):
799
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
800
    if mtype == TMessageType.EXCEPTION:
801
      x = TApplicationException()
802
      x.read(self._iprot)
803
      self._iprot.readMessageEnd()
804
      raise x
805
    result = getInvoices_result()
806
    result.read(self._iprot)
807
    self._iprot.readMessageEnd()
808
    if result.success is not None:
809
      return result.success
810
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getInvoices failed: unknown result");
811
 
7410 amar.kumar 812
  def getInvoicesForWarehouse(self, warehouseId, supplierId, date):
813
    """
814
    Fetches all invoices after a given date
815
 
816
    Parameters:
817
     - warehouseId
818
     - supplierId
819
     - date
820
    """
821
    self.send_getInvoicesForWarehouse(warehouseId, supplierId, date)
822
    return self.recv_getInvoicesForWarehouse()
823
 
824
  def send_getInvoicesForWarehouse(self, warehouseId, supplierId, date):
825
    self._oprot.writeMessageBegin('getInvoicesForWarehouse', TMessageType.CALL, self._seqid)
826
    args = getInvoicesForWarehouse_args()
827
    args.warehouseId = warehouseId
828
    args.supplierId = supplierId
829
    args.date = date
830
    args.write(self._oprot)
831
    self._oprot.writeMessageEnd()
832
    self._oprot.trans.flush()
833
 
834
  def recv_getInvoicesForWarehouse(self, ):
835
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
836
    if mtype == TMessageType.EXCEPTION:
837
      x = TApplicationException()
838
      x.read(self._iprot)
839
      self._iprot.readMessageEnd()
840
      raise x
841
    result = getInvoicesForWarehouse_result()
842
    result.read(self._iprot)
843
    self._iprot.readMessageEnd()
844
    if result.success is not None:
845
      return result.success
846
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getInvoicesForWarehouse failed: unknown result");
847
 
5443 mandeep.dh 848
  def createInvoice(self, invoice):
849
    """
850
    Creates an invoice object
851
 
852
    Parameters:
853
     - invoice
854
    """
855
    self.send_createInvoice(invoice)
856
    self.recv_createInvoice()
857
 
858
  def send_createInvoice(self, invoice):
859
    self._oprot.writeMessageBegin('createInvoice', TMessageType.CALL, self._seqid)
860
    args = createInvoice_args()
861
    args.invoice = invoice
862
    args.write(self._oprot)
863
    self._oprot.writeMessageEnd()
864
    self._oprot.trans.flush()
865
 
866
  def recv_createInvoice(self, ):
867
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
868
    if mtype == TMessageType.EXCEPTION:
869
      x = TApplicationException()
870
      x.read(self._iprot)
871
      self._iprot.readMessageEnd()
872
      raise x
873
    result = createInvoice_result()
874
    result.read(self._iprot)
875
    self._iprot.readMessageEnd()
876
    if result.e is not None:
877
      raise result.e
878
    return
879
 
5591 mandeep.dh 880
  def addSupplier(self, supplier):
881
    """
882
    Creates a supplier
5443 mandeep.dh 883
 
5591 mandeep.dh 884
    Parameters:
885
     - supplier
886
    """
887
    self.send_addSupplier(supplier)
888
    return self.recv_addSupplier()
889
 
890
  def send_addSupplier(self, supplier):
891
    self._oprot.writeMessageBegin('addSupplier', TMessageType.CALL, self._seqid)
892
    args = addSupplier_args()
893
    args.supplier = supplier
894
    args.write(self._oprot)
895
    self._oprot.writeMessageEnd()
896
    self._oprot.trans.flush()
897
 
898
  def recv_addSupplier(self, ):
899
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
900
    if mtype == TMessageType.EXCEPTION:
901
      x = TApplicationException()
902
      x.read(self._iprot)
903
      self._iprot.readMessageEnd()
904
      raise x
905
    result = addSupplier_result()
906
    result.read(self._iprot)
907
    self._iprot.readMessageEnd()
908
    if result.success is not None:
909
      return result.success
910
    raise TApplicationException(TApplicationException.MISSING_RESULT, "addSupplier failed: unknown result");
911
 
912
  def updateSupplier(self, supplier):
913
    """
914
    Updates a supplier
915
 
916
    Parameters:
917
     - supplier
918
    """
919
    self.send_updateSupplier(supplier)
920
    self.recv_updateSupplier()
921
 
922
  def send_updateSupplier(self, supplier):
923
    self._oprot.writeMessageBegin('updateSupplier', TMessageType.CALL, self._seqid)
924
    args = updateSupplier_args()
925
    args.supplier = supplier
926
    args.write(self._oprot)
927
    self._oprot.writeMessageEnd()
928
    self._oprot.trans.flush()
929
 
930
  def recv_updateSupplier(self, ):
931
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
932
    if mtype == TMessageType.EXCEPTION:
933
      x = TApplicationException()
934
      x.read(self._iprot)
935
      self._iprot.readMessageEnd()
936
      raise x
937
    result = updateSupplier_result()
938
    result.read(self._iprot)
939
    self._iprot.readMessageEnd()
940
    return
941
 
6467 amar.kumar 942
  def createPurchaseReturn(self, purchaseReturn):
943
    """
944
    Create a new Purchase Return
5591 mandeep.dh 945
 
6467 amar.kumar 946
    Parameters:
947
     - purchaseReturn
948
    """
949
    self.send_createPurchaseReturn(purchaseReturn)
950
    return self.recv_createPurchaseReturn()
951
 
952
  def send_createPurchaseReturn(self, purchaseReturn):
953
    self._oprot.writeMessageBegin('createPurchaseReturn', TMessageType.CALL, self._seqid)
954
    args = createPurchaseReturn_args()
955
    args.purchaseReturn = purchaseReturn
956
    args.write(self._oprot)
957
    self._oprot.writeMessageEnd()
958
    self._oprot.trans.flush()
959
 
960
  def recv_createPurchaseReturn(self, ):
961
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
962
    if mtype == TMessageType.EXCEPTION:
963
      x = TApplicationException()
964
      x.read(self._iprot)
965
      self._iprot.readMessageEnd()
966
      raise x
967
    result = createPurchaseReturn_result()
968
    result.read(self._iprot)
969
    self._iprot.readMessageEnd()
970
    if result.success is not None:
971
      return result.success
972
    raise TApplicationException(TApplicationException.MISSING_RESULT, "createPurchaseReturn failed: unknown result");
973
 
974
  def settlePurchaseReturn(self, id):
975
    """
976
    Create a new Purchase Return
977
 
978
    Parameters:
979
     - id
980
    """
981
    self.send_settlePurchaseReturn(id)
982
    self.recv_settlePurchaseReturn()
983
 
984
  def send_settlePurchaseReturn(self, id):
985
    self._oprot.writeMessageBegin('settlePurchaseReturn', TMessageType.CALL, self._seqid)
986
    args = settlePurchaseReturn_args()
987
    args.id = id
988
    args.write(self._oprot)
989
    self._oprot.writeMessageEnd()
990
    self._oprot.trans.flush()
991
 
992
  def recv_settlePurchaseReturn(self, ):
993
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
994
    if mtype == TMessageType.EXCEPTION:
995
      x = TApplicationException()
996
      x.read(self._iprot)
997
      self._iprot.readMessageEnd()
998
      raise x
999
    result = settlePurchaseReturn_result()
1000
    result.read(self._iprot)
1001
    self._iprot.readMessageEnd()
1002
    return
1003
 
1004
  def getUnsettledPurchaseReturns(self, ):
1005
    """
1006
    Create a new Purchase Return
1007
    """
1008
    self.send_getUnsettledPurchaseReturns()
1009
    return self.recv_getUnsettledPurchaseReturns()
1010
 
1011
  def send_getUnsettledPurchaseReturns(self, ):
1012
    self._oprot.writeMessageBegin('getUnsettledPurchaseReturns', TMessageType.CALL, self._seqid)
1013
    args = getUnsettledPurchaseReturns_args()
1014
    args.write(self._oprot)
1015
    self._oprot.writeMessageEnd()
1016
    self._oprot.trans.flush()
1017
 
1018
  def recv_getUnsettledPurchaseReturns(self, ):
1019
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
1020
    if mtype == TMessageType.EXCEPTION:
1021
      x = TApplicationException()
1022
      x.read(self._iprot)
1023
      self._iprot.readMessageEnd()
1024
      raise x
1025
    result = getUnsettledPurchaseReturns_result()
1026
    result.read(self._iprot)
1027
    self._iprot.readMessageEnd()
1028
    if result.success is not None:
1029
      return result.success
1030
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getUnsettledPurchaseReturns failed: unknown result");
1031
 
6630 amar.kumar 1032
  def getInvoice(self, invoiceNumber, supplierId):
1033
    """
1034
    Get invoice with given supplierId and invoiceNumber
6467 amar.kumar 1035
 
6630 amar.kumar 1036
    Parameters:
1037
     - invoiceNumber
1038
     - supplierId
1039
    """
1040
    self.send_getInvoice(invoiceNumber, supplierId)
1041
    return self.recv_getInvoice()
1042
 
1043
  def send_getInvoice(self, invoiceNumber, supplierId):
1044
    self._oprot.writeMessageBegin('getInvoice', TMessageType.CALL, self._seqid)
1045
    args = getInvoice_args()
1046
    args.invoiceNumber = invoiceNumber
1047
    args.supplierId = supplierId
1048
    args.write(self._oprot)
1049
    self._oprot.writeMessageEnd()
1050
    self._oprot.trans.flush()
1051
 
1052
  def recv_getInvoice(self, ):
1053
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
1054
    if mtype == TMessageType.EXCEPTION:
1055
      x = TApplicationException()
1056
      x.read(self._iprot)
1057
      self._iprot.readMessageEnd()
1058
      raise x
1059
    result = getInvoice_result()
1060
    result.read(self._iprot)
1061
    self._iprot.readMessageEnd()
1062
    if result.success is not None:
1063
      return result.success
1064
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getInvoice failed: unknown result");
1065
 
7672 rajveer 1066
  def createPurchaseForOurExtBilling(self, invoiceNumber, unitPrice, nlc, itemId):
6762 amar.kumar 1067
    """
1068
     * Inserts new Invoice/LineItem/Purchase Entries for Billed Product done through Our External Billing
1069
    *
6630 amar.kumar 1070
 
6762 amar.kumar 1071
    Parameters:
1072
     - invoiceNumber
1073
     - unitPrice
7672 rajveer 1074
     - nlc
6762 amar.kumar 1075
     - itemId
1076
    """
7672 rajveer 1077
    self.send_createPurchaseForOurExtBilling(invoiceNumber, unitPrice, nlc, itemId)
6762 amar.kumar 1078
    return self.recv_createPurchaseForOurExtBilling()
1079
 
7672 rajveer 1080
  def send_createPurchaseForOurExtBilling(self, invoiceNumber, unitPrice, nlc, itemId):
6762 amar.kumar 1081
    self._oprot.writeMessageBegin('createPurchaseForOurExtBilling', TMessageType.CALL, self._seqid)
1082
    args = createPurchaseForOurExtBilling_args()
1083
    args.invoiceNumber = invoiceNumber
1084
    args.unitPrice = unitPrice
7672 rajveer 1085
    args.nlc = nlc
6762 amar.kumar 1086
    args.itemId = itemId
1087
    args.write(self._oprot)
1088
    self._oprot.writeMessageEnd()
1089
    self._oprot.trans.flush()
1090
 
1091
  def recv_createPurchaseForOurExtBilling(self, ):
1092
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
1093
    if mtype == TMessageType.EXCEPTION:
1094
      x = TApplicationException()
1095
      x.read(self._iprot)
1096
      self._iprot.readMessageEnd()
1097
      raise x
1098
    result = createPurchaseForOurExtBilling_result()
1099
    result.read(self._iprot)
1100
    self._iprot.readMessageEnd()
1101
    if result.success is not None:
1102
      return result.success
1103
    raise TApplicationException(TApplicationException.MISSING_RESULT, "createPurchaseForOurExtBilling failed: unknown result");
1104
 
1105
  def fulfillPOForExtBilling(self, itemId, quantity):
1106
    """
1107
    Parameters:
1108
     - itemId
1109
     - quantity
1110
    """
1111
    self.send_fulfillPOForExtBilling(itemId, quantity)
1112
    self.recv_fulfillPOForExtBilling()
1113
 
1114
  def send_fulfillPOForExtBilling(self, itemId, quantity):
1115
    self._oprot.writeMessageBegin('fulfillPOForExtBilling', TMessageType.CALL, self._seqid)
1116
    args = fulfillPOForExtBilling_args()
1117
    args.itemId = itemId
1118
    args.quantity = quantity
1119
    args.write(self._oprot)
1120
    self._oprot.writeMessageEnd()
1121
    self._oprot.trans.flush()
1122
 
1123
  def recv_fulfillPOForExtBilling(self, ):
1124
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
1125
    if mtype == TMessageType.EXCEPTION:
1126
      x = TApplicationException()
1127
      x.read(self._iprot)
1128
      self._iprot.readMessageEnd()
1129
      raise x
1130
    result = fulfillPOForExtBilling_result()
1131
    result.read(self._iprot)
1132
    self._iprot.readMessageEnd()
1133
    return
1134
 
7410 amar.kumar 1135
  def closePO(self, poId):
1136
    """
1137
    Marks a purchase order as closedcomplete and updates the receivedOn time.
6762 amar.kumar 1138
 
7410 amar.kumar 1139
    Parameters:
1140
     - poId
1141
    """
1142
    self.send_closePO(poId)
1143
    self.recv_closePO()
1144
 
1145
  def send_closePO(self, poId):
1146
    self._oprot.writeMessageBegin('closePO', TMessageType.CALL, self._seqid)
1147
    args = closePO_args()
1148
    args.poId = poId
1149
    args.write(self._oprot)
1150
    self._oprot.writeMessageEnd()
1151
    self._oprot.trans.flush()
1152
 
1153
  def recv_closePO(self, ):
1154
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
1155
    if mtype == TMessageType.EXCEPTION:
1156
      x = TApplicationException()
1157
      x.read(self._iprot)
1158
      self._iprot.readMessageEnd()
1159
      raise x
1160
    result = closePO_result()
1161
    result.read(self._iprot)
1162
    self._iprot.readMessageEnd()
1163
    if result.e is not None:
1164
      raise result.e
1165
    return
1166
 
1167
  def isInvoiceReceived(self, invoiceNumber, supplierId):
1168
    """
1169
    Check if invoice is already received with given supplierId and invoiceNumber
1170
 
1171
    Parameters:
1172
     - invoiceNumber
1173
     - supplierId
1174
    """
1175
    self.send_isInvoiceReceived(invoiceNumber, supplierId)
1176
    return self.recv_isInvoiceReceived()
1177
 
1178
  def send_isInvoiceReceived(self, invoiceNumber, supplierId):
1179
    self._oprot.writeMessageBegin('isInvoiceReceived', TMessageType.CALL, self._seqid)
1180
    args = isInvoiceReceived_args()
1181
    args.invoiceNumber = invoiceNumber
1182
    args.supplierId = supplierId
1183
    args.write(self._oprot)
1184
    self._oprot.writeMessageEnd()
1185
    self._oprot.trans.flush()
1186
 
1187
  def recv_isInvoiceReceived(self, ):
1188
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
1189
    if mtype == TMessageType.EXCEPTION:
1190
      x = TApplicationException()
1191
      x.read(self._iprot)
1192
      self._iprot.readMessageEnd()
1193
      raise x
1194
    result = isInvoiceReceived_result()
1195
    result.read(self._iprot)
1196
    self._iprot.readMessageEnd()
1197
    if result.success is not None:
1198
      return result.success
1199
    raise TApplicationException(TApplicationException.MISSING_RESULT, "isInvoiceReceived failed: unknown result");
1200
 
9829 amar.kumar 1201
  def changeWarehouseForPO(self, id, warehouseId):
1202
    """
1203
    Change warehouseId of PO if no items have been received yet for the PO
7410 amar.kumar 1204
 
9829 amar.kumar 1205
    Parameters:
1206
     - id
1207
     - warehouseId
1208
    """
1209
    self.send_changeWarehouseForPO(id, warehouseId)
1210
    self.recv_changeWarehouseForPO()
1211
 
1212
  def send_changeWarehouseForPO(self, id, warehouseId):
1213
    self._oprot.writeMessageBegin('changeWarehouseForPO', TMessageType.CALL, self._seqid)
1214
    args = changeWarehouseForPO_args()
1215
    args.id = id
1216
    args.warehouseId = warehouseId
1217
    args.write(self._oprot)
1218
    self._oprot.writeMessageEnd()
1219
    self._oprot.trans.flush()
1220
 
1221
  def recv_changeWarehouseForPO(self, ):
1222
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
1223
    if mtype == TMessageType.EXCEPTION:
1224
      x = TApplicationException()
1225
      x.read(self._iprot)
1226
      self._iprot.readMessageEnd()
1227
      raise x
1228
    result = changeWarehouseForPO_result()
1229
    result.read(self._iprot)
1230
    self._iprot.readMessageEnd()
1231
    if result.e is not None:
1232
      raise result.e
1233
    return
1234
 
9925 amar.kumar 1235
  def changePOStatus(self, id, poStatus):
1236
    """
1237
    Change status of PO
9829 amar.kumar 1238
 
9925 amar.kumar 1239
    Parameters:
1240
     - id
1241
     - poStatus
1242
    """
1243
    self.send_changePOStatus(id, poStatus)
1244
    self.recv_changePOStatus()
1245
 
1246
  def send_changePOStatus(self, id, poStatus):
1247
    self._oprot.writeMessageBegin('changePOStatus', TMessageType.CALL, self._seqid)
1248
    args = changePOStatus_args()
1249
    args.id = id
1250
    args.poStatus = poStatus
1251
    args.write(self._oprot)
1252
    self._oprot.writeMessageEnd()
1253
    self._oprot.trans.flush()
1254
 
1255
  def recv_changePOStatus(self, ):
1256
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
1257
    if mtype == TMessageType.EXCEPTION:
1258
      x = TApplicationException()
1259
      x.read(self._iprot)
1260
      self._iprot.readMessageEnd()
1261
      raise x
1262
    result = changePOStatus_result()
1263
    result.read(self._iprot)
1264
    self._iprot.readMessageEnd()
1265
    if result.e is not None:
1266
      raise result.e
1267
    return
1268
 
1269
 
4502 mandeep.dh 1270
class Processor(shop2020.thriftpy.generic.GenericService.Processor, Iface, TProcessor):
1271
  def __init__(self, handler):
1272
    shop2020.thriftpy.generic.GenericService.Processor.__init__(self, handler)
1273
    self._processMap["createPurchaseOrder"] = Processor.process_createPurchaseOrder
1274
    self._processMap["getPurchaseOrder"] = Processor.process_getPurchaseOrder
1275
    self._processMap["getAllPurchaseOrders"] = Processor.process_getAllPurchaseOrders
1276
    self._processMap["getSupplier"] = Processor.process_getSupplier
1277
    self._processMap["startPurchase"] = Processor.process_startPurchase
1278
    self._processMap["closePurchase"] = Processor.process_closePurchase
1279
    self._processMap["getAllPurchases"] = Processor.process_getAllPurchases
6386 amar.kumar 1280
    self._processMap["getPurchasesForPO"] = Processor.process_getPurchasesForPO
4555 mandeep.dh 1281
    self._processMap["getPurchaseOrderForPurchase"] = Processor.process_getPurchaseOrderForPurchase
4754 mandeep.dh 1282
    self._processMap["getPendingPurchaseOrders"] = Processor.process_getPendingPurchaseOrders
1283
    self._processMap["getSuppliers"] = Processor.process_getSuppliers
1284
    self._processMap["fulfillPO"] = Processor.process_fulfillPO
1285
    self._processMap["updatePurchaseOrder"] = Processor.process_updatePurchaseOrder
5185 mandeep.dh 1286
    self._processMap["unFulfillPO"] = Processor.process_unFulfillPO
5443 mandeep.dh 1287
    self._processMap["getInvoices"] = Processor.process_getInvoices
7410 amar.kumar 1288
    self._processMap["getInvoicesForWarehouse"] = Processor.process_getInvoicesForWarehouse
5443 mandeep.dh 1289
    self._processMap["createInvoice"] = Processor.process_createInvoice
5591 mandeep.dh 1290
    self._processMap["addSupplier"] = Processor.process_addSupplier
1291
    self._processMap["updateSupplier"] = Processor.process_updateSupplier
6467 amar.kumar 1292
    self._processMap["createPurchaseReturn"] = Processor.process_createPurchaseReturn
1293
    self._processMap["settlePurchaseReturn"] = Processor.process_settlePurchaseReturn
1294
    self._processMap["getUnsettledPurchaseReturns"] = Processor.process_getUnsettledPurchaseReturns
6630 amar.kumar 1295
    self._processMap["getInvoice"] = Processor.process_getInvoice
6762 amar.kumar 1296
    self._processMap["createPurchaseForOurExtBilling"] = Processor.process_createPurchaseForOurExtBilling
1297
    self._processMap["fulfillPOForExtBilling"] = Processor.process_fulfillPOForExtBilling
7410 amar.kumar 1298
    self._processMap["closePO"] = Processor.process_closePO
1299
    self._processMap["isInvoiceReceived"] = Processor.process_isInvoiceReceived
9829 amar.kumar 1300
    self._processMap["changeWarehouseForPO"] = Processor.process_changeWarehouseForPO
9925 amar.kumar 1301
    self._processMap["changePOStatus"] = Processor.process_changePOStatus
4502 mandeep.dh 1302
 
1303
  def process(self, iprot, oprot):
1304
    (name, type, seqid) = iprot.readMessageBegin()
1305
    if name not in self._processMap:
1306
      iprot.skip(TType.STRUCT)
1307
      iprot.readMessageEnd()
1308
      x = TApplicationException(TApplicationException.UNKNOWN_METHOD, 'Unknown function %s' % (name))
1309
      oprot.writeMessageBegin(name, TMessageType.EXCEPTION, seqid)
1310
      x.write(oprot)
1311
      oprot.writeMessageEnd()
1312
      oprot.trans.flush()
1313
      return
1314
    else:
1315
      self._processMap[name](self, seqid, iprot, oprot)
1316
    return True
1317
 
1318
  def process_createPurchaseOrder(self, seqid, iprot, oprot):
1319
    args = createPurchaseOrder_args()
1320
    args.read(iprot)
1321
    iprot.readMessageEnd()
1322
    result = createPurchaseOrder_result()
1323
    try:
1324
      result.success = self._handler.createPurchaseOrder(args.purchaseOrder)
1325
    except PurchaseServiceException, e:
1326
      result.e = e
1327
    oprot.writeMessageBegin("createPurchaseOrder", TMessageType.REPLY, seqid)
1328
    result.write(oprot)
1329
    oprot.writeMessageEnd()
1330
    oprot.trans.flush()
1331
 
1332
  def process_getPurchaseOrder(self, seqid, iprot, oprot):
1333
    args = getPurchaseOrder_args()
1334
    args.read(iprot)
1335
    iprot.readMessageEnd()
1336
    result = getPurchaseOrder_result()
1337
    try:
1338
      result.success = self._handler.getPurchaseOrder(args.id)
1339
    except PurchaseServiceException, e:
1340
      result.e = e
1341
    oprot.writeMessageBegin("getPurchaseOrder", TMessageType.REPLY, seqid)
1342
    result.write(oprot)
1343
    oprot.writeMessageEnd()
1344
    oprot.trans.flush()
1345
 
1346
  def process_getAllPurchaseOrders(self, seqid, iprot, oprot):
1347
    args = getAllPurchaseOrders_args()
1348
    args.read(iprot)
1349
    iprot.readMessageEnd()
1350
    result = getAllPurchaseOrders_result()
1351
    try:
1352
      result.success = self._handler.getAllPurchaseOrders(args.status)
1353
    except PurchaseServiceException, e:
1354
      result.e = e
1355
    oprot.writeMessageBegin("getAllPurchaseOrders", TMessageType.REPLY, seqid)
1356
    result.write(oprot)
1357
    oprot.writeMessageEnd()
1358
    oprot.trans.flush()
1359
 
1360
  def process_getSupplier(self, seqid, iprot, oprot):
1361
    args = getSupplier_args()
1362
    args.read(iprot)
1363
    iprot.readMessageEnd()
1364
    result = getSupplier_result()
1365
    try:
1366
      result.success = self._handler.getSupplier(args.id)
1367
    except PurchaseServiceException, e:
1368
      result.e = e
1369
    oprot.writeMessageBegin("getSupplier", TMessageType.REPLY, seqid)
1370
    result.write(oprot)
1371
    oprot.writeMessageEnd()
1372
    oprot.trans.flush()
1373
 
1374
  def process_startPurchase(self, seqid, iprot, oprot):
1375
    args = startPurchase_args()
1376
    args.read(iprot)
1377
    iprot.readMessageEnd()
1378
    result = startPurchase_result()
1379
    try:
1380
      result.success = self._handler.startPurchase(args.purchaseOrderId, args.invoiceNumber, args.freightCharges)
1381
    except PurchaseServiceException, e:
1382
      result.e = e
1383
    oprot.writeMessageBegin("startPurchase", TMessageType.REPLY, seqid)
1384
    result.write(oprot)
1385
    oprot.writeMessageEnd()
1386
    oprot.trans.flush()
1387
 
1388
  def process_closePurchase(self, seqid, iprot, oprot):
1389
    args = closePurchase_args()
1390
    args.read(iprot)
1391
    iprot.readMessageEnd()
1392
    result = closePurchase_result()
1393
    try:
1394
      result.success = self._handler.closePurchase(args.purchaseId)
1395
    except PurchaseServiceException, e:
1396
      result.e = e
1397
    oprot.writeMessageBegin("closePurchase", TMessageType.REPLY, seqid)
1398
    result.write(oprot)
1399
    oprot.writeMessageEnd()
1400
    oprot.trans.flush()
1401
 
1402
  def process_getAllPurchases(self, seqid, iprot, oprot):
1403
    args = getAllPurchases_args()
1404
    args.read(iprot)
1405
    iprot.readMessageEnd()
1406
    result = getAllPurchases_result()
1407
    try:
1408
      result.success = self._handler.getAllPurchases(args.purchaseOrderId, args.open)
1409
    except PurchaseServiceException, e:
1410
      result.e = e
1411
    oprot.writeMessageBegin("getAllPurchases", TMessageType.REPLY, seqid)
1412
    result.write(oprot)
1413
    oprot.writeMessageEnd()
1414
    oprot.trans.flush()
1415
 
6386 amar.kumar 1416
  def process_getPurchasesForPO(self, seqid, iprot, oprot):
1417
    args = getPurchasesForPO_args()
1418
    args.read(iprot)
1419
    iprot.readMessageEnd()
1420
    result = getPurchasesForPO_result()
1421
    try:
1422
      result.success = self._handler.getPurchasesForPO(args.purchaseOrderId)
1423
    except PurchaseServiceException, e:
1424
      result.e = e
1425
    oprot.writeMessageBegin("getPurchasesForPO", TMessageType.REPLY, seqid)
1426
    result.write(oprot)
1427
    oprot.writeMessageEnd()
1428
    oprot.trans.flush()
1429
 
4555 mandeep.dh 1430
  def process_getPurchaseOrderForPurchase(self, seqid, iprot, oprot):
1431
    args = getPurchaseOrderForPurchase_args()
4502 mandeep.dh 1432
    args.read(iprot)
1433
    iprot.readMessageEnd()
4555 mandeep.dh 1434
    result = getPurchaseOrderForPurchase_result()
1435
    result.success = self._handler.getPurchaseOrderForPurchase(args.purchaseId)
1436
    oprot.writeMessageBegin("getPurchaseOrderForPurchase", TMessageType.REPLY, seqid)
4502 mandeep.dh 1437
    result.write(oprot)
1438
    oprot.writeMessageEnd()
1439
    oprot.trans.flush()
1440
 
4754 mandeep.dh 1441
  def process_getPendingPurchaseOrders(self, seqid, iprot, oprot):
1442
    args = getPendingPurchaseOrders_args()
1443
    args.read(iprot)
1444
    iprot.readMessageEnd()
1445
    result = getPendingPurchaseOrders_result()
1446
    try:
1447
      result.success = self._handler.getPendingPurchaseOrders(args.warehouseId)
1448
    except PurchaseServiceException, e:
1449
      result.e = e
1450
    oprot.writeMessageBegin("getPendingPurchaseOrders", TMessageType.REPLY, seqid)
1451
    result.write(oprot)
1452
    oprot.writeMessageEnd()
1453
    oprot.trans.flush()
4502 mandeep.dh 1454
 
4754 mandeep.dh 1455
  def process_getSuppliers(self, seqid, iprot, oprot):
1456
    args = getSuppliers_args()
1457
    args.read(iprot)
1458
    iprot.readMessageEnd()
1459
    result = getSuppliers_result()
1460
    try:
1461
      result.success = self._handler.getSuppliers()
1462
    except PurchaseServiceException, e:
1463
      result.e = e
1464
    oprot.writeMessageBegin("getSuppliers", TMessageType.REPLY, seqid)
1465
    result.write(oprot)
1466
    oprot.writeMessageEnd()
1467
    oprot.trans.flush()
1468
 
1469
  def process_fulfillPO(self, seqid, iprot, oprot):
1470
    args = fulfillPO_args()
1471
    args.read(iprot)
1472
    iprot.readMessageEnd()
1473
    result = fulfillPO_result()
1474
    try:
1475
      self._handler.fulfillPO(args.purchaseOrderId, args.itemId, args.quantity)
1476
    except PurchaseServiceException, e:
1477
      result.e = e
1478
    oprot.writeMessageBegin("fulfillPO", TMessageType.REPLY, seqid)
1479
    result.write(oprot)
1480
    oprot.writeMessageEnd()
1481
    oprot.trans.flush()
1482
 
1483
  def process_updatePurchaseOrder(self, seqid, iprot, oprot):
1484
    args = updatePurchaseOrder_args()
1485
    args.read(iprot)
1486
    iprot.readMessageEnd()
1487
    result = updatePurchaseOrder_result()
1488
    try:
1489
      self._handler.updatePurchaseOrder(args.purchaseOrder)
1490
    except PurchaseServiceException, e:
1491
      result.e = e
1492
    oprot.writeMessageBegin("updatePurchaseOrder", TMessageType.REPLY, seqid)
1493
    result.write(oprot)
1494
    oprot.writeMessageEnd()
1495
    oprot.trans.flush()
1496
 
5185 mandeep.dh 1497
  def process_unFulfillPO(self, seqid, iprot, oprot):
1498
    args = unFulfillPO_args()
1499
    args.read(iprot)
1500
    iprot.readMessageEnd()
1501
    result = unFulfillPO_result()
1502
    try:
1503
      self._handler.unFulfillPO(args.purchaseId, args.itemId, args.quantity)
1504
    except PurchaseServiceException, e:
1505
      result.e = e
1506
    oprot.writeMessageBegin("unFulfillPO", TMessageType.REPLY, seqid)
1507
    result.write(oprot)
1508
    oprot.writeMessageEnd()
1509
    oprot.trans.flush()
4754 mandeep.dh 1510
 
5443 mandeep.dh 1511
  def process_getInvoices(self, seqid, iprot, oprot):
1512
    args = getInvoices_args()
1513
    args.read(iprot)
1514
    iprot.readMessageEnd()
1515
    result = getInvoices_result()
1516
    result.success = self._handler.getInvoices(args.date)
1517
    oprot.writeMessageBegin("getInvoices", TMessageType.REPLY, seqid)
1518
    result.write(oprot)
1519
    oprot.writeMessageEnd()
1520
    oprot.trans.flush()
5185 mandeep.dh 1521
 
7410 amar.kumar 1522
  def process_getInvoicesForWarehouse(self, seqid, iprot, oprot):
1523
    args = getInvoicesForWarehouse_args()
1524
    args.read(iprot)
1525
    iprot.readMessageEnd()
1526
    result = getInvoicesForWarehouse_result()
1527
    result.success = self._handler.getInvoicesForWarehouse(args.warehouseId, args.supplierId, args.date)
1528
    oprot.writeMessageBegin("getInvoicesForWarehouse", TMessageType.REPLY, seqid)
1529
    result.write(oprot)
1530
    oprot.writeMessageEnd()
1531
    oprot.trans.flush()
1532
 
5443 mandeep.dh 1533
  def process_createInvoice(self, seqid, iprot, oprot):
1534
    args = createInvoice_args()
1535
    args.read(iprot)
1536
    iprot.readMessageEnd()
1537
    result = createInvoice_result()
1538
    try:
1539
      self._handler.createInvoice(args.invoice)
1540
    except PurchaseServiceException, e:
1541
      result.e = e
1542
    oprot.writeMessageBegin("createInvoice", TMessageType.REPLY, seqid)
1543
    result.write(oprot)
1544
    oprot.writeMessageEnd()
1545
    oprot.trans.flush()
1546
 
5591 mandeep.dh 1547
  def process_addSupplier(self, seqid, iprot, oprot):
1548
    args = addSupplier_args()
1549
    args.read(iprot)
1550
    iprot.readMessageEnd()
1551
    result = addSupplier_result()
1552
    result.success = self._handler.addSupplier(args.supplier)
1553
    oprot.writeMessageBegin("addSupplier", TMessageType.REPLY, seqid)
1554
    result.write(oprot)
1555
    oprot.writeMessageEnd()
1556
    oprot.trans.flush()
5443 mandeep.dh 1557
 
5591 mandeep.dh 1558
  def process_updateSupplier(self, seqid, iprot, oprot):
1559
    args = updateSupplier_args()
1560
    args.read(iprot)
1561
    iprot.readMessageEnd()
1562
    result = updateSupplier_result()
1563
    self._handler.updateSupplier(args.supplier)
1564
    oprot.writeMessageBegin("updateSupplier", TMessageType.REPLY, seqid)
1565
    result.write(oprot)
1566
    oprot.writeMessageEnd()
1567
    oprot.trans.flush()
1568
 
6467 amar.kumar 1569
  def process_createPurchaseReturn(self, seqid, iprot, oprot):
1570
    args = createPurchaseReturn_args()
1571
    args.read(iprot)
1572
    iprot.readMessageEnd()
1573
    result = createPurchaseReturn_result()
1574
    result.success = self._handler.createPurchaseReturn(args.purchaseReturn)
1575
    oprot.writeMessageBegin("createPurchaseReturn", TMessageType.REPLY, seqid)
1576
    result.write(oprot)
1577
    oprot.writeMessageEnd()
1578
    oprot.trans.flush()
5591 mandeep.dh 1579
 
6467 amar.kumar 1580
  def process_settlePurchaseReturn(self, seqid, iprot, oprot):
1581
    args = settlePurchaseReturn_args()
1582
    args.read(iprot)
1583
    iprot.readMessageEnd()
1584
    result = settlePurchaseReturn_result()
1585
    self._handler.settlePurchaseReturn(args.id)
1586
    oprot.writeMessageBegin("settlePurchaseReturn", TMessageType.REPLY, seqid)
1587
    result.write(oprot)
1588
    oprot.writeMessageEnd()
1589
    oprot.trans.flush()
1590
 
1591
  def process_getUnsettledPurchaseReturns(self, seqid, iprot, oprot):
1592
    args = getUnsettledPurchaseReturns_args()
1593
    args.read(iprot)
1594
    iprot.readMessageEnd()
1595
    result = getUnsettledPurchaseReturns_result()
1596
    result.success = self._handler.getUnsettledPurchaseReturns()
1597
    oprot.writeMessageBegin("getUnsettledPurchaseReturns", TMessageType.REPLY, seqid)
1598
    result.write(oprot)
1599
    oprot.writeMessageEnd()
1600
    oprot.trans.flush()
1601
 
6630 amar.kumar 1602
  def process_getInvoice(self, seqid, iprot, oprot):
1603
    args = getInvoice_args()
1604
    args.read(iprot)
1605
    iprot.readMessageEnd()
1606
    result = getInvoice_result()
1607
    result.success = self._handler.getInvoice(args.invoiceNumber, args.supplierId)
1608
    oprot.writeMessageBegin("getInvoice", TMessageType.REPLY, seqid)
1609
    result.write(oprot)
1610
    oprot.writeMessageEnd()
1611
    oprot.trans.flush()
6467 amar.kumar 1612
 
6762 amar.kumar 1613
  def process_createPurchaseForOurExtBilling(self, seqid, iprot, oprot):
1614
    args = createPurchaseForOurExtBilling_args()
1615
    args.read(iprot)
1616
    iprot.readMessageEnd()
1617
    result = createPurchaseForOurExtBilling_result()
7672 rajveer 1618
    result.success = self._handler.createPurchaseForOurExtBilling(args.invoiceNumber, args.unitPrice, args.nlc, args.itemId)
6762 amar.kumar 1619
    oprot.writeMessageBegin("createPurchaseForOurExtBilling", TMessageType.REPLY, seqid)
1620
    result.write(oprot)
1621
    oprot.writeMessageEnd()
1622
    oprot.trans.flush()
6630 amar.kumar 1623
 
6762 amar.kumar 1624
  def process_fulfillPOForExtBilling(self, seqid, iprot, oprot):
1625
    args = fulfillPOForExtBilling_args()
1626
    args.read(iprot)
1627
    iprot.readMessageEnd()
1628
    result = fulfillPOForExtBilling_result()
1629
    self._handler.fulfillPOForExtBilling(args.itemId, args.quantity)
1630
    oprot.writeMessageBegin("fulfillPOForExtBilling", TMessageType.REPLY, seqid)
1631
    result.write(oprot)
1632
    oprot.writeMessageEnd()
1633
    oprot.trans.flush()
1634
 
7410 amar.kumar 1635
  def process_closePO(self, seqid, iprot, oprot):
1636
    args = closePO_args()
1637
    args.read(iprot)
1638
    iprot.readMessageEnd()
1639
    result = closePO_result()
1640
    try:
1641
      self._handler.closePO(args.poId)
1642
    except PurchaseServiceException, e:
1643
      result.e = e
1644
    oprot.writeMessageBegin("closePO", TMessageType.REPLY, seqid)
1645
    result.write(oprot)
1646
    oprot.writeMessageEnd()
1647
    oprot.trans.flush()
6762 amar.kumar 1648
 
7410 amar.kumar 1649
  def process_isInvoiceReceived(self, seqid, iprot, oprot):
1650
    args = isInvoiceReceived_args()
1651
    args.read(iprot)
1652
    iprot.readMessageEnd()
1653
    result = isInvoiceReceived_result()
1654
    result.success = self._handler.isInvoiceReceived(args.invoiceNumber, args.supplierId)
1655
    oprot.writeMessageBegin("isInvoiceReceived", TMessageType.REPLY, seqid)
1656
    result.write(oprot)
1657
    oprot.writeMessageEnd()
1658
    oprot.trans.flush()
1659
 
9829 amar.kumar 1660
  def process_changeWarehouseForPO(self, seqid, iprot, oprot):
1661
    args = changeWarehouseForPO_args()
1662
    args.read(iprot)
1663
    iprot.readMessageEnd()
1664
    result = changeWarehouseForPO_result()
1665
    try:
1666
      self._handler.changeWarehouseForPO(args.id, args.warehouseId)
1667
    except PurchaseServiceException, e:
1668
      result.e = e
1669
    oprot.writeMessageBegin("changeWarehouseForPO", TMessageType.REPLY, seqid)
1670
    result.write(oprot)
1671
    oprot.writeMessageEnd()
1672
    oprot.trans.flush()
7410 amar.kumar 1673
 
9925 amar.kumar 1674
  def process_changePOStatus(self, seqid, iprot, oprot):
1675
    args = changePOStatus_args()
1676
    args.read(iprot)
1677
    iprot.readMessageEnd()
1678
    result = changePOStatus_result()
1679
    try:
1680
      self._handler.changePOStatus(args.id, args.poStatus)
1681
    except PurchaseServiceException, e:
1682
      result.e = e
1683
    oprot.writeMessageBegin("changePOStatus", TMessageType.REPLY, seqid)
1684
    result.write(oprot)
1685
    oprot.writeMessageEnd()
1686
    oprot.trans.flush()
9829 amar.kumar 1687
 
9925 amar.kumar 1688
 
4502 mandeep.dh 1689
# HELPER FUNCTIONS AND STRUCTURES
1690
 
1691
class createPurchaseOrder_args:
1692
  """
1693
  Attributes:
1694
   - purchaseOrder
1695
  """
1696
 
1697
  thrift_spec = (
1698
    None, # 0
1699
    (1, TType.STRUCT, 'purchaseOrder', (PurchaseOrder, PurchaseOrder.thrift_spec), None, ), # 1
1700
  )
1701
 
1702
  def __init__(self, purchaseOrder=None,):
1703
    self.purchaseOrder = purchaseOrder
1704
 
1705
  def read(self, iprot):
1706
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1707
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1708
      return
1709
    iprot.readStructBegin()
1710
    while True:
1711
      (fname, ftype, fid) = iprot.readFieldBegin()
1712
      if ftype == TType.STOP:
1713
        break
1714
      if fid == 1:
1715
        if ftype == TType.STRUCT:
1716
          self.purchaseOrder = PurchaseOrder()
1717
          self.purchaseOrder.read(iprot)
1718
        else:
1719
          iprot.skip(ftype)
1720
      else:
1721
        iprot.skip(ftype)
1722
      iprot.readFieldEnd()
1723
    iprot.readStructEnd()
1724
 
1725
  def write(self, oprot):
1726
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1727
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1728
      return
1729
    oprot.writeStructBegin('createPurchaseOrder_args')
1730
    if self.purchaseOrder is not None:
1731
      oprot.writeFieldBegin('purchaseOrder', TType.STRUCT, 1)
1732
      self.purchaseOrder.write(oprot)
1733
      oprot.writeFieldEnd()
1734
    oprot.writeFieldStop()
1735
    oprot.writeStructEnd()
1736
 
1737
  def validate(self):
1738
    return
1739
 
1740
 
1741
  def __repr__(self):
1742
    L = ['%s=%r' % (key, value)
1743
      for key, value in self.__dict__.iteritems()]
1744
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1745
 
1746
  def __eq__(self, other):
1747
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1748
 
1749
  def __ne__(self, other):
1750
    return not (self == other)
1751
 
1752
class createPurchaseOrder_result:
1753
  """
1754
  Attributes:
1755
   - success
1756
   - e
1757
  """
1758
 
1759
  thrift_spec = (
1760
    (0, TType.I64, 'success', None, None, ), # 0
1761
    (1, TType.STRUCT, 'e', (PurchaseServiceException, PurchaseServiceException.thrift_spec), None, ), # 1
1762
  )
1763
 
1764
  def __init__(self, success=None, e=None,):
1765
    self.success = success
1766
    self.e = e
1767
 
1768
  def read(self, iprot):
1769
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1770
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1771
      return
1772
    iprot.readStructBegin()
1773
    while True:
1774
      (fname, ftype, fid) = iprot.readFieldBegin()
1775
      if ftype == TType.STOP:
1776
        break
1777
      if fid == 0:
1778
        if ftype == TType.I64:
1779
          self.success = iprot.readI64();
1780
        else:
1781
          iprot.skip(ftype)
1782
      elif fid == 1:
1783
        if ftype == TType.STRUCT:
1784
          self.e = PurchaseServiceException()
1785
          self.e.read(iprot)
1786
        else:
1787
          iprot.skip(ftype)
1788
      else:
1789
        iprot.skip(ftype)
1790
      iprot.readFieldEnd()
1791
    iprot.readStructEnd()
1792
 
1793
  def write(self, oprot):
1794
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1795
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1796
      return
1797
    oprot.writeStructBegin('createPurchaseOrder_result')
1798
    if self.success is not None:
1799
      oprot.writeFieldBegin('success', TType.I64, 0)
1800
      oprot.writeI64(self.success)
1801
      oprot.writeFieldEnd()
1802
    if self.e is not None:
1803
      oprot.writeFieldBegin('e', TType.STRUCT, 1)
1804
      self.e.write(oprot)
1805
      oprot.writeFieldEnd()
1806
    oprot.writeFieldStop()
1807
    oprot.writeStructEnd()
1808
 
1809
  def validate(self):
1810
    return
1811
 
1812
 
1813
  def __repr__(self):
1814
    L = ['%s=%r' % (key, value)
1815
      for key, value in self.__dict__.iteritems()]
1816
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1817
 
1818
  def __eq__(self, other):
1819
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1820
 
1821
  def __ne__(self, other):
1822
    return not (self == other)
1823
 
1824
class getPurchaseOrder_args:
1825
  """
1826
  Attributes:
1827
   - id
1828
  """
1829
 
1830
  thrift_spec = (
1831
    None, # 0
1832
    (1, TType.I64, 'id', None, None, ), # 1
1833
  )
1834
 
1835
  def __init__(self, id=None,):
1836
    self.id = id
1837
 
1838
  def read(self, iprot):
1839
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1840
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1841
      return
1842
    iprot.readStructBegin()
1843
    while True:
1844
      (fname, ftype, fid) = iprot.readFieldBegin()
1845
      if ftype == TType.STOP:
1846
        break
1847
      if fid == 1:
1848
        if ftype == TType.I64:
1849
          self.id = iprot.readI64();
1850
        else:
1851
          iprot.skip(ftype)
1852
      else:
1853
        iprot.skip(ftype)
1854
      iprot.readFieldEnd()
1855
    iprot.readStructEnd()
1856
 
1857
  def write(self, oprot):
1858
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1859
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1860
      return
1861
    oprot.writeStructBegin('getPurchaseOrder_args')
1862
    if self.id is not None:
1863
      oprot.writeFieldBegin('id', TType.I64, 1)
1864
      oprot.writeI64(self.id)
1865
      oprot.writeFieldEnd()
1866
    oprot.writeFieldStop()
1867
    oprot.writeStructEnd()
1868
 
1869
  def validate(self):
1870
    return
1871
 
1872
 
1873
  def __repr__(self):
1874
    L = ['%s=%r' % (key, value)
1875
      for key, value in self.__dict__.iteritems()]
1876
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1877
 
1878
  def __eq__(self, other):
1879
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1880
 
1881
  def __ne__(self, other):
1882
    return not (self == other)
1883
 
1884
class getPurchaseOrder_result:
1885
  """
1886
  Attributes:
1887
   - success
1888
   - e
1889
  """
1890
 
1891
  thrift_spec = (
1892
    (0, TType.STRUCT, 'success', (PurchaseOrder, PurchaseOrder.thrift_spec), None, ), # 0
1893
    (1, TType.STRUCT, 'e', (PurchaseServiceException, PurchaseServiceException.thrift_spec), None, ), # 1
1894
  )
1895
 
1896
  def __init__(self, success=None, e=None,):
1897
    self.success = success
1898
    self.e = e
1899
 
1900
  def read(self, iprot):
1901
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1902
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1903
      return
1904
    iprot.readStructBegin()
1905
    while True:
1906
      (fname, ftype, fid) = iprot.readFieldBegin()
1907
      if ftype == TType.STOP:
1908
        break
1909
      if fid == 0:
1910
        if ftype == TType.STRUCT:
1911
          self.success = PurchaseOrder()
1912
          self.success.read(iprot)
1913
        else:
1914
          iprot.skip(ftype)
1915
      elif fid == 1:
1916
        if ftype == TType.STRUCT:
1917
          self.e = PurchaseServiceException()
1918
          self.e.read(iprot)
1919
        else:
1920
          iprot.skip(ftype)
1921
      else:
1922
        iprot.skip(ftype)
1923
      iprot.readFieldEnd()
1924
    iprot.readStructEnd()
1925
 
1926
  def write(self, oprot):
1927
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1928
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1929
      return
1930
    oprot.writeStructBegin('getPurchaseOrder_result')
1931
    if self.success is not None:
1932
      oprot.writeFieldBegin('success', TType.STRUCT, 0)
1933
      self.success.write(oprot)
1934
      oprot.writeFieldEnd()
1935
    if self.e is not None:
1936
      oprot.writeFieldBegin('e', TType.STRUCT, 1)
1937
      self.e.write(oprot)
1938
      oprot.writeFieldEnd()
1939
    oprot.writeFieldStop()
1940
    oprot.writeStructEnd()
1941
 
1942
  def validate(self):
1943
    return
1944
 
1945
 
1946
  def __repr__(self):
1947
    L = ['%s=%r' % (key, value)
1948
      for key, value in self.__dict__.iteritems()]
1949
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1950
 
1951
  def __eq__(self, other):
1952
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1953
 
1954
  def __ne__(self, other):
1955
    return not (self == other)
1956
 
1957
class getAllPurchaseOrders_args:
1958
  """
1959
  Attributes:
1960
   - status
1961
  """
1962
 
1963
  thrift_spec = (
1964
    None, # 0
1965
    (1, TType.I32, 'status', None, None, ), # 1
1966
  )
1967
 
1968
  def __init__(self, status=None,):
1969
    self.status = status
1970
 
1971
  def read(self, iprot):
1972
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1973
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1974
      return
1975
    iprot.readStructBegin()
1976
    while True:
1977
      (fname, ftype, fid) = iprot.readFieldBegin()
1978
      if ftype == TType.STOP:
1979
        break
1980
      if fid == 1:
1981
        if ftype == TType.I32:
1982
          self.status = iprot.readI32();
1983
        else:
1984
          iprot.skip(ftype)
1985
      else:
1986
        iprot.skip(ftype)
1987
      iprot.readFieldEnd()
1988
    iprot.readStructEnd()
1989
 
1990
  def write(self, oprot):
1991
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1992
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1993
      return
1994
    oprot.writeStructBegin('getAllPurchaseOrders_args')
1995
    if self.status is not None:
1996
      oprot.writeFieldBegin('status', TType.I32, 1)
1997
      oprot.writeI32(self.status)
1998
      oprot.writeFieldEnd()
1999
    oprot.writeFieldStop()
2000
    oprot.writeStructEnd()
2001
 
2002
  def validate(self):
2003
    return
2004
 
2005
 
2006
  def __repr__(self):
2007
    L = ['%s=%r' % (key, value)
2008
      for key, value in self.__dict__.iteritems()]
2009
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
2010
 
2011
  def __eq__(self, other):
2012
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
2013
 
2014
  def __ne__(self, other):
2015
    return not (self == other)
2016
 
2017
class getAllPurchaseOrders_result:
2018
  """
2019
  Attributes:
2020
   - success
2021
   - e
2022
  """
2023
 
2024
  thrift_spec = (
2025
    (0, TType.LIST, 'success', (TType.STRUCT,(PurchaseOrder, PurchaseOrder.thrift_spec)), None, ), # 0
2026
    (1, TType.STRUCT, 'e', (PurchaseServiceException, PurchaseServiceException.thrift_spec), None, ), # 1
2027
  )
2028
 
2029
  def __init__(self, success=None, e=None,):
2030
    self.success = success
2031
    self.e = e
2032
 
2033
  def read(self, iprot):
2034
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
2035
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
2036
      return
2037
    iprot.readStructBegin()
2038
    while True:
2039
      (fname, ftype, fid) = iprot.readFieldBegin()
2040
      if ftype == TType.STOP:
2041
        break
2042
      if fid == 0:
2043
        if ftype == TType.LIST:
2044
          self.success = []
2045
          (_etype10, _size7) = iprot.readListBegin()
2046
          for _i11 in xrange(_size7):
2047
            _elem12 = PurchaseOrder()
2048
            _elem12.read(iprot)
2049
            self.success.append(_elem12)
2050
          iprot.readListEnd()
2051
        else:
2052
          iprot.skip(ftype)
2053
      elif fid == 1:
2054
        if ftype == TType.STRUCT:
2055
          self.e = PurchaseServiceException()
2056
          self.e.read(iprot)
2057
        else:
2058
          iprot.skip(ftype)
2059
      else:
2060
        iprot.skip(ftype)
2061
      iprot.readFieldEnd()
2062
    iprot.readStructEnd()
2063
 
2064
  def write(self, oprot):
2065
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
2066
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
2067
      return
2068
    oprot.writeStructBegin('getAllPurchaseOrders_result')
2069
    if self.success is not None:
2070
      oprot.writeFieldBegin('success', TType.LIST, 0)
2071
      oprot.writeListBegin(TType.STRUCT, len(self.success))
2072
      for iter13 in self.success:
2073
        iter13.write(oprot)
2074
      oprot.writeListEnd()
2075
      oprot.writeFieldEnd()
2076
    if self.e is not None:
2077
      oprot.writeFieldBegin('e', TType.STRUCT, 1)
2078
      self.e.write(oprot)
2079
      oprot.writeFieldEnd()
2080
    oprot.writeFieldStop()
2081
    oprot.writeStructEnd()
2082
 
2083
  def validate(self):
2084
    return
2085
 
2086
 
2087
  def __repr__(self):
2088
    L = ['%s=%r' % (key, value)
2089
      for key, value in self.__dict__.iteritems()]
2090
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
2091
 
2092
  def __eq__(self, other):
2093
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
2094
 
2095
  def __ne__(self, other):
2096
    return not (self == other)
2097
 
2098
class getSupplier_args:
2099
  """
2100
  Attributes:
2101
   - id
2102
  """
2103
 
2104
  thrift_spec = (
2105
    None, # 0
2106
    (1, TType.I64, 'id', None, None, ), # 1
2107
  )
2108
 
2109
  def __init__(self, id=None,):
2110
    self.id = id
2111
 
2112
  def read(self, iprot):
2113
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
2114
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
2115
      return
2116
    iprot.readStructBegin()
2117
    while True:
2118
      (fname, ftype, fid) = iprot.readFieldBegin()
2119
      if ftype == TType.STOP:
2120
        break
2121
      if fid == 1:
2122
        if ftype == TType.I64:
2123
          self.id = iprot.readI64();
2124
        else:
2125
          iprot.skip(ftype)
2126
      else:
2127
        iprot.skip(ftype)
2128
      iprot.readFieldEnd()
2129
    iprot.readStructEnd()
2130
 
2131
  def write(self, oprot):
2132
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
2133
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
2134
      return
2135
    oprot.writeStructBegin('getSupplier_args')
2136
    if self.id is not None:
2137
      oprot.writeFieldBegin('id', TType.I64, 1)
2138
      oprot.writeI64(self.id)
2139
      oprot.writeFieldEnd()
2140
    oprot.writeFieldStop()
2141
    oprot.writeStructEnd()
2142
 
2143
  def validate(self):
2144
    return
2145
 
2146
 
2147
  def __repr__(self):
2148
    L = ['%s=%r' % (key, value)
2149
      for key, value in self.__dict__.iteritems()]
2150
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
2151
 
2152
  def __eq__(self, other):
2153
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
2154
 
2155
  def __ne__(self, other):
2156
    return not (self == other)
2157
 
2158
class getSupplier_result:
2159
  """
2160
  Attributes:
2161
   - success
2162
   - e
2163
  """
2164
 
2165
  thrift_spec = (
2166
    (0, TType.STRUCT, 'success', (Supplier, Supplier.thrift_spec), None, ), # 0
2167
    (1, TType.STRUCT, 'e', (PurchaseServiceException, PurchaseServiceException.thrift_spec), None, ), # 1
2168
  )
2169
 
2170
  def __init__(self, success=None, e=None,):
2171
    self.success = success
2172
    self.e = e
2173
 
2174
  def read(self, iprot):
2175
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
2176
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
2177
      return
2178
    iprot.readStructBegin()
2179
    while True:
2180
      (fname, ftype, fid) = iprot.readFieldBegin()
2181
      if ftype == TType.STOP:
2182
        break
2183
      if fid == 0:
2184
        if ftype == TType.STRUCT:
2185
          self.success = Supplier()
2186
          self.success.read(iprot)
2187
        else:
2188
          iprot.skip(ftype)
2189
      elif fid == 1:
2190
        if ftype == TType.STRUCT:
2191
          self.e = PurchaseServiceException()
2192
          self.e.read(iprot)
2193
        else:
2194
          iprot.skip(ftype)
2195
      else:
2196
        iprot.skip(ftype)
2197
      iprot.readFieldEnd()
2198
    iprot.readStructEnd()
2199
 
2200
  def write(self, oprot):
2201
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
2202
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
2203
      return
2204
    oprot.writeStructBegin('getSupplier_result')
2205
    if self.success is not None:
2206
      oprot.writeFieldBegin('success', TType.STRUCT, 0)
2207
      self.success.write(oprot)
2208
      oprot.writeFieldEnd()
2209
    if self.e is not None:
2210
      oprot.writeFieldBegin('e', TType.STRUCT, 1)
2211
      self.e.write(oprot)
2212
      oprot.writeFieldEnd()
2213
    oprot.writeFieldStop()
2214
    oprot.writeStructEnd()
2215
 
2216
  def validate(self):
2217
    return
2218
 
2219
 
2220
  def __repr__(self):
2221
    L = ['%s=%r' % (key, value)
2222
      for key, value in self.__dict__.iteritems()]
2223
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
2224
 
2225
  def __eq__(self, other):
2226
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
2227
 
2228
  def __ne__(self, other):
2229
    return not (self == other)
2230
 
2231
class startPurchase_args:
2232
  """
2233
  Attributes:
2234
   - purchaseOrderId
2235
   - invoiceNumber
2236
   - freightCharges
2237
  """
2238
 
2239
  thrift_spec = (
2240
    None, # 0
2241
    (1, TType.I64, 'purchaseOrderId', None, None, ), # 1
2242
    (2, TType.STRING, 'invoiceNumber', None, None, ), # 2
2243
    (3, TType.DOUBLE, 'freightCharges', None, None, ), # 3
2244
  )
2245
 
2246
  def __init__(self, purchaseOrderId=None, invoiceNumber=None, freightCharges=None,):
2247
    self.purchaseOrderId = purchaseOrderId
2248
    self.invoiceNumber = invoiceNumber
2249
    self.freightCharges = freightCharges
2250
 
2251
  def read(self, iprot):
2252
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
2253
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
2254
      return
2255
    iprot.readStructBegin()
2256
    while True:
2257
      (fname, ftype, fid) = iprot.readFieldBegin()
2258
      if ftype == TType.STOP:
2259
        break
2260
      if fid == 1:
2261
        if ftype == TType.I64:
2262
          self.purchaseOrderId = iprot.readI64();
2263
        else:
2264
          iprot.skip(ftype)
2265
      elif fid == 2:
2266
        if ftype == TType.STRING:
2267
          self.invoiceNumber = iprot.readString();
2268
        else:
2269
          iprot.skip(ftype)
2270
      elif fid == 3:
2271
        if ftype == TType.DOUBLE:
2272
          self.freightCharges = iprot.readDouble();
2273
        else:
2274
          iprot.skip(ftype)
2275
      else:
2276
        iprot.skip(ftype)
2277
      iprot.readFieldEnd()
2278
    iprot.readStructEnd()
2279
 
2280
  def write(self, oprot):
2281
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
2282
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
2283
      return
2284
    oprot.writeStructBegin('startPurchase_args')
2285
    if self.purchaseOrderId is not None:
2286
      oprot.writeFieldBegin('purchaseOrderId', TType.I64, 1)
2287
      oprot.writeI64(self.purchaseOrderId)
2288
      oprot.writeFieldEnd()
2289
    if self.invoiceNumber is not None:
2290
      oprot.writeFieldBegin('invoiceNumber', TType.STRING, 2)
2291
      oprot.writeString(self.invoiceNumber)
2292
      oprot.writeFieldEnd()
2293
    if self.freightCharges is not None:
2294
      oprot.writeFieldBegin('freightCharges', TType.DOUBLE, 3)
2295
      oprot.writeDouble(self.freightCharges)
2296
      oprot.writeFieldEnd()
2297
    oprot.writeFieldStop()
2298
    oprot.writeStructEnd()
2299
 
2300
  def validate(self):
2301
    return
2302
 
2303
 
2304
  def __repr__(self):
2305
    L = ['%s=%r' % (key, value)
2306
      for key, value in self.__dict__.iteritems()]
2307
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
2308
 
2309
  def __eq__(self, other):
2310
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
2311
 
2312
  def __ne__(self, other):
2313
    return not (self == other)
2314
 
2315
class startPurchase_result:
2316
  """
2317
  Attributes:
2318
   - success
2319
   - e
2320
  """
2321
 
2322
  thrift_spec = (
2323
    (0, TType.I64, 'success', None, None, ), # 0
2324
    (1, TType.STRUCT, 'e', (PurchaseServiceException, PurchaseServiceException.thrift_spec), None, ), # 1
2325
  )
2326
 
2327
  def __init__(self, success=None, e=None,):
2328
    self.success = success
2329
    self.e = e
2330
 
2331
  def read(self, iprot):
2332
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
2333
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
2334
      return
2335
    iprot.readStructBegin()
2336
    while True:
2337
      (fname, ftype, fid) = iprot.readFieldBegin()
2338
      if ftype == TType.STOP:
2339
        break
2340
      if fid == 0:
2341
        if ftype == TType.I64:
2342
          self.success = iprot.readI64();
2343
        else:
2344
          iprot.skip(ftype)
2345
      elif fid == 1:
2346
        if ftype == TType.STRUCT:
2347
          self.e = PurchaseServiceException()
2348
          self.e.read(iprot)
2349
        else:
2350
          iprot.skip(ftype)
2351
      else:
2352
        iprot.skip(ftype)
2353
      iprot.readFieldEnd()
2354
    iprot.readStructEnd()
2355
 
2356
  def write(self, oprot):
2357
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
2358
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
2359
      return
2360
    oprot.writeStructBegin('startPurchase_result')
2361
    if self.success is not None:
2362
      oprot.writeFieldBegin('success', TType.I64, 0)
2363
      oprot.writeI64(self.success)
2364
      oprot.writeFieldEnd()
2365
    if self.e is not None:
2366
      oprot.writeFieldBegin('e', TType.STRUCT, 1)
2367
      self.e.write(oprot)
2368
      oprot.writeFieldEnd()
2369
    oprot.writeFieldStop()
2370
    oprot.writeStructEnd()
2371
 
2372
  def validate(self):
2373
    return
2374
 
2375
 
2376
  def __repr__(self):
2377
    L = ['%s=%r' % (key, value)
2378
      for key, value in self.__dict__.iteritems()]
2379
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
2380
 
2381
  def __eq__(self, other):
2382
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
2383
 
2384
  def __ne__(self, other):
2385
    return not (self == other)
2386
 
2387
class closePurchase_args:
2388
  """
2389
  Attributes:
2390
   - purchaseId
2391
  """
2392
 
2393
  thrift_spec = (
2394
    None, # 0
2395
    (1, TType.I64, 'purchaseId', None, None, ), # 1
2396
  )
2397
 
2398
  def __init__(self, purchaseId=None,):
2399
    self.purchaseId = purchaseId
2400
 
2401
  def read(self, iprot):
2402
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
2403
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
2404
      return
2405
    iprot.readStructBegin()
2406
    while True:
2407
      (fname, ftype, fid) = iprot.readFieldBegin()
2408
      if ftype == TType.STOP:
2409
        break
2410
      if fid == 1:
2411
        if ftype == TType.I64:
2412
          self.purchaseId = iprot.readI64();
2413
        else:
2414
          iprot.skip(ftype)
2415
      else:
2416
        iprot.skip(ftype)
2417
      iprot.readFieldEnd()
2418
    iprot.readStructEnd()
2419
 
2420
  def write(self, oprot):
2421
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
2422
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
2423
      return
2424
    oprot.writeStructBegin('closePurchase_args')
2425
    if self.purchaseId is not None:
2426
      oprot.writeFieldBegin('purchaseId', TType.I64, 1)
2427
      oprot.writeI64(self.purchaseId)
2428
      oprot.writeFieldEnd()
2429
    oprot.writeFieldStop()
2430
    oprot.writeStructEnd()
2431
 
2432
  def validate(self):
2433
    return
2434
 
2435
 
2436
  def __repr__(self):
2437
    L = ['%s=%r' % (key, value)
2438
      for key, value in self.__dict__.iteritems()]
2439
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
2440
 
2441
  def __eq__(self, other):
2442
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
2443
 
2444
  def __ne__(self, other):
2445
    return not (self == other)
2446
 
2447
class closePurchase_result:
2448
  """
2449
  Attributes:
2450
   - success
2451
   - e
2452
  """
2453
 
2454
  thrift_spec = (
2455
    (0, TType.I64, 'success', None, None, ), # 0
2456
    (1, TType.STRUCT, 'e', (PurchaseServiceException, PurchaseServiceException.thrift_spec), None, ), # 1
2457
  )
2458
 
2459
  def __init__(self, success=None, e=None,):
2460
    self.success = success
2461
    self.e = e
2462
 
2463
  def read(self, iprot):
2464
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
2465
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
2466
      return
2467
    iprot.readStructBegin()
2468
    while True:
2469
      (fname, ftype, fid) = iprot.readFieldBegin()
2470
      if ftype == TType.STOP:
2471
        break
2472
      if fid == 0:
2473
        if ftype == TType.I64:
2474
          self.success = iprot.readI64();
2475
        else:
2476
          iprot.skip(ftype)
2477
      elif fid == 1:
2478
        if ftype == TType.STRUCT:
2479
          self.e = PurchaseServiceException()
2480
          self.e.read(iprot)
2481
        else:
2482
          iprot.skip(ftype)
2483
      else:
2484
        iprot.skip(ftype)
2485
      iprot.readFieldEnd()
2486
    iprot.readStructEnd()
2487
 
2488
  def write(self, oprot):
2489
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
2490
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
2491
      return
2492
    oprot.writeStructBegin('closePurchase_result')
2493
    if self.success is not None:
2494
      oprot.writeFieldBegin('success', TType.I64, 0)
2495
      oprot.writeI64(self.success)
2496
      oprot.writeFieldEnd()
2497
    if self.e is not None:
2498
      oprot.writeFieldBegin('e', TType.STRUCT, 1)
2499
      self.e.write(oprot)
2500
      oprot.writeFieldEnd()
2501
    oprot.writeFieldStop()
2502
    oprot.writeStructEnd()
2503
 
2504
  def validate(self):
2505
    return
2506
 
2507
 
2508
  def __repr__(self):
2509
    L = ['%s=%r' % (key, value)
2510
      for key, value in self.__dict__.iteritems()]
2511
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
2512
 
2513
  def __eq__(self, other):
2514
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
2515
 
2516
  def __ne__(self, other):
2517
    return not (self == other)
2518
 
2519
class getAllPurchases_args:
2520
  """
2521
  Attributes:
2522
   - purchaseOrderId
2523
   - open
2524
  """
2525
 
2526
  thrift_spec = (
2527
    None, # 0
2528
    (1, TType.I64, 'purchaseOrderId', None, None, ), # 1
2529
    (2, TType.BOOL, 'open', None, None, ), # 2
2530
  )
2531
 
2532
  def __init__(self, purchaseOrderId=None, open=None,):
2533
    self.purchaseOrderId = purchaseOrderId
2534
    self.open = open
2535
 
2536
  def read(self, iprot):
2537
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
2538
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
2539
      return
2540
    iprot.readStructBegin()
2541
    while True:
2542
      (fname, ftype, fid) = iprot.readFieldBegin()
2543
      if ftype == TType.STOP:
2544
        break
2545
      if fid == 1:
2546
        if ftype == TType.I64:
2547
          self.purchaseOrderId = iprot.readI64();
2548
        else:
2549
          iprot.skip(ftype)
2550
      elif fid == 2:
2551
        if ftype == TType.BOOL:
2552
          self.open = iprot.readBool();
2553
        else:
2554
          iprot.skip(ftype)
2555
      else:
2556
        iprot.skip(ftype)
2557
      iprot.readFieldEnd()
2558
    iprot.readStructEnd()
2559
 
2560
  def write(self, oprot):
2561
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
2562
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
2563
      return
2564
    oprot.writeStructBegin('getAllPurchases_args')
2565
    if self.purchaseOrderId is not None:
2566
      oprot.writeFieldBegin('purchaseOrderId', TType.I64, 1)
2567
      oprot.writeI64(self.purchaseOrderId)
2568
      oprot.writeFieldEnd()
2569
    if self.open is not None:
2570
      oprot.writeFieldBegin('open', TType.BOOL, 2)
2571
      oprot.writeBool(self.open)
2572
      oprot.writeFieldEnd()
2573
    oprot.writeFieldStop()
2574
    oprot.writeStructEnd()
2575
 
2576
  def validate(self):
2577
    return
2578
 
2579
 
2580
  def __repr__(self):
2581
    L = ['%s=%r' % (key, value)
2582
      for key, value in self.__dict__.iteritems()]
2583
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
2584
 
2585
  def __eq__(self, other):
2586
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
2587
 
2588
  def __ne__(self, other):
2589
    return not (self == other)
2590
 
2591
class getAllPurchases_result:
2592
  """
2593
  Attributes:
2594
   - success
2595
   - e
2596
  """
2597
 
2598
  thrift_spec = (
2599
    (0, TType.LIST, 'success', (TType.STRUCT,(Purchase, Purchase.thrift_spec)), None, ), # 0
2600
    (1, TType.STRUCT, 'e', (PurchaseServiceException, PurchaseServiceException.thrift_spec), None, ), # 1
2601
  )
2602
 
2603
  def __init__(self, success=None, e=None,):
2604
    self.success = success
2605
    self.e = e
2606
 
2607
  def read(self, iprot):
2608
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
2609
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
2610
      return
2611
    iprot.readStructBegin()
2612
    while True:
2613
      (fname, ftype, fid) = iprot.readFieldBegin()
2614
      if ftype == TType.STOP:
2615
        break
2616
      if fid == 0:
2617
        if ftype == TType.LIST:
2618
          self.success = []
2619
          (_etype17, _size14) = iprot.readListBegin()
2620
          for _i18 in xrange(_size14):
2621
            _elem19 = Purchase()
2622
            _elem19.read(iprot)
2623
            self.success.append(_elem19)
2624
          iprot.readListEnd()
2625
        else:
2626
          iprot.skip(ftype)
2627
      elif fid == 1:
2628
        if ftype == TType.STRUCT:
2629
          self.e = PurchaseServiceException()
2630
          self.e.read(iprot)
2631
        else:
2632
          iprot.skip(ftype)
2633
      else:
2634
        iprot.skip(ftype)
2635
      iprot.readFieldEnd()
2636
    iprot.readStructEnd()
2637
 
2638
  def write(self, oprot):
2639
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
2640
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
2641
      return
2642
    oprot.writeStructBegin('getAllPurchases_result')
2643
    if self.success is not None:
2644
      oprot.writeFieldBegin('success', TType.LIST, 0)
2645
      oprot.writeListBegin(TType.STRUCT, len(self.success))
2646
      for iter20 in self.success:
2647
        iter20.write(oprot)
2648
      oprot.writeListEnd()
2649
      oprot.writeFieldEnd()
2650
    if self.e is not None:
2651
      oprot.writeFieldBegin('e', TType.STRUCT, 1)
2652
      self.e.write(oprot)
2653
      oprot.writeFieldEnd()
2654
    oprot.writeFieldStop()
2655
    oprot.writeStructEnd()
2656
 
2657
  def validate(self):
2658
    return
2659
 
2660
 
2661
  def __repr__(self):
2662
    L = ['%s=%r' % (key, value)
2663
      for key, value in self.__dict__.iteritems()]
2664
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
2665
 
2666
  def __eq__(self, other):
2667
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
2668
 
2669
  def __ne__(self, other):
2670
    return not (self == other)
2671
 
6386 amar.kumar 2672
class getPurchasesForPO_args:
2673
  """
2674
  Attributes:
2675
   - purchaseOrderId
2676
  """
2677
 
2678
  thrift_spec = (
2679
    None, # 0
2680
    (1, TType.I64, 'purchaseOrderId', None, None, ), # 1
2681
  )
2682
 
2683
  def __init__(self, purchaseOrderId=None,):
2684
    self.purchaseOrderId = purchaseOrderId
2685
 
2686
  def read(self, iprot):
2687
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
2688
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
2689
      return
2690
    iprot.readStructBegin()
2691
    while True:
2692
      (fname, ftype, fid) = iprot.readFieldBegin()
2693
      if ftype == TType.STOP:
2694
        break
2695
      if fid == 1:
2696
        if ftype == TType.I64:
2697
          self.purchaseOrderId = 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('getPurchasesForPO_args')
2710
    if self.purchaseOrderId is not None:
2711
      oprot.writeFieldBegin('purchaseOrderId', TType.I64, 1)
2712
      oprot.writeI64(self.purchaseOrderId)
2713
      oprot.writeFieldEnd()
2714
    oprot.writeFieldStop()
2715
    oprot.writeStructEnd()
2716
 
2717
  def validate(self):
2718
    return
2719
 
2720
 
2721
  def __repr__(self):
2722
    L = ['%s=%r' % (key, value)
2723
      for key, value in self.__dict__.iteritems()]
2724
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
2725
 
2726
  def __eq__(self, other):
2727
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
2728
 
2729
  def __ne__(self, other):
2730
    return not (self == other)
2731
 
2732
class getPurchasesForPO_result:
2733
  """
2734
  Attributes:
2735
   - success
2736
   - e
2737
  """
2738
 
2739
  thrift_spec = (
2740
    (0, TType.LIST, 'success', (TType.STRUCT,(Purchase, Purchase.thrift_spec)), None, ), # 0
2741
    (1, TType.STRUCT, 'e', (PurchaseServiceException, PurchaseServiceException.thrift_spec), None, ), # 1
2742
  )
2743
 
2744
  def __init__(self, success=None, e=None,):
2745
    self.success = success
2746
    self.e = e
2747
 
2748
  def read(self, iprot):
2749
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
2750
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
2751
      return
2752
    iprot.readStructBegin()
2753
    while True:
2754
      (fname, ftype, fid) = iprot.readFieldBegin()
2755
      if ftype == TType.STOP:
2756
        break
2757
      if fid == 0:
2758
        if ftype == TType.LIST:
2759
          self.success = []
2760
          (_etype24, _size21) = iprot.readListBegin()
2761
          for _i25 in xrange(_size21):
2762
            _elem26 = Purchase()
2763
            _elem26.read(iprot)
2764
            self.success.append(_elem26)
2765
          iprot.readListEnd()
2766
        else:
2767
          iprot.skip(ftype)
2768
      elif fid == 1:
2769
        if ftype == TType.STRUCT:
2770
          self.e = PurchaseServiceException()
2771
          self.e.read(iprot)
2772
        else:
2773
          iprot.skip(ftype)
2774
      else:
2775
        iprot.skip(ftype)
2776
      iprot.readFieldEnd()
2777
    iprot.readStructEnd()
2778
 
2779
  def write(self, oprot):
2780
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
2781
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
2782
      return
2783
    oprot.writeStructBegin('getPurchasesForPO_result')
2784
    if self.success is not None:
2785
      oprot.writeFieldBegin('success', TType.LIST, 0)
2786
      oprot.writeListBegin(TType.STRUCT, len(self.success))
2787
      for iter27 in self.success:
2788
        iter27.write(oprot)
2789
      oprot.writeListEnd()
2790
      oprot.writeFieldEnd()
2791
    if self.e is not None:
2792
      oprot.writeFieldBegin('e', TType.STRUCT, 1)
2793
      self.e.write(oprot)
2794
      oprot.writeFieldEnd()
2795
    oprot.writeFieldStop()
2796
    oprot.writeStructEnd()
2797
 
2798
  def validate(self):
2799
    return
2800
 
2801
 
2802
  def __repr__(self):
2803
    L = ['%s=%r' % (key, value)
2804
      for key, value in self.__dict__.iteritems()]
2805
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
2806
 
2807
  def __eq__(self, other):
2808
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
2809
 
2810
  def __ne__(self, other):
2811
    return not (self == other)
2812
 
4555 mandeep.dh 2813
class getPurchaseOrderForPurchase_args:
4502 mandeep.dh 2814
  """
2815
  Attributes:
2816
   - purchaseId
2817
  """
2818
 
2819
  thrift_spec = (
2820
    None, # 0
2821
    (1, TType.I64, 'purchaseId', None, None, ), # 1
2822
  )
2823
 
4555 mandeep.dh 2824
  def __init__(self, purchaseId=None,):
4502 mandeep.dh 2825
    self.purchaseId = purchaseId
2826
 
2827
  def read(self, iprot):
2828
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
2829
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
2830
      return
2831
    iprot.readStructBegin()
2832
    while True:
2833
      (fname, ftype, fid) = iprot.readFieldBegin()
2834
      if ftype == TType.STOP:
2835
        break
2836
      if fid == 1:
2837
        if ftype == TType.I64:
2838
          self.purchaseId = iprot.readI64();
2839
        else:
2840
          iprot.skip(ftype)
2841
      else:
2842
        iprot.skip(ftype)
2843
      iprot.readFieldEnd()
2844
    iprot.readStructEnd()
2845
 
2846
  def write(self, oprot):
2847
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
2848
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
2849
      return
4555 mandeep.dh 2850
    oprot.writeStructBegin('getPurchaseOrderForPurchase_args')
4502 mandeep.dh 2851
    if self.purchaseId is not None:
2852
      oprot.writeFieldBegin('purchaseId', TType.I64, 1)
2853
      oprot.writeI64(self.purchaseId)
2854
      oprot.writeFieldEnd()
2855
    oprot.writeFieldStop()
2856
    oprot.writeStructEnd()
2857
 
2858
  def validate(self):
2859
    return
2860
 
2861
 
2862
  def __repr__(self):
2863
    L = ['%s=%r' % (key, value)
2864
      for key, value in self.__dict__.iteritems()]
2865
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
2866
 
2867
  def __eq__(self, other):
2868
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
2869
 
2870
  def __ne__(self, other):
2871
    return not (self == other)
2872
 
4555 mandeep.dh 2873
class getPurchaseOrderForPurchase_result:
4502 mandeep.dh 2874
  """
2875
  Attributes:
2876
   - success
2877
  """
2878
 
2879
  thrift_spec = (
4555 mandeep.dh 2880
    (0, TType.STRUCT, 'success', (PurchaseOrder, PurchaseOrder.thrift_spec), None, ), # 0
4502 mandeep.dh 2881
  )
2882
 
2883
  def __init__(self, success=None,):
2884
    self.success = success
2885
 
2886
  def read(self, iprot):
2887
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
2888
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
2889
      return
2890
    iprot.readStructBegin()
2891
    while True:
2892
      (fname, ftype, fid) = iprot.readFieldBegin()
2893
      if ftype == TType.STOP:
2894
        break
2895
      if fid == 0:
4555 mandeep.dh 2896
        if ftype == TType.STRUCT:
2897
          self.success = PurchaseOrder()
2898
          self.success.read(iprot)
4502 mandeep.dh 2899
        else:
2900
          iprot.skip(ftype)
2901
      else:
2902
        iprot.skip(ftype)
2903
      iprot.readFieldEnd()
2904
    iprot.readStructEnd()
2905
 
2906
  def write(self, oprot):
2907
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
2908
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
2909
      return
4555 mandeep.dh 2910
    oprot.writeStructBegin('getPurchaseOrderForPurchase_result')
4502 mandeep.dh 2911
    if self.success is not None:
4555 mandeep.dh 2912
      oprot.writeFieldBegin('success', TType.STRUCT, 0)
2913
      self.success.write(oprot)
4502 mandeep.dh 2914
      oprot.writeFieldEnd()
2915
    oprot.writeFieldStop()
2916
    oprot.writeStructEnd()
2917
 
2918
  def validate(self):
2919
    return
2920
 
2921
 
2922
  def __repr__(self):
2923
    L = ['%s=%r' % (key, value)
2924
      for key, value in self.__dict__.iteritems()]
2925
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
2926
 
2927
  def __eq__(self, other):
2928
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
2929
 
2930
  def __ne__(self, other):
2931
    return not (self == other)
4754 mandeep.dh 2932
 
2933
class getPendingPurchaseOrders_args:
2934
  """
2935
  Attributes:
2936
   - warehouseId
2937
  """
2938
 
2939
  thrift_spec = (
2940
    None, # 0
2941
    (1, TType.I64, 'warehouseId', None, None, ), # 1
2942
  )
2943
 
2944
  def __init__(self, warehouseId=None,):
2945
    self.warehouseId = warehouseId
2946
 
2947
  def read(self, iprot):
2948
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
2949
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
2950
      return
2951
    iprot.readStructBegin()
2952
    while True:
2953
      (fname, ftype, fid) = iprot.readFieldBegin()
2954
      if ftype == TType.STOP:
2955
        break
2956
      if fid == 1:
2957
        if ftype == TType.I64:
2958
          self.warehouseId = iprot.readI64();
2959
        else:
2960
          iprot.skip(ftype)
2961
      else:
2962
        iprot.skip(ftype)
2963
      iprot.readFieldEnd()
2964
    iprot.readStructEnd()
2965
 
2966
  def write(self, oprot):
2967
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
2968
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
2969
      return
2970
    oprot.writeStructBegin('getPendingPurchaseOrders_args')
2971
    if self.warehouseId is not None:
2972
      oprot.writeFieldBegin('warehouseId', TType.I64, 1)
2973
      oprot.writeI64(self.warehouseId)
2974
      oprot.writeFieldEnd()
2975
    oprot.writeFieldStop()
2976
    oprot.writeStructEnd()
2977
 
2978
  def validate(self):
2979
    return
2980
 
2981
 
2982
  def __repr__(self):
2983
    L = ['%s=%r' % (key, value)
2984
      for key, value in self.__dict__.iteritems()]
2985
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
2986
 
2987
  def __eq__(self, other):
2988
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
2989
 
2990
  def __ne__(self, other):
2991
    return not (self == other)
2992
 
2993
class getPendingPurchaseOrders_result:
2994
  """
2995
  Attributes:
2996
   - success
2997
   - e
2998
  """
2999
 
3000
  thrift_spec = (
3001
    (0, TType.LIST, 'success', (TType.STRUCT,(PurchaseOrder, PurchaseOrder.thrift_spec)), None, ), # 0
3002
    (1, TType.STRUCT, 'e', (PurchaseServiceException, PurchaseServiceException.thrift_spec), None, ), # 1
3003
  )
3004
 
3005
  def __init__(self, success=None, e=None,):
3006
    self.success = success
3007
    self.e = e
3008
 
3009
  def read(self, iprot):
3010
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
3011
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
3012
      return
3013
    iprot.readStructBegin()
3014
    while True:
3015
      (fname, ftype, fid) = iprot.readFieldBegin()
3016
      if ftype == TType.STOP:
3017
        break
3018
      if fid == 0:
3019
        if ftype == TType.LIST:
3020
          self.success = []
6386 amar.kumar 3021
          (_etype31, _size28) = iprot.readListBegin()
3022
          for _i32 in xrange(_size28):
3023
            _elem33 = PurchaseOrder()
3024
            _elem33.read(iprot)
3025
            self.success.append(_elem33)
4754 mandeep.dh 3026
          iprot.readListEnd()
3027
        else:
3028
          iprot.skip(ftype)
3029
      elif fid == 1:
3030
        if ftype == TType.STRUCT:
3031
          self.e = PurchaseServiceException()
3032
          self.e.read(iprot)
3033
        else:
3034
          iprot.skip(ftype)
3035
      else:
3036
        iprot.skip(ftype)
3037
      iprot.readFieldEnd()
3038
    iprot.readStructEnd()
3039
 
3040
  def write(self, oprot):
3041
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
3042
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
3043
      return
3044
    oprot.writeStructBegin('getPendingPurchaseOrders_result')
3045
    if self.success is not None:
3046
      oprot.writeFieldBegin('success', TType.LIST, 0)
3047
      oprot.writeListBegin(TType.STRUCT, len(self.success))
6386 amar.kumar 3048
      for iter34 in self.success:
3049
        iter34.write(oprot)
4754 mandeep.dh 3050
      oprot.writeListEnd()
3051
      oprot.writeFieldEnd()
3052
    if self.e is not None:
3053
      oprot.writeFieldBegin('e', TType.STRUCT, 1)
3054
      self.e.write(oprot)
3055
      oprot.writeFieldEnd()
3056
    oprot.writeFieldStop()
3057
    oprot.writeStructEnd()
3058
 
3059
  def validate(self):
3060
    return
3061
 
3062
 
3063
  def __repr__(self):
3064
    L = ['%s=%r' % (key, value)
3065
      for key, value in self.__dict__.iteritems()]
3066
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
3067
 
3068
  def __eq__(self, other):
3069
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
3070
 
3071
  def __ne__(self, other):
3072
    return not (self == other)
3073
 
3074
class getSuppliers_args:
3075
 
3076
  thrift_spec = (
3077
  )
3078
 
3079
  def read(self, iprot):
3080
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
3081
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
3082
      return
3083
    iprot.readStructBegin()
3084
    while True:
3085
      (fname, ftype, fid) = iprot.readFieldBegin()
3086
      if ftype == TType.STOP:
3087
        break
3088
      else:
3089
        iprot.skip(ftype)
3090
      iprot.readFieldEnd()
3091
    iprot.readStructEnd()
3092
 
3093
  def write(self, oprot):
3094
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
3095
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
3096
      return
3097
    oprot.writeStructBegin('getSuppliers_args')
3098
    oprot.writeFieldStop()
3099
    oprot.writeStructEnd()
3100
 
3101
  def validate(self):
3102
    return
3103
 
3104
 
3105
  def __repr__(self):
3106
    L = ['%s=%r' % (key, value)
3107
      for key, value in self.__dict__.iteritems()]
3108
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
3109
 
3110
  def __eq__(self, other):
3111
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
3112
 
3113
  def __ne__(self, other):
3114
    return not (self == other)
3115
 
3116
class getSuppliers_result:
3117
  """
3118
  Attributes:
3119
   - success
3120
   - e
3121
  """
3122
 
3123
  thrift_spec = (
3124
    (0, TType.LIST, 'success', (TType.STRUCT,(Supplier, Supplier.thrift_spec)), None, ), # 0
3125
    (1, TType.STRUCT, 'e', (PurchaseServiceException, PurchaseServiceException.thrift_spec), None, ), # 1
3126
  )
3127
 
3128
  def __init__(self, success=None, e=None,):
3129
    self.success = success
3130
    self.e = e
3131
 
3132
  def read(self, iprot):
3133
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
3134
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
3135
      return
3136
    iprot.readStructBegin()
3137
    while True:
3138
      (fname, ftype, fid) = iprot.readFieldBegin()
3139
      if ftype == TType.STOP:
3140
        break
3141
      if fid == 0:
3142
        if ftype == TType.LIST:
3143
          self.success = []
6386 amar.kumar 3144
          (_etype38, _size35) = iprot.readListBegin()
3145
          for _i39 in xrange(_size35):
3146
            _elem40 = Supplier()
3147
            _elem40.read(iprot)
3148
            self.success.append(_elem40)
4754 mandeep.dh 3149
          iprot.readListEnd()
3150
        else:
3151
          iprot.skip(ftype)
3152
      elif fid == 1:
3153
        if ftype == TType.STRUCT:
3154
          self.e = PurchaseServiceException()
3155
          self.e.read(iprot)
3156
        else:
3157
          iprot.skip(ftype)
3158
      else:
3159
        iprot.skip(ftype)
3160
      iprot.readFieldEnd()
3161
    iprot.readStructEnd()
3162
 
3163
  def write(self, oprot):
3164
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
3165
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
3166
      return
3167
    oprot.writeStructBegin('getSuppliers_result')
3168
    if self.success is not None:
3169
      oprot.writeFieldBegin('success', TType.LIST, 0)
3170
      oprot.writeListBegin(TType.STRUCT, len(self.success))
6386 amar.kumar 3171
      for iter41 in self.success:
3172
        iter41.write(oprot)
4754 mandeep.dh 3173
      oprot.writeListEnd()
3174
      oprot.writeFieldEnd()
3175
    if self.e is not None:
3176
      oprot.writeFieldBegin('e', TType.STRUCT, 1)
3177
      self.e.write(oprot)
3178
      oprot.writeFieldEnd()
3179
    oprot.writeFieldStop()
3180
    oprot.writeStructEnd()
3181
 
3182
  def validate(self):
3183
    return
3184
 
3185
 
3186
  def __repr__(self):
3187
    L = ['%s=%r' % (key, value)
3188
      for key, value in self.__dict__.iteritems()]
3189
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
3190
 
3191
  def __eq__(self, other):
3192
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
3193
 
3194
  def __ne__(self, other):
3195
    return not (self == other)
3196
 
3197
class fulfillPO_args:
3198
  """
3199
  Attributes:
3200
   - purchaseOrderId
3201
   - itemId
3202
   - quantity
3203
  """
3204
 
3205
  thrift_spec = (
3206
    None, # 0
3207
    (1, TType.I64, 'purchaseOrderId', None, None, ), # 1
3208
    (2, TType.I64, 'itemId', None, None, ), # 2
3209
    (3, TType.I64, 'quantity', None, None, ), # 3
3210
  )
3211
 
3212
  def __init__(self, purchaseOrderId=None, itemId=None, quantity=None,):
3213
    self.purchaseOrderId = purchaseOrderId
3214
    self.itemId = itemId
3215
    self.quantity = quantity
3216
 
3217
  def read(self, iprot):
3218
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
3219
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
3220
      return
3221
    iprot.readStructBegin()
3222
    while True:
3223
      (fname, ftype, fid) = iprot.readFieldBegin()
3224
      if ftype == TType.STOP:
3225
        break
3226
      if fid == 1:
3227
        if ftype == TType.I64:
3228
          self.purchaseOrderId = iprot.readI64();
3229
        else:
3230
          iprot.skip(ftype)
3231
      elif fid == 2:
3232
        if ftype == TType.I64:
3233
          self.itemId = iprot.readI64();
3234
        else:
3235
          iprot.skip(ftype)
3236
      elif fid == 3:
3237
        if ftype == TType.I64:
3238
          self.quantity = iprot.readI64();
3239
        else:
3240
          iprot.skip(ftype)
3241
      else:
3242
        iprot.skip(ftype)
3243
      iprot.readFieldEnd()
3244
    iprot.readStructEnd()
3245
 
3246
  def write(self, oprot):
3247
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
3248
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
3249
      return
3250
    oprot.writeStructBegin('fulfillPO_args')
3251
    if self.purchaseOrderId is not None:
3252
      oprot.writeFieldBegin('purchaseOrderId', TType.I64, 1)
3253
      oprot.writeI64(self.purchaseOrderId)
3254
      oprot.writeFieldEnd()
3255
    if self.itemId is not None:
3256
      oprot.writeFieldBegin('itemId', TType.I64, 2)
3257
      oprot.writeI64(self.itemId)
3258
      oprot.writeFieldEnd()
3259
    if self.quantity is not None:
3260
      oprot.writeFieldBegin('quantity', TType.I64, 3)
3261
      oprot.writeI64(self.quantity)
3262
      oprot.writeFieldEnd()
3263
    oprot.writeFieldStop()
3264
    oprot.writeStructEnd()
3265
 
3266
  def validate(self):
3267
    return
3268
 
3269
 
3270
  def __repr__(self):
3271
    L = ['%s=%r' % (key, value)
3272
      for key, value in self.__dict__.iteritems()]
3273
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
3274
 
3275
  def __eq__(self, other):
3276
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
3277
 
3278
  def __ne__(self, other):
3279
    return not (self == other)
3280
 
3281
class fulfillPO_result:
3282
  """
3283
  Attributes:
3284
   - e
3285
  """
3286
 
3287
  thrift_spec = (
3288
    None, # 0
3289
    (1, TType.STRUCT, 'e', (PurchaseServiceException, PurchaseServiceException.thrift_spec), None, ), # 1
3290
  )
3291
 
3292
  def __init__(self, e=None,):
3293
    self.e = e
3294
 
3295
  def read(self, iprot):
3296
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
3297
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
3298
      return
3299
    iprot.readStructBegin()
3300
    while True:
3301
      (fname, ftype, fid) = iprot.readFieldBegin()
3302
      if ftype == TType.STOP:
3303
        break
3304
      if fid == 1:
3305
        if ftype == TType.STRUCT:
3306
          self.e = PurchaseServiceException()
3307
          self.e.read(iprot)
3308
        else:
3309
          iprot.skip(ftype)
3310
      else:
3311
        iprot.skip(ftype)
3312
      iprot.readFieldEnd()
3313
    iprot.readStructEnd()
3314
 
3315
  def write(self, oprot):
3316
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
3317
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
3318
      return
3319
    oprot.writeStructBegin('fulfillPO_result')
3320
    if self.e is not None:
3321
      oprot.writeFieldBegin('e', TType.STRUCT, 1)
3322
      self.e.write(oprot)
3323
      oprot.writeFieldEnd()
3324
    oprot.writeFieldStop()
3325
    oprot.writeStructEnd()
3326
 
3327
  def validate(self):
3328
    return
3329
 
3330
 
3331
  def __repr__(self):
3332
    L = ['%s=%r' % (key, value)
3333
      for key, value in self.__dict__.iteritems()]
3334
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
3335
 
3336
  def __eq__(self, other):
3337
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
3338
 
3339
  def __ne__(self, other):
3340
    return not (self == other)
3341
 
3342
class updatePurchaseOrder_args:
3343
  """
3344
  Attributes:
3345
   - purchaseOrder
3346
  """
3347
 
3348
  thrift_spec = (
3349
    None, # 0
3350
    (1, TType.STRUCT, 'purchaseOrder', (PurchaseOrder, PurchaseOrder.thrift_spec), None, ), # 1
3351
  )
3352
 
3353
  def __init__(self, purchaseOrder=None,):
3354
    self.purchaseOrder = purchaseOrder
3355
 
3356
  def read(self, iprot):
3357
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
3358
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
3359
      return
3360
    iprot.readStructBegin()
3361
    while True:
3362
      (fname, ftype, fid) = iprot.readFieldBegin()
3363
      if ftype == TType.STOP:
3364
        break
3365
      if fid == 1:
3366
        if ftype == TType.STRUCT:
3367
          self.purchaseOrder = PurchaseOrder()
3368
          self.purchaseOrder.read(iprot)
3369
        else:
3370
          iprot.skip(ftype)
3371
      else:
3372
        iprot.skip(ftype)
3373
      iprot.readFieldEnd()
3374
    iprot.readStructEnd()
3375
 
3376
  def write(self, oprot):
3377
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
3378
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
3379
      return
3380
    oprot.writeStructBegin('updatePurchaseOrder_args')
3381
    if self.purchaseOrder is not None:
3382
      oprot.writeFieldBegin('purchaseOrder', TType.STRUCT, 1)
3383
      self.purchaseOrder.write(oprot)
3384
      oprot.writeFieldEnd()
3385
    oprot.writeFieldStop()
3386
    oprot.writeStructEnd()
3387
 
3388
  def validate(self):
3389
    return
3390
 
3391
 
3392
  def __repr__(self):
3393
    L = ['%s=%r' % (key, value)
3394
      for key, value in self.__dict__.iteritems()]
3395
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
3396
 
3397
  def __eq__(self, other):
3398
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
3399
 
3400
  def __ne__(self, other):
3401
    return not (self == other)
3402
 
3403
class updatePurchaseOrder_result:
3404
  """
3405
  Attributes:
3406
   - e
3407
  """
3408
 
3409
  thrift_spec = (
3410
    None, # 0
3411
    (1, TType.STRUCT, 'e', (PurchaseServiceException, PurchaseServiceException.thrift_spec), None, ), # 1
3412
  )
3413
 
3414
  def __init__(self, e=None,):
3415
    self.e = e
3416
 
3417
  def read(self, iprot):
3418
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
3419
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
3420
      return
3421
    iprot.readStructBegin()
3422
    while True:
3423
      (fname, ftype, fid) = iprot.readFieldBegin()
3424
      if ftype == TType.STOP:
3425
        break
3426
      if fid == 1:
3427
        if ftype == TType.STRUCT:
3428
          self.e = PurchaseServiceException()
3429
          self.e.read(iprot)
3430
        else:
3431
          iprot.skip(ftype)
3432
      else:
3433
        iprot.skip(ftype)
3434
      iprot.readFieldEnd()
3435
    iprot.readStructEnd()
3436
 
3437
  def write(self, oprot):
3438
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
3439
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
3440
      return
3441
    oprot.writeStructBegin('updatePurchaseOrder_result')
3442
    if self.e is not None:
3443
      oprot.writeFieldBegin('e', TType.STRUCT, 1)
3444
      self.e.write(oprot)
3445
      oprot.writeFieldEnd()
3446
    oprot.writeFieldStop()
3447
    oprot.writeStructEnd()
3448
 
3449
  def validate(self):
3450
    return
3451
 
3452
 
3453
  def __repr__(self):
3454
    L = ['%s=%r' % (key, value)
3455
      for key, value in self.__dict__.iteritems()]
3456
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
3457
 
3458
  def __eq__(self, other):
3459
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
3460
 
3461
  def __ne__(self, other):
3462
    return not (self == other)
5185 mandeep.dh 3463
 
3464
class unFulfillPO_args:
3465
  """
3466
  Attributes:
3467
   - purchaseId
3468
   - itemId
3469
   - quantity
3470
  """
3471
 
3472
  thrift_spec = (
3473
    None, # 0
3474
    (1, TType.I64, 'purchaseId', None, None, ), # 1
3475
    (2, TType.I64, 'itemId', None, None, ), # 2
3476
    (3, TType.I64, 'quantity', None, None, ), # 3
3477
  )
3478
 
3479
  def __init__(self, purchaseId=None, itemId=None, quantity=None,):
3480
    self.purchaseId = purchaseId
3481
    self.itemId = itemId
3482
    self.quantity = quantity
3483
 
3484
  def read(self, iprot):
3485
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
3486
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
3487
      return
3488
    iprot.readStructBegin()
3489
    while True:
3490
      (fname, ftype, fid) = iprot.readFieldBegin()
3491
      if ftype == TType.STOP:
3492
        break
3493
      if fid == 1:
3494
        if ftype == TType.I64:
3495
          self.purchaseId = iprot.readI64();
3496
        else:
3497
          iprot.skip(ftype)
3498
      elif fid == 2:
3499
        if ftype == TType.I64:
3500
          self.itemId = iprot.readI64();
3501
        else:
3502
          iprot.skip(ftype)
3503
      elif fid == 3:
3504
        if ftype == TType.I64:
3505
          self.quantity = iprot.readI64();
3506
        else:
3507
          iprot.skip(ftype)
3508
      else:
3509
        iprot.skip(ftype)
3510
      iprot.readFieldEnd()
3511
    iprot.readStructEnd()
3512
 
3513
  def write(self, oprot):
3514
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
3515
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
3516
      return
3517
    oprot.writeStructBegin('unFulfillPO_args')
3518
    if self.purchaseId is not None:
3519
      oprot.writeFieldBegin('purchaseId', TType.I64, 1)
3520
      oprot.writeI64(self.purchaseId)
3521
      oprot.writeFieldEnd()
3522
    if self.itemId is not None:
3523
      oprot.writeFieldBegin('itemId', TType.I64, 2)
3524
      oprot.writeI64(self.itemId)
3525
      oprot.writeFieldEnd()
3526
    if self.quantity is not None:
3527
      oprot.writeFieldBegin('quantity', TType.I64, 3)
3528
      oprot.writeI64(self.quantity)
3529
      oprot.writeFieldEnd()
3530
    oprot.writeFieldStop()
3531
    oprot.writeStructEnd()
3532
 
3533
  def validate(self):
3534
    return
3535
 
3536
 
3537
  def __repr__(self):
3538
    L = ['%s=%r' % (key, value)
3539
      for key, value in self.__dict__.iteritems()]
3540
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
3541
 
3542
  def __eq__(self, other):
3543
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
3544
 
3545
  def __ne__(self, other):
3546
    return not (self == other)
3547
 
3548
class unFulfillPO_result:
3549
  """
3550
  Attributes:
3551
   - e
3552
  """
3553
 
3554
  thrift_spec = (
3555
    None, # 0
3556
    (1, TType.STRUCT, 'e', (PurchaseServiceException, PurchaseServiceException.thrift_spec), None, ), # 1
3557
  )
3558
 
3559
  def __init__(self, e=None,):
3560
    self.e = e
3561
 
3562
  def read(self, iprot):
3563
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
3564
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
3565
      return
3566
    iprot.readStructBegin()
3567
    while True:
3568
      (fname, ftype, fid) = iprot.readFieldBegin()
3569
      if ftype == TType.STOP:
3570
        break
3571
      if fid == 1:
3572
        if ftype == TType.STRUCT:
3573
          self.e = PurchaseServiceException()
3574
          self.e.read(iprot)
3575
        else:
3576
          iprot.skip(ftype)
3577
      else:
3578
        iprot.skip(ftype)
3579
      iprot.readFieldEnd()
3580
    iprot.readStructEnd()
3581
 
3582
  def write(self, oprot):
3583
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
3584
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
3585
      return
3586
    oprot.writeStructBegin('unFulfillPO_result')
3587
    if self.e is not None:
3588
      oprot.writeFieldBegin('e', TType.STRUCT, 1)
3589
      self.e.write(oprot)
3590
      oprot.writeFieldEnd()
3591
    oprot.writeFieldStop()
3592
    oprot.writeStructEnd()
3593
 
3594
  def validate(self):
3595
    return
3596
 
3597
 
3598
  def __repr__(self):
3599
    L = ['%s=%r' % (key, value)
3600
      for key, value in self.__dict__.iteritems()]
3601
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
3602
 
3603
  def __eq__(self, other):
3604
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
3605
 
3606
  def __ne__(self, other):
3607
    return not (self == other)
5443 mandeep.dh 3608
 
3609
class getInvoices_args:
3610
  """
3611
  Attributes:
3612
   - date
3613
  """
3614
 
3615
  thrift_spec = (
3616
    None, # 0
3617
    (1, TType.I64, 'date', None, None, ), # 1
3618
  )
3619
 
3620
  def __init__(self, date=None,):
3621
    self.date = date
3622
 
3623
  def read(self, iprot):
3624
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
3625
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
3626
      return
3627
    iprot.readStructBegin()
3628
    while True:
3629
      (fname, ftype, fid) = iprot.readFieldBegin()
3630
      if ftype == TType.STOP:
3631
        break
3632
      if fid == 1:
3633
        if ftype == TType.I64:
3634
          self.date = iprot.readI64();
3635
        else:
3636
          iprot.skip(ftype)
3637
      else:
3638
        iprot.skip(ftype)
3639
      iprot.readFieldEnd()
3640
    iprot.readStructEnd()
3641
 
3642
  def write(self, oprot):
3643
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
3644
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
3645
      return
3646
    oprot.writeStructBegin('getInvoices_args')
3647
    if self.date is not None:
3648
      oprot.writeFieldBegin('date', TType.I64, 1)
3649
      oprot.writeI64(self.date)
3650
      oprot.writeFieldEnd()
3651
    oprot.writeFieldStop()
3652
    oprot.writeStructEnd()
3653
 
3654
  def validate(self):
3655
    return
3656
 
3657
 
3658
  def __repr__(self):
3659
    L = ['%s=%r' % (key, value)
3660
      for key, value in self.__dict__.iteritems()]
3661
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
3662
 
3663
  def __eq__(self, other):
3664
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
3665
 
3666
  def __ne__(self, other):
3667
    return not (self == other)
3668
 
3669
class getInvoices_result:
3670
  """
3671
  Attributes:
3672
   - success
3673
  """
3674
 
3675
  thrift_spec = (
3676
    (0, TType.LIST, 'success', (TType.STRUCT,(Invoice, Invoice.thrift_spec)), None, ), # 0
3677
  )
3678
 
3679
  def __init__(self, success=None,):
3680
    self.success = success
3681
 
3682
  def read(self, iprot):
3683
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
3684
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
3685
      return
3686
    iprot.readStructBegin()
3687
    while True:
3688
      (fname, ftype, fid) = iprot.readFieldBegin()
3689
      if ftype == TType.STOP:
3690
        break
3691
      if fid == 0:
3692
        if ftype == TType.LIST:
3693
          self.success = []
6386 amar.kumar 3694
          (_etype45, _size42) = iprot.readListBegin()
3695
          for _i46 in xrange(_size42):
3696
            _elem47 = Invoice()
3697
            _elem47.read(iprot)
3698
            self.success.append(_elem47)
5443 mandeep.dh 3699
          iprot.readListEnd()
3700
        else:
3701
          iprot.skip(ftype)
3702
      else:
3703
        iprot.skip(ftype)
3704
      iprot.readFieldEnd()
3705
    iprot.readStructEnd()
3706
 
3707
  def write(self, oprot):
3708
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
3709
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
3710
      return
3711
    oprot.writeStructBegin('getInvoices_result')
3712
    if self.success is not None:
3713
      oprot.writeFieldBegin('success', TType.LIST, 0)
3714
      oprot.writeListBegin(TType.STRUCT, len(self.success))
6386 amar.kumar 3715
      for iter48 in self.success:
3716
        iter48.write(oprot)
5443 mandeep.dh 3717
      oprot.writeListEnd()
3718
      oprot.writeFieldEnd()
3719
    oprot.writeFieldStop()
3720
    oprot.writeStructEnd()
3721
 
3722
  def validate(self):
3723
    return
3724
 
3725
 
3726
  def __repr__(self):
3727
    L = ['%s=%r' % (key, value)
3728
      for key, value in self.__dict__.iteritems()]
3729
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
3730
 
3731
  def __eq__(self, other):
3732
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
3733
 
3734
  def __ne__(self, other):
3735
    return not (self == other)
3736
 
7410 amar.kumar 3737
class getInvoicesForWarehouse_args:
3738
  """
3739
  Attributes:
3740
   - warehouseId
3741
   - supplierId
3742
   - date
3743
  """
3744
 
3745
  thrift_spec = (
3746
    None, # 0
3747
    (1, TType.I64, 'warehouseId', None, None, ), # 1
3748
    (2, TType.I64, 'supplierId', None, None, ), # 2
3749
    (3, TType.I64, 'date', None, None, ), # 3
3750
  )
3751
 
3752
  def __init__(self, warehouseId=None, supplierId=None, date=None,):
3753
    self.warehouseId = warehouseId
3754
    self.supplierId = supplierId
3755
    self.date = date
3756
 
3757
  def read(self, iprot):
3758
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
3759
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
3760
      return
3761
    iprot.readStructBegin()
3762
    while True:
3763
      (fname, ftype, fid) = iprot.readFieldBegin()
3764
      if ftype == TType.STOP:
3765
        break
3766
      if fid == 1:
3767
        if ftype == TType.I64:
3768
          self.warehouseId = iprot.readI64();
3769
        else:
3770
          iprot.skip(ftype)
3771
      elif fid == 2:
3772
        if ftype == TType.I64:
3773
          self.supplierId = iprot.readI64();
3774
        else:
3775
          iprot.skip(ftype)
3776
      elif fid == 3:
3777
        if ftype == TType.I64:
3778
          self.date = iprot.readI64();
3779
        else:
3780
          iprot.skip(ftype)
3781
      else:
3782
        iprot.skip(ftype)
3783
      iprot.readFieldEnd()
3784
    iprot.readStructEnd()
3785
 
3786
  def write(self, oprot):
3787
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
3788
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
3789
      return
3790
    oprot.writeStructBegin('getInvoicesForWarehouse_args')
3791
    if self.warehouseId is not None:
3792
      oprot.writeFieldBegin('warehouseId', TType.I64, 1)
3793
      oprot.writeI64(self.warehouseId)
3794
      oprot.writeFieldEnd()
3795
    if self.supplierId is not None:
3796
      oprot.writeFieldBegin('supplierId', TType.I64, 2)
3797
      oprot.writeI64(self.supplierId)
3798
      oprot.writeFieldEnd()
3799
    if self.date is not None:
3800
      oprot.writeFieldBegin('date', TType.I64, 3)
3801
      oprot.writeI64(self.date)
3802
      oprot.writeFieldEnd()
3803
    oprot.writeFieldStop()
3804
    oprot.writeStructEnd()
3805
 
3806
  def validate(self):
3807
    return
3808
 
3809
 
3810
  def __repr__(self):
3811
    L = ['%s=%r' % (key, value)
3812
      for key, value in self.__dict__.iteritems()]
3813
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
3814
 
3815
  def __eq__(self, other):
3816
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
3817
 
3818
  def __ne__(self, other):
3819
    return not (self == other)
3820
 
3821
class getInvoicesForWarehouse_result:
3822
  """
3823
  Attributes:
3824
   - success
3825
  """
3826
 
3827
  thrift_spec = (
3828
    (0, TType.LIST, 'success', (TType.STRUCT,(Invoice, Invoice.thrift_spec)), None, ), # 0
3829
  )
3830
 
3831
  def __init__(self, success=None,):
3832
    self.success = success
3833
 
3834
  def read(self, iprot):
3835
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
3836
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
3837
      return
3838
    iprot.readStructBegin()
3839
    while True:
3840
      (fname, ftype, fid) = iprot.readFieldBegin()
3841
      if ftype == TType.STOP:
3842
        break
3843
      if fid == 0:
3844
        if ftype == TType.LIST:
3845
          self.success = []
3846
          (_etype52, _size49) = iprot.readListBegin()
3847
          for _i53 in xrange(_size49):
3848
            _elem54 = Invoice()
3849
            _elem54.read(iprot)
3850
            self.success.append(_elem54)
3851
          iprot.readListEnd()
3852
        else:
3853
          iprot.skip(ftype)
3854
      else:
3855
        iprot.skip(ftype)
3856
      iprot.readFieldEnd()
3857
    iprot.readStructEnd()
3858
 
3859
  def write(self, oprot):
3860
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
3861
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
3862
      return
3863
    oprot.writeStructBegin('getInvoicesForWarehouse_result')
3864
    if self.success is not None:
3865
      oprot.writeFieldBegin('success', TType.LIST, 0)
3866
      oprot.writeListBegin(TType.STRUCT, len(self.success))
3867
      for iter55 in self.success:
3868
        iter55.write(oprot)
3869
      oprot.writeListEnd()
3870
      oprot.writeFieldEnd()
3871
    oprot.writeFieldStop()
3872
    oprot.writeStructEnd()
3873
 
3874
  def validate(self):
3875
    return
3876
 
3877
 
3878
  def __repr__(self):
3879
    L = ['%s=%r' % (key, value)
3880
      for key, value in self.__dict__.iteritems()]
3881
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
3882
 
3883
  def __eq__(self, other):
3884
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
3885
 
3886
  def __ne__(self, other):
3887
    return not (self == other)
3888
 
5443 mandeep.dh 3889
class createInvoice_args:
3890
  """
3891
  Attributes:
3892
   - invoice
3893
  """
3894
 
3895
  thrift_spec = (
3896
    None, # 0
3897
    (1, TType.STRUCT, 'invoice', (Invoice, Invoice.thrift_spec), None, ), # 1
3898
  )
3899
 
3900
  def __init__(self, invoice=None,):
3901
    self.invoice = invoice
3902
 
3903
  def read(self, iprot):
3904
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
3905
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
3906
      return
3907
    iprot.readStructBegin()
3908
    while True:
3909
      (fname, ftype, fid) = iprot.readFieldBegin()
3910
      if ftype == TType.STOP:
3911
        break
3912
      if fid == 1:
3913
        if ftype == TType.STRUCT:
3914
          self.invoice = Invoice()
3915
          self.invoice.read(iprot)
3916
        else:
3917
          iprot.skip(ftype)
3918
      else:
3919
        iprot.skip(ftype)
3920
      iprot.readFieldEnd()
3921
    iprot.readStructEnd()
3922
 
3923
  def write(self, oprot):
3924
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
3925
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
3926
      return
3927
    oprot.writeStructBegin('createInvoice_args')
3928
    if self.invoice is not None:
3929
      oprot.writeFieldBegin('invoice', TType.STRUCT, 1)
3930
      self.invoice.write(oprot)
3931
      oprot.writeFieldEnd()
3932
    oprot.writeFieldStop()
3933
    oprot.writeStructEnd()
3934
 
3935
  def validate(self):
3936
    return
3937
 
3938
 
3939
  def __repr__(self):
3940
    L = ['%s=%r' % (key, value)
3941
      for key, value in self.__dict__.iteritems()]
3942
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
3943
 
3944
  def __eq__(self, other):
3945
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
3946
 
3947
  def __ne__(self, other):
3948
    return not (self == other)
3949
 
3950
class createInvoice_result:
3951
  """
3952
  Attributes:
3953
   - e
3954
  """
3955
 
3956
  thrift_spec = (
3957
    None, # 0
3958
    (1, TType.STRUCT, 'e', (PurchaseServiceException, PurchaseServiceException.thrift_spec), None, ), # 1
3959
  )
3960
 
3961
  def __init__(self, e=None,):
3962
    self.e = e
3963
 
3964
  def read(self, iprot):
3965
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
3966
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
3967
      return
3968
    iprot.readStructBegin()
3969
    while True:
3970
      (fname, ftype, fid) = iprot.readFieldBegin()
3971
      if ftype == TType.STOP:
3972
        break
3973
      if fid == 1:
3974
        if ftype == TType.STRUCT:
3975
          self.e = PurchaseServiceException()
3976
          self.e.read(iprot)
3977
        else:
3978
          iprot.skip(ftype)
3979
      else:
3980
        iprot.skip(ftype)
3981
      iprot.readFieldEnd()
3982
    iprot.readStructEnd()
3983
 
3984
  def write(self, oprot):
3985
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
3986
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
3987
      return
3988
    oprot.writeStructBegin('createInvoice_result')
3989
    if self.e is not None:
3990
      oprot.writeFieldBegin('e', TType.STRUCT, 1)
3991
      self.e.write(oprot)
3992
      oprot.writeFieldEnd()
3993
    oprot.writeFieldStop()
3994
    oprot.writeStructEnd()
3995
 
3996
  def validate(self):
3997
    return
3998
 
3999
 
4000
  def __repr__(self):
4001
    L = ['%s=%r' % (key, value)
4002
      for key, value in self.__dict__.iteritems()]
4003
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
4004
 
4005
  def __eq__(self, other):
4006
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
4007
 
4008
  def __ne__(self, other):
4009
    return not (self == other)
5591 mandeep.dh 4010
 
4011
class addSupplier_args:
4012
  """
4013
  Attributes:
4014
   - supplier
4015
  """
4016
 
4017
  thrift_spec = (
4018
    None, # 0
4019
    (1, TType.STRUCT, 'supplier', (Supplier, Supplier.thrift_spec), None, ), # 1
4020
  )
4021
 
4022
  def __init__(self, supplier=None,):
4023
    self.supplier = supplier
4024
 
4025
  def read(self, iprot):
4026
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
4027
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
4028
      return
4029
    iprot.readStructBegin()
4030
    while True:
4031
      (fname, ftype, fid) = iprot.readFieldBegin()
4032
      if ftype == TType.STOP:
4033
        break
4034
      if fid == 1:
4035
        if ftype == TType.STRUCT:
4036
          self.supplier = Supplier()
4037
          self.supplier.read(iprot)
4038
        else:
4039
          iprot.skip(ftype)
4040
      else:
4041
        iprot.skip(ftype)
4042
      iprot.readFieldEnd()
4043
    iprot.readStructEnd()
4044
 
4045
  def write(self, oprot):
4046
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
4047
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
4048
      return
4049
    oprot.writeStructBegin('addSupplier_args')
4050
    if self.supplier is not None:
4051
      oprot.writeFieldBegin('supplier', TType.STRUCT, 1)
4052
      self.supplier.write(oprot)
4053
      oprot.writeFieldEnd()
4054
    oprot.writeFieldStop()
4055
    oprot.writeStructEnd()
4056
 
4057
  def validate(self):
4058
    return
4059
 
4060
 
4061
  def __repr__(self):
4062
    L = ['%s=%r' % (key, value)
4063
      for key, value in self.__dict__.iteritems()]
4064
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
4065
 
4066
  def __eq__(self, other):
4067
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
4068
 
4069
  def __ne__(self, other):
4070
    return not (self == other)
4071
 
4072
class addSupplier_result:
4073
  """
4074
  Attributes:
4075
   - success
4076
  """
4077
 
4078
  thrift_spec = (
4079
    (0, TType.STRUCT, 'success', (Supplier, Supplier.thrift_spec), None, ), # 0
4080
  )
4081
 
4082
  def __init__(self, success=None,):
4083
    self.success = success
4084
 
4085
  def read(self, iprot):
4086
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
4087
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
4088
      return
4089
    iprot.readStructBegin()
4090
    while True:
4091
      (fname, ftype, fid) = iprot.readFieldBegin()
4092
      if ftype == TType.STOP:
4093
        break
4094
      if fid == 0:
4095
        if ftype == TType.STRUCT:
4096
          self.success = Supplier()
4097
          self.success.read(iprot)
4098
        else:
4099
          iprot.skip(ftype)
4100
      else:
4101
        iprot.skip(ftype)
4102
      iprot.readFieldEnd()
4103
    iprot.readStructEnd()
4104
 
4105
  def write(self, oprot):
4106
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
4107
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
4108
      return
4109
    oprot.writeStructBegin('addSupplier_result')
4110
    if self.success is not None:
4111
      oprot.writeFieldBegin('success', TType.STRUCT, 0)
4112
      self.success.write(oprot)
4113
      oprot.writeFieldEnd()
4114
    oprot.writeFieldStop()
4115
    oprot.writeStructEnd()
4116
 
4117
  def validate(self):
4118
    return
4119
 
4120
 
4121
  def __repr__(self):
4122
    L = ['%s=%r' % (key, value)
4123
      for key, value in self.__dict__.iteritems()]
4124
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
4125
 
4126
  def __eq__(self, other):
4127
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
4128
 
4129
  def __ne__(self, other):
4130
    return not (self == other)
4131
 
4132
class updateSupplier_args:
4133
  """
4134
  Attributes:
4135
   - supplier
4136
  """
4137
 
4138
  thrift_spec = (
4139
    None, # 0
4140
    (1, TType.STRUCT, 'supplier', (Supplier, Supplier.thrift_spec), None, ), # 1
4141
  )
4142
 
4143
  def __init__(self, supplier=None,):
4144
    self.supplier = supplier
4145
 
4146
  def read(self, iprot):
4147
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
4148
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
4149
      return
4150
    iprot.readStructBegin()
4151
    while True:
4152
      (fname, ftype, fid) = iprot.readFieldBegin()
4153
      if ftype == TType.STOP:
4154
        break
4155
      if fid == 1:
4156
        if ftype == TType.STRUCT:
4157
          self.supplier = Supplier()
4158
          self.supplier.read(iprot)
4159
        else:
4160
          iprot.skip(ftype)
4161
      else:
4162
        iprot.skip(ftype)
4163
      iprot.readFieldEnd()
4164
    iprot.readStructEnd()
4165
 
4166
  def write(self, oprot):
4167
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
4168
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
4169
      return
4170
    oprot.writeStructBegin('updateSupplier_args')
4171
    if self.supplier is not None:
4172
      oprot.writeFieldBegin('supplier', TType.STRUCT, 1)
4173
      self.supplier.write(oprot)
4174
      oprot.writeFieldEnd()
4175
    oprot.writeFieldStop()
4176
    oprot.writeStructEnd()
4177
 
4178
  def validate(self):
4179
    return
4180
 
4181
 
4182
  def __repr__(self):
4183
    L = ['%s=%r' % (key, value)
4184
      for key, value in self.__dict__.iteritems()]
4185
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
4186
 
4187
  def __eq__(self, other):
4188
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
4189
 
4190
  def __ne__(self, other):
4191
    return not (self == other)
4192
 
4193
class updateSupplier_result:
4194
 
4195
  thrift_spec = (
4196
  )
4197
 
4198
  def read(self, iprot):
4199
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
4200
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
4201
      return
4202
    iprot.readStructBegin()
4203
    while True:
4204
      (fname, ftype, fid) = iprot.readFieldBegin()
4205
      if ftype == TType.STOP:
4206
        break
4207
      else:
4208
        iprot.skip(ftype)
4209
      iprot.readFieldEnd()
4210
    iprot.readStructEnd()
4211
 
4212
  def write(self, oprot):
4213
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
4214
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
4215
      return
4216
    oprot.writeStructBegin('updateSupplier_result')
4217
    oprot.writeFieldStop()
4218
    oprot.writeStructEnd()
4219
 
4220
  def validate(self):
4221
    return
4222
 
4223
 
4224
  def __repr__(self):
4225
    L = ['%s=%r' % (key, value)
4226
      for key, value in self.__dict__.iteritems()]
4227
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
4228
 
4229
  def __eq__(self, other):
4230
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
4231
 
4232
  def __ne__(self, other):
4233
    return not (self == other)
6467 amar.kumar 4234
 
4235
class createPurchaseReturn_args:
4236
  """
4237
  Attributes:
4238
   - purchaseReturn
4239
  """
4240
 
4241
  thrift_spec = (
4242
    None, # 0
4243
    (1, TType.STRUCT, 'purchaseReturn', (PurchaseReturn, PurchaseReturn.thrift_spec), None, ), # 1
4244
  )
4245
 
4246
  def __init__(self, purchaseReturn=None,):
4247
    self.purchaseReturn = purchaseReturn
4248
 
4249
  def read(self, iprot):
4250
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
4251
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
4252
      return
4253
    iprot.readStructBegin()
4254
    while True:
4255
      (fname, ftype, fid) = iprot.readFieldBegin()
4256
      if ftype == TType.STOP:
4257
        break
4258
      if fid == 1:
4259
        if ftype == TType.STRUCT:
4260
          self.purchaseReturn = PurchaseReturn()
4261
          self.purchaseReturn.read(iprot)
4262
        else:
4263
          iprot.skip(ftype)
4264
      else:
4265
        iprot.skip(ftype)
4266
      iprot.readFieldEnd()
4267
    iprot.readStructEnd()
4268
 
4269
  def write(self, oprot):
4270
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
4271
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
4272
      return
4273
    oprot.writeStructBegin('createPurchaseReturn_args')
4274
    if self.purchaseReturn is not None:
4275
      oprot.writeFieldBegin('purchaseReturn', TType.STRUCT, 1)
4276
      self.purchaseReturn.write(oprot)
4277
      oprot.writeFieldEnd()
4278
    oprot.writeFieldStop()
4279
    oprot.writeStructEnd()
4280
 
4281
  def validate(self):
4282
    return
4283
 
4284
 
4285
  def __repr__(self):
4286
    L = ['%s=%r' % (key, value)
4287
      for key, value in self.__dict__.iteritems()]
4288
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
4289
 
4290
  def __eq__(self, other):
4291
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
4292
 
4293
  def __ne__(self, other):
4294
    return not (self == other)
4295
 
4296
class createPurchaseReturn_result:
4297
  """
4298
  Attributes:
4299
   - success
4300
  """
4301
 
4302
  thrift_spec = (
4303
    (0, TType.I64, 'success', None, None, ), # 0
4304
  )
4305
 
4306
  def __init__(self, success=None,):
4307
    self.success = success
4308
 
4309
  def read(self, iprot):
4310
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
4311
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
4312
      return
4313
    iprot.readStructBegin()
4314
    while True:
4315
      (fname, ftype, fid) = iprot.readFieldBegin()
4316
      if ftype == TType.STOP:
4317
        break
4318
      if fid == 0:
4319
        if ftype == TType.I64:
4320
          self.success = iprot.readI64();
4321
        else:
4322
          iprot.skip(ftype)
4323
      else:
4324
        iprot.skip(ftype)
4325
      iprot.readFieldEnd()
4326
    iprot.readStructEnd()
4327
 
4328
  def write(self, oprot):
4329
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
4330
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
4331
      return
4332
    oprot.writeStructBegin('createPurchaseReturn_result')
4333
    if self.success is not None:
4334
      oprot.writeFieldBegin('success', TType.I64, 0)
4335
      oprot.writeI64(self.success)
4336
      oprot.writeFieldEnd()
4337
    oprot.writeFieldStop()
4338
    oprot.writeStructEnd()
4339
 
4340
  def validate(self):
4341
    return
4342
 
4343
 
4344
  def __repr__(self):
4345
    L = ['%s=%r' % (key, value)
4346
      for key, value in self.__dict__.iteritems()]
4347
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
4348
 
4349
  def __eq__(self, other):
4350
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
4351
 
4352
  def __ne__(self, other):
4353
    return not (self == other)
4354
 
4355
class settlePurchaseReturn_args:
4356
  """
4357
  Attributes:
4358
   - id
4359
  """
4360
 
4361
  thrift_spec = (
4362
    None, # 0
4363
    (1, TType.I64, 'id', None, None, ), # 1
4364
  )
4365
 
4366
  def __init__(self, id=None,):
4367
    self.id = id
4368
 
4369
  def read(self, iprot):
4370
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
4371
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
4372
      return
4373
    iprot.readStructBegin()
4374
    while True:
4375
      (fname, ftype, fid) = iprot.readFieldBegin()
4376
      if ftype == TType.STOP:
4377
        break
4378
      if fid == 1:
4379
        if ftype == TType.I64:
4380
          self.id = iprot.readI64();
4381
        else:
4382
          iprot.skip(ftype)
4383
      else:
4384
        iprot.skip(ftype)
4385
      iprot.readFieldEnd()
4386
    iprot.readStructEnd()
4387
 
4388
  def write(self, oprot):
4389
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
4390
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
4391
      return
4392
    oprot.writeStructBegin('settlePurchaseReturn_args')
4393
    if self.id is not None:
4394
      oprot.writeFieldBegin('id', TType.I64, 1)
4395
      oprot.writeI64(self.id)
4396
      oprot.writeFieldEnd()
4397
    oprot.writeFieldStop()
4398
    oprot.writeStructEnd()
4399
 
4400
  def validate(self):
4401
    return
4402
 
4403
 
4404
  def __repr__(self):
4405
    L = ['%s=%r' % (key, value)
4406
      for key, value in self.__dict__.iteritems()]
4407
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
4408
 
4409
  def __eq__(self, other):
4410
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
4411
 
4412
  def __ne__(self, other):
4413
    return not (self == other)
4414
 
4415
class settlePurchaseReturn_result:
4416
 
4417
  thrift_spec = (
4418
  )
4419
 
4420
  def read(self, iprot):
4421
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
4422
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
4423
      return
4424
    iprot.readStructBegin()
4425
    while True:
4426
      (fname, ftype, fid) = iprot.readFieldBegin()
4427
      if ftype == TType.STOP:
4428
        break
4429
      else:
4430
        iprot.skip(ftype)
4431
      iprot.readFieldEnd()
4432
    iprot.readStructEnd()
4433
 
4434
  def write(self, oprot):
4435
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
4436
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
4437
      return
4438
    oprot.writeStructBegin('settlePurchaseReturn_result')
4439
    oprot.writeFieldStop()
4440
    oprot.writeStructEnd()
4441
 
4442
  def validate(self):
4443
    return
4444
 
4445
 
4446
  def __repr__(self):
4447
    L = ['%s=%r' % (key, value)
4448
      for key, value in self.__dict__.iteritems()]
4449
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
4450
 
4451
  def __eq__(self, other):
4452
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
4453
 
4454
  def __ne__(self, other):
4455
    return not (self == other)
4456
 
4457
class getUnsettledPurchaseReturns_args:
4458
 
4459
  thrift_spec = (
4460
  )
4461
 
4462
  def read(self, iprot):
4463
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
4464
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
4465
      return
4466
    iprot.readStructBegin()
4467
    while True:
4468
      (fname, ftype, fid) = iprot.readFieldBegin()
4469
      if ftype == TType.STOP:
4470
        break
4471
      else:
4472
        iprot.skip(ftype)
4473
      iprot.readFieldEnd()
4474
    iprot.readStructEnd()
4475
 
4476
  def write(self, oprot):
4477
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
4478
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
4479
      return
4480
    oprot.writeStructBegin('getUnsettledPurchaseReturns_args')
4481
    oprot.writeFieldStop()
4482
    oprot.writeStructEnd()
4483
 
4484
  def validate(self):
4485
    return
4486
 
4487
 
4488
  def __repr__(self):
4489
    L = ['%s=%r' % (key, value)
4490
      for key, value in self.__dict__.iteritems()]
4491
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
4492
 
4493
  def __eq__(self, other):
4494
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
4495
 
4496
  def __ne__(self, other):
4497
    return not (self == other)
4498
 
4499
class getUnsettledPurchaseReturns_result:
4500
  """
4501
  Attributes:
4502
   - success
4503
  """
4504
 
4505
  thrift_spec = (
4506
    (0, TType.LIST, 'success', (TType.STRUCT,(PurchaseReturn, PurchaseReturn.thrift_spec)), None, ), # 0
4507
  )
4508
 
4509
  def __init__(self, success=None,):
4510
    self.success = success
4511
 
4512
  def read(self, iprot):
4513
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
4514
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
4515
      return
4516
    iprot.readStructBegin()
4517
    while True:
4518
      (fname, ftype, fid) = iprot.readFieldBegin()
4519
      if ftype == TType.STOP:
4520
        break
4521
      if fid == 0:
4522
        if ftype == TType.LIST:
4523
          self.success = []
7410 amar.kumar 4524
          (_etype59, _size56) = iprot.readListBegin()
4525
          for _i60 in xrange(_size56):
4526
            _elem61 = PurchaseReturn()
4527
            _elem61.read(iprot)
4528
            self.success.append(_elem61)
6467 amar.kumar 4529
          iprot.readListEnd()
4530
        else:
4531
          iprot.skip(ftype)
4532
      else:
4533
        iprot.skip(ftype)
4534
      iprot.readFieldEnd()
4535
    iprot.readStructEnd()
4536
 
4537
  def write(self, oprot):
4538
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
4539
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
4540
      return
4541
    oprot.writeStructBegin('getUnsettledPurchaseReturns_result')
4542
    if self.success is not None:
4543
      oprot.writeFieldBegin('success', TType.LIST, 0)
4544
      oprot.writeListBegin(TType.STRUCT, len(self.success))
7410 amar.kumar 4545
      for iter62 in self.success:
4546
        iter62.write(oprot)
6467 amar.kumar 4547
      oprot.writeListEnd()
4548
      oprot.writeFieldEnd()
4549
    oprot.writeFieldStop()
4550
    oprot.writeStructEnd()
4551
 
4552
  def validate(self):
4553
    return
4554
 
4555
 
4556
  def __repr__(self):
4557
    L = ['%s=%r' % (key, value)
4558
      for key, value in self.__dict__.iteritems()]
4559
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
4560
 
4561
  def __eq__(self, other):
4562
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
4563
 
4564
  def __ne__(self, other):
4565
    return not (self == other)
6630 amar.kumar 4566
 
4567
class getInvoice_args:
4568
  """
4569
  Attributes:
4570
   - invoiceNumber
4571
   - supplierId
4572
  """
4573
 
4574
  thrift_spec = (
4575
    None, # 0
4576
    (1, TType.STRING, 'invoiceNumber', None, None, ), # 1
4577
    (2, TType.I64, 'supplierId', None, None, ), # 2
4578
  )
4579
 
4580
  def __init__(self, invoiceNumber=None, supplierId=None,):
4581
    self.invoiceNumber = invoiceNumber
4582
    self.supplierId = supplierId
4583
 
4584
  def read(self, iprot):
4585
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
4586
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
4587
      return
4588
    iprot.readStructBegin()
4589
    while True:
4590
      (fname, ftype, fid) = iprot.readFieldBegin()
4591
      if ftype == TType.STOP:
4592
        break
4593
      if fid == 1:
4594
        if ftype == TType.STRING:
4595
          self.invoiceNumber = iprot.readString();
4596
        else:
4597
          iprot.skip(ftype)
4598
      elif fid == 2:
4599
        if ftype == TType.I64:
4600
          self.supplierId = iprot.readI64();
4601
        else:
4602
          iprot.skip(ftype)
4603
      else:
4604
        iprot.skip(ftype)
4605
      iprot.readFieldEnd()
4606
    iprot.readStructEnd()
4607
 
4608
  def write(self, oprot):
4609
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
4610
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
4611
      return
4612
    oprot.writeStructBegin('getInvoice_args')
4613
    if self.invoiceNumber is not None:
4614
      oprot.writeFieldBegin('invoiceNumber', TType.STRING, 1)
4615
      oprot.writeString(self.invoiceNumber)
4616
      oprot.writeFieldEnd()
4617
    if self.supplierId is not None:
4618
      oprot.writeFieldBegin('supplierId', TType.I64, 2)
4619
      oprot.writeI64(self.supplierId)
4620
      oprot.writeFieldEnd()
4621
    oprot.writeFieldStop()
4622
    oprot.writeStructEnd()
4623
 
4624
  def validate(self):
4625
    return
4626
 
4627
 
4628
  def __repr__(self):
4629
    L = ['%s=%r' % (key, value)
4630
      for key, value in self.__dict__.iteritems()]
4631
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
4632
 
4633
  def __eq__(self, other):
4634
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
4635
 
4636
  def __ne__(self, other):
4637
    return not (self == other)
4638
 
4639
class getInvoice_result:
4640
  """
4641
  Attributes:
4642
   - success
4643
  """
4644
 
4645
  thrift_spec = (
4646
    (0, TType.LIST, 'success', (TType.STRUCT,(PurchaseReturn, PurchaseReturn.thrift_spec)), None, ), # 0
4647
  )
4648
 
4649
  def __init__(self, success=None,):
4650
    self.success = success
4651
 
4652
  def read(self, iprot):
4653
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
4654
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
4655
      return
4656
    iprot.readStructBegin()
4657
    while True:
4658
      (fname, ftype, fid) = iprot.readFieldBegin()
4659
      if ftype == TType.STOP:
4660
        break
4661
      if fid == 0:
4662
        if ftype == TType.LIST:
4663
          self.success = []
7410 amar.kumar 4664
          (_etype66, _size63) = iprot.readListBegin()
4665
          for _i67 in xrange(_size63):
4666
            _elem68 = PurchaseReturn()
4667
            _elem68.read(iprot)
4668
            self.success.append(_elem68)
6630 amar.kumar 4669
          iprot.readListEnd()
4670
        else:
4671
          iprot.skip(ftype)
4672
      else:
4673
        iprot.skip(ftype)
4674
      iprot.readFieldEnd()
4675
    iprot.readStructEnd()
4676
 
4677
  def write(self, oprot):
4678
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
4679
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
4680
      return
4681
    oprot.writeStructBegin('getInvoice_result')
4682
    if self.success is not None:
4683
      oprot.writeFieldBegin('success', TType.LIST, 0)
4684
      oprot.writeListBegin(TType.STRUCT, len(self.success))
7410 amar.kumar 4685
      for iter69 in self.success:
4686
        iter69.write(oprot)
6630 amar.kumar 4687
      oprot.writeListEnd()
4688
      oprot.writeFieldEnd()
4689
    oprot.writeFieldStop()
4690
    oprot.writeStructEnd()
4691
 
4692
  def validate(self):
4693
    return
4694
 
4695
 
4696
  def __repr__(self):
4697
    L = ['%s=%r' % (key, value)
4698
      for key, value in self.__dict__.iteritems()]
4699
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
4700
 
4701
  def __eq__(self, other):
4702
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
4703
 
4704
  def __ne__(self, other):
4705
    return not (self == other)
6762 amar.kumar 4706
 
4707
class createPurchaseForOurExtBilling_args:
4708
  """
4709
  Attributes:
4710
   - invoiceNumber
4711
   - unitPrice
7672 rajveer 4712
   - nlc
6762 amar.kumar 4713
   - itemId
4714
  """
4715
 
4716
  thrift_spec = (
4717
    None, # 0
4718
    (1, TType.STRING, 'invoiceNumber', None, None, ), # 1
4719
    (2, TType.DOUBLE, 'unitPrice', None, None, ), # 2
7672 rajveer 4720
    (3, TType.DOUBLE, 'nlc', None, None, ), # 3
4721
    (4, TType.I64, 'itemId', None, None, ), # 4
6762 amar.kumar 4722
  )
4723
 
7672 rajveer 4724
  def __init__(self, invoiceNumber=None, unitPrice=None, nlc=None, itemId=None,):
6762 amar.kumar 4725
    self.invoiceNumber = invoiceNumber
4726
    self.unitPrice = unitPrice
7672 rajveer 4727
    self.nlc = nlc
6762 amar.kumar 4728
    self.itemId = itemId
4729
 
4730
  def read(self, iprot):
4731
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
4732
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
4733
      return
4734
    iprot.readStructBegin()
4735
    while True:
4736
      (fname, ftype, fid) = iprot.readFieldBegin()
4737
      if ftype == TType.STOP:
4738
        break
4739
      if fid == 1:
4740
        if ftype == TType.STRING:
4741
          self.invoiceNumber = iprot.readString();
4742
        else:
4743
          iprot.skip(ftype)
4744
      elif fid == 2:
4745
        if ftype == TType.DOUBLE:
4746
          self.unitPrice = iprot.readDouble();
4747
        else:
4748
          iprot.skip(ftype)
4749
      elif fid == 3:
7672 rajveer 4750
        if ftype == TType.DOUBLE:
4751
          self.nlc = iprot.readDouble();
4752
        else:
4753
          iprot.skip(ftype)
4754
      elif fid == 4:
6762 amar.kumar 4755
        if ftype == TType.I64:
4756
          self.itemId = iprot.readI64();
4757
        else:
4758
          iprot.skip(ftype)
4759
      else:
4760
        iprot.skip(ftype)
4761
      iprot.readFieldEnd()
4762
    iprot.readStructEnd()
4763
 
4764
  def write(self, oprot):
4765
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
4766
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
4767
      return
4768
    oprot.writeStructBegin('createPurchaseForOurExtBilling_args')
4769
    if self.invoiceNumber is not None:
4770
      oprot.writeFieldBegin('invoiceNumber', TType.STRING, 1)
4771
      oprot.writeString(self.invoiceNumber)
4772
      oprot.writeFieldEnd()
4773
    if self.unitPrice is not None:
4774
      oprot.writeFieldBegin('unitPrice', TType.DOUBLE, 2)
4775
      oprot.writeDouble(self.unitPrice)
4776
      oprot.writeFieldEnd()
7672 rajveer 4777
    if self.nlc is not None:
4778
      oprot.writeFieldBegin('nlc', TType.DOUBLE, 3)
4779
      oprot.writeDouble(self.nlc)
4780
      oprot.writeFieldEnd()
6762 amar.kumar 4781
    if self.itemId is not None:
7672 rajveer 4782
      oprot.writeFieldBegin('itemId', TType.I64, 4)
6762 amar.kumar 4783
      oprot.writeI64(self.itemId)
4784
      oprot.writeFieldEnd()
4785
    oprot.writeFieldStop()
4786
    oprot.writeStructEnd()
4787
 
4788
  def validate(self):
4789
    return
4790
 
4791
 
4792
  def __repr__(self):
4793
    L = ['%s=%r' % (key, value)
4794
      for key, value in self.__dict__.iteritems()]
4795
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
4796
 
4797
  def __eq__(self, other):
4798
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
4799
 
4800
  def __ne__(self, other):
4801
    return not (self == other)
4802
 
4803
class createPurchaseForOurExtBilling_result:
4804
  """
4805
  Attributes:
4806
   - success
4807
  """
4808
 
4809
  thrift_spec = (
4810
    (0, TType.I64, 'success', None, None, ), # 0
4811
  )
4812
 
4813
  def __init__(self, success=None,):
4814
    self.success = success
4815
 
4816
  def read(self, iprot):
4817
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
4818
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
4819
      return
4820
    iprot.readStructBegin()
4821
    while True:
4822
      (fname, ftype, fid) = iprot.readFieldBegin()
4823
      if ftype == TType.STOP:
4824
        break
4825
      if fid == 0:
4826
        if ftype == TType.I64:
4827
          self.success = iprot.readI64();
4828
        else:
4829
          iprot.skip(ftype)
4830
      else:
4831
        iprot.skip(ftype)
4832
      iprot.readFieldEnd()
4833
    iprot.readStructEnd()
4834
 
4835
  def write(self, oprot):
4836
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
4837
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
4838
      return
4839
    oprot.writeStructBegin('createPurchaseForOurExtBilling_result')
4840
    if self.success is not None:
4841
      oprot.writeFieldBegin('success', TType.I64, 0)
4842
      oprot.writeI64(self.success)
4843
      oprot.writeFieldEnd()
4844
    oprot.writeFieldStop()
4845
    oprot.writeStructEnd()
4846
 
4847
  def validate(self):
4848
    return
4849
 
4850
 
4851
  def __repr__(self):
4852
    L = ['%s=%r' % (key, value)
4853
      for key, value in self.__dict__.iteritems()]
4854
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
4855
 
4856
  def __eq__(self, other):
4857
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
4858
 
4859
  def __ne__(self, other):
4860
    return not (self == other)
4861
 
4862
class fulfillPOForExtBilling_args:
4863
  """
4864
  Attributes:
4865
   - itemId
4866
   - quantity
4867
  """
4868
 
4869
  thrift_spec = (
4870
    None, # 0
4871
    (1, TType.I64, 'itemId', None, None, ), # 1
4872
    (2, TType.I64, 'quantity', None, None, ), # 2
4873
  )
4874
 
4875
  def __init__(self, itemId=None, quantity=None,):
4876
    self.itemId = itemId
4877
    self.quantity = quantity
4878
 
4879
  def read(self, iprot):
4880
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
4881
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
4882
      return
4883
    iprot.readStructBegin()
4884
    while True:
4885
      (fname, ftype, fid) = iprot.readFieldBegin()
4886
      if ftype == TType.STOP:
4887
        break
4888
      if fid == 1:
4889
        if ftype == TType.I64:
4890
          self.itemId = iprot.readI64();
4891
        else:
4892
          iprot.skip(ftype)
4893
      elif fid == 2:
4894
        if ftype == TType.I64:
4895
          self.quantity = iprot.readI64();
4896
        else:
4897
          iprot.skip(ftype)
4898
      else:
4899
        iprot.skip(ftype)
4900
      iprot.readFieldEnd()
4901
    iprot.readStructEnd()
4902
 
4903
  def write(self, oprot):
4904
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
4905
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
4906
      return
4907
    oprot.writeStructBegin('fulfillPOForExtBilling_args')
4908
    if self.itemId is not None:
4909
      oprot.writeFieldBegin('itemId', TType.I64, 1)
4910
      oprot.writeI64(self.itemId)
4911
      oprot.writeFieldEnd()
4912
    if self.quantity is not None:
4913
      oprot.writeFieldBegin('quantity', TType.I64, 2)
4914
      oprot.writeI64(self.quantity)
4915
      oprot.writeFieldEnd()
4916
    oprot.writeFieldStop()
4917
    oprot.writeStructEnd()
4918
 
4919
  def validate(self):
4920
    return
4921
 
4922
 
4923
  def __repr__(self):
4924
    L = ['%s=%r' % (key, value)
4925
      for key, value in self.__dict__.iteritems()]
4926
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
4927
 
4928
  def __eq__(self, other):
4929
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
4930
 
4931
  def __ne__(self, other):
4932
    return not (self == other)
4933
 
4934
class fulfillPOForExtBilling_result:
4935
 
4936
  thrift_spec = (
4937
  )
4938
 
4939
  def read(self, iprot):
4940
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
4941
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
4942
      return
4943
    iprot.readStructBegin()
4944
    while True:
4945
      (fname, ftype, fid) = iprot.readFieldBegin()
4946
      if ftype == TType.STOP:
4947
        break
4948
      else:
4949
        iprot.skip(ftype)
4950
      iprot.readFieldEnd()
4951
    iprot.readStructEnd()
4952
 
4953
  def write(self, oprot):
4954
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
4955
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
4956
      return
4957
    oprot.writeStructBegin('fulfillPOForExtBilling_result')
4958
    oprot.writeFieldStop()
4959
    oprot.writeStructEnd()
4960
 
4961
  def validate(self):
4962
    return
4963
 
4964
 
4965
  def __repr__(self):
4966
    L = ['%s=%r' % (key, value)
4967
      for key, value in self.__dict__.iteritems()]
4968
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
4969
 
4970
  def __eq__(self, other):
4971
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
4972
 
4973
  def __ne__(self, other):
4974
    return not (self == other)
7410 amar.kumar 4975
 
4976
class closePO_args:
4977
  """
4978
  Attributes:
4979
   - poId
4980
  """
4981
 
4982
  thrift_spec = (
4983
    None, # 0
4984
    (1, TType.I64, 'poId', None, None, ), # 1
4985
  )
4986
 
4987
  def __init__(self, poId=None,):
4988
    self.poId = poId
4989
 
4990
  def read(self, iprot):
4991
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
4992
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
4993
      return
4994
    iprot.readStructBegin()
4995
    while True:
4996
      (fname, ftype, fid) = iprot.readFieldBegin()
4997
      if ftype == TType.STOP:
4998
        break
4999
      if fid == 1:
5000
        if ftype == TType.I64:
5001
          self.poId = iprot.readI64();
5002
        else:
5003
          iprot.skip(ftype)
5004
      else:
5005
        iprot.skip(ftype)
5006
      iprot.readFieldEnd()
5007
    iprot.readStructEnd()
5008
 
5009
  def write(self, oprot):
5010
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
5011
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
5012
      return
5013
    oprot.writeStructBegin('closePO_args')
5014
    if self.poId is not None:
5015
      oprot.writeFieldBegin('poId', TType.I64, 1)
5016
      oprot.writeI64(self.poId)
5017
      oprot.writeFieldEnd()
5018
    oprot.writeFieldStop()
5019
    oprot.writeStructEnd()
5020
 
5021
  def validate(self):
5022
    return
5023
 
5024
 
5025
  def __repr__(self):
5026
    L = ['%s=%r' % (key, value)
5027
      for key, value in self.__dict__.iteritems()]
5028
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
5029
 
5030
  def __eq__(self, other):
5031
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
5032
 
5033
  def __ne__(self, other):
5034
    return not (self == other)
5035
 
5036
class closePO_result:
5037
  """
5038
  Attributes:
5039
   - e
5040
  """
5041
 
5042
  thrift_spec = (
5043
    None, # 0
5044
    (1, TType.STRUCT, 'e', (PurchaseServiceException, PurchaseServiceException.thrift_spec), None, ), # 1
5045
  )
5046
 
5047
  def __init__(self, e=None,):
5048
    self.e = e
5049
 
5050
  def read(self, iprot):
5051
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
5052
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
5053
      return
5054
    iprot.readStructBegin()
5055
    while True:
5056
      (fname, ftype, fid) = iprot.readFieldBegin()
5057
      if ftype == TType.STOP:
5058
        break
5059
      if fid == 1:
5060
        if ftype == TType.STRUCT:
5061
          self.e = PurchaseServiceException()
5062
          self.e.read(iprot)
5063
        else:
5064
          iprot.skip(ftype)
5065
      else:
5066
        iprot.skip(ftype)
5067
      iprot.readFieldEnd()
5068
    iprot.readStructEnd()
5069
 
5070
  def write(self, oprot):
5071
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
5072
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
5073
      return
5074
    oprot.writeStructBegin('closePO_result')
5075
    if self.e is not None:
5076
      oprot.writeFieldBegin('e', TType.STRUCT, 1)
5077
      self.e.write(oprot)
5078
      oprot.writeFieldEnd()
5079
    oprot.writeFieldStop()
5080
    oprot.writeStructEnd()
5081
 
5082
  def validate(self):
5083
    return
5084
 
5085
 
5086
  def __repr__(self):
5087
    L = ['%s=%r' % (key, value)
5088
      for key, value in self.__dict__.iteritems()]
5089
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
5090
 
5091
  def __eq__(self, other):
5092
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
5093
 
5094
  def __ne__(self, other):
5095
    return not (self == other)
5096
 
5097
class isInvoiceReceived_args:
5098
  """
5099
  Attributes:
5100
   - invoiceNumber
5101
   - supplierId
5102
  """
5103
 
5104
  thrift_spec = (
5105
    None, # 0
5106
    (1, TType.STRING, 'invoiceNumber', None, None, ), # 1
5107
    (2, TType.I64, 'supplierId', None, None, ), # 2
5108
  )
5109
 
5110
  def __init__(self, invoiceNumber=None, supplierId=None,):
5111
    self.invoiceNumber = invoiceNumber
5112
    self.supplierId = supplierId
5113
 
5114
  def read(self, iprot):
5115
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
5116
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
5117
      return
5118
    iprot.readStructBegin()
5119
    while True:
5120
      (fname, ftype, fid) = iprot.readFieldBegin()
5121
      if ftype == TType.STOP:
5122
        break
5123
      if fid == 1:
5124
        if ftype == TType.STRING:
5125
          self.invoiceNumber = iprot.readString();
5126
        else:
5127
          iprot.skip(ftype)
5128
      elif fid == 2:
5129
        if ftype == TType.I64:
5130
          self.supplierId = iprot.readI64();
5131
        else:
5132
          iprot.skip(ftype)
5133
      else:
5134
        iprot.skip(ftype)
5135
      iprot.readFieldEnd()
5136
    iprot.readStructEnd()
5137
 
5138
  def write(self, oprot):
5139
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
5140
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
5141
      return
5142
    oprot.writeStructBegin('isInvoiceReceived_args')
5143
    if self.invoiceNumber is not None:
5144
      oprot.writeFieldBegin('invoiceNumber', TType.STRING, 1)
5145
      oprot.writeString(self.invoiceNumber)
5146
      oprot.writeFieldEnd()
5147
    if self.supplierId is not None:
5148
      oprot.writeFieldBegin('supplierId', TType.I64, 2)
5149
      oprot.writeI64(self.supplierId)
5150
      oprot.writeFieldEnd()
5151
    oprot.writeFieldStop()
5152
    oprot.writeStructEnd()
5153
 
5154
  def validate(self):
5155
    return
5156
 
5157
 
5158
  def __repr__(self):
5159
    L = ['%s=%r' % (key, value)
5160
      for key, value in self.__dict__.iteritems()]
5161
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
5162
 
5163
  def __eq__(self, other):
5164
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
5165
 
5166
  def __ne__(self, other):
5167
    return not (self == other)
5168
 
5169
class isInvoiceReceived_result:
5170
  """
5171
  Attributes:
5172
   - success
5173
  """
5174
 
5175
  thrift_spec = (
5176
    (0, TType.BOOL, 'success', None, None, ), # 0
5177
  )
5178
 
5179
  def __init__(self, success=None,):
5180
    self.success = success
5181
 
5182
  def read(self, iprot):
5183
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
5184
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
5185
      return
5186
    iprot.readStructBegin()
5187
    while True:
5188
      (fname, ftype, fid) = iprot.readFieldBegin()
5189
      if ftype == TType.STOP:
5190
        break
5191
      if fid == 0:
5192
        if ftype == TType.BOOL:
5193
          self.success = iprot.readBool();
5194
        else:
5195
          iprot.skip(ftype)
5196
      else:
5197
        iprot.skip(ftype)
5198
      iprot.readFieldEnd()
5199
    iprot.readStructEnd()
5200
 
5201
  def write(self, oprot):
5202
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
5203
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
5204
      return
5205
    oprot.writeStructBegin('isInvoiceReceived_result')
5206
    if self.success is not None:
5207
      oprot.writeFieldBegin('success', TType.BOOL, 0)
5208
      oprot.writeBool(self.success)
5209
      oprot.writeFieldEnd()
5210
    oprot.writeFieldStop()
5211
    oprot.writeStructEnd()
5212
 
5213
  def validate(self):
5214
    return
5215
 
5216
 
5217
  def __repr__(self):
5218
    L = ['%s=%r' % (key, value)
5219
      for key, value in self.__dict__.iteritems()]
5220
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
5221
 
5222
  def __eq__(self, other):
5223
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
5224
 
5225
  def __ne__(self, other):
5226
    return not (self == other)
9829 amar.kumar 5227
 
5228
class changeWarehouseForPO_args:
5229
  """
5230
  Attributes:
5231
   - id
5232
   - warehouseId
5233
  """
5234
 
5235
  thrift_spec = (
5236
    None, # 0
5237
    (1, TType.I64, 'id', None, None, ), # 1
5238
    (2, TType.I64, 'warehouseId', None, None, ), # 2
5239
  )
5240
 
5241
  def __init__(self, id=None, warehouseId=None,):
5242
    self.id = id
5243
    self.warehouseId = warehouseId
5244
 
5245
  def read(self, iprot):
5246
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
5247
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
5248
      return
5249
    iprot.readStructBegin()
5250
    while True:
5251
      (fname, ftype, fid) = iprot.readFieldBegin()
5252
      if ftype == TType.STOP:
5253
        break
5254
      if fid == 1:
5255
        if ftype == TType.I64:
5256
          self.id = iprot.readI64();
5257
        else:
5258
          iprot.skip(ftype)
5259
      elif fid == 2:
5260
        if ftype == TType.I64:
5261
          self.warehouseId = iprot.readI64();
5262
        else:
5263
          iprot.skip(ftype)
5264
      else:
5265
        iprot.skip(ftype)
5266
      iprot.readFieldEnd()
5267
    iprot.readStructEnd()
5268
 
5269
  def write(self, oprot):
5270
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
5271
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
5272
      return
5273
    oprot.writeStructBegin('changeWarehouseForPO_args')
5274
    if self.id is not None:
5275
      oprot.writeFieldBegin('id', TType.I64, 1)
5276
      oprot.writeI64(self.id)
5277
      oprot.writeFieldEnd()
5278
    if self.warehouseId is not None:
5279
      oprot.writeFieldBegin('warehouseId', TType.I64, 2)
5280
      oprot.writeI64(self.warehouseId)
5281
      oprot.writeFieldEnd()
5282
    oprot.writeFieldStop()
5283
    oprot.writeStructEnd()
5284
 
5285
  def validate(self):
5286
    return
5287
 
5288
 
5289
  def __repr__(self):
5290
    L = ['%s=%r' % (key, value)
5291
      for key, value in self.__dict__.iteritems()]
5292
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
5293
 
5294
  def __eq__(self, other):
5295
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
5296
 
5297
  def __ne__(self, other):
5298
    return not (self == other)
5299
 
5300
class changeWarehouseForPO_result:
5301
  """
5302
  Attributes:
5303
   - e
5304
  """
5305
 
5306
  thrift_spec = (
5307
    None, # 0
5308
    (1, TType.STRUCT, 'e', (PurchaseServiceException, PurchaseServiceException.thrift_spec), None, ), # 1
5309
  )
5310
 
5311
  def __init__(self, e=None,):
5312
    self.e = e
5313
 
5314
  def read(self, iprot):
5315
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
5316
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
5317
      return
5318
    iprot.readStructBegin()
5319
    while True:
5320
      (fname, ftype, fid) = iprot.readFieldBegin()
5321
      if ftype == TType.STOP:
5322
        break
5323
      if fid == 1:
5324
        if ftype == TType.STRUCT:
5325
          self.e = PurchaseServiceException()
5326
          self.e.read(iprot)
5327
        else:
5328
          iprot.skip(ftype)
5329
      else:
5330
        iprot.skip(ftype)
5331
      iprot.readFieldEnd()
5332
    iprot.readStructEnd()
5333
 
5334
  def write(self, oprot):
5335
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
5336
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
5337
      return
5338
    oprot.writeStructBegin('changeWarehouseForPO_result')
5339
    if self.e is not None:
5340
      oprot.writeFieldBegin('e', TType.STRUCT, 1)
5341
      self.e.write(oprot)
5342
      oprot.writeFieldEnd()
5343
    oprot.writeFieldStop()
5344
    oprot.writeStructEnd()
5345
 
5346
  def validate(self):
5347
    return
5348
 
5349
 
5350
  def __repr__(self):
5351
    L = ['%s=%r' % (key, value)
5352
      for key, value in self.__dict__.iteritems()]
5353
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
5354
 
5355
  def __eq__(self, other):
5356
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
5357
 
5358
  def __ne__(self, other):
5359
    return not (self == other)
9925 amar.kumar 5360
 
5361
class changePOStatus_args:
5362
  """
5363
  Attributes:
5364
   - id
5365
   - poStatus
5366
  """
5367
 
5368
  thrift_spec = (
5369
    None, # 0
5370
    (1, TType.I64, 'id', None, None, ), # 1
5371
    (2, TType.I32, 'poStatus', None, None, ), # 2
5372
  )
5373
 
5374
  def __init__(self, id=None, poStatus=None,):
5375
    self.id = id
5376
    self.poStatus = poStatus
5377
 
5378
  def read(self, iprot):
5379
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
5380
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
5381
      return
5382
    iprot.readStructBegin()
5383
    while True:
5384
      (fname, ftype, fid) = iprot.readFieldBegin()
5385
      if ftype == TType.STOP:
5386
        break
5387
      if fid == 1:
5388
        if ftype == TType.I64:
5389
          self.id = iprot.readI64();
5390
        else:
5391
          iprot.skip(ftype)
5392
      elif fid == 2:
5393
        if ftype == TType.I32:
5394
          self.poStatus = iprot.readI32();
5395
        else:
5396
          iprot.skip(ftype)
5397
      else:
5398
        iprot.skip(ftype)
5399
      iprot.readFieldEnd()
5400
    iprot.readStructEnd()
5401
 
5402
  def write(self, oprot):
5403
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
5404
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
5405
      return
5406
    oprot.writeStructBegin('changePOStatus_args')
5407
    if self.id is not None:
5408
      oprot.writeFieldBegin('id', TType.I64, 1)
5409
      oprot.writeI64(self.id)
5410
      oprot.writeFieldEnd()
5411
    if self.poStatus is not None:
5412
      oprot.writeFieldBegin('poStatus', TType.I32, 2)
5413
      oprot.writeI32(self.poStatus)
5414
      oprot.writeFieldEnd()
5415
    oprot.writeFieldStop()
5416
    oprot.writeStructEnd()
5417
 
5418
  def validate(self):
5419
    return
5420
 
5421
 
5422
  def __repr__(self):
5423
    L = ['%s=%r' % (key, value)
5424
      for key, value in self.__dict__.iteritems()]
5425
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
5426
 
5427
  def __eq__(self, other):
5428
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
5429
 
5430
  def __ne__(self, other):
5431
    return not (self == other)
5432
 
5433
class changePOStatus_result:
5434
  """
5435
  Attributes:
5436
   - e
5437
  """
5438
 
5439
  thrift_spec = (
5440
    None, # 0
5441
    (1, TType.STRUCT, 'e', (PurchaseServiceException, PurchaseServiceException.thrift_spec), None, ), # 1
5442
  )
5443
 
5444
  def __init__(self, e=None,):
5445
    self.e = e
5446
 
5447
  def read(self, iprot):
5448
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
5449
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
5450
      return
5451
    iprot.readStructBegin()
5452
    while True:
5453
      (fname, ftype, fid) = iprot.readFieldBegin()
5454
      if ftype == TType.STOP:
5455
        break
5456
      if fid == 1:
5457
        if ftype == TType.STRUCT:
5458
          self.e = PurchaseServiceException()
5459
          self.e.read(iprot)
5460
        else:
5461
          iprot.skip(ftype)
5462
      else:
5463
        iprot.skip(ftype)
5464
      iprot.readFieldEnd()
5465
    iprot.readStructEnd()
5466
 
5467
  def write(self, oprot):
5468
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
5469
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
5470
      return
5471
    oprot.writeStructBegin('changePOStatus_result')
5472
    if self.e is not None:
5473
      oprot.writeFieldBegin('e', TType.STRUCT, 1)
5474
      self.e.write(oprot)
5475
      oprot.writeFieldEnd()
5476
    oprot.writeFieldStop()
5477
    oprot.writeStructEnd()
5478
 
5479
  def validate(self):
5480
    return
5481
 
5482
 
5483
  def __repr__(self):
5484
    L = ['%s=%r' % (key, value)
5485
      for key, value in self.__dict__.iteritems()]
5486
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
5487
 
5488
  def __eq__(self, other):
5489
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
5490
 
5491
  def __ne__(self, other):
5492
    return not (self == other)