Subversion Repositories SmartDukaan

Rev

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

Rev 5553 Rev 5719
Line 140... Line 140...
140
    Parameters:
140
    Parameters:
141
     - storeId
141
     - storeId
142
    """
142
    """
143
    pass
143
    pass
144
 
144
 
-
 
145
  def getPickupStoreByHotspotId(self, hotspotId):
-
 
146
    """
-
 
147
    Parameters:
-
 
148
     - hotspotId
-
 
149
    """
-
 
150
    pass
-
 
151
 
145
 
152
 
146
class Client(shop2020.thriftpy.generic.GenericService.Client, Iface):
153
class Client(shop2020.thriftpy.generic.GenericService.Client, Iface):
147
  def __init__(self, iprot, oprot=None):
154
  def __init__(self, iprot, oprot=None):
148
    shop2020.thriftpy.generic.GenericService.Client.__init__(self, iprot, oprot)
155
    shop2020.thriftpy.generic.GenericService.Client.__init__(self, iprot, oprot)
149
 
156
 
Line 594... Line 601...
594
    self._iprot.readMessageEnd()
601
    self._iprot.readMessageEnd()
595
    if result.success is not None:
602
    if result.success is not None:
596
      return result.success
603
      return result.success
597
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getPickupStore failed: unknown result");
604
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getPickupStore failed: unknown result");
598
 
605
 
-
 
606
  def getPickupStoreByHotspotId(self, hotspotId):
-
 
607
    """
-
 
608
    Parameters:
-
 
609
     - hotspotId
-
 
610
    """
-
 
611
    self.send_getPickupStoreByHotspotId(hotspotId)
-
 
612
    return self.recv_getPickupStoreByHotspotId()
-
 
613
 
-
 
614
  def send_getPickupStoreByHotspotId(self, hotspotId):
-
 
615
    self._oprot.writeMessageBegin('getPickupStoreByHotspotId', TMessageType.CALL, self._seqid)
-
 
616
    args = getPickupStoreByHotspotId_args()
-
 
617
    args.hotspotId = hotspotId
-
 
618
    args.write(self._oprot)
-
 
619
    self._oprot.writeMessageEnd()
-
 
620
    self._oprot.trans.flush()
-
 
621
 
-
 
622
  def recv_getPickupStoreByHotspotId(self, ):
-
 
623
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
-
 
624
    if mtype == TMessageType.EXCEPTION:
-
 
625
      x = TApplicationException()
-
 
626
      x.read(self._iprot)
-
 
627
      self._iprot.readMessageEnd()
-
 
628
      raise x
-
 
629
    result = getPickupStoreByHotspotId_result()
-
 
630
    result.read(self._iprot)
-
 
631
    self._iprot.readMessageEnd()
-
 
632
    if result.success is not None:
-
 
633
      return result.success
-
 
634
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getPickupStoreByHotspotId failed: unknown result");
-
 
635
 
599
 
636
 
600
class Processor(shop2020.thriftpy.generic.GenericService.Processor, Iface, TProcessor):
637
class Processor(shop2020.thriftpy.generic.GenericService.Processor, Iface, TProcessor):
601
  def __init__(self, handler):
638
  def __init__(self, handler):
602
    shop2020.thriftpy.generic.GenericService.Processor.__init__(self, handler)
639
    shop2020.thriftpy.generic.GenericService.Processor.__init__(self, handler)
603
    self._processMap["getProvider"] = Processor.process_getProvider
640
    self._processMap["getProvider"] = Processor.process_getProvider
Line 611... Line 648...
611
    self._processMap["getHolidays"] = Processor.process_getHolidays
648
    self._processMap["getHolidays"] = Processor.process_getHolidays
612
    self._processMap["getEntityLogisticsEstimation"] = Processor.process_getEntityLogisticsEstimation
649
    self._processMap["getEntityLogisticsEstimation"] = Processor.process_getEntityLogisticsEstimation
613
    self._processMap["getProviderForPickupType"] = Processor.process_getProviderForPickupType
650
    self._processMap["getProviderForPickupType"] = Processor.process_getProviderForPickupType
614
    self._processMap["getAllPickupStores"] = Processor.process_getAllPickupStores
651
    self._processMap["getAllPickupStores"] = Processor.process_getAllPickupStores
615
    self._processMap["getPickupStore"] = Processor.process_getPickupStore
652
    self._processMap["getPickupStore"] = Processor.process_getPickupStore
-
 
653
    self._processMap["getPickupStoreByHotspotId"] = Processor.process_getPickupStoreByHotspotId
616
 
654
 
617
  def process(self, iprot, oprot):
655
  def process(self, iprot, oprot):
618
    (name, type, seqid) = iprot.readMessageBegin()
656
    (name, type, seqid) = iprot.readMessageBegin()
619
    if name not in self._processMap:
657
    if name not in self._processMap:
620
      iprot.skip(TType.STRUCT)
658
      iprot.skip(TType.STRUCT)
Line 794... Line 832...
794
    oprot.writeMessageBegin("getPickupStore", TMessageType.REPLY, seqid)
832
    oprot.writeMessageBegin("getPickupStore", TMessageType.REPLY, seqid)
795
    result.write(oprot)
833
    result.write(oprot)
796
    oprot.writeMessageEnd()
834
    oprot.writeMessageEnd()
797
    oprot.trans.flush()
835
    oprot.trans.flush()
798
 
836
 
-
 
837
  def process_getPickupStoreByHotspotId(self, seqid, iprot, oprot):
-
 
838
    args = getPickupStoreByHotspotId_args()
-
 
839
    args.read(iprot)
-
 
840
    iprot.readMessageEnd()
-
 
841
    result = getPickupStoreByHotspotId_result()
-
 
842
    result.success = self._handler.getPickupStoreByHotspotId(args.hotspotId)
-
 
843
    oprot.writeMessageBegin("getPickupStoreByHotspotId", TMessageType.REPLY, seqid)
-
 
844
    result.write(oprot)
-
 
845
    oprot.writeMessageEnd()
-
 
846
    oprot.trans.flush()
-
 
847
 
799
 
848
 
800
# HELPER FUNCTIONS AND STRUCTURES
849
# HELPER FUNCTIONS AND STRUCTURES
801
 
850
 
802
class getProvider_args:
851
class getProvider_args:
803
  """
852
  """
Line 2569... Line 2618...
2569
    if self.success is not None:
2618
    if self.success is not None:
2570
      oprot.writeFieldBegin('success', TType.STRUCT, 0)
2619
      oprot.writeFieldBegin('success', TType.STRUCT, 0)
2571
      self.success.write(oprot)
2620
      self.success.write(oprot)
2572
      oprot.writeFieldEnd()
2621
      oprot.writeFieldEnd()
2573
    oprot.writeFieldStop()
2622
    oprot.writeFieldStop()
-
 
2623
    oprot.writeStructEnd()
-
 
2624
 
-
 
2625
  def validate(self):
-
 
2626
    return
-
 
2627
 
-
 
2628
 
-
 
2629
  def __repr__(self):
-
 
2630
    L = ['%s=%r' % (key, value)
-
 
2631
      for key, value in self.__dict__.iteritems()]
-
 
2632
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
2633
 
-
 
2634
  def __eq__(self, other):
-
 
2635
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
2636
 
-
 
2637
  def __ne__(self, other):
-
 
2638
    return not (self == other)
-
 
2639
 
-
 
2640
class getPickupStoreByHotspotId_args:
-
 
2641
  """
-
 
2642
  Attributes:
-
 
2643
   - hotspotId
-
 
2644
  """
-
 
2645
 
-
 
2646
  thrift_spec = (
-
 
2647
    None, # 0
-
 
2648
    (1, TType.STRING, 'hotspotId', None, None, ), # 1
-
 
2649
  )
-
 
2650
 
-
 
2651
  def __init__(self, hotspotId=None,):
-
 
2652
    self.hotspotId = hotspotId
-
 
2653
 
-
 
2654
  def read(self, iprot):
-
 
2655
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
2656
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
2657
      return
-
 
2658
    iprot.readStructBegin()
-
 
2659
    while True:
-
 
2660
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
2661
      if ftype == TType.STOP:
-
 
2662
        break
-
 
2663
      if fid == 1:
-
 
2664
        if ftype == TType.STRING:
-
 
2665
          self.hotspotId = iprot.readString();
-
 
2666
        else:
-
 
2667
          iprot.skip(ftype)
-
 
2668
      else:
-
 
2669
        iprot.skip(ftype)
-
 
2670
      iprot.readFieldEnd()
-
 
2671
    iprot.readStructEnd()
-
 
2672
 
-
 
2673
  def write(self, oprot):
-
 
2674
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
2675
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
2676
      return
-
 
2677
    oprot.writeStructBegin('getPickupStoreByHotspotId_args')
-
 
2678
    if self.hotspotId is not None:
-
 
2679
      oprot.writeFieldBegin('hotspotId', TType.STRING, 1)
-
 
2680
      oprot.writeString(self.hotspotId)
-
 
2681
      oprot.writeFieldEnd()
-
 
2682
    oprot.writeFieldStop()
-
 
2683
    oprot.writeStructEnd()
-
 
2684
 
-
 
2685
  def validate(self):
-
 
2686
    return
-
 
2687
 
-
 
2688
 
-
 
2689
  def __repr__(self):
-
 
2690
    L = ['%s=%r' % (key, value)
-
 
2691
      for key, value in self.__dict__.iteritems()]
-
 
2692
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
2693
 
-
 
2694
  def __eq__(self, other):
-
 
2695
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
2696
 
-
 
2697
  def __ne__(self, other):
-
 
2698
    return not (self == other)
-
 
2699
 
-
 
2700
class getPickupStoreByHotspotId_result:
-
 
2701
  """
-
 
2702
  Attributes:
-
 
2703
   - success
-
 
2704
  """
-
 
2705
 
-
 
2706
  thrift_spec = (
-
 
2707
    (0, TType.STRUCT, 'success', (PickupStore, PickupStore.thrift_spec), None, ), # 0
-
 
2708
  )
-
 
2709
 
-
 
2710
  def __init__(self, success=None,):
-
 
2711
    self.success = success
-
 
2712
 
-
 
2713
  def read(self, iprot):
-
 
2714
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
2715
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
2716
      return
-
 
2717
    iprot.readStructBegin()
-
 
2718
    while True:
-
 
2719
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
2720
      if ftype == TType.STOP:
-
 
2721
        break
-
 
2722
      if fid == 0:
-
 
2723
        if ftype == TType.STRUCT:
-
 
2724
          self.success = PickupStore()
-
 
2725
          self.success.read(iprot)
-
 
2726
        else:
-
 
2727
          iprot.skip(ftype)
-
 
2728
      else:
-
 
2729
        iprot.skip(ftype)
-
 
2730
      iprot.readFieldEnd()
-
 
2731
    iprot.readStructEnd()
-
 
2732
 
-
 
2733
  def write(self, oprot):
-
 
2734
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
2735
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
2736
      return
-
 
2737
    oprot.writeStructBegin('getPickupStoreByHotspotId_result')
-
 
2738
    if self.success is not None:
-
 
2739
      oprot.writeFieldBegin('success', TType.STRUCT, 0)
-
 
2740
      self.success.write(oprot)
-
 
2741
      oprot.writeFieldEnd()
-
 
2742
    oprot.writeFieldStop()
2574
    oprot.writeStructEnd()
2743
    oprot.writeStructEnd()
2575
 
2744
 
2576
  def validate(self):
2745
  def validate(self):
2577
    return
2746
    return
2578
 
2747