Subversion Repositories SmartDukaan

Rev

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

Rev 9621 Rev 9724
Line 993... Line 993...
993
    pass
993
    pass
994
 
994
 
995
  def getAllProductFeedSubmit(self, ):
995
  def getAllProductFeedSubmit(self, ):
996
    pass
996
    pass
997
 
997
 
-
 
998
  def getMarketplacedetailsForItem(self, itemId, sourceId):
-
 
999
    """
-
 
1000
    Parameters:
-
 
1001
     - itemId
-
 
1002
     - sourceId
-
 
1003
    """
-
 
1004
    pass
-
 
1005
 
-
 
1006
  def updateMarketplaceAttributesForItem(self, marketPlaceItem):
-
 
1007
    """
-
 
1008
    Parameters:
-
 
1009
     - marketPlaceItem
-
 
1010
    """
-
 
1011
    pass
-
 
1012
 
998
 
1013
 
999
class Client(shop2020.thriftpy.generic.GenericService.Client, Iface):
1014
class Client(shop2020.thriftpy.generic.GenericService.Client, Iface):
1000
  def __init__(self, iprot, oprot=None):
1015
  def __init__(self, iprot, oprot=None):
1001
    shop2020.thriftpy.generic.GenericService.Client.__init__(self, iprot, oprot)
1016
    shop2020.thriftpy.generic.GenericService.Client.__init__(self, iprot, oprot)
1002
 
1017
 
Line 5209... Line 5224...
5209
      return result.success
5224
      return result.success
5210
    if result.cex is not None:
5225
    if result.cex is not None:
5211
      raise result.cex
5226
      raise result.cex
5212
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getAllProductFeedSubmit failed: unknown result");
5227
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getAllProductFeedSubmit failed: unknown result");
5213
 
5228
 
-
 
5229
  def getMarketplacedetailsForItem(self, itemId, sourceId):
-
 
5230
    """
-
 
5231
    Parameters:
-
 
5232
     - itemId
-
 
5233
     - sourceId
-
 
5234
    """
-
 
5235
    self.send_getMarketplacedetailsForItem(itemId, sourceId)
-
 
5236
    return self.recv_getMarketplacedetailsForItem()
-
 
5237
 
-
 
5238
  def send_getMarketplacedetailsForItem(self, itemId, sourceId):
-
 
5239
    self._oprot.writeMessageBegin('getMarketplacedetailsForItem', TMessageType.CALL, self._seqid)
-
 
5240
    args = getMarketplacedetailsForItem_args()
-
 
5241
    args.itemId = itemId
-
 
5242
    args.sourceId = sourceId
-
 
5243
    args.write(self._oprot)
-
 
5244
    self._oprot.writeMessageEnd()
-
 
5245
    self._oprot.trans.flush()
-
 
5246
 
-
 
5247
  def recv_getMarketplacedetailsForItem(self, ):
-
 
5248
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
-
 
5249
    if mtype == TMessageType.EXCEPTION:
-
 
5250
      x = TApplicationException()
-
 
5251
      x.read(self._iprot)
-
 
5252
      self._iprot.readMessageEnd()
-
 
5253
      raise x
-
 
5254
    result = getMarketplacedetailsForItem_result()
-
 
5255
    result.read(self._iprot)
-
 
5256
    self._iprot.readMessageEnd()
-
 
5257
    if result.success is not None:
-
 
5258
      return result.success
-
 
5259
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getMarketplacedetailsForItem failed: unknown result");
-
 
5260
 
-
 
5261
  def updateMarketplaceAttributesForItem(self, marketPlaceItem):
-
 
5262
    """
-
 
5263
    Parameters:
-
 
5264
     - marketPlaceItem
-
 
5265
    """
-
 
5266
    self.send_updateMarketplaceAttributesForItem(marketPlaceItem)
-
 
5267
    return self.recv_updateMarketplaceAttributesForItem()
-
 
5268
 
-
 
5269
  def send_updateMarketplaceAttributesForItem(self, marketPlaceItem):
-
 
5270
    self._oprot.writeMessageBegin('updateMarketplaceAttributesForItem', TMessageType.CALL, self._seqid)
-
 
5271
    args = updateMarketplaceAttributesForItem_args()
-
 
5272
    args.marketPlaceItem = marketPlaceItem
-
 
5273
    args.write(self._oprot)
-
 
5274
    self._oprot.writeMessageEnd()
-
 
5275
    self._oprot.trans.flush()
-
 
5276
 
-
 
5277
  def recv_updateMarketplaceAttributesForItem(self, ):
-
 
5278
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
-
 
5279
    if mtype == TMessageType.EXCEPTION:
-
 
5280
      x = TApplicationException()
-
 
5281
      x.read(self._iprot)
-
 
5282
      self._iprot.readMessageEnd()
-
 
5283
      raise x
-
 
5284
    result = updateMarketplaceAttributesForItem_result()
-
 
5285
    result.read(self._iprot)
-
 
5286
    self._iprot.readMessageEnd()
-
 
5287
    if result.success is not None:
-
 
5288
      return result.success
-
 
5289
    raise TApplicationException(TApplicationException.MISSING_RESULT, "updateMarketplaceAttributesForItem failed: unknown result");
-
 
5290
 
5214
 
5291
 
5215
class Processor(shop2020.thriftpy.generic.GenericService.Processor, Iface, TProcessor):
5292
class Processor(shop2020.thriftpy.generic.GenericService.Processor, Iface, TProcessor):
5216
  def __init__(self, handler):
5293
  def __init__(self, handler):
5217
    shop2020.thriftpy.generic.GenericService.Processor.__init__(self, handler)
5294
    shop2020.thriftpy.generic.GenericService.Processor.__init__(self, handler)
5218
    self._processMap["addItem"] = Processor.process_addItem
5295
    self._processMap["addItem"] = Processor.process_addItem
Line 5350... Line 5427...
5350
    self._processMap["getProductFeedSubmit"] = Processor.process_getProductFeedSubmit
5427
    self._processMap["getProductFeedSubmit"] = Processor.process_getProductFeedSubmit
5351
    self._processMap["addProductFeedSubmit"] = Processor.process_addProductFeedSubmit
5428
    self._processMap["addProductFeedSubmit"] = Processor.process_addProductFeedSubmit
5352
    self._processMap["updateProductFeedSubmit"] = Processor.process_updateProductFeedSubmit
5429
    self._processMap["updateProductFeedSubmit"] = Processor.process_updateProductFeedSubmit
5353
    self._processMap["deleteProductFeedSubmit"] = Processor.process_deleteProductFeedSubmit
5430
    self._processMap["deleteProductFeedSubmit"] = Processor.process_deleteProductFeedSubmit
5354
    self._processMap["getAllProductFeedSubmit"] = Processor.process_getAllProductFeedSubmit
5431
    self._processMap["getAllProductFeedSubmit"] = Processor.process_getAllProductFeedSubmit
-
 
5432
    self._processMap["getMarketplacedetailsForItem"] = Processor.process_getMarketplacedetailsForItem
-
 
5433
    self._processMap["updateMarketplaceAttributesForItem"] = Processor.process_updateMarketplaceAttributesForItem
5355
 
5434
 
5356
  def process(self, iprot, oprot):
5435
  def process(self, iprot, oprot):
5357
    (name, type, seqid) = iprot.readMessageBegin()
5436
    (name, type, seqid) = iprot.readMessageBegin()
5358
    if name not in self._processMap:
5437
    if name not in self._processMap:
5359
      iprot.skip(TType.STRUCT)
5438
      iprot.skip(TType.STRUCT)
Line 7002... Line 7081...
7002
    oprot.writeMessageBegin("getAllProductFeedSubmit", TMessageType.REPLY, seqid)
7081
    oprot.writeMessageBegin("getAllProductFeedSubmit", TMessageType.REPLY, seqid)
7003
    result.write(oprot)
7082
    result.write(oprot)
7004
    oprot.writeMessageEnd()
7083
    oprot.writeMessageEnd()
7005
    oprot.trans.flush()
7084
    oprot.trans.flush()
7006
 
7085
 
-
 
7086
  def process_getMarketplacedetailsForItem(self, seqid, iprot, oprot):
-
 
7087
    args = getMarketplacedetailsForItem_args()
-
 
7088
    args.read(iprot)
-
 
7089
    iprot.readMessageEnd()
-
 
7090
    result = getMarketplacedetailsForItem_result()
-
 
7091
    result.success = self._handler.getMarketplacedetailsForItem(args.itemId, args.sourceId)
-
 
7092
    oprot.writeMessageBegin("getMarketplacedetailsForItem", TMessageType.REPLY, seqid)
-
 
7093
    result.write(oprot)
-
 
7094
    oprot.writeMessageEnd()
-
 
7095
    oprot.trans.flush()
-
 
7096
 
-
 
7097
  def process_updateMarketplaceAttributesForItem(self, seqid, iprot, oprot):
-
 
7098
    args = updateMarketplaceAttributesForItem_args()
-
 
7099
    args.read(iprot)
-
 
7100
    iprot.readMessageEnd()
-
 
7101
    result = updateMarketplaceAttributesForItem_result()
-
 
7102
    result.success = self._handler.updateMarketplaceAttributesForItem(args.marketPlaceItem)
-
 
7103
    oprot.writeMessageBegin("updateMarketplaceAttributesForItem", TMessageType.REPLY, seqid)
-
 
7104
    result.write(oprot)
-
 
7105
    oprot.writeMessageEnd()
-
 
7106
    oprot.trans.flush()
-
 
7107
 
7007
 
7108
 
7008
# HELPER FUNCTIONS AND STRUCTURES
7109
# HELPER FUNCTIONS AND STRUCTURES
7009
 
7110
 
7010
class addItem_args:
7111
class addItem_args:
7011
  """
7112
  """
Line 24440... Line 24541...
24440
      oprot.writeFieldEnd()
24541
      oprot.writeFieldEnd()
24441
    oprot.writeFieldStop()
24542
    oprot.writeFieldStop()
24442
    oprot.writeStructEnd()
24543
    oprot.writeStructEnd()
24443
 
24544
 
24444
  def validate(self):
24545
  def validate(self):
-
 
24546
    return
-
 
24547
 
-
 
24548
 
-
 
24549
  def __repr__(self):
-
 
24550
    L = ['%s=%r' % (key, value)
-
 
24551
      for key, value in self.__dict__.iteritems()]
-
 
24552
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
24553
 
-
 
24554
  def __eq__(self, other):
-
 
24555
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
24556
 
-
 
24557
  def __ne__(self, other):
-
 
24558
    return not (self == other)
-
 
24559
 
-
 
24560
class getMarketplacedetailsForItem_args:
-
 
24561
  """
-
 
24562
  Attributes:
-
 
24563
   - itemId
-
 
24564
   - sourceId
-
 
24565
  """
-
 
24566
 
-
 
24567
  thrift_spec = (
-
 
24568
    None, # 0
-
 
24569
    (1, TType.I64, 'itemId', None, None, ), # 1
-
 
24570
    (2, TType.I64, 'sourceId', None, None, ), # 2
-
 
24571
  )
-
 
24572
 
-
 
24573
  def __init__(self, itemId=None, sourceId=None,):
-
 
24574
    self.itemId = itemId
-
 
24575
    self.sourceId = sourceId
-
 
24576
 
-
 
24577
  def read(self, iprot):
-
 
24578
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
24579
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
24580
      return
-
 
24581
    iprot.readStructBegin()
-
 
24582
    while True:
-
 
24583
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
24584
      if ftype == TType.STOP:
-
 
24585
        break
-
 
24586
      if fid == 1:
-
 
24587
        if ftype == TType.I64:
-
 
24588
          self.itemId = iprot.readI64();
-
 
24589
        else:
-
 
24590
          iprot.skip(ftype)
-
 
24591
      elif fid == 2:
-
 
24592
        if ftype == TType.I64:
-
 
24593
          self.sourceId = iprot.readI64();
-
 
24594
        else:
-
 
24595
          iprot.skip(ftype)
-
 
24596
      else:
-
 
24597
        iprot.skip(ftype)
-
 
24598
      iprot.readFieldEnd()
-
 
24599
    iprot.readStructEnd()
-
 
24600
 
-
 
24601
  def write(self, oprot):
-
 
24602
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
24603
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
24604
      return
-
 
24605
    oprot.writeStructBegin('getMarketplacedetailsForItem_args')
-
 
24606
    if self.itemId is not None:
-
 
24607
      oprot.writeFieldBegin('itemId', TType.I64, 1)
-
 
24608
      oprot.writeI64(self.itemId)
-
 
24609
      oprot.writeFieldEnd()
-
 
24610
    if self.sourceId is not None:
-
 
24611
      oprot.writeFieldBegin('sourceId', TType.I64, 2)
-
 
24612
      oprot.writeI64(self.sourceId)
-
 
24613
      oprot.writeFieldEnd()
-
 
24614
    oprot.writeFieldStop()
-
 
24615
    oprot.writeStructEnd()
-
 
24616
 
-
 
24617
  def validate(self):
-
 
24618
    return
-
 
24619
 
-
 
24620
 
-
 
24621
  def __repr__(self):
-
 
24622
    L = ['%s=%r' % (key, value)
-
 
24623
      for key, value in self.__dict__.iteritems()]
-
 
24624
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
24625
 
-
 
24626
  def __eq__(self, other):
-
 
24627
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
24628
 
-
 
24629
  def __ne__(self, other):
-
 
24630
    return not (self == other)
-
 
24631
 
-
 
24632
class getMarketplacedetailsForItem_result:
-
 
24633
  """
-
 
24634
  Attributes:
-
 
24635
   - success
-
 
24636
  """
-
 
24637
 
-
 
24638
  thrift_spec = (
-
 
24639
    (0, TType.STRUCT, 'success', (MarketplaceItems, MarketplaceItems.thrift_spec), None, ), # 0
-
 
24640
  )
-
 
24641
 
-
 
24642
  def __init__(self, success=None,):
-
 
24643
    self.success = success
-
 
24644
 
-
 
24645
  def read(self, iprot):
-
 
24646
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
24647
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
24648
      return
-
 
24649
    iprot.readStructBegin()
-
 
24650
    while True:
-
 
24651
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
24652
      if ftype == TType.STOP:
-
 
24653
        break
-
 
24654
      if fid == 0:
-
 
24655
        if ftype == TType.STRUCT:
-
 
24656
          self.success = MarketplaceItems()
-
 
24657
          self.success.read(iprot)
-
 
24658
        else:
-
 
24659
          iprot.skip(ftype)
-
 
24660
      else:
-
 
24661
        iprot.skip(ftype)
-
 
24662
      iprot.readFieldEnd()
-
 
24663
    iprot.readStructEnd()
-
 
24664
 
-
 
24665
  def write(self, oprot):
-
 
24666
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
24667
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
24668
      return
-
 
24669
    oprot.writeStructBegin('getMarketplacedetailsForItem_result')
-
 
24670
    if self.success is not None:
-
 
24671
      oprot.writeFieldBegin('success', TType.STRUCT, 0)
-
 
24672
      self.success.write(oprot)
-
 
24673
      oprot.writeFieldEnd()
-
 
24674
    oprot.writeFieldStop()
-
 
24675
    oprot.writeStructEnd()
-
 
24676
 
-
 
24677
  def validate(self):
-
 
24678
    return
-
 
24679
 
-
 
24680
 
-
 
24681
  def __repr__(self):
-
 
24682
    L = ['%s=%r' % (key, value)
-
 
24683
      for key, value in self.__dict__.iteritems()]
-
 
24684
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
24685
 
-
 
24686
  def __eq__(self, other):
-
 
24687
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
24688
 
-
 
24689
  def __ne__(self, other):
-
 
24690
    return not (self == other)
-
 
24691
 
-
 
24692
class updateMarketplaceAttributesForItem_args:
-
 
24693
  """
-
 
24694
  Attributes:
-
 
24695
   - marketPlaceItem
-
 
24696
  """
-
 
24697
 
-
 
24698
  thrift_spec = (
-
 
24699
    None, # 0
-
 
24700
    (1, TType.STRUCT, 'marketPlaceItem', (MarketplaceItems, MarketplaceItems.thrift_spec), None, ), # 1
-
 
24701
  )
-
 
24702
 
-
 
24703
  def __init__(self, marketPlaceItem=None,):
-
 
24704
    self.marketPlaceItem = marketPlaceItem
-
 
24705
 
-
 
24706
  def read(self, iprot):
-
 
24707
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
24708
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
24709
      return
-
 
24710
    iprot.readStructBegin()
-
 
24711
    while True:
-
 
24712
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
24713
      if ftype == TType.STOP:
-
 
24714
        break
-
 
24715
      if fid == 1:
-
 
24716
        if ftype == TType.STRUCT:
-
 
24717
          self.marketPlaceItem = MarketplaceItems()
-
 
24718
          self.marketPlaceItem.read(iprot)
-
 
24719
        else:
-
 
24720
          iprot.skip(ftype)
-
 
24721
      else:
-
 
24722
        iprot.skip(ftype)
-
 
24723
      iprot.readFieldEnd()
-
 
24724
    iprot.readStructEnd()
-
 
24725
 
-
 
24726
  def write(self, oprot):
-
 
24727
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
24728
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
24729
      return
-
 
24730
    oprot.writeStructBegin('updateMarketplaceAttributesForItem_args')
-
 
24731
    if self.marketPlaceItem is not None:
-
 
24732
      oprot.writeFieldBegin('marketPlaceItem', TType.STRUCT, 1)
-
 
24733
      self.marketPlaceItem.write(oprot)
-
 
24734
      oprot.writeFieldEnd()
-
 
24735
    oprot.writeFieldStop()
-
 
24736
    oprot.writeStructEnd()
-
 
24737
 
-
 
24738
  def validate(self):
-
 
24739
    return
-
 
24740
 
-
 
24741
 
-
 
24742
  def __repr__(self):
-
 
24743
    L = ['%s=%r' % (key, value)
-
 
24744
      for key, value in self.__dict__.iteritems()]
-
 
24745
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
24746
 
-
 
24747
  def __eq__(self, other):
-
 
24748
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
24749
 
-
 
24750
  def __ne__(self, other):
-
 
24751
    return not (self == other)
-
 
24752
 
-
 
24753
class updateMarketplaceAttributesForItem_result:
-
 
24754
  """
-
 
24755
  Attributes:
-
 
24756
   - success
-
 
24757
  """
-
 
24758
 
-
 
24759
  thrift_spec = (
-
 
24760
    (0, TType.BOOL, 'success', None, None, ), # 0
-
 
24761
  )
-
 
24762
 
-
 
24763
  def __init__(self, success=None,):
-
 
24764
    self.success = success
-
 
24765
 
-
 
24766
  def read(self, iprot):
-
 
24767
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
24768
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
24769
      return
-
 
24770
    iprot.readStructBegin()
-
 
24771
    while True:
-
 
24772
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
24773
      if ftype == TType.STOP:
-
 
24774
        break
-
 
24775
      if fid == 0:
-
 
24776
        if ftype == TType.BOOL:
-
 
24777
          self.success = iprot.readBool();
-
 
24778
        else:
-
 
24779
          iprot.skip(ftype)
-
 
24780
      else:
-
 
24781
        iprot.skip(ftype)
-
 
24782
      iprot.readFieldEnd()
-
 
24783
    iprot.readStructEnd()
-
 
24784
 
-
 
24785
  def write(self, oprot):
-
 
24786
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
24787
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
24788
      return
-
 
24789
    oprot.writeStructBegin('updateMarketplaceAttributesForItem_result')
-
 
24790
    if self.success is not None:
-
 
24791
      oprot.writeFieldBegin('success', TType.BOOL, 0)
-
 
24792
      oprot.writeBool(self.success)
-
 
24793
      oprot.writeFieldEnd()
-
 
24794
    oprot.writeFieldStop()
-
 
24795
    oprot.writeStructEnd()
-
 
24796
 
-
 
24797
  def validate(self):
24445
    return
24798
    return
24446
 
24799
 
24447
 
24800
 
24448
  def __repr__(self):
24801
  def __repr__(self):
24449
    L = ['%s=%r' % (key, value)
24802
    L = ['%s=%r' % (key, value)