Subversion Repositories SmartDukaan

Rev

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

Rev 11905 Rev 12133
Line 1195... Line 1195...
1195
    pass
1195
    pass
1196
 
1196
 
1197
  def getAllPrivateDealsComparison(self, ):
1197
  def getAllPrivateDealsComparison(self, ):
1198
    pass
1198
    pass
1199
 
1199
 
-
 
1200
  def getAllSnapdealMarketplaceItem(self, ):
-
 
1201
    pass
-
 
1202
 
-
 
1203
  def getAllFlipkartMarketplaceItem(self, ):
-
 
1204
    pass
-
 
1205
 
1200
 
1206
 
1201
class Client(shop2020.thriftpy.generic.GenericService.Client, Iface):
1207
class Client(shop2020.thriftpy.generic.GenericService.Client, Iface):
1202
  def __init__(self, iprot, oprot=None):
1208
  def __init__(self, iprot, oprot=None):
1203
    shop2020.thriftpy.generic.GenericService.Client.__init__(self, iprot, oprot)
1209
    shop2020.thriftpy.generic.GenericService.Client.__init__(self, iprot, oprot)
1204
 
1210
 
Line 6314... Line 6320...
6314
    self._iprot.readMessageEnd()
6320
    self._iprot.readMessageEnd()
6315
    if result.success is not None:
6321
    if result.success is not None:
6316
      return result.success
6322
      return result.success
6317
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getAllPrivateDealsComparison failed: unknown result");
6323
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getAllPrivateDealsComparison failed: unknown result");
6318
 
6324
 
-
 
6325
  def getAllSnapdealMarketplaceItem(self, ):
-
 
6326
    self.send_getAllSnapdealMarketplaceItem()
-
 
6327
    return self.recv_getAllSnapdealMarketplaceItem()
-
 
6328
 
-
 
6329
  def send_getAllSnapdealMarketplaceItem(self, ):
-
 
6330
    self._oprot.writeMessageBegin('getAllSnapdealMarketplaceItem', TMessageType.CALL, self._seqid)
-
 
6331
    args = getAllSnapdealMarketplaceItem_args()
-
 
6332
    args.write(self._oprot)
-
 
6333
    self._oprot.writeMessageEnd()
-
 
6334
    self._oprot.trans.flush()
-
 
6335
 
-
 
6336
  def recv_getAllSnapdealMarketplaceItem(self, ):
-
 
6337
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
-
 
6338
    if mtype == TMessageType.EXCEPTION:
-
 
6339
      x = TApplicationException()
-
 
6340
      x.read(self._iprot)
-
 
6341
      self._iprot.readMessageEnd()
-
 
6342
      raise x
-
 
6343
    result = getAllSnapdealMarketplaceItem_result()
-
 
6344
    result.read(self._iprot)
-
 
6345
    self._iprot.readMessageEnd()
-
 
6346
    if result.success is not None:
-
 
6347
      return result.success
-
 
6348
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getAllSnapdealMarketplaceItem failed: unknown result");
-
 
6349
 
-
 
6350
  def getAllFlipkartMarketplaceItem(self, ):
-
 
6351
    self.send_getAllFlipkartMarketplaceItem()
-
 
6352
    return self.recv_getAllFlipkartMarketplaceItem()
-
 
6353
 
-
 
6354
  def send_getAllFlipkartMarketplaceItem(self, ):
-
 
6355
    self._oprot.writeMessageBegin('getAllFlipkartMarketplaceItem', TMessageType.CALL, self._seqid)
-
 
6356
    args = getAllFlipkartMarketplaceItem_args()
-
 
6357
    args.write(self._oprot)
-
 
6358
    self._oprot.writeMessageEnd()
-
 
6359
    self._oprot.trans.flush()
-
 
6360
 
-
 
6361
  def recv_getAllFlipkartMarketplaceItem(self, ):
-
 
6362
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
-
 
6363
    if mtype == TMessageType.EXCEPTION:
-
 
6364
      x = TApplicationException()
-
 
6365
      x.read(self._iprot)
-
 
6366
      self._iprot.readMessageEnd()
-
 
6367
      raise x
-
 
6368
    result = getAllFlipkartMarketplaceItem_result()
-
 
6369
    result.read(self._iprot)
-
 
6370
    self._iprot.readMessageEnd()
-
 
6371
    if result.success is not None:
-
 
6372
      return result.success
-
 
6373
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getAllFlipkartMarketplaceItem failed: unknown result");
-
 
6374
 
6319
 
6375
 
6320
class Processor(shop2020.thriftpy.generic.GenericService.Processor, Iface, TProcessor):
6376
class Processor(shop2020.thriftpy.generic.GenericService.Processor, Iface, TProcessor):
6321
  def __init__(self, handler):
6377
  def __init__(self, handler):
6322
    shop2020.thriftpy.generic.GenericService.Processor.__init__(self, handler)
6378
    shop2020.thriftpy.generic.GenericService.Processor.__init__(self, handler)
6323
    self._processMap["addItem"] = Processor.process_addItem
6379
    self._processMap["addItem"] = Processor.process_addItem
Line 6485... Line 6541...
6485
    self._processMap["addOrUpdatePrivateDeal"] = Processor.process_addOrUpdatePrivateDeal
6541
    self._processMap["addOrUpdatePrivateDeal"] = Processor.process_addOrUpdatePrivateDeal
6486
    self._processMap["getPrivateDealsCatalogIds"] = Processor.process_getPrivateDealsCatalogIds
6542
    self._processMap["getPrivateDealsCatalogIds"] = Processor.process_getPrivateDealsCatalogIds
6487
    self._processMap["getPrivateDealsCount"] = Processor.process_getPrivateDealsCount
6543
    self._processMap["getPrivateDealsCount"] = Processor.process_getPrivateDealsCount
6488
    self._processMap["getAmazonOutSyncItems"] = Processor.process_getAmazonOutSyncItems
6544
    self._processMap["getAmazonOutSyncItems"] = Processor.process_getAmazonOutSyncItems
6489
    self._processMap["getAllPrivateDealsComparison"] = Processor.process_getAllPrivateDealsComparison
6545
    self._processMap["getAllPrivateDealsComparison"] = Processor.process_getAllPrivateDealsComparison
-
 
6546
    self._processMap["getAllSnapdealMarketplaceItem"] = Processor.process_getAllSnapdealMarketplaceItem
-
 
6547
    self._processMap["getAllFlipkartMarketplaceItem"] = Processor.process_getAllFlipkartMarketplaceItem
6490
 
6548
 
6491
  def process(self, iprot, oprot):
6549
  def process(self, iprot, oprot):
6492
    (name, type, seqid) = iprot.readMessageBegin()
6550
    (name, type, seqid) = iprot.readMessageBegin()
6493
    if name not in self._processMap:
6551
    if name not in self._processMap:
6494
      iprot.skip(TType.STRUCT)
6552
      iprot.skip(TType.STRUCT)
Line 8470... Line 8528...
8470
    oprot.writeMessageBegin("getAllPrivateDealsComparison", TMessageType.REPLY, seqid)
8528
    oprot.writeMessageBegin("getAllPrivateDealsComparison", TMessageType.REPLY, seqid)
8471
    result.write(oprot)
8529
    result.write(oprot)
8472
    oprot.writeMessageEnd()
8530
    oprot.writeMessageEnd()
8473
    oprot.trans.flush()
8531
    oprot.trans.flush()
8474
 
8532
 
-
 
8533
  def process_getAllSnapdealMarketplaceItem(self, seqid, iprot, oprot):
-
 
8534
    args = getAllSnapdealMarketplaceItem_args()
-
 
8535
    args.read(iprot)
-
 
8536
    iprot.readMessageEnd()
-
 
8537
    result = getAllSnapdealMarketplaceItem_result()
-
 
8538
    result.success = self._handler.getAllSnapdealMarketplaceItem()
-
 
8539
    oprot.writeMessageBegin("getAllSnapdealMarketplaceItem", TMessageType.REPLY, seqid)
-
 
8540
    result.write(oprot)
-
 
8541
    oprot.writeMessageEnd()
-
 
8542
    oprot.trans.flush()
-
 
8543
 
-
 
8544
  def process_getAllFlipkartMarketplaceItem(self, seqid, iprot, oprot):
-
 
8545
    args = getAllFlipkartMarketplaceItem_args()
-
 
8546
    args.read(iprot)
-
 
8547
    iprot.readMessageEnd()
-
 
8548
    result = getAllFlipkartMarketplaceItem_result()
-
 
8549
    result.success = self._handler.getAllFlipkartMarketplaceItem()
-
 
8550
    oprot.writeMessageBegin("getAllFlipkartMarketplaceItem", TMessageType.REPLY, seqid)
-
 
8551
    result.write(oprot)
-
 
8552
    oprot.writeMessageEnd()
-
 
8553
    oprot.trans.flush()
-
 
8554
 
8475
 
8555
 
8476
# HELPER FUNCTIONS AND STRUCTURES
8556
# HELPER FUNCTIONS AND STRUCTURES
8477
 
8557
 
8478
class addItem_args:
8558
class addItem_args:
8479
  """
8559
  """
Line 29726... Line 29806...
29726
      oprot.writeListEnd()
29806
      oprot.writeListEnd()
29727
      oprot.writeFieldEnd()
29807
      oprot.writeFieldEnd()
29728
    oprot.writeFieldStop()
29808
    oprot.writeFieldStop()
29729
    oprot.writeStructEnd()
29809
    oprot.writeStructEnd()
29730
 
29810
 
-
 
29811
  def validate(self):
-
 
29812
    return
-
 
29813
 
-
 
29814
 
-
 
29815
  def __repr__(self):
-
 
29816
    L = ['%s=%r' % (key, value)
-
 
29817
      for key, value in self.__dict__.iteritems()]
-
 
29818
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
29819
 
-
 
29820
  def __eq__(self, other):
-
 
29821
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
29822
 
-
 
29823
  def __ne__(self, other):
-
 
29824
    return not (self == other)
-
 
29825
 
-
 
29826
class getAllSnapdealMarketplaceItem_args:
-
 
29827
 
-
 
29828
  thrift_spec = (
-
 
29829
  )
-
 
29830
 
-
 
29831
  def read(self, iprot):
-
 
29832
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
29833
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
29834
      return
-
 
29835
    iprot.readStructBegin()
-
 
29836
    while True:
-
 
29837
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
29838
      if ftype == TType.STOP:
-
 
29839
        break
-
 
29840
      else:
-
 
29841
        iprot.skip(ftype)
-
 
29842
      iprot.readFieldEnd()
-
 
29843
    iprot.readStructEnd()
-
 
29844
 
-
 
29845
  def write(self, oprot):
-
 
29846
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
29847
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
29848
      return
-
 
29849
    oprot.writeStructBegin('getAllSnapdealMarketplaceItem_args')
-
 
29850
    oprot.writeFieldStop()
-
 
29851
    oprot.writeStructEnd()
-
 
29852
 
-
 
29853
  def validate(self):
-
 
29854
    return
-
 
29855
 
-
 
29856
 
-
 
29857
  def __repr__(self):
-
 
29858
    L = ['%s=%r' % (key, value)
-
 
29859
      for key, value in self.__dict__.iteritems()]
-
 
29860
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
29861
 
-
 
29862
  def __eq__(self, other):
-
 
29863
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
29864
 
-
 
29865
  def __ne__(self, other):
-
 
29866
    return not (self == other)
-
 
29867
 
-
 
29868
class getAllSnapdealMarketplaceItem_result:
-
 
29869
  """
-
 
29870
  Attributes:
-
 
29871
   - success
-
 
29872
  """
-
 
29873
 
-
 
29874
  thrift_spec = (
-
 
29875
    (0, TType.LIST, 'success', (TType.STRUCT,(SnapdealItem, SnapdealItem.thrift_spec)), None, ), # 0
-
 
29876
  )
-
 
29877
 
-
 
29878
  def __init__(self, success=None,):
-
 
29879
    self.success = success
-
 
29880
 
-
 
29881
  def read(self, iprot):
-
 
29882
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
29883
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
29884
      return
-
 
29885
    iprot.readStructBegin()
-
 
29886
    while True:
-
 
29887
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
29888
      if ftype == TType.STOP:
-
 
29889
        break
-
 
29890
      if fid == 0:
-
 
29891
        if ftype == TType.LIST:
-
 
29892
          self.success = []
-
 
29893
          (_etype688, _size685) = iprot.readListBegin()
-
 
29894
          for _i689 in xrange(_size685):
-
 
29895
            _elem690 = SnapdealItem()
-
 
29896
            _elem690.read(iprot)
-
 
29897
            self.success.append(_elem690)
-
 
29898
          iprot.readListEnd()
-
 
29899
        else:
-
 
29900
          iprot.skip(ftype)
-
 
29901
      else:
-
 
29902
        iprot.skip(ftype)
-
 
29903
      iprot.readFieldEnd()
-
 
29904
    iprot.readStructEnd()
-
 
29905
 
-
 
29906
  def write(self, oprot):
-
 
29907
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
29908
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
29909
      return
-
 
29910
    oprot.writeStructBegin('getAllSnapdealMarketplaceItem_result')
-
 
29911
    if self.success is not None:
-
 
29912
      oprot.writeFieldBegin('success', TType.LIST, 0)
-
 
29913
      oprot.writeListBegin(TType.STRUCT, len(self.success))
-
 
29914
      for iter691 in self.success:
-
 
29915
        iter691.write(oprot)
-
 
29916
      oprot.writeListEnd()
-
 
29917
      oprot.writeFieldEnd()
-
 
29918
    oprot.writeFieldStop()
-
 
29919
    oprot.writeStructEnd()
-
 
29920
 
-
 
29921
  def validate(self):
-
 
29922
    return
-
 
29923
 
-
 
29924
 
-
 
29925
  def __repr__(self):
-
 
29926
    L = ['%s=%r' % (key, value)
-
 
29927
      for key, value in self.__dict__.iteritems()]
-
 
29928
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
29929
 
-
 
29930
  def __eq__(self, other):
-
 
29931
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
29932
 
-
 
29933
  def __ne__(self, other):
-
 
29934
    return not (self == other)
-
 
29935
 
-
 
29936
class getAllFlipkartMarketplaceItem_args:
-
 
29937
 
-
 
29938
  thrift_spec = (
-
 
29939
  )
-
 
29940
 
-
 
29941
  def read(self, iprot):
-
 
29942
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
29943
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
29944
      return
-
 
29945
    iprot.readStructBegin()
-
 
29946
    while True:
-
 
29947
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
29948
      if ftype == TType.STOP:
-
 
29949
        break
-
 
29950
      else:
-
 
29951
        iprot.skip(ftype)
-
 
29952
      iprot.readFieldEnd()
-
 
29953
    iprot.readStructEnd()
-
 
29954
 
-
 
29955
  def write(self, oprot):
-
 
29956
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
29957
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
29958
      return
-
 
29959
    oprot.writeStructBegin('getAllFlipkartMarketplaceItem_args')
-
 
29960
    oprot.writeFieldStop()
-
 
29961
    oprot.writeStructEnd()
-
 
29962
 
-
 
29963
  def validate(self):
-
 
29964
    return
-
 
29965
 
-
 
29966
 
-
 
29967
  def __repr__(self):
-
 
29968
    L = ['%s=%r' % (key, value)
-
 
29969
      for key, value in self.__dict__.iteritems()]
-
 
29970
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
29971
 
-
 
29972
  def __eq__(self, other):
-
 
29973
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
29974
 
-
 
29975
  def __ne__(self, other):
-
 
29976
    return not (self == other)
-
 
29977
 
-
 
29978
class getAllFlipkartMarketplaceItem_result:
-
 
29979
  """
-
 
29980
  Attributes:
-
 
29981
   - success
-
 
29982
  """
-
 
29983
 
-
 
29984
  thrift_spec = (
-
 
29985
    (0, TType.LIST, 'success', (TType.STRUCT,(FlipkartItem, FlipkartItem.thrift_spec)), None, ), # 0
-
 
29986
  )
-
 
29987
 
-
 
29988
  def __init__(self, success=None,):
-
 
29989
    self.success = success
-
 
29990
 
-
 
29991
  def read(self, iprot):
-
 
29992
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
29993
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
29994
      return
-
 
29995
    iprot.readStructBegin()
-
 
29996
    while True:
-
 
29997
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
29998
      if ftype == TType.STOP:
-
 
29999
        break
-
 
30000
      if fid == 0:
-
 
30001
        if ftype == TType.LIST:
-
 
30002
          self.success = []
-
 
30003
          (_etype695, _size692) = iprot.readListBegin()
-
 
30004
          for _i696 in xrange(_size692):
-
 
30005
            _elem697 = FlipkartItem()
-
 
30006
            _elem697.read(iprot)
-
 
30007
            self.success.append(_elem697)
-
 
30008
          iprot.readListEnd()
-
 
30009
        else:
-
 
30010
          iprot.skip(ftype)
-
 
30011
      else:
-
 
30012
        iprot.skip(ftype)
-
 
30013
      iprot.readFieldEnd()
-
 
30014
    iprot.readStructEnd()
-
 
30015
 
-
 
30016
  def write(self, oprot):
-
 
30017
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
30018
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
30019
      return
-
 
30020
    oprot.writeStructBegin('getAllFlipkartMarketplaceItem_result')
-
 
30021
    if self.success is not None:
-
 
30022
      oprot.writeFieldBegin('success', TType.LIST, 0)
-
 
30023
      oprot.writeListBegin(TType.STRUCT, len(self.success))
-
 
30024
      for iter698 in self.success:
-
 
30025
        iter698.write(oprot)
-
 
30026
      oprot.writeListEnd()
-
 
30027
      oprot.writeFieldEnd()
-
 
30028
    oprot.writeFieldStop()
-
 
30029
    oprot.writeStructEnd()
-
 
30030
 
29731
  def validate(self):
30031
  def validate(self):
29732
    return
30032
    return
29733
 
30033
 
29734
 
30034
 
29735
  def __repr__(self):
30035
  def __repr__(self):