Subversion Repositories SmartDukaan

Rev

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

Rev 7256 Rev 7567
Line 190... Line 190...
190
     - cod
190
     - cod
191
     - otgAvailable
191
     - otgAvailable
192
    """
192
    """
193
    pass
193
    pass
194
 
194
 
-
 
195
  def addNewAwbs(self, providerId, cod, awbs):
-
 
196
    """
-
 
197
    Parameters:
-
 
198
     - providerId
-
 
199
     - cod
-
 
200
     - awbs
-
 
201
    """
-
 
202
    pass
-
 
203
 
195
 
204
 
196
class Client(shop2020.thriftpy.generic.GenericService.Client, Iface):
205
class Client(shop2020.thriftpy.generic.GenericService.Client, Iface):
197
  def __init__(self, iprot, oprot=None):
206
  def __init__(self, iprot, oprot=None):
198
    shop2020.thriftpy.generic.GenericService.Client.__init__(self, iprot, oprot)
207
    shop2020.thriftpy.generic.GenericService.Client.__init__(self, iprot, oprot)
199
 
208
 
Line 820... Line 829...
820
    result = updatePincode_result()
829
    result = updatePincode_result()
821
    result.read(self._iprot)
830
    result.read(self._iprot)
822
    self._iprot.readMessageEnd()
831
    self._iprot.readMessageEnd()
823
    return
832
    return
824
 
833
 
-
 
834
  def addNewAwbs(self, providerId, cod, awbs):
-
 
835
    """
-
 
836
    Parameters:
-
 
837
     - providerId
-
 
838
     - cod
-
 
839
     - awbs
-
 
840
    """
-
 
841
    self.send_addNewAwbs(providerId, cod, awbs)
-
 
842
    return self.recv_addNewAwbs()
-
 
843
 
-
 
844
  def send_addNewAwbs(self, providerId, cod, awbs):
-
 
845
    self._oprot.writeMessageBegin('addNewAwbs', TMessageType.CALL, self._seqid)
-
 
846
    args = addNewAwbs_args()
-
 
847
    args.providerId = providerId
-
 
848
    args.cod = cod
-
 
849
    args.awbs = awbs
-
 
850
    args.write(self._oprot)
-
 
851
    self._oprot.writeMessageEnd()
-
 
852
    self._oprot.trans.flush()
-
 
853
 
-
 
854
  def recv_addNewAwbs(self, ):
-
 
855
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
-
 
856
    if mtype == TMessageType.EXCEPTION:
-
 
857
      x = TApplicationException()
-
 
858
      x.read(self._iprot)
-
 
859
      self._iprot.readMessageEnd()
-
 
860
      raise x
-
 
861
    result = addNewAwbs_result()
-
 
862
    result.read(self._iprot)
-
 
863
    self._iprot.readMessageEnd()
-
 
864
    if result.success is not None:
-
 
865
      return result.success
-
 
866
    raise TApplicationException(TApplicationException.MISSING_RESULT, "addNewAwbs failed: unknown result");
-
 
867
 
825
 
868
 
826
class Processor(shop2020.thriftpy.generic.GenericService.Processor, Iface, TProcessor):
869
class Processor(shop2020.thriftpy.generic.GenericService.Processor, Iface, TProcessor):
827
  def __init__(self, handler):
870
  def __init__(self, handler):
828
    shop2020.thriftpy.generic.GenericService.Processor.__init__(self, handler)
871
    shop2020.thriftpy.generic.GenericService.Processor.__init__(self, handler)
829
    self._processMap["getProvider"] = Processor.process_getProvider
872
    self._processMap["getProvider"] = Processor.process_getProvider
Line 842... Line 885...
842
    self._processMap["getAllPickupStores"] = Processor.process_getAllPickupStores
885
    self._processMap["getAllPickupStores"] = Processor.process_getAllPickupStores
843
    self._processMap["getPickupStore"] = Processor.process_getPickupStore
886
    self._processMap["getPickupStore"] = Processor.process_getPickupStore
844
    self._processMap["getPickupStoreByHotspotId"] = Processor.process_getPickupStoreByHotspotId
887
    self._processMap["getPickupStoreByHotspotId"] = Processor.process_getPickupStoreByHotspotId
845
    self._processMap["addPincode"] = Processor.process_addPincode
888
    self._processMap["addPincode"] = Processor.process_addPincode
846
    self._processMap["updatePincode"] = Processor.process_updatePincode
889
    self._processMap["updatePincode"] = Processor.process_updatePincode
-
 
890
    self._processMap["addNewAwbs"] = Processor.process_addNewAwbs
847
 
891
 
848
  def process(self, iprot, oprot):
892
  def process(self, iprot, oprot):
849
    (name, type, seqid) = iprot.readMessageBegin()
893
    (name, type, seqid) = iprot.readMessageBegin()
850
    if name not in self._processMap:
894
    if name not in self._processMap:
851
      iprot.skip(TType.STRUCT)
895
      iprot.skip(TType.STRUCT)
Line 1086... Line 1130...
1086
    oprot.writeMessageBegin("updatePincode", TMessageType.REPLY, seqid)
1130
    oprot.writeMessageBegin("updatePincode", TMessageType.REPLY, seqid)
1087
    result.write(oprot)
1131
    result.write(oprot)
1088
    oprot.writeMessageEnd()
1132
    oprot.writeMessageEnd()
1089
    oprot.trans.flush()
1133
    oprot.trans.flush()
1090
 
1134
 
-
 
1135
  def process_addNewAwbs(self, seqid, iprot, oprot):
-
 
1136
    args = addNewAwbs_args()
-
 
1137
    args.read(iprot)
-
 
1138
    iprot.readMessageEnd()
-
 
1139
    result = addNewAwbs_result()
-
 
1140
    result.success = self._handler.addNewAwbs(args.providerId, args.cod, args.awbs)
-
 
1141
    oprot.writeMessageBegin("addNewAwbs", TMessageType.REPLY, seqid)
-
 
1142
    result.write(oprot)
-
 
1143
    oprot.writeMessageEnd()
-
 
1144
    oprot.trans.flush()
-
 
1145
 
1091
 
1146
 
1092
# HELPER FUNCTIONS AND STRUCTURES
1147
# HELPER FUNCTIONS AND STRUCTURES
1093
 
1148
 
1094
class getProvider_args:
1149
class getProvider_args:
1095
  """
1150
  """
Line 3600... Line 3655...
3600
    oprot.writeFieldStop()
3655
    oprot.writeFieldStop()
3601
    oprot.writeStructEnd()
3656
    oprot.writeStructEnd()
3602
 
3657
 
3603
  def validate(self):
3658
  def validate(self):
3604
    return
3659
    return
-
 
3660
 
-
 
3661
 
-
 
3662
  def __repr__(self):
-
 
3663
    L = ['%s=%r' % (key, value)
-
 
3664
      for key, value in self.__dict__.iteritems()]
-
 
3665
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
3666
 
-
 
3667
  def __eq__(self, other):
-
 
3668
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
3669
 
-
 
3670
  def __ne__(self, other):
-
 
3671
    return not (self == other)
-
 
3672
 
-
 
3673
class addNewAwbs_args:
-
 
3674
  """
-
 
3675
  Attributes:
-
 
3676
   - providerId
-
 
3677
   - cod
-
 
3678
   - awbs
-
 
3679
  """
-
 
3680
 
-
 
3681
  thrift_spec = (
-
 
3682
    None, # 0
-
 
3683
    (1, TType.I64, 'providerId', None, None, ), # 1
-
 
3684
    (2, TType.BOOL, 'cod', None, None, ), # 2
-
 
3685
    (3, TType.LIST, 'awbs', (TType.STRING,None), None, ), # 3
-
 
3686
  )
-
 
3687
 
-
 
3688
  def __init__(self, providerId=None, cod=None, awbs=None,):
-
 
3689
    self.providerId = providerId
-
 
3690
    self.cod = cod
-
 
3691
    self.awbs = awbs
-
 
3692
 
-
 
3693
  def read(self, iprot):
-
 
3694
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
3695
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
3696
      return
-
 
3697
    iprot.readStructBegin()
-
 
3698
    while True:
-
 
3699
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
3700
      if ftype == TType.STOP:
-
 
3701
        break
-
 
3702
      if fid == 1:
-
 
3703
        if ftype == TType.I64:
-
 
3704
          self.providerId = iprot.readI64();
-
 
3705
        else:
-
 
3706
          iprot.skip(ftype)
-
 
3707
      elif fid == 2:
-
 
3708
        if ftype == TType.BOOL:
-
 
3709
          self.cod = iprot.readBool();
-
 
3710
        else:
-
 
3711
          iprot.skip(ftype)
-
 
3712
      elif fid == 3:
-
 
3713
        if ftype == TType.LIST:
-
 
3714
          self.awbs = []
-
 
3715
          (_etype47, _size44) = iprot.readListBegin()
-
 
3716
          for _i48 in xrange(_size44):
-
 
3717
            _elem49 = iprot.readString();
-
 
3718
            self.awbs.append(_elem49)
-
 
3719
          iprot.readListEnd()
-
 
3720
        else:
-
 
3721
          iprot.skip(ftype)
-
 
3722
      else:
-
 
3723
        iprot.skip(ftype)
-
 
3724
      iprot.readFieldEnd()
-
 
3725
    iprot.readStructEnd()
-
 
3726
 
-
 
3727
  def write(self, oprot):
-
 
3728
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
3729
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
3730
      return
-
 
3731
    oprot.writeStructBegin('addNewAwbs_args')
-
 
3732
    if self.providerId is not None:
-
 
3733
      oprot.writeFieldBegin('providerId', TType.I64, 1)
-
 
3734
      oprot.writeI64(self.providerId)
-
 
3735
      oprot.writeFieldEnd()
-
 
3736
    if self.cod is not None:
-
 
3737
      oprot.writeFieldBegin('cod', TType.BOOL, 2)
-
 
3738
      oprot.writeBool(self.cod)
-
 
3739
      oprot.writeFieldEnd()
-
 
3740
    if self.awbs is not None:
-
 
3741
      oprot.writeFieldBegin('awbs', TType.LIST, 3)
-
 
3742
      oprot.writeListBegin(TType.STRING, len(self.awbs))
-
 
3743
      for iter50 in self.awbs:
-
 
3744
        oprot.writeString(iter50)
-
 
3745
      oprot.writeListEnd()
-
 
3746
      oprot.writeFieldEnd()
-
 
3747
    oprot.writeFieldStop()
-
 
3748
    oprot.writeStructEnd()
-
 
3749
 
-
 
3750
  def validate(self):
-
 
3751
    return
-
 
3752
 
-
 
3753
 
-
 
3754
  def __repr__(self):
-
 
3755
    L = ['%s=%r' % (key, value)
-
 
3756
      for key, value in self.__dict__.iteritems()]
-
 
3757
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
3758
 
-
 
3759
  def __eq__(self, other):
-
 
3760
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
3761
 
-
 
3762
  def __ne__(self, other):
-
 
3763
    return not (self == other)
-
 
3764
 
-
 
3765
class addNewAwbs_result:
-
 
3766
  """
-
 
3767
  Attributes:
-
 
3768
   - success
-
 
3769
  """
-
 
3770
 
-
 
3771
  thrift_spec = (
-
 
3772
    (0, TType.BOOL, 'success', None, None, ), # 0
-
 
3773
  )
-
 
3774
 
-
 
3775
  def __init__(self, success=None,):
-
 
3776
    self.success = success
-
 
3777
 
-
 
3778
  def read(self, iprot):
-
 
3779
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
3780
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
3781
      return
-
 
3782
    iprot.readStructBegin()
-
 
3783
    while True:
-
 
3784
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
3785
      if ftype == TType.STOP:
-
 
3786
        break
-
 
3787
      if fid == 0:
-
 
3788
        if ftype == TType.BOOL:
-
 
3789
          self.success = iprot.readBool();
-
 
3790
        else:
-
 
3791
          iprot.skip(ftype)
-
 
3792
      else:
-
 
3793
        iprot.skip(ftype)
-
 
3794
      iprot.readFieldEnd()
-
 
3795
    iprot.readStructEnd()
-
 
3796
 
-
 
3797
  def write(self, oprot):
-
 
3798
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
3799
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
3800
      return
-
 
3801
    oprot.writeStructBegin('addNewAwbs_result')
-
 
3802
    if self.success is not None:
-
 
3803
      oprot.writeFieldBegin('success', TType.BOOL, 0)
-
 
3804
      oprot.writeBool(self.success)
-
 
3805
      oprot.writeFieldEnd()
-
 
3806
    oprot.writeFieldStop()
-
 
3807
    oprot.writeStructEnd()
-
 
3808
 
-
 
3809
  def validate(self):
-
 
3810
    return
3605
 
3811
 
3606
 
3812
 
3607
  def __repr__(self):
3813
  def __repr__(self):
3608
    L = ['%s=%r' % (key, value)
3814
    L = ['%s=%r' % (key, value)
3609
      for key, value in self.__dict__.iteritems()]
3815
      for key, value in self.__dict__.iteritems()]