Subversion Repositories SmartDukaan

Rev

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

Rev 3451 Rev 3469
Line 567... Line 567...
567
     - orderId
567
     - orderId
568
     - weight
568
     - weight
569
    """
569
    """
570
    pass
570
    pass
571
 
571
 
-
 
572
  def changeItem(self, orderId, itemId):
-
 
573
    """
-
 
574
    Change the item to be shipped for this order. Also adjusts the reservation in the inventory accordingly.
-
 
575
    Currently, it also ensures that only a different color of the given item is shipped.
-
 
576
 
-
 
577
    Parameters:
-
 
578
     - orderId
-
 
579
     - itemId
-
 
580
    """
-
 
581
    pass
-
 
582
 
-
 
583
  def shiftToWarehouse(self, orderId, warehouseId):
-
 
584
    """
-
 
585
    Moves the given order to the given warehouse. Also adjusts the inventory reservations accordingly.
-
 
586
 
-
 
587
    Parameters:
-
 
588
     - orderId
-
 
589
     - warehouseId
-
 
590
    """
-
 
591
    pass
-
 
592
 
572
 
593
 
573
class Client(shop2020.thriftpy.generic.GenericService.Client, Iface):
594
class Client(shop2020.thriftpy.generic.GenericService.Client, Iface):
574
  def __init__(self, iprot, oprot=None):
595
  def __init__(self, iprot, oprot=None):
575
    shop2020.thriftpy.generic.GenericService.Client.__init__(self, iprot, oprot)
596
    shop2020.thriftpy.generic.GenericService.Client.__init__(self, iprot, oprot)
576
 
597
 
Line 2418... Line 2439...
2418
      return result.success
2439
      return result.success
2419
    if result.ex is not None:
2440
    if result.ex is not None:
2420
      raise result.ex
2441
      raise result.ex
2421
    raise TApplicationException(TApplicationException.MISSING_RESULT, "updateWeight failed: unknown result");
2442
    raise TApplicationException(TApplicationException.MISSING_RESULT, "updateWeight failed: unknown result");
2422
 
2443
 
-
 
2444
  def changeItem(self, orderId, itemId):
-
 
2445
    """
-
 
2446
    Change the item to be shipped for this order. Also adjusts the reservation in the inventory accordingly.
-
 
2447
    Currently, it also ensures that only a different color of the given item is shipped.
-
 
2448
 
-
 
2449
    Parameters:
-
 
2450
     - orderId
-
 
2451
     - itemId
-
 
2452
    """
-
 
2453
    self.send_changeItem(orderId, itemId)
-
 
2454
    return self.recv_changeItem()
-
 
2455
 
-
 
2456
  def send_changeItem(self, orderId, itemId):
-
 
2457
    self._oprot.writeMessageBegin('changeItem', TMessageType.CALL, self._seqid)
-
 
2458
    args = changeItem_args()
-
 
2459
    args.orderId = orderId
-
 
2460
    args.itemId = itemId
-
 
2461
    args.write(self._oprot)
-
 
2462
    self._oprot.writeMessageEnd()
-
 
2463
    self._oprot.trans.flush()
-
 
2464
 
-
 
2465
  def recv_changeItem(self, ):
-
 
2466
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
-
 
2467
    if mtype == TMessageType.EXCEPTION:
-
 
2468
      x = TApplicationException()
-
 
2469
      x.read(self._iprot)
-
 
2470
      self._iprot.readMessageEnd()
-
 
2471
      raise x
-
 
2472
    result = changeItem_result()
-
 
2473
    result.read(self._iprot)
-
 
2474
    self._iprot.readMessageEnd()
-
 
2475
    if result.success is not None:
-
 
2476
      return result.success
-
 
2477
    if result.ex is not None:
-
 
2478
      raise result.ex
-
 
2479
    raise TApplicationException(TApplicationException.MISSING_RESULT, "changeItem failed: unknown result");
-
 
2480
 
-
 
2481
  def shiftToWarehouse(self, orderId, warehouseId):
-
 
2482
    """
-
 
2483
    Moves the given order to the given warehouse. Also adjusts the inventory reservations accordingly.
-
 
2484
 
-
 
2485
    Parameters:
-
 
2486
     - orderId
-
 
2487
     - warehouseId
-
 
2488
    """
-
 
2489
    self.send_shiftToWarehouse(orderId, warehouseId)
-
 
2490
    return self.recv_shiftToWarehouse()
-
 
2491
 
-
 
2492
  def send_shiftToWarehouse(self, orderId, warehouseId):
-
 
2493
    self._oprot.writeMessageBegin('shiftToWarehouse', TMessageType.CALL, self._seqid)
-
 
2494
    args = shiftToWarehouse_args()
-
 
2495
    args.orderId = orderId
-
 
2496
    args.warehouseId = warehouseId
-
 
2497
    args.write(self._oprot)
-
 
2498
    self._oprot.writeMessageEnd()
-
 
2499
    self._oprot.trans.flush()
-
 
2500
 
-
 
2501
  def recv_shiftToWarehouse(self, ):
-
 
2502
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
-
 
2503
    if mtype == TMessageType.EXCEPTION:
-
 
2504
      x = TApplicationException()
-
 
2505
      x.read(self._iprot)
-
 
2506
      self._iprot.readMessageEnd()
-
 
2507
      raise x
-
 
2508
    result = shiftToWarehouse_result()
-
 
2509
    result.read(self._iprot)
-
 
2510
    self._iprot.readMessageEnd()
-
 
2511
    if result.success is not None:
-
 
2512
      return result.success
-
 
2513
    if result.ex is not None:
-
 
2514
      raise result.ex
-
 
2515
    raise TApplicationException(TApplicationException.MISSING_RESULT, "shiftToWarehouse failed: unknown result");
-
 
2516
 
2423
 
2517
 
2424
class Processor(shop2020.thriftpy.generic.GenericService.Processor, Iface, TProcessor):
2518
class Processor(shop2020.thriftpy.generic.GenericService.Processor, Iface, TProcessor):
2425
  def __init__(self, handler):
2519
  def __init__(self, handler):
2426
    shop2020.thriftpy.generic.GenericService.Processor.__init__(self, handler)
2520
    shop2020.thriftpy.generic.GenericService.Processor.__init__(self, handler)
2427
    self._processMap["createTransaction"] = Processor.process_createTransaction
2521
    self._processMap["createTransaction"] = Processor.process_createTransaction
Line 2473... Line 2567...
2473
    self._processMap["getReturnOrders"] = Processor.process_getReturnOrders
2567
    self._processMap["getReturnOrders"] = Processor.process_getReturnOrders
2474
    self._processMap["getReturnOrder"] = Processor.process_getReturnOrder
2568
    self._processMap["getReturnOrder"] = Processor.process_getReturnOrder
2475
    self._processMap["processReturn"] = Processor.process_processReturn
2569
    self._processMap["processReturn"] = Processor.process_processReturn
2476
    self._processMap["createPurchaseOrder"] = Processor.process_createPurchaseOrder
2570
    self._processMap["createPurchaseOrder"] = Processor.process_createPurchaseOrder
2477
    self._processMap["updateWeight"] = Processor.process_updateWeight
2571
    self._processMap["updateWeight"] = Processor.process_updateWeight
-
 
2572
    self._processMap["changeItem"] = Processor.process_changeItem
-
 
2573
    self._processMap["shiftToWarehouse"] = Processor.process_shiftToWarehouse
2478
 
2574
 
2479
  def process(self, iprot, oprot):
2575
  def process(self, iprot, oprot):
2480
    (name, type, seqid) = iprot.readMessageBegin()
2576
    (name, type, seqid) = iprot.readMessageBegin()
2481
    if name not in self._processMap:
2577
    if name not in self._processMap:
2482
      iprot.skip(TType.STRUCT)
2578
      iprot.skip(TType.STRUCT)
Line 3176... Line 3272...
3176
    oprot.writeMessageBegin("updateWeight", TMessageType.REPLY, seqid)
3272
    oprot.writeMessageBegin("updateWeight", TMessageType.REPLY, seqid)
3177
    result.write(oprot)
3273
    result.write(oprot)
3178
    oprot.writeMessageEnd()
3274
    oprot.writeMessageEnd()
3179
    oprot.trans.flush()
3275
    oprot.trans.flush()
3180
 
3276
 
-
 
3277
  def process_changeItem(self, seqid, iprot, oprot):
-
 
3278
    args = changeItem_args()
-
 
3279
    args.read(iprot)
-
 
3280
    iprot.readMessageEnd()
-
 
3281
    result = changeItem_result()
-
 
3282
    try:
-
 
3283
      result.success = self._handler.changeItem(args.orderId, args.itemId)
-
 
3284
    except TransactionServiceException, ex:
-
 
3285
      result.ex = ex
-
 
3286
    oprot.writeMessageBegin("changeItem", TMessageType.REPLY, seqid)
-
 
3287
    result.write(oprot)
-
 
3288
    oprot.writeMessageEnd()
-
 
3289
    oprot.trans.flush()
-
 
3290
 
-
 
3291
  def process_shiftToWarehouse(self, seqid, iprot, oprot):
-
 
3292
    args = shiftToWarehouse_args()
-
 
3293
    args.read(iprot)
-
 
3294
    iprot.readMessageEnd()
-
 
3295
    result = shiftToWarehouse_result()
-
 
3296
    try:
-
 
3297
      result.success = self._handler.shiftToWarehouse(args.orderId, args.warehouseId)
-
 
3298
    except TransactionServiceException, ex:
-
 
3299
      result.ex = ex
-
 
3300
    oprot.writeMessageBegin("shiftToWarehouse", TMessageType.REPLY, seqid)
-
 
3301
    result.write(oprot)
-
 
3302
    oprot.writeMessageEnd()
-
 
3303
    oprot.trans.flush()
-
 
3304
 
3181
 
3305
 
3182
# HELPER FUNCTIONS AND STRUCTURES
3306
# HELPER FUNCTIONS AND STRUCTURES
3183
 
3307
 
3184
class createTransaction_args:
3308
class createTransaction_args:
3185
  """
3309
  """
Line 10482... Line 10606...
10482
    if self.success is not None:
10606
    if self.success is not None:
10483
      oprot.writeFieldBegin('success', TType.STRUCT, 0)
10607
      oprot.writeFieldBegin('success', TType.STRUCT, 0)
10484
      self.success.write(oprot)
10608
      self.success.write(oprot)
10485
      oprot.writeFieldEnd()
10609
      oprot.writeFieldEnd()
10486
    if self.ex is not None:
10610
    if self.ex is not None:
-
 
10611
      oprot.writeFieldBegin('ex', TType.STRUCT, 1)
-
 
10612
      self.ex.write(oprot)
-
 
10613
      oprot.writeFieldEnd()
-
 
10614
    oprot.writeFieldStop()
-
 
10615
    oprot.writeStructEnd()
-
 
10616
 
-
 
10617
  def validate(self):
-
 
10618
    return
-
 
10619
 
-
 
10620
 
-
 
10621
  def __repr__(self):
-
 
10622
    L = ['%s=%r' % (key, value)
-
 
10623
      for key, value in self.__dict__.iteritems()]
-
 
10624
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
10625
 
-
 
10626
  def __eq__(self, other):
-
 
10627
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
10628
 
-
 
10629
  def __ne__(self, other):
-
 
10630
    return not (self == other)
-
 
10631
 
-
 
10632
class changeItem_args:
-
 
10633
  """
-
 
10634
  Attributes:
-
 
10635
   - orderId
-
 
10636
   - itemId
-
 
10637
  """
-
 
10638
 
-
 
10639
  thrift_spec = (
-
 
10640
    None, # 0
-
 
10641
    (1, TType.I64, 'orderId', None, None, ), # 1
-
 
10642
    (2, TType.I64, 'itemId', None, None, ), # 2
-
 
10643
  )
-
 
10644
 
-
 
10645
  def __init__(self, orderId=None, itemId=None,):
-
 
10646
    self.orderId = orderId
-
 
10647
    self.itemId = itemId
-
 
10648
 
-
 
10649
  def read(self, iprot):
-
 
10650
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
10651
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
10652
      return
-
 
10653
    iprot.readStructBegin()
-
 
10654
    while True:
-
 
10655
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
10656
      if ftype == TType.STOP:
-
 
10657
        break
-
 
10658
      if fid == 1:
-
 
10659
        if ftype == TType.I64:
-
 
10660
          self.orderId = iprot.readI64();
-
 
10661
        else:
-
 
10662
          iprot.skip(ftype)
-
 
10663
      elif fid == 2:
-
 
10664
        if ftype == TType.I64:
-
 
10665
          self.itemId = iprot.readI64();
-
 
10666
        else:
-
 
10667
          iprot.skip(ftype)
-
 
10668
      else:
-
 
10669
        iprot.skip(ftype)
-
 
10670
      iprot.readFieldEnd()
-
 
10671
    iprot.readStructEnd()
-
 
10672
 
-
 
10673
  def write(self, oprot):
-
 
10674
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
10675
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
10676
      return
-
 
10677
    oprot.writeStructBegin('changeItem_args')
-
 
10678
    if self.orderId is not None:
-
 
10679
      oprot.writeFieldBegin('orderId', TType.I64, 1)
-
 
10680
      oprot.writeI64(self.orderId)
-
 
10681
      oprot.writeFieldEnd()
-
 
10682
    if self.itemId is not None:
-
 
10683
      oprot.writeFieldBegin('itemId', TType.I64, 2)
-
 
10684
      oprot.writeI64(self.itemId)
-
 
10685
      oprot.writeFieldEnd()
-
 
10686
    oprot.writeFieldStop()
-
 
10687
    oprot.writeStructEnd()
-
 
10688
 
-
 
10689
  def validate(self):
-
 
10690
    return
-
 
10691
 
-
 
10692
 
-
 
10693
  def __repr__(self):
-
 
10694
    L = ['%s=%r' % (key, value)
-
 
10695
      for key, value in self.__dict__.iteritems()]
-
 
10696
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
10697
 
-
 
10698
  def __eq__(self, other):
-
 
10699
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
10700
 
-
 
10701
  def __ne__(self, other):
-
 
10702
    return not (self == other)
-
 
10703
 
-
 
10704
class changeItem_result:
-
 
10705
  """
-
 
10706
  Attributes:
-
 
10707
   - success
-
 
10708
   - ex
-
 
10709
  """
-
 
10710
 
-
 
10711
  thrift_spec = (
-
 
10712
    (0, TType.STRUCT, 'success', (Order, Order.thrift_spec), None, ), # 0
-
 
10713
    (1, TType.STRUCT, 'ex', (TransactionServiceException, TransactionServiceException.thrift_spec), None, ), # 1
-
 
10714
  )
-
 
10715
 
-
 
10716
  def __init__(self, success=None, ex=None,):
-
 
10717
    self.success = success
-
 
10718
    self.ex = ex
-
 
10719
 
-
 
10720
  def read(self, iprot):
-
 
10721
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
10722
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
10723
      return
-
 
10724
    iprot.readStructBegin()
-
 
10725
    while True:
-
 
10726
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
10727
      if ftype == TType.STOP:
-
 
10728
        break
-
 
10729
      if fid == 0:
-
 
10730
        if ftype == TType.STRUCT:
-
 
10731
          self.success = Order()
-
 
10732
          self.success.read(iprot)
-
 
10733
        else:
-
 
10734
          iprot.skip(ftype)
-
 
10735
      elif fid == 1:
-
 
10736
        if ftype == TType.STRUCT:
-
 
10737
          self.ex = TransactionServiceException()
-
 
10738
          self.ex.read(iprot)
-
 
10739
        else:
-
 
10740
          iprot.skip(ftype)
-
 
10741
      else:
-
 
10742
        iprot.skip(ftype)
-
 
10743
      iprot.readFieldEnd()
-
 
10744
    iprot.readStructEnd()
-
 
10745
 
-
 
10746
  def write(self, oprot):
-
 
10747
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
10748
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
10749
      return
-
 
10750
    oprot.writeStructBegin('changeItem_result')
-
 
10751
    if self.success is not None:
-
 
10752
      oprot.writeFieldBegin('success', TType.STRUCT, 0)
-
 
10753
      self.success.write(oprot)
-
 
10754
      oprot.writeFieldEnd()
-
 
10755
    if self.ex is not None:
-
 
10756
      oprot.writeFieldBegin('ex', TType.STRUCT, 1)
-
 
10757
      self.ex.write(oprot)
-
 
10758
      oprot.writeFieldEnd()
-
 
10759
    oprot.writeFieldStop()
-
 
10760
    oprot.writeStructEnd()
-
 
10761
 
-
 
10762
  def validate(self):
-
 
10763
    return
-
 
10764
 
-
 
10765
 
-
 
10766
  def __repr__(self):
-
 
10767
    L = ['%s=%r' % (key, value)
-
 
10768
      for key, value in self.__dict__.iteritems()]
-
 
10769
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
10770
 
-
 
10771
  def __eq__(self, other):
-
 
10772
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
10773
 
-
 
10774
  def __ne__(self, other):
-
 
10775
    return not (self == other)
-
 
10776
 
-
 
10777
class shiftToWarehouse_args:
-
 
10778
  """
-
 
10779
  Attributes:
-
 
10780
   - orderId
-
 
10781
   - warehouseId
-
 
10782
  """
-
 
10783
 
-
 
10784
  thrift_spec = (
-
 
10785
    None, # 0
-
 
10786
    (1, TType.I64, 'orderId', None, None, ), # 1
-
 
10787
    (2, TType.I64, 'warehouseId', None, None, ), # 2
-
 
10788
  )
-
 
10789
 
-
 
10790
  def __init__(self, orderId=None, warehouseId=None,):
-
 
10791
    self.orderId = orderId
-
 
10792
    self.warehouseId = warehouseId
-
 
10793
 
-
 
10794
  def read(self, iprot):
-
 
10795
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
10796
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
10797
      return
-
 
10798
    iprot.readStructBegin()
-
 
10799
    while True:
-
 
10800
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
10801
      if ftype == TType.STOP:
-
 
10802
        break
-
 
10803
      if fid == 1:
-
 
10804
        if ftype == TType.I64:
-
 
10805
          self.orderId = iprot.readI64();
-
 
10806
        else:
-
 
10807
          iprot.skip(ftype)
-
 
10808
      elif fid == 2:
-
 
10809
        if ftype == TType.I64:
-
 
10810
          self.warehouseId = iprot.readI64();
-
 
10811
        else:
-
 
10812
          iprot.skip(ftype)
-
 
10813
      else:
-
 
10814
        iprot.skip(ftype)
-
 
10815
      iprot.readFieldEnd()
-
 
10816
    iprot.readStructEnd()
-
 
10817
 
-
 
10818
  def write(self, oprot):
-
 
10819
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
10820
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
10821
      return
-
 
10822
    oprot.writeStructBegin('shiftToWarehouse_args')
-
 
10823
    if self.orderId is not None:
-
 
10824
      oprot.writeFieldBegin('orderId', TType.I64, 1)
-
 
10825
      oprot.writeI64(self.orderId)
-
 
10826
      oprot.writeFieldEnd()
-
 
10827
    if self.warehouseId is not None:
-
 
10828
      oprot.writeFieldBegin('warehouseId', TType.I64, 2)
-
 
10829
      oprot.writeI64(self.warehouseId)
-
 
10830
      oprot.writeFieldEnd()
-
 
10831
    oprot.writeFieldStop()
-
 
10832
    oprot.writeStructEnd()
-
 
10833
 
-
 
10834
  def validate(self):
-
 
10835
    return
-
 
10836
 
-
 
10837
 
-
 
10838
  def __repr__(self):
-
 
10839
    L = ['%s=%r' % (key, value)
-
 
10840
      for key, value in self.__dict__.iteritems()]
-
 
10841
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
10842
 
-
 
10843
  def __eq__(self, other):
-
 
10844
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
10845
 
-
 
10846
  def __ne__(self, other):
-
 
10847
    return not (self == other)
-
 
10848
 
-
 
10849
class shiftToWarehouse_result:
-
 
10850
  """
-
 
10851
  Attributes:
-
 
10852
   - success
-
 
10853
   - ex
-
 
10854
  """
-
 
10855
 
-
 
10856
  thrift_spec = (
-
 
10857
    (0, TType.STRUCT, 'success', (Order, Order.thrift_spec), None, ), # 0
-
 
10858
    (1, TType.STRUCT, 'ex', (TransactionServiceException, TransactionServiceException.thrift_spec), None, ), # 1
-
 
10859
  )
-
 
10860
 
-
 
10861
  def __init__(self, success=None, ex=None,):
-
 
10862
    self.success = success
-
 
10863
    self.ex = ex
-
 
10864
 
-
 
10865
  def read(self, iprot):
-
 
10866
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
10867
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
10868
      return
-
 
10869
    iprot.readStructBegin()
-
 
10870
    while True:
-
 
10871
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
10872
      if ftype == TType.STOP:
-
 
10873
        break
-
 
10874
      if fid == 0:
-
 
10875
        if ftype == TType.STRUCT:
-
 
10876
          self.success = Order()
-
 
10877
          self.success.read(iprot)
-
 
10878
        else:
-
 
10879
          iprot.skip(ftype)
-
 
10880
      elif fid == 1:
-
 
10881
        if ftype == TType.STRUCT:
-
 
10882
          self.ex = TransactionServiceException()
-
 
10883
          self.ex.read(iprot)
-
 
10884
        else:
-
 
10885
          iprot.skip(ftype)
-
 
10886
      else:
-
 
10887
        iprot.skip(ftype)
-
 
10888
      iprot.readFieldEnd()
-
 
10889
    iprot.readStructEnd()
-
 
10890
 
-
 
10891
  def write(self, oprot):
-
 
10892
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
10893
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
10894
      return
-
 
10895
    oprot.writeStructBegin('shiftToWarehouse_result')
-
 
10896
    if self.success is not None:
-
 
10897
      oprot.writeFieldBegin('success', TType.STRUCT, 0)
-
 
10898
      self.success.write(oprot)
-
 
10899
      oprot.writeFieldEnd()
-
 
10900
    if self.ex is not None:
10487
      oprot.writeFieldBegin('ex', TType.STRUCT, 1)
10901
      oprot.writeFieldBegin('ex', TType.STRUCT, 1)
10488
      self.ex.write(oprot)
10902
      self.ex.write(oprot)
10489
      oprot.writeFieldEnd()
10903
      oprot.writeFieldEnd()
10490
    oprot.writeFieldStop()
10904
    oprot.writeFieldStop()
10491
    oprot.writeStructEnd()
10905
    oprot.writeStructEnd()