Subversion Repositories SmartDukaan

Rev

Rev 4555 | Rev 5185 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 4555 Rev 4754
Line 93... Line 93...
93
    Parameters:
93
    Parameters:
94
     - purchaseId
94
     - purchaseId
95
    """
95
    """
96
    pass
96
    pass
97
 
97
 
-
 
98
  def getPendingPurchaseOrders(self, warehouseId):
-
 
99
    """
-
 
100
    Creates purchase order objects from pending orders
-
 
101
 
-
 
102
    Parameters:
-
 
103
     - warehouseId
-
 
104
    """
-
 
105
    pass
-
 
106
 
-
 
107
  def getSuppliers(self, ):
-
 
108
    """
-
 
109
    Returns all the valid suppliers
-
 
110
    """
-
 
111
    pass
-
 
112
 
-
 
113
  def fulfillPO(self, purchaseOrderId, itemId, quantity):
-
 
114
    """
-
 
115
    Fulfills a given purchase order with an item.
-
 
116
 
-
 
117
    Parameters:
-
 
118
     - purchaseOrderId
-
 
119
     - itemId
-
 
120
     - quantity
-
 
121
    """
-
 
122
    pass
-
 
123
 
-
 
124
  def updatePurchaseOrder(self, purchaseOrder):
-
 
125
    """
-
 
126
    Amends a PO as per the new lineitems passed
-
 
127
 
-
 
128
    Parameters:
-
 
129
     - purchaseOrder
-
 
130
    """
-
 
131
    pass
-
 
132
 
98
 
133
 
99
class Client(shop2020.thriftpy.generic.GenericService.Client, Iface):
134
class Client(shop2020.thriftpy.generic.GenericService.Client, Iface):
100
  def __init__(self, iprot, oprot=None):
135
  def __init__(self, iprot, oprot=None):
101
    shop2020.thriftpy.generic.GenericService.Client.__init__(self, iprot, oprot)
136
    shop2020.thriftpy.generic.GenericService.Client.__init__(self, iprot, oprot)
102
 
137
 
Line 377... Line 412...
377
    self._iprot.readMessageEnd()
412
    self._iprot.readMessageEnd()
378
    if result.success is not None:
413
    if result.success is not None:
379
      return result.success
414
      return result.success
380
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getPurchaseOrderForPurchase failed: unknown result");
415
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getPurchaseOrderForPurchase failed: unknown result");
381
 
416
 
-
 
417
  def getPendingPurchaseOrders(self, warehouseId):
-
 
418
    """
-
 
419
    Creates purchase order objects from pending orders
-
 
420
 
-
 
421
    Parameters:
-
 
422
     - warehouseId
-
 
423
    """
-
 
424
    self.send_getPendingPurchaseOrders(warehouseId)
-
 
425
    return self.recv_getPendingPurchaseOrders()
-
 
426
 
-
 
427
  def send_getPendingPurchaseOrders(self, warehouseId):
-
 
428
    self._oprot.writeMessageBegin('getPendingPurchaseOrders', TMessageType.CALL, self._seqid)
-
 
429
    args = getPendingPurchaseOrders_args()
-
 
430
    args.warehouseId = warehouseId
-
 
431
    args.write(self._oprot)
-
 
432
    self._oprot.writeMessageEnd()
-
 
433
    self._oprot.trans.flush()
-
 
434
 
-
 
435
  def recv_getPendingPurchaseOrders(self, ):
-
 
436
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
-
 
437
    if mtype == TMessageType.EXCEPTION:
-
 
438
      x = TApplicationException()
-
 
439
      x.read(self._iprot)
-
 
440
      self._iprot.readMessageEnd()
-
 
441
      raise x
-
 
442
    result = getPendingPurchaseOrders_result()
-
 
443
    result.read(self._iprot)
-
 
444
    self._iprot.readMessageEnd()
-
 
445
    if result.success is not None:
-
 
446
      return result.success
-
 
447
    if result.e is not None:
-
 
448
      raise result.e
-
 
449
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getPendingPurchaseOrders failed: unknown result");
-
 
450
 
-
 
451
  def getSuppliers(self, ):
-
 
452
    """
-
 
453
    Returns all the valid suppliers
-
 
454
    """
-
 
455
    self.send_getSuppliers()
-
 
456
    return self.recv_getSuppliers()
-
 
457
 
-
 
458
  def send_getSuppliers(self, ):
-
 
459
    self._oprot.writeMessageBegin('getSuppliers', TMessageType.CALL, self._seqid)
-
 
460
    args = getSuppliers_args()
-
 
461
    args.write(self._oprot)
-
 
462
    self._oprot.writeMessageEnd()
-
 
463
    self._oprot.trans.flush()
-
 
464
 
-
 
465
  def recv_getSuppliers(self, ):
-
 
466
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
-
 
467
    if mtype == TMessageType.EXCEPTION:
-
 
468
      x = TApplicationException()
-
 
469
      x.read(self._iprot)
-
 
470
      self._iprot.readMessageEnd()
-
 
471
      raise x
-
 
472
    result = getSuppliers_result()
-
 
473
    result.read(self._iprot)
-
 
474
    self._iprot.readMessageEnd()
-
 
475
    if result.success is not None:
-
 
476
      return result.success
-
 
477
    if result.e is not None:
-
 
478
      raise result.e
-
 
479
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getSuppliers failed: unknown result");
-
 
480
 
-
 
481
  def fulfillPO(self, purchaseOrderId, itemId, quantity):
-
 
482
    """
-
 
483
    Fulfills a given purchase order with an item.
-
 
484
 
-
 
485
    Parameters:
-
 
486
     - purchaseOrderId
-
 
487
     - itemId
-
 
488
     - quantity
-
 
489
    """
-
 
490
    self.send_fulfillPO(purchaseOrderId, itemId, quantity)
-
 
491
    self.recv_fulfillPO()
-
 
492
 
-
 
493
  def send_fulfillPO(self, purchaseOrderId, itemId, quantity):
-
 
494
    self._oprot.writeMessageBegin('fulfillPO', TMessageType.CALL, self._seqid)
-
 
495
    args = fulfillPO_args()
-
 
496
    args.purchaseOrderId = purchaseOrderId
-
 
497
    args.itemId = itemId
-
 
498
    args.quantity = quantity
-
 
499
    args.write(self._oprot)
-
 
500
    self._oprot.writeMessageEnd()
-
 
501
    self._oprot.trans.flush()
-
 
502
 
-
 
503
  def recv_fulfillPO(self, ):
-
 
504
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
-
 
505
    if mtype == TMessageType.EXCEPTION:
-
 
506
      x = TApplicationException()
-
 
507
      x.read(self._iprot)
-
 
508
      self._iprot.readMessageEnd()
-
 
509
      raise x
-
 
510
    result = fulfillPO_result()
-
 
511
    result.read(self._iprot)
-
 
512
    self._iprot.readMessageEnd()
-
 
513
    if result.e is not None:
-
 
514
      raise result.e
-
 
515
    return
-
 
516
 
-
 
517
  def updatePurchaseOrder(self, purchaseOrder):
-
 
518
    """
-
 
519
    Amends a PO as per the new lineitems passed
-
 
520
 
-
 
521
    Parameters:
-
 
522
     - purchaseOrder
-
 
523
    """
-
 
524
    self.send_updatePurchaseOrder(purchaseOrder)
-
 
525
    self.recv_updatePurchaseOrder()
-
 
526
 
-
 
527
  def send_updatePurchaseOrder(self, purchaseOrder):
-
 
528
    self._oprot.writeMessageBegin('updatePurchaseOrder', TMessageType.CALL, self._seqid)
-
 
529
    args = updatePurchaseOrder_args()
-
 
530
    args.purchaseOrder = purchaseOrder
-
 
531
    args.write(self._oprot)
-
 
532
    self._oprot.writeMessageEnd()
-
 
533
    self._oprot.trans.flush()
-
 
534
 
-
 
535
  def recv_updatePurchaseOrder(self, ):
-
 
536
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
-
 
537
    if mtype == TMessageType.EXCEPTION:
-
 
538
      x = TApplicationException()
-
 
539
      x.read(self._iprot)
-
 
540
      self._iprot.readMessageEnd()
-
 
541
      raise x
-
 
542
    result = updatePurchaseOrder_result()
-
 
543
    result.read(self._iprot)
-
 
544
    self._iprot.readMessageEnd()
-
 
545
    if result.e is not None:
-
 
546
      raise result.e
-
 
547
    return
-
 
548
 
382
 
549
 
383
class Processor(shop2020.thriftpy.generic.GenericService.Processor, Iface, TProcessor):
550
class Processor(shop2020.thriftpy.generic.GenericService.Processor, Iface, TProcessor):
384
  def __init__(self, handler):
551
  def __init__(self, handler):
385
    shop2020.thriftpy.generic.GenericService.Processor.__init__(self, handler)
552
    shop2020.thriftpy.generic.GenericService.Processor.__init__(self, handler)
386
    self._processMap["createPurchaseOrder"] = Processor.process_createPurchaseOrder
553
    self._processMap["createPurchaseOrder"] = Processor.process_createPurchaseOrder
Line 389... Line 556...
389
    self._processMap["getSupplier"] = Processor.process_getSupplier
556
    self._processMap["getSupplier"] = Processor.process_getSupplier
390
    self._processMap["startPurchase"] = Processor.process_startPurchase
557
    self._processMap["startPurchase"] = Processor.process_startPurchase
391
    self._processMap["closePurchase"] = Processor.process_closePurchase
558
    self._processMap["closePurchase"] = Processor.process_closePurchase
392
    self._processMap["getAllPurchases"] = Processor.process_getAllPurchases
559
    self._processMap["getAllPurchases"] = Processor.process_getAllPurchases
393
    self._processMap["getPurchaseOrderForPurchase"] = Processor.process_getPurchaseOrderForPurchase
560
    self._processMap["getPurchaseOrderForPurchase"] = Processor.process_getPurchaseOrderForPurchase
-
 
561
    self._processMap["getPendingPurchaseOrders"] = Processor.process_getPendingPurchaseOrders
-
 
562
    self._processMap["getSuppliers"] = Processor.process_getSuppliers
-
 
563
    self._processMap["fulfillPO"] = Processor.process_fulfillPO
-
 
564
    self._processMap["updatePurchaseOrder"] = Processor.process_updatePurchaseOrder
394
 
565
 
395
  def process(self, iprot, oprot):
566
  def process(self, iprot, oprot):
396
    (name, type, seqid) = iprot.readMessageBegin()
567
    (name, type, seqid) = iprot.readMessageBegin()
397
    if name not in self._processMap:
568
    if name not in self._processMap:
398
      iprot.skip(TType.STRUCT)
569
      iprot.skip(TType.STRUCT)
Line 514... Line 685...
514
    oprot.writeMessageBegin("getPurchaseOrderForPurchase", TMessageType.REPLY, seqid)
685
    oprot.writeMessageBegin("getPurchaseOrderForPurchase", TMessageType.REPLY, seqid)
515
    result.write(oprot)
686
    result.write(oprot)
516
    oprot.writeMessageEnd()
687
    oprot.writeMessageEnd()
517
    oprot.trans.flush()
688
    oprot.trans.flush()
518
 
689
 
-
 
690
  def process_getPendingPurchaseOrders(self, seqid, iprot, oprot):
-
 
691
    args = getPendingPurchaseOrders_args()
-
 
692
    args.read(iprot)
-
 
693
    iprot.readMessageEnd()
-
 
694
    result = getPendingPurchaseOrders_result()
-
 
695
    try:
-
 
696
      result.success = self._handler.getPendingPurchaseOrders(args.warehouseId)
-
 
697
    except PurchaseServiceException, e:
-
 
698
      result.e = e
-
 
699
    oprot.writeMessageBegin("getPendingPurchaseOrders", TMessageType.REPLY, seqid)
-
 
700
    result.write(oprot)
-
 
701
    oprot.writeMessageEnd()
-
 
702
    oprot.trans.flush()
-
 
703
 
-
 
704
  def process_getSuppliers(self, seqid, iprot, oprot):
-
 
705
    args = getSuppliers_args()
-
 
706
    args.read(iprot)
-
 
707
    iprot.readMessageEnd()
-
 
708
    result = getSuppliers_result()
-
 
709
    try:
-
 
710
      result.success = self._handler.getSuppliers()
-
 
711
    except PurchaseServiceException, e:
-
 
712
      result.e = e
-
 
713
    oprot.writeMessageBegin("getSuppliers", TMessageType.REPLY, seqid)
-
 
714
    result.write(oprot)
-
 
715
    oprot.writeMessageEnd()
-
 
716
    oprot.trans.flush()
-
 
717
 
-
 
718
  def process_fulfillPO(self, seqid, iprot, oprot):
-
 
719
    args = fulfillPO_args()
-
 
720
    args.read(iprot)
-
 
721
    iprot.readMessageEnd()
-
 
722
    result = fulfillPO_result()
-
 
723
    try:
-
 
724
      self._handler.fulfillPO(args.purchaseOrderId, args.itemId, args.quantity)
-
 
725
    except PurchaseServiceException, e:
-
 
726
      result.e = e
-
 
727
    oprot.writeMessageBegin("fulfillPO", TMessageType.REPLY, seqid)
-
 
728
    result.write(oprot)
-
 
729
    oprot.writeMessageEnd()
-
 
730
    oprot.trans.flush()
-
 
731
 
-
 
732
  def process_updatePurchaseOrder(self, seqid, iprot, oprot):
-
 
733
    args = updatePurchaseOrder_args()
-
 
734
    args.read(iprot)
-
 
735
    iprot.readMessageEnd()
-
 
736
    result = updatePurchaseOrder_result()
-
 
737
    try:
-
 
738
      self._handler.updatePurchaseOrder(args.purchaseOrder)
-
 
739
    except PurchaseServiceException, e:
-
 
740
      result.e = e
-
 
741
    oprot.writeMessageBegin("updatePurchaseOrder", TMessageType.REPLY, seqid)
-
 
742
    result.write(oprot)
-
 
743
    oprot.writeMessageEnd()
-
 
744
    oprot.trans.flush()
-
 
745
 
519
 
746
 
520
# HELPER FUNCTIONS AND STRUCTURES
747
# HELPER FUNCTIONS AND STRUCTURES
521
 
748
 
522
class createPurchaseOrder_args:
749
class createPurchaseOrder_args:
523
  """
750
  """
Line 1604... Line 1831...
1604
      oprot.writeFieldEnd()
1831
      oprot.writeFieldEnd()
1605
    oprot.writeFieldStop()
1832
    oprot.writeFieldStop()
1606
    oprot.writeStructEnd()
1833
    oprot.writeStructEnd()
1607
 
1834
 
1608
  def validate(self):
1835
  def validate(self):
-
 
1836
    return
-
 
1837
 
-
 
1838
 
-
 
1839
  def __repr__(self):
-
 
1840
    L = ['%s=%r' % (key, value)
-
 
1841
      for key, value in self.__dict__.iteritems()]
-
 
1842
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
1843
 
-
 
1844
  def __eq__(self, other):
-
 
1845
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
1846
 
-
 
1847
  def __ne__(self, other):
-
 
1848
    return not (self == other)
-
 
1849
 
-
 
1850
class getPendingPurchaseOrders_args:
-
 
1851
  """
-
 
1852
  Attributes:
-
 
1853
   - warehouseId
-
 
1854
  """
-
 
1855
 
-
 
1856
  thrift_spec = (
-
 
1857
    None, # 0
-
 
1858
    (1, TType.I64, 'warehouseId', None, None, ), # 1
-
 
1859
  )
-
 
1860
 
-
 
1861
  def __init__(self, warehouseId=None,):
-
 
1862
    self.warehouseId = warehouseId
-
 
1863
 
-
 
1864
  def read(self, iprot):
-
 
1865
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
1866
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
1867
      return
-
 
1868
    iprot.readStructBegin()
-
 
1869
    while True:
-
 
1870
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
1871
      if ftype == TType.STOP:
-
 
1872
        break
-
 
1873
      if fid == 1:
-
 
1874
        if ftype == TType.I64:
-
 
1875
          self.warehouseId = iprot.readI64();
-
 
1876
        else:
-
 
1877
          iprot.skip(ftype)
-
 
1878
      else:
-
 
1879
        iprot.skip(ftype)
-
 
1880
      iprot.readFieldEnd()
-
 
1881
    iprot.readStructEnd()
-
 
1882
 
-
 
1883
  def write(self, oprot):
-
 
1884
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
1885
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
1886
      return
-
 
1887
    oprot.writeStructBegin('getPendingPurchaseOrders_args')
-
 
1888
    if self.warehouseId is not None:
-
 
1889
      oprot.writeFieldBegin('warehouseId', TType.I64, 1)
-
 
1890
      oprot.writeI64(self.warehouseId)
-
 
1891
      oprot.writeFieldEnd()
-
 
1892
    oprot.writeFieldStop()
-
 
1893
    oprot.writeStructEnd()
-
 
1894
 
-
 
1895
  def validate(self):
-
 
1896
    return
-
 
1897
 
-
 
1898
 
-
 
1899
  def __repr__(self):
-
 
1900
    L = ['%s=%r' % (key, value)
-
 
1901
      for key, value in self.__dict__.iteritems()]
-
 
1902
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
1903
 
-
 
1904
  def __eq__(self, other):
-
 
1905
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
1906
 
-
 
1907
  def __ne__(self, other):
-
 
1908
    return not (self == other)
-
 
1909
 
-
 
1910
class getPendingPurchaseOrders_result:
-
 
1911
  """
-
 
1912
  Attributes:
-
 
1913
   - success
-
 
1914
   - e
-
 
1915
  """
-
 
1916
 
-
 
1917
  thrift_spec = (
-
 
1918
    (0, TType.LIST, 'success', (TType.STRUCT,(PurchaseOrder, PurchaseOrder.thrift_spec)), None, ), # 0
-
 
1919
    (1, TType.STRUCT, 'e', (PurchaseServiceException, PurchaseServiceException.thrift_spec), None, ), # 1
-
 
1920
  )
-
 
1921
 
-
 
1922
  def __init__(self, success=None, e=None,):
-
 
1923
    self.success = success
-
 
1924
    self.e = e
-
 
1925
 
-
 
1926
  def read(self, iprot):
-
 
1927
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
1928
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
1929
      return
-
 
1930
    iprot.readStructBegin()
-
 
1931
    while True:
-
 
1932
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
1933
      if ftype == TType.STOP:
-
 
1934
        break
-
 
1935
      if fid == 0:
-
 
1936
        if ftype == TType.LIST:
-
 
1937
          self.success = []
-
 
1938
          (_etype24, _size21) = iprot.readListBegin()
-
 
1939
          for _i25 in xrange(_size21):
-
 
1940
            _elem26 = PurchaseOrder()
-
 
1941
            _elem26.read(iprot)
-
 
1942
            self.success.append(_elem26)
-
 
1943
          iprot.readListEnd()
-
 
1944
        else:
-
 
1945
          iprot.skip(ftype)
-
 
1946
      elif fid == 1:
-
 
1947
        if ftype == TType.STRUCT:
-
 
1948
          self.e = PurchaseServiceException()
-
 
1949
          self.e.read(iprot)
-
 
1950
        else:
-
 
1951
          iprot.skip(ftype)
-
 
1952
      else:
-
 
1953
        iprot.skip(ftype)
-
 
1954
      iprot.readFieldEnd()
-
 
1955
    iprot.readStructEnd()
-
 
1956
 
-
 
1957
  def write(self, oprot):
-
 
1958
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
1959
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
1960
      return
-
 
1961
    oprot.writeStructBegin('getPendingPurchaseOrders_result')
-
 
1962
    if self.success is not None:
-
 
1963
      oprot.writeFieldBegin('success', TType.LIST, 0)
-
 
1964
      oprot.writeListBegin(TType.STRUCT, len(self.success))
-
 
1965
      for iter27 in self.success:
-
 
1966
        iter27.write(oprot)
-
 
1967
      oprot.writeListEnd()
-
 
1968
      oprot.writeFieldEnd()
-
 
1969
    if self.e is not None:
-
 
1970
      oprot.writeFieldBegin('e', TType.STRUCT, 1)
-
 
1971
      self.e.write(oprot)
-
 
1972
      oprot.writeFieldEnd()
-
 
1973
    oprot.writeFieldStop()
-
 
1974
    oprot.writeStructEnd()
-
 
1975
 
-
 
1976
  def validate(self):
-
 
1977
    return
-
 
1978
 
-
 
1979
 
-
 
1980
  def __repr__(self):
-
 
1981
    L = ['%s=%r' % (key, value)
-
 
1982
      for key, value in self.__dict__.iteritems()]
-
 
1983
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
1984
 
-
 
1985
  def __eq__(self, other):
-
 
1986
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
1987
 
-
 
1988
  def __ne__(self, other):
-
 
1989
    return not (self == other)
-
 
1990
 
-
 
1991
class getSuppliers_args:
-
 
1992
 
-
 
1993
  thrift_spec = (
-
 
1994
  )
-
 
1995
 
-
 
1996
  def read(self, iprot):
-
 
1997
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
1998
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
1999
      return
-
 
2000
    iprot.readStructBegin()
-
 
2001
    while True:
-
 
2002
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
2003
      if ftype == TType.STOP:
-
 
2004
        break
-
 
2005
      else:
-
 
2006
        iprot.skip(ftype)
-
 
2007
      iprot.readFieldEnd()
-
 
2008
    iprot.readStructEnd()
-
 
2009
 
-
 
2010
  def write(self, oprot):
-
 
2011
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
2012
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
2013
      return
-
 
2014
    oprot.writeStructBegin('getSuppliers_args')
-
 
2015
    oprot.writeFieldStop()
-
 
2016
    oprot.writeStructEnd()
-
 
2017
 
-
 
2018
  def validate(self):
-
 
2019
    return
-
 
2020
 
-
 
2021
 
-
 
2022
  def __repr__(self):
-
 
2023
    L = ['%s=%r' % (key, value)
-
 
2024
      for key, value in self.__dict__.iteritems()]
-
 
2025
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
2026
 
-
 
2027
  def __eq__(self, other):
-
 
2028
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
2029
 
-
 
2030
  def __ne__(self, other):
-
 
2031
    return not (self == other)
-
 
2032
 
-
 
2033
class getSuppliers_result:
-
 
2034
  """
-
 
2035
  Attributes:
-
 
2036
   - success
-
 
2037
   - e
-
 
2038
  """
-
 
2039
 
-
 
2040
  thrift_spec = (
-
 
2041
    (0, TType.LIST, 'success', (TType.STRUCT,(Supplier, Supplier.thrift_spec)), None, ), # 0
-
 
2042
    (1, TType.STRUCT, 'e', (PurchaseServiceException, PurchaseServiceException.thrift_spec), None, ), # 1
-
 
2043
  )
-
 
2044
 
-
 
2045
  def __init__(self, success=None, e=None,):
-
 
2046
    self.success = success
-
 
2047
    self.e = e
-
 
2048
 
-
 
2049
  def read(self, iprot):
-
 
2050
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
2051
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
2052
      return
-
 
2053
    iprot.readStructBegin()
-
 
2054
    while True:
-
 
2055
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
2056
      if ftype == TType.STOP:
-
 
2057
        break
-
 
2058
      if fid == 0:
-
 
2059
        if ftype == TType.LIST:
-
 
2060
          self.success = []
-
 
2061
          (_etype31, _size28) = iprot.readListBegin()
-
 
2062
          for _i32 in xrange(_size28):
-
 
2063
            _elem33 = Supplier()
-
 
2064
            _elem33.read(iprot)
-
 
2065
            self.success.append(_elem33)
-
 
2066
          iprot.readListEnd()
-
 
2067
        else:
-
 
2068
          iprot.skip(ftype)
-
 
2069
      elif fid == 1:
-
 
2070
        if ftype == TType.STRUCT:
-
 
2071
          self.e = PurchaseServiceException()
-
 
2072
          self.e.read(iprot)
-
 
2073
        else:
-
 
2074
          iprot.skip(ftype)
-
 
2075
      else:
-
 
2076
        iprot.skip(ftype)
-
 
2077
      iprot.readFieldEnd()
-
 
2078
    iprot.readStructEnd()
-
 
2079
 
-
 
2080
  def write(self, oprot):
-
 
2081
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
2082
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
2083
      return
-
 
2084
    oprot.writeStructBegin('getSuppliers_result')
-
 
2085
    if self.success is not None:
-
 
2086
      oprot.writeFieldBegin('success', TType.LIST, 0)
-
 
2087
      oprot.writeListBegin(TType.STRUCT, len(self.success))
-
 
2088
      for iter34 in self.success:
-
 
2089
        iter34.write(oprot)
-
 
2090
      oprot.writeListEnd()
-
 
2091
      oprot.writeFieldEnd()
-
 
2092
    if self.e is not None:
-
 
2093
      oprot.writeFieldBegin('e', TType.STRUCT, 1)
-
 
2094
      self.e.write(oprot)
-
 
2095
      oprot.writeFieldEnd()
-
 
2096
    oprot.writeFieldStop()
-
 
2097
    oprot.writeStructEnd()
-
 
2098
 
-
 
2099
  def validate(self):
-
 
2100
    return
-
 
2101
 
-
 
2102
 
-
 
2103
  def __repr__(self):
-
 
2104
    L = ['%s=%r' % (key, value)
-
 
2105
      for key, value in self.__dict__.iteritems()]
-
 
2106
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
2107
 
-
 
2108
  def __eq__(self, other):
-
 
2109
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
2110
 
-
 
2111
  def __ne__(self, other):
-
 
2112
    return not (self == other)
-
 
2113
 
-
 
2114
class fulfillPO_args:
-
 
2115
  """
-
 
2116
  Attributes:
-
 
2117
   - purchaseOrderId
-
 
2118
   - itemId
-
 
2119
   - quantity
-
 
2120
  """
-
 
2121
 
-
 
2122
  thrift_spec = (
-
 
2123
    None, # 0
-
 
2124
    (1, TType.I64, 'purchaseOrderId', None, None, ), # 1
-
 
2125
    (2, TType.I64, 'itemId', None, None, ), # 2
-
 
2126
    (3, TType.I64, 'quantity', None, None, ), # 3
-
 
2127
  )
-
 
2128
 
-
 
2129
  def __init__(self, purchaseOrderId=None, itemId=None, quantity=None,):
-
 
2130
    self.purchaseOrderId = purchaseOrderId
-
 
2131
    self.itemId = itemId
-
 
2132
    self.quantity = quantity
-
 
2133
 
-
 
2134
  def read(self, iprot):
-
 
2135
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
2136
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
2137
      return
-
 
2138
    iprot.readStructBegin()
-
 
2139
    while True:
-
 
2140
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
2141
      if ftype == TType.STOP:
-
 
2142
        break
-
 
2143
      if fid == 1:
-
 
2144
        if ftype == TType.I64:
-
 
2145
          self.purchaseOrderId = iprot.readI64();
-
 
2146
        else:
-
 
2147
          iprot.skip(ftype)
-
 
2148
      elif fid == 2:
-
 
2149
        if ftype == TType.I64:
-
 
2150
          self.itemId = iprot.readI64();
-
 
2151
        else:
-
 
2152
          iprot.skip(ftype)
-
 
2153
      elif fid == 3:
-
 
2154
        if ftype == TType.I64:
-
 
2155
          self.quantity = iprot.readI64();
-
 
2156
        else:
-
 
2157
          iprot.skip(ftype)
-
 
2158
      else:
-
 
2159
        iprot.skip(ftype)
-
 
2160
      iprot.readFieldEnd()
-
 
2161
    iprot.readStructEnd()
-
 
2162
 
-
 
2163
  def write(self, oprot):
-
 
2164
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
2165
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
2166
      return
-
 
2167
    oprot.writeStructBegin('fulfillPO_args')
-
 
2168
    if self.purchaseOrderId is not None:
-
 
2169
      oprot.writeFieldBegin('purchaseOrderId', TType.I64, 1)
-
 
2170
      oprot.writeI64(self.purchaseOrderId)
-
 
2171
      oprot.writeFieldEnd()
-
 
2172
    if self.itemId is not None:
-
 
2173
      oprot.writeFieldBegin('itemId', TType.I64, 2)
-
 
2174
      oprot.writeI64(self.itemId)
-
 
2175
      oprot.writeFieldEnd()
-
 
2176
    if self.quantity is not None:
-
 
2177
      oprot.writeFieldBegin('quantity', TType.I64, 3)
-
 
2178
      oprot.writeI64(self.quantity)
-
 
2179
      oprot.writeFieldEnd()
-
 
2180
    oprot.writeFieldStop()
-
 
2181
    oprot.writeStructEnd()
-
 
2182
 
-
 
2183
  def validate(self):
-
 
2184
    return
-
 
2185
 
-
 
2186
 
-
 
2187
  def __repr__(self):
-
 
2188
    L = ['%s=%r' % (key, value)
-
 
2189
      for key, value in self.__dict__.iteritems()]
-
 
2190
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
2191
 
-
 
2192
  def __eq__(self, other):
-
 
2193
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
2194
 
-
 
2195
  def __ne__(self, other):
-
 
2196
    return not (self == other)
-
 
2197
 
-
 
2198
class fulfillPO_result:
-
 
2199
  """
-
 
2200
  Attributes:
-
 
2201
   - e
-
 
2202
  """
-
 
2203
 
-
 
2204
  thrift_spec = (
-
 
2205
    None, # 0
-
 
2206
    (1, TType.STRUCT, 'e', (PurchaseServiceException, PurchaseServiceException.thrift_spec), None, ), # 1
-
 
2207
  )
-
 
2208
 
-
 
2209
  def __init__(self, e=None,):
-
 
2210
    self.e = e
-
 
2211
 
-
 
2212
  def read(self, iprot):
-
 
2213
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
2214
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
2215
      return
-
 
2216
    iprot.readStructBegin()
-
 
2217
    while True:
-
 
2218
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
2219
      if ftype == TType.STOP:
-
 
2220
        break
-
 
2221
      if fid == 1:
-
 
2222
        if ftype == TType.STRUCT:
-
 
2223
          self.e = PurchaseServiceException()
-
 
2224
          self.e.read(iprot)
-
 
2225
        else:
-
 
2226
          iprot.skip(ftype)
-
 
2227
      else:
-
 
2228
        iprot.skip(ftype)
-
 
2229
      iprot.readFieldEnd()
-
 
2230
    iprot.readStructEnd()
-
 
2231
 
-
 
2232
  def write(self, oprot):
-
 
2233
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
2234
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
2235
      return
-
 
2236
    oprot.writeStructBegin('fulfillPO_result')
-
 
2237
    if self.e is not None:
-
 
2238
      oprot.writeFieldBegin('e', TType.STRUCT, 1)
-
 
2239
      self.e.write(oprot)
-
 
2240
      oprot.writeFieldEnd()
-
 
2241
    oprot.writeFieldStop()
-
 
2242
    oprot.writeStructEnd()
-
 
2243
 
-
 
2244
  def validate(self):
-
 
2245
    return
-
 
2246
 
-
 
2247
 
-
 
2248
  def __repr__(self):
-
 
2249
    L = ['%s=%r' % (key, value)
-
 
2250
      for key, value in self.__dict__.iteritems()]
-
 
2251
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
2252
 
-
 
2253
  def __eq__(self, other):
-
 
2254
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
2255
 
-
 
2256
  def __ne__(self, other):
-
 
2257
    return not (self == other)
-
 
2258
 
-
 
2259
class updatePurchaseOrder_args:
-
 
2260
  """
-
 
2261
  Attributes:
-
 
2262
   - purchaseOrder
-
 
2263
  """
-
 
2264
 
-
 
2265
  thrift_spec = (
-
 
2266
    None, # 0
-
 
2267
    (1, TType.STRUCT, 'purchaseOrder', (PurchaseOrder, PurchaseOrder.thrift_spec), None, ), # 1
-
 
2268
  )
-
 
2269
 
-
 
2270
  def __init__(self, purchaseOrder=None,):
-
 
2271
    self.purchaseOrder = purchaseOrder
-
 
2272
 
-
 
2273
  def read(self, iprot):
-
 
2274
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
2275
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
2276
      return
-
 
2277
    iprot.readStructBegin()
-
 
2278
    while True:
-
 
2279
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
2280
      if ftype == TType.STOP:
-
 
2281
        break
-
 
2282
      if fid == 1:
-
 
2283
        if ftype == TType.STRUCT:
-
 
2284
          self.purchaseOrder = PurchaseOrder()
-
 
2285
          self.purchaseOrder.read(iprot)
-
 
2286
        else:
-
 
2287
          iprot.skip(ftype)
-
 
2288
      else:
-
 
2289
        iprot.skip(ftype)
-
 
2290
      iprot.readFieldEnd()
-
 
2291
    iprot.readStructEnd()
-
 
2292
 
-
 
2293
  def write(self, oprot):
-
 
2294
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
2295
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
2296
      return
-
 
2297
    oprot.writeStructBegin('updatePurchaseOrder_args')
-
 
2298
    if self.purchaseOrder is not None:
-
 
2299
      oprot.writeFieldBegin('purchaseOrder', TType.STRUCT, 1)
-
 
2300
      self.purchaseOrder.write(oprot)
-
 
2301
      oprot.writeFieldEnd()
-
 
2302
    oprot.writeFieldStop()
-
 
2303
    oprot.writeStructEnd()
-
 
2304
 
-
 
2305
  def validate(self):
-
 
2306
    return
-
 
2307
 
-
 
2308
 
-
 
2309
  def __repr__(self):
-
 
2310
    L = ['%s=%r' % (key, value)
-
 
2311
      for key, value in self.__dict__.iteritems()]
-
 
2312
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
2313
 
-
 
2314
  def __eq__(self, other):
-
 
2315
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
2316
 
-
 
2317
  def __ne__(self, other):
-
 
2318
    return not (self == other)
-
 
2319
 
-
 
2320
class updatePurchaseOrder_result:
-
 
2321
  """
-
 
2322
  Attributes:
-
 
2323
   - e
-
 
2324
  """
-
 
2325
 
-
 
2326
  thrift_spec = (
-
 
2327
    None, # 0
-
 
2328
    (1, TType.STRUCT, 'e', (PurchaseServiceException, PurchaseServiceException.thrift_spec), None, ), # 1
-
 
2329
  )
-
 
2330
 
-
 
2331
  def __init__(self, e=None,):
-
 
2332
    self.e = e
-
 
2333
 
-
 
2334
  def read(self, iprot):
-
 
2335
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
2336
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
2337
      return
-
 
2338
    iprot.readStructBegin()
-
 
2339
    while True:
-
 
2340
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
2341
      if ftype == TType.STOP:
-
 
2342
        break
-
 
2343
      if fid == 1:
-
 
2344
        if ftype == TType.STRUCT:
-
 
2345
          self.e = PurchaseServiceException()
-
 
2346
          self.e.read(iprot)
-
 
2347
        else:
-
 
2348
          iprot.skip(ftype)
-
 
2349
      else:
-
 
2350
        iprot.skip(ftype)
-
 
2351
      iprot.readFieldEnd()
-
 
2352
    iprot.readStructEnd()
-
 
2353
 
-
 
2354
  def write(self, oprot):
-
 
2355
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
2356
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
2357
      return
-
 
2358
    oprot.writeStructBegin('updatePurchaseOrder_result')
-
 
2359
    if self.e is not None:
-
 
2360
      oprot.writeFieldBegin('e', TType.STRUCT, 1)
-
 
2361
      self.e.write(oprot)
-
 
2362
      oprot.writeFieldEnd()
-
 
2363
    oprot.writeFieldStop()
-
 
2364
    oprot.writeStructEnd()
-
 
2365
 
-
 
2366
  def validate(self):
1609
    return
2367
    return
1610
 
2368
 
1611
 
2369
 
1612
  def __repr__(self):
2370
  def __repr__(self):
1613
    L = ['%s=%r' % (key, value)
2371
    L = ['%s=%r' % (key, value)