Subversion Repositories SmartDukaan

Rev

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

Rev 12243 Rev 12256
Line 1215... Line 1215...
1215
    Parameters:
1215
    Parameters:
1216
     - delta
1216
     - delta
1217
    """
1217
    """
1218
    pass
1218
    pass
1219
 
1219
 
-
 
1220
  def getUploadResultById(self, uploadId):
-
 
1221
    """
-
 
1222
    Parameters:
-
 
1223
     - uploadId
-
 
1224
    """
-
 
1225
    pass
-
 
1226
 
1220
 
1227
 
1221
class Client(shop2020.thriftpy.generic.GenericService.Client, Iface):
1228
class Client(shop2020.thriftpy.generic.GenericService.Client, Iface):
1222
  def __init__(self, iprot, oprot=None):
1229
  def __init__(self, iprot, oprot=None):
1223
    shop2020.thriftpy.generic.GenericService.Client.__init__(self, iprot, oprot)
1230
    shop2020.thriftpy.generic.GenericService.Client.__init__(self, iprot, oprot)
1224
 
1231
 
Line 6442... Line 6449...
6442
    self._iprot.readMessageEnd()
6449
    self._iprot.readMessageEnd()
6443
    if result.success is not None:
6450
    if result.success is not None:
6444
      return result.success
6451
      return result.success
6445
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getPreviousCompetitorScraping failed: unknown result");
6452
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getPreviousCompetitorScraping failed: unknown result");
6446
 
6453
 
-
 
6454
  def getUploadResultById(self, uploadId):
-
 
6455
    """
-
 
6456
    Parameters:
-
 
6457
     - uploadId
-
 
6458
    """
-
 
6459
    self.send_getUploadResultById(uploadId)
-
 
6460
    return self.recv_getUploadResultById()
-
 
6461
 
-
 
6462
  def send_getUploadResultById(self, uploadId):
-
 
6463
    self._oprot.writeMessageBegin('getUploadResultById', TMessageType.CALL, self._seqid)
-
 
6464
    args = getUploadResultById_args()
-
 
6465
    args.uploadId = uploadId
-
 
6466
    args.write(self._oprot)
-
 
6467
    self._oprot.writeMessageEnd()
-
 
6468
    self._oprot.trans.flush()
-
 
6469
 
-
 
6470
  def recv_getUploadResultById(self, ):
-
 
6471
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
-
 
6472
    if mtype == TMessageType.EXCEPTION:
-
 
6473
      x = TApplicationException()
-
 
6474
      x.read(self._iprot)
-
 
6475
      self._iprot.readMessageEnd()
-
 
6476
      raise x
-
 
6477
    result = getUploadResultById_result()
-
 
6478
    result.read(self._iprot)
-
 
6479
    self._iprot.readMessageEnd()
-
 
6480
    if result.success is not None:
-
 
6481
      return result.success
-
 
6482
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getUploadResultById failed: unknown result");
-
 
6483
 
6447
 
6484
 
6448
class Processor(shop2020.thriftpy.generic.GenericService.Processor, Iface, TProcessor):
6485
class Processor(shop2020.thriftpy.generic.GenericService.Processor, Iface, TProcessor):
6449
  def __init__(self, handler):
6486
  def __init__(self, handler):
6450
    shop2020.thriftpy.generic.GenericService.Processor.__init__(self, handler)
6487
    shop2020.thriftpy.generic.GenericService.Processor.__init__(self, handler)
6451
    self._processMap["addItem"] = Processor.process_addItem
6488
    self._processMap["addItem"] = Processor.process_addItem
Line 6617... Line 6654...
6617
    self._processMap["getAllPrivateDealsComparison"] = Processor.process_getAllPrivateDealsComparison
6654
    self._processMap["getAllPrivateDealsComparison"] = Processor.process_getAllPrivateDealsComparison
6618
    self._processMap["getAllSnapdealMarketplaceItem"] = Processor.process_getAllSnapdealMarketplaceItem
6655
    self._processMap["getAllSnapdealMarketplaceItem"] = Processor.process_getAllSnapdealMarketplaceItem
6619
    self._processMap["getAllFlipkartMarketplaceItem"] = Processor.process_getAllFlipkartMarketplaceItem
6656
    self._processMap["getAllFlipkartMarketplaceItem"] = Processor.process_getAllFlipkartMarketplaceItem
6620
    self._processMap["addCompetitorScraping"] = Processor.process_addCompetitorScraping
6657
    self._processMap["addCompetitorScraping"] = Processor.process_addCompetitorScraping
6621
    self._processMap["getPreviousCompetitorScraping"] = Processor.process_getPreviousCompetitorScraping
6658
    self._processMap["getPreviousCompetitorScraping"] = Processor.process_getPreviousCompetitorScraping
-
 
6659
    self._processMap["getUploadResultById"] = Processor.process_getUploadResultById
6622
 
6660
 
6623
  def process(self, iprot, oprot):
6661
  def process(self, iprot, oprot):
6624
    (name, type, seqid) = iprot.readMessageBegin()
6662
    (name, type, seqid) = iprot.readMessageBegin()
6625
    if name not in self._processMap:
6663
    if name not in self._processMap:
6626
      iprot.skip(TType.STRUCT)
6664
      iprot.skip(TType.STRUCT)
Line 8646... Line 8684...
8646
    oprot.writeMessageBegin("getPreviousCompetitorScraping", TMessageType.REPLY, seqid)
8684
    oprot.writeMessageBegin("getPreviousCompetitorScraping", TMessageType.REPLY, seqid)
8647
    result.write(oprot)
8685
    result.write(oprot)
8648
    oprot.writeMessageEnd()
8686
    oprot.writeMessageEnd()
8649
    oprot.trans.flush()
8687
    oprot.trans.flush()
8650
 
8688
 
-
 
8689
  def process_getUploadResultById(self, seqid, iprot, oprot):
-
 
8690
    args = getUploadResultById_args()
-
 
8691
    args.read(iprot)
-
 
8692
    iprot.readMessageEnd()
-
 
8693
    result = getUploadResultById_result()
-
 
8694
    result.success = self._handler.getUploadResultById(args.uploadId)
-
 
8695
    oprot.writeMessageBegin("getUploadResultById", TMessageType.REPLY, seqid)
-
 
8696
    result.write(oprot)
-
 
8697
    oprot.writeMessageEnd()
-
 
8698
    oprot.trans.flush()
-
 
8699
 
8651
 
8700
 
8652
# HELPER FUNCTIONS AND STRUCTURES
8701
# HELPER FUNCTIONS AND STRUCTURES
8653
 
8702
 
8654
class addItem_args:
8703
class addItem_args:
8655
  """
8704
  """
Line 30363... Line 30412...
30363
      oprot.writeListEnd()
30412
      oprot.writeListEnd()
30364
      oprot.writeFieldEnd()
30413
      oprot.writeFieldEnd()
30365
    oprot.writeFieldStop()
30414
    oprot.writeFieldStop()
30366
    oprot.writeStructEnd()
30415
    oprot.writeStructEnd()
30367
 
30416
 
-
 
30417
  def validate(self):
-
 
30418
    return
-
 
30419
 
-
 
30420
 
-
 
30421
  def __repr__(self):
-
 
30422
    L = ['%s=%r' % (key, value)
-
 
30423
      for key, value in self.__dict__.iteritems()]
-
 
30424
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
30425
 
-
 
30426
  def __eq__(self, other):
-
 
30427
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
30428
 
-
 
30429
  def __ne__(self, other):
-
 
30430
    return not (self == other)
-
 
30431
 
-
 
30432
class getUploadResultById_args:
-
 
30433
  """
-
 
30434
  Attributes:
-
 
30435
   - uploadId
-
 
30436
  """
-
 
30437
 
-
 
30438
  thrift_spec = (
-
 
30439
    None, # 0
-
 
30440
    (1, TType.I64, 'uploadId', None, None, ), # 1
-
 
30441
  )
-
 
30442
 
-
 
30443
  def __init__(self, uploadId=None,):
-
 
30444
    self.uploadId = uploadId
-
 
30445
 
-
 
30446
  def read(self, iprot):
-
 
30447
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
30448
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
30449
      return
-
 
30450
    iprot.readStructBegin()
-
 
30451
    while True:
-
 
30452
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
30453
      if ftype == TType.STOP:
-
 
30454
        break
-
 
30455
      if fid == 1:
-
 
30456
        if ftype == TType.I64:
-
 
30457
          self.uploadId = iprot.readI64();
-
 
30458
        else:
-
 
30459
          iprot.skip(ftype)
-
 
30460
      else:
-
 
30461
        iprot.skip(ftype)
-
 
30462
      iprot.readFieldEnd()
-
 
30463
    iprot.readStructEnd()
-
 
30464
 
-
 
30465
  def write(self, oprot):
-
 
30466
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
30467
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
30468
      return
-
 
30469
    oprot.writeStructBegin('getUploadResultById_args')
-
 
30470
    if self.uploadId is not None:
-
 
30471
      oprot.writeFieldBegin('uploadId', TType.I64, 1)
-
 
30472
      oprot.writeI64(self.uploadId)
-
 
30473
      oprot.writeFieldEnd()
-
 
30474
    oprot.writeFieldStop()
-
 
30475
    oprot.writeStructEnd()
-
 
30476
 
-
 
30477
  def validate(self):
-
 
30478
    return
-
 
30479
 
-
 
30480
 
-
 
30481
  def __repr__(self):
-
 
30482
    L = ['%s=%r' % (key, value)
-
 
30483
      for key, value in self.__dict__.iteritems()]
-
 
30484
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
30485
 
-
 
30486
  def __eq__(self, other):
-
 
30487
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
30488
 
-
 
30489
  def __ne__(self, other):
-
 
30490
    return not (self == other)
-
 
30491
 
-
 
30492
class getUploadResultById_result:
-
 
30493
  """
-
 
30494
  Attributes:
-
 
30495
   - success
-
 
30496
  """
-
 
30497
 
-
 
30498
  thrift_spec = (
-
 
30499
    (0, TType.LIST, 'success', (TType.STRUCT,(CompetitorPricing, CompetitorPricing.thrift_spec)), None, ), # 0
-
 
30500
  )
-
 
30501
 
-
 
30502
  def __init__(self, success=None,):
-
 
30503
    self.success = success
-
 
30504
 
-
 
30505
  def read(self, iprot):
-
 
30506
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
30507
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
30508
      return
-
 
30509
    iprot.readStructBegin()
-
 
30510
    while True:
-
 
30511
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
30512
      if ftype == TType.STOP:
-
 
30513
        break
-
 
30514
      if fid == 0:
-
 
30515
        if ftype == TType.LIST:
-
 
30516
          self.success = []
-
 
30517
          (_etype718, _size715) = iprot.readListBegin()
-
 
30518
          for _i719 in xrange(_size715):
-
 
30519
            _elem720 = CompetitorPricing()
-
 
30520
            _elem720.read(iprot)
-
 
30521
            self.success.append(_elem720)
-
 
30522
          iprot.readListEnd()
-
 
30523
        else:
-
 
30524
          iprot.skip(ftype)
-
 
30525
      else:
-
 
30526
        iprot.skip(ftype)
-
 
30527
      iprot.readFieldEnd()
-
 
30528
    iprot.readStructEnd()
-
 
30529
 
-
 
30530
  def write(self, oprot):
-
 
30531
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
30532
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
30533
      return
-
 
30534
    oprot.writeStructBegin('getUploadResultById_result')
-
 
30535
    if self.success is not None:
-
 
30536
      oprot.writeFieldBegin('success', TType.LIST, 0)
-
 
30537
      oprot.writeListBegin(TType.STRUCT, len(self.success))
-
 
30538
      for iter721 in self.success:
-
 
30539
        iter721.write(oprot)
-
 
30540
      oprot.writeListEnd()
-
 
30541
      oprot.writeFieldEnd()
-
 
30542
    oprot.writeFieldStop()
-
 
30543
    oprot.writeStructEnd()
-
 
30544
 
30368
  def validate(self):
30545
  def validate(self):
30369
    return
30546
    return
30370
 
30547
 
30371
 
30548
 
30372
  def __repr__(self):
30549
  def __repr__(self):