Subversion Repositories SmartDukaan

Rev

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

Rev 11653 Rev 11905
Line 1185... Line 1185...
1185
    pass
1185
    pass
1186
 
1186
 
1187
  def getPrivateDealsCount(self, ):
1187
  def getPrivateDealsCount(self, ):
1188
    pass
1188
    pass
1189
 
1189
 
-
 
1190
  def getAmazonOutSyncItems(self, item_id):
-
 
1191
    """
-
 
1192
    Parameters:
-
 
1193
     - item_id
-
 
1194
    """
-
 
1195
    pass
-
 
1196
 
-
 
1197
  def getAllPrivateDealsComparison(self, ):
-
 
1198
    pass
-
 
1199
 
1190
 
1200
 
1191
class Client(shop2020.thriftpy.generic.GenericService.Client, Iface):
1201
class Client(shop2020.thriftpy.generic.GenericService.Client, Iface):
1192
  def __init__(self, iprot, oprot=None):
1202
  def __init__(self, iprot, oprot=None):
1193
    shop2020.thriftpy.generic.GenericService.Client.__init__(self, iprot, oprot)
1203
    shop2020.thriftpy.generic.GenericService.Client.__init__(self, iprot, oprot)
1194
 
1204
 
Line 6249... Line 6259...
6249
    self._iprot.readMessageEnd()
6259
    self._iprot.readMessageEnd()
6250
    if result.success is not None:
6260
    if result.success is not None:
6251
      return result.success
6261
      return result.success
6252
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getPrivateDealsCount failed: unknown result");
6262
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getPrivateDealsCount failed: unknown result");
6253
 
6263
 
-
 
6264
  def getAmazonOutSyncItems(self, item_id):
-
 
6265
    """
-
 
6266
    Parameters:
-
 
6267
     - item_id
-
 
6268
    """
-
 
6269
    self.send_getAmazonOutSyncItems(item_id)
-
 
6270
    return self.recv_getAmazonOutSyncItems()
-
 
6271
 
-
 
6272
  def send_getAmazonOutSyncItems(self, item_id):
-
 
6273
    self._oprot.writeMessageBegin('getAmazonOutSyncItems', TMessageType.CALL, self._seqid)
-
 
6274
    args = getAmazonOutSyncItems_args()
-
 
6275
    args.item_id = item_id
-
 
6276
    args.write(self._oprot)
-
 
6277
    self._oprot.writeMessageEnd()
-
 
6278
    self._oprot.trans.flush()
-
 
6279
 
-
 
6280
  def recv_getAmazonOutSyncItems(self, ):
-
 
6281
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
-
 
6282
    if mtype == TMessageType.EXCEPTION:
-
 
6283
      x = TApplicationException()
-
 
6284
      x.read(self._iprot)
-
 
6285
      self._iprot.readMessageEnd()
-
 
6286
      raise x
-
 
6287
    result = getAmazonOutSyncItems_result()
-
 
6288
    result.read(self._iprot)
-
 
6289
    self._iprot.readMessageEnd()
-
 
6290
    if result.success is not None:
-
 
6291
      return result.success
-
 
6292
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getAmazonOutSyncItems failed: unknown result");
-
 
6293
 
-
 
6294
  def getAllPrivateDealsComparison(self, ):
-
 
6295
    self.send_getAllPrivateDealsComparison()
-
 
6296
    return self.recv_getAllPrivateDealsComparison()
-
 
6297
 
-
 
6298
  def send_getAllPrivateDealsComparison(self, ):
-
 
6299
    self._oprot.writeMessageBegin('getAllPrivateDealsComparison', TMessageType.CALL, self._seqid)
-
 
6300
    args = getAllPrivateDealsComparison_args()
-
 
6301
    args.write(self._oprot)
-
 
6302
    self._oprot.writeMessageEnd()
-
 
6303
    self._oprot.trans.flush()
-
 
6304
 
-
 
6305
  def recv_getAllPrivateDealsComparison(self, ):
-
 
6306
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
-
 
6307
    if mtype == TMessageType.EXCEPTION:
-
 
6308
      x = TApplicationException()
-
 
6309
      x.read(self._iprot)
-
 
6310
      self._iprot.readMessageEnd()
-
 
6311
      raise x
-
 
6312
    result = getAllPrivateDealsComparison_result()
-
 
6313
    result.read(self._iprot)
-
 
6314
    self._iprot.readMessageEnd()
-
 
6315
    if result.success is not None:
-
 
6316
      return result.success
-
 
6317
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getAllPrivateDealsComparison failed: unknown result");
-
 
6318
 
6254
 
6319
 
6255
class Processor(shop2020.thriftpy.generic.GenericService.Processor, Iface, TProcessor):
6320
class Processor(shop2020.thriftpy.generic.GenericService.Processor, Iface, TProcessor):
6256
  def __init__(self, handler):
6321
  def __init__(self, handler):
6257
    shop2020.thriftpy.generic.GenericService.Processor.__init__(self, handler)
6322
    shop2020.thriftpy.generic.GenericService.Processor.__init__(self, handler)
6258
    self._processMap["addItem"] = Processor.process_addItem
6323
    self._processMap["addItem"] = Processor.process_addItem
Line 6418... Line 6483...
6418
    self._processMap["getPrivateDealItems"] = Processor.process_getPrivateDealItems
6483
    self._processMap["getPrivateDealItems"] = Processor.process_getPrivateDealItems
6419
    self._processMap["getAllActivePrivateDeals"] = Processor.process_getAllActivePrivateDeals
6484
    self._processMap["getAllActivePrivateDeals"] = Processor.process_getAllActivePrivateDeals
6420
    self._processMap["addOrUpdatePrivateDeal"] = Processor.process_addOrUpdatePrivateDeal
6485
    self._processMap["addOrUpdatePrivateDeal"] = Processor.process_addOrUpdatePrivateDeal
6421
    self._processMap["getPrivateDealsCatalogIds"] = Processor.process_getPrivateDealsCatalogIds
6486
    self._processMap["getPrivateDealsCatalogIds"] = Processor.process_getPrivateDealsCatalogIds
6422
    self._processMap["getPrivateDealsCount"] = Processor.process_getPrivateDealsCount
6487
    self._processMap["getPrivateDealsCount"] = Processor.process_getPrivateDealsCount
-
 
6488
    self._processMap["getAmazonOutSyncItems"] = Processor.process_getAmazonOutSyncItems
-
 
6489
    self._processMap["getAllPrivateDealsComparison"] = Processor.process_getAllPrivateDealsComparison
6423
 
6490
 
6424
  def process(self, iprot, oprot):
6491
  def process(self, iprot, oprot):
6425
    (name, type, seqid) = iprot.readMessageBegin()
6492
    (name, type, seqid) = iprot.readMessageBegin()
6426
    if name not in self._processMap:
6493
    if name not in self._processMap:
6427
      iprot.skip(TType.STRUCT)
6494
      iprot.skip(TType.STRUCT)
Line 8381... Line 8448...
8381
    oprot.writeMessageBegin("getPrivateDealsCount", TMessageType.REPLY, seqid)
8448
    oprot.writeMessageBegin("getPrivateDealsCount", TMessageType.REPLY, seqid)
8382
    result.write(oprot)
8449
    result.write(oprot)
8383
    oprot.writeMessageEnd()
8450
    oprot.writeMessageEnd()
8384
    oprot.trans.flush()
8451
    oprot.trans.flush()
8385
 
8452
 
-
 
8453
  def process_getAmazonOutSyncItems(self, seqid, iprot, oprot):
-
 
8454
    args = getAmazonOutSyncItems_args()
-
 
8455
    args.read(iprot)
-
 
8456
    iprot.readMessageEnd()
-
 
8457
    result = getAmazonOutSyncItems_result()
-
 
8458
    result.success = self._handler.getAmazonOutSyncItems(args.item_id)
-
 
8459
    oprot.writeMessageBegin("getAmazonOutSyncItems", TMessageType.REPLY, seqid)
-
 
8460
    result.write(oprot)
-
 
8461
    oprot.writeMessageEnd()
-
 
8462
    oprot.trans.flush()
-
 
8463
 
-
 
8464
  def process_getAllPrivateDealsComparison(self, seqid, iprot, oprot):
-
 
8465
    args = getAllPrivateDealsComparison_args()
-
 
8466
    args.read(iprot)
-
 
8467
    iprot.readMessageEnd()
-
 
8468
    result = getAllPrivateDealsComparison_result()
-
 
8469
    result.success = self._handler.getAllPrivateDealsComparison()
-
 
8470
    oprot.writeMessageBegin("getAllPrivateDealsComparison", TMessageType.REPLY, seqid)
-
 
8471
    result.write(oprot)
-
 
8472
    oprot.writeMessageEnd()
-
 
8473
    oprot.trans.flush()
-
 
8474
 
8386
 
8475
 
8387
# HELPER FUNCTIONS AND STRUCTURES
8476
# HELPER FUNCTIONS AND STRUCTURES
8388
 
8477
 
8389
class addItem_args:
8478
class addItem_args:
8390
  """
8479
  """
Line 29408... Line 29497...
29408
      oprot.writeFieldEnd()
29497
      oprot.writeFieldEnd()
29409
    oprot.writeFieldStop()
29498
    oprot.writeFieldStop()
29410
    oprot.writeStructEnd()
29499
    oprot.writeStructEnd()
29411
 
29500
 
29412
  def validate(self):
29501
  def validate(self):
-
 
29502
    return
-
 
29503
 
-
 
29504
 
-
 
29505
  def __repr__(self):
-
 
29506
    L = ['%s=%r' % (key, value)
-
 
29507
      for key, value in self.__dict__.iteritems()]
-
 
29508
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
29509
 
-
 
29510
  def __eq__(self, other):
-
 
29511
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
29512
 
-
 
29513
  def __ne__(self, other):
-
 
29514
    return not (self == other)
-
 
29515
 
-
 
29516
class getAmazonOutSyncItems_args:
-
 
29517
  """
-
 
29518
  Attributes:
-
 
29519
   - item_id
-
 
29520
  """
-
 
29521
 
-
 
29522
  thrift_spec = (
-
 
29523
    None, # 0
-
 
29524
    (1, TType.I64, 'item_id', None, None, ), # 1
-
 
29525
  )
-
 
29526
 
-
 
29527
  def __init__(self, item_id=None,):
-
 
29528
    self.item_id = item_id
-
 
29529
 
-
 
29530
  def read(self, iprot):
-
 
29531
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
29532
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
29533
      return
-
 
29534
    iprot.readStructBegin()
-
 
29535
    while True:
-
 
29536
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
29537
      if ftype == TType.STOP:
-
 
29538
        break
-
 
29539
      if fid == 1:
-
 
29540
        if ftype == TType.I64:
-
 
29541
          self.item_id = iprot.readI64();
-
 
29542
        else:
-
 
29543
          iprot.skip(ftype)
-
 
29544
      else:
-
 
29545
        iprot.skip(ftype)
-
 
29546
      iprot.readFieldEnd()
-
 
29547
    iprot.readStructEnd()
-
 
29548
 
-
 
29549
  def write(self, oprot):
-
 
29550
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
29551
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
29552
      return
-
 
29553
    oprot.writeStructBegin('getAmazonOutSyncItems_args')
-
 
29554
    if self.item_id is not None:
-
 
29555
      oprot.writeFieldBegin('item_id', TType.I64, 1)
-
 
29556
      oprot.writeI64(self.item_id)
-
 
29557
      oprot.writeFieldEnd()
-
 
29558
    oprot.writeFieldStop()
-
 
29559
    oprot.writeStructEnd()
-
 
29560
 
-
 
29561
  def validate(self):
-
 
29562
    return
-
 
29563
 
-
 
29564
 
-
 
29565
  def __repr__(self):
-
 
29566
    L = ['%s=%r' % (key, value)
-
 
29567
      for key, value in self.__dict__.iteritems()]
-
 
29568
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
29569
 
-
 
29570
  def __eq__(self, other):
-
 
29571
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
29572
 
-
 
29573
  def __ne__(self, other):
-
 
29574
    return not (self == other)
-
 
29575
 
-
 
29576
class getAmazonOutSyncItems_result:
-
 
29577
  """
-
 
29578
  Attributes:
-
 
29579
   - success
-
 
29580
  """
-
 
29581
 
-
 
29582
  thrift_spec = (
-
 
29583
    (0, TType.STRUCT, 'success', (AmazonOutOfSync, AmazonOutOfSync.thrift_spec), None, ), # 0
-
 
29584
  )
-
 
29585
 
-
 
29586
  def __init__(self, success=None,):
-
 
29587
    self.success = success
-
 
29588
 
-
 
29589
  def read(self, iprot):
-
 
29590
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
29591
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
29592
      return
-
 
29593
    iprot.readStructBegin()
-
 
29594
    while True:
-
 
29595
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
29596
      if ftype == TType.STOP:
-
 
29597
        break
-
 
29598
      if fid == 0:
-
 
29599
        if ftype == TType.STRUCT:
-
 
29600
          self.success = AmazonOutOfSync()
-
 
29601
          self.success.read(iprot)
-
 
29602
        else:
-
 
29603
          iprot.skip(ftype)
-
 
29604
      else:
-
 
29605
        iprot.skip(ftype)
-
 
29606
      iprot.readFieldEnd()
-
 
29607
    iprot.readStructEnd()
-
 
29608
 
-
 
29609
  def write(self, oprot):
-
 
29610
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
29611
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
29612
      return
-
 
29613
    oprot.writeStructBegin('getAmazonOutSyncItems_result')
-
 
29614
    if self.success is not None:
-
 
29615
      oprot.writeFieldBegin('success', TType.STRUCT, 0)
-
 
29616
      self.success.write(oprot)
-
 
29617
      oprot.writeFieldEnd()
-
 
29618
    oprot.writeFieldStop()
-
 
29619
    oprot.writeStructEnd()
-
 
29620
 
-
 
29621
  def validate(self):
-
 
29622
    return
-
 
29623
 
-
 
29624
 
-
 
29625
  def __repr__(self):
-
 
29626
    L = ['%s=%r' % (key, value)
-
 
29627
      for key, value in self.__dict__.iteritems()]
-
 
29628
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
29629
 
-
 
29630
  def __eq__(self, other):
-
 
29631
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
29632
 
-
 
29633
  def __ne__(self, other):
-
 
29634
    return not (self == other)
-
 
29635
 
-
 
29636
class getAllPrivateDealsComparison_args:
-
 
29637
 
-
 
29638
  thrift_spec = (
-
 
29639
  )
-
 
29640
 
-
 
29641
  def read(self, iprot):
-
 
29642
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
29643
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
29644
      return
-
 
29645
    iprot.readStructBegin()
-
 
29646
    while True:
-
 
29647
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
29648
      if ftype == TType.STOP:
-
 
29649
        break
-
 
29650
      else:
-
 
29651
        iprot.skip(ftype)
-
 
29652
      iprot.readFieldEnd()
-
 
29653
    iprot.readStructEnd()
-
 
29654
 
-
 
29655
  def write(self, oprot):
-
 
29656
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
29657
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
29658
      return
-
 
29659
    oprot.writeStructBegin('getAllPrivateDealsComparison_args')
-
 
29660
    oprot.writeFieldStop()
-
 
29661
    oprot.writeStructEnd()
-
 
29662
 
-
 
29663
  def validate(self):
-
 
29664
    return
-
 
29665
 
-
 
29666
 
-
 
29667
  def __repr__(self):
-
 
29668
    L = ['%s=%r' % (key, value)
-
 
29669
      for key, value in self.__dict__.iteritems()]
-
 
29670
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
29671
 
-
 
29672
  def __eq__(self, other):
-
 
29673
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
29674
 
-
 
29675
  def __ne__(self, other):
-
 
29676
    return not (self == other)
-
 
29677
 
-
 
29678
class getAllPrivateDealsComparison_result:
-
 
29679
  """
-
 
29680
  Attributes:
-
 
29681
   - success
-
 
29682
  """
-
 
29683
 
-
 
29684
  thrift_spec = (
-
 
29685
    (0, TType.LIST, 'success', (TType.STRUCT,(PdPriceComp, PdPriceComp.thrift_spec)), None, ), # 0
-
 
29686
  )
-
 
29687
 
-
 
29688
  def __init__(self, success=None,):
-
 
29689
    self.success = success
-
 
29690
 
-
 
29691
  def read(self, iprot):
-
 
29692
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
29693
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
29694
      return
-
 
29695
    iprot.readStructBegin()
-
 
29696
    while True:
-
 
29697
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
29698
      if ftype == TType.STOP:
-
 
29699
        break
-
 
29700
      if fid == 0:
-
 
29701
        if ftype == TType.LIST:
-
 
29702
          self.success = []
-
 
29703
          (_etype681, _size678) = iprot.readListBegin()
-
 
29704
          for _i682 in xrange(_size678):
-
 
29705
            _elem683 = PdPriceComp()
-
 
29706
            _elem683.read(iprot)
-
 
29707
            self.success.append(_elem683)
-
 
29708
          iprot.readListEnd()
-
 
29709
        else:
-
 
29710
          iprot.skip(ftype)
-
 
29711
      else:
-
 
29712
        iprot.skip(ftype)
-
 
29713
      iprot.readFieldEnd()
-
 
29714
    iprot.readStructEnd()
-
 
29715
 
-
 
29716
  def write(self, oprot):
-
 
29717
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
29718
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
29719
      return
-
 
29720
    oprot.writeStructBegin('getAllPrivateDealsComparison_result')
-
 
29721
    if self.success is not None:
-
 
29722
      oprot.writeFieldBegin('success', TType.LIST, 0)
-
 
29723
      oprot.writeListBegin(TType.STRUCT, len(self.success))
-
 
29724
      for iter684 in self.success:
-
 
29725
        iter684.write(oprot)
-
 
29726
      oprot.writeListEnd()
-
 
29727
      oprot.writeFieldEnd()
-
 
29728
    oprot.writeFieldStop()
-
 
29729
    oprot.writeStructEnd()
-
 
29730
 
-
 
29731
  def validate(self):
29413
    return
29732
    return
29414
 
29733
 
29415
 
29734
 
29416
  def __repr__(self):
29735
  def __repr__(self):
29417
    L = ['%s=%r' % (key, value)
29736
    L = ['%s=%r' % (key, value)