Subversion Repositories SmartDukaan

Rev

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

Rev 10097 Rev 10140
Line 1102... Line 1102...
1102
    pass
1102
    pass
1103
 
1103
 
1104
  def getAllFkItems(self, ):
1104
  def getAllFkItems(self, ):
1105
    pass
1105
    pass
1106
 
1106
 
-
 
1107
  def getFlipkartItemBySkyAtFlipkart(self, sku):
-
 
1108
    """
-
 
1109
    Parameters:
-
 
1110
     - sku
-
 
1111
    """
-
 
1112
    pass
-
 
1113
 
1107
 
1114
 
1108
class Client(shop2020.thriftpy.generic.GenericService.Client, Iface):
1115
class Client(shop2020.thriftpy.generic.GenericService.Client, Iface):
1109
  def __init__(self, iprot, oprot=None):
1116
  def __init__(self, iprot, oprot=None):
1110
    shop2020.thriftpy.generic.GenericService.Client.__init__(self, iprot, oprot)
1117
    shop2020.thriftpy.generic.GenericService.Client.__init__(self, iprot, oprot)
1111
 
1118
 
Line 5797... Line 5804...
5797
    self._iprot.readMessageEnd()
5804
    self._iprot.readMessageEnd()
5798
    if result.success is not None:
5805
    if result.success is not None:
5799
      return result.success
5806
      return result.success
5800
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getAllFkItems failed: unknown result");
5807
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getAllFkItems failed: unknown result");
5801
 
5808
 
-
 
5809
  def getFlipkartItemBySkyAtFlipkart(self, sku):
-
 
5810
    """
-
 
5811
    Parameters:
-
 
5812
     - sku
-
 
5813
    """
-
 
5814
    self.send_getFlipkartItemBySkyAtFlipkart(sku)
-
 
5815
    return self.recv_getFlipkartItemBySkyAtFlipkart()
-
 
5816
 
-
 
5817
  def send_getFlipkartItemBySkyAtFlipkart(self, sku):
-
 
5818
    self._oprot.writeMessageBegin('getFlipkartItemBySkyAtFlipkart', TMessageType.CALL, self._seqid)
-
 
5819
    args = getFlipkartItemBySkyAtFlipkart_args()
-
 
5820
    args.sku = sku
-
 
5821
    args.write(self._oprot)
-
 
5822
    self._oprot.writeMessageEnd()
-
 
5823
    self._oprot.trans.flush()
-
 
5824
 
-
 
5825
  def recv_getFlipkartItemBySkyAtFlipkart(self, ):
-
 
5826
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
-
 
5827
    if mtype == TMessageType.EXCEPTION:
-
 
5828
      x = TApplicationException()
-
 
5829
      x.read(self._iprot)
-
 
5830
      self._iprot.readMessageEnd()
-
 
5831
      raise x
-
 
5832
    result = getFlipkartItemBySkyAtFlipkart_result()
-
 
5833
    result.read(self._iprot)
-
 
5834
    self._iprot.readMessageEnd()
-
 
5835
    if result.success is not None:
-
 
5836
      return result.success
-
 
5837
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getFlipkartItemBySkyAtFlipkart failed: unknown result");
-
 
5838
 
5802
 
5839
 
5803
class Processor(shop2020.thriftpy.generic.GenericService.Processor, Iface, TProcessor):
5840
class Processor(shop2020.thriftpy.generic.GenericService.Processor, Iface, TProcessor):
5804
  def __init__(self, handler):
5841
  def __init__(self, handler):
5805
    shop2020.thriftpy.generic.GenericService.Processor.__init__(self, handler)
5842
    shop2020.thriftpy.generic.GenericService.Processor.__init__(self, handler)
5806
    self._processMap["addItem"] = Processor.process_addItem
5843
    self._processMap["addItem"] = Processor.process_addItem
Line 5954... Line 5991...
5954
    self._processMap["getFlipkartItems"] = Processor.process_getFlipkartItems
5991
    self._processMap["getFlipkartItems"] = Processor.process_getFlipkartItems
5955
    self._processMap["searchFlipkartItems"] = Processor.process_searchFlipkartItems
5992
    self._processMap["searchFlipkartItems"] = Processor.process_searchFlipkartItems
5956
    self._processMap["getCountForFlipkartItems"] = Processor.process_getCountForFlipkartItems
5993
    self._processMap["getCountForFlipkartItems"] = Processor.process_getCountForFlipkartItems
5957
    self._processMap["getFlipkartSearchResultCount"] = Processor.process_getFlipkartSearchResultCount
5994
    self._processMap["getFlipkartSearchResultCount"] = Processor.process_getFlipkartSearchResultCount
5958
    self._processMap["getAllFkItems"] = Processor.process_getAllFkItems
5995
    self._processMap["getAllFkItems"] = Processor.process_getAllFkItems
-
 
5996
    self._processMap["getFlipkartItemBySkyAtFlipkart"] = Processor.process_getFlipkartItemBySkyAtFlipkart
5959
 
5997
 
5960
  def process(self, iprot, oprot):
5998
  def process(self, iprot, oprot):
5961
    (name, type, seqid) = iprot.readMessageBegin()
5999
    (name, type, seqid) = iprot.readMessageBegin()
5962
    if name not in self._processMap:
6000
    if name not in self._processMap:
5963
      iprot.skip(TType.STRUCT)
6001
      iprot.skip(TType.STRUCT)
Line 7782... Line 7820...
7782
    oprot.writeMessageBegin("getAllFkItems", TMessageType.REPLY, seqid)
7820
    oprot.writeMessageBegin("getAllFkItems", TMessageType.REPLY, seqid)
7783
    result.write(oprot)
7821
    result.write(oprot)
7784
    oprot.writeMessageEnd()
7822
    oprot.writeMessageEnd()
7785
    oprot.trans.flush()
7823
    oprot.trans.flush()
7786
 
7824
 
-
 
7825
  def process_getFlipkartItemBySkyAtFlipkart(self, seqid, iprot, oprot):
-
 
7826
    args = getFlipkartItemBySkyAtFlipkart_args()
-
 
7827
    args.read(iprot)
-
 
7828
    iprot.readMessageEnd()
-
 
7829
    result = getFlipkartItemBySkyAtFlipkart_result()
-
 
7830
    result.success = self._handler.getFlipkartItemBySkyAtFlipkart(args.sku)
-
 
7831
    oprot.writeMessageBegin("getFlipkartItemBySkyAtFlipkart", TMessageType.REPLY, seqid)
-
 
7832
    result.write(oprot)
-
 
7833
    oprot.writeMessageEnd()
-
 
7834
    oprot.trans.flush()
-
 
7835
 
7787
 
7836
 
7788
# HELPER FUNCTIONS AND STRUCTURES
7837
# HELPER FUNCTIONS AND STRUCTURES
7789
 
7838
 
7790
class addItem_args:
7839
class addItem_args:
7791
  """
7840
  """
Line 27219... Line 27268...
27219
      oprot.writeFieldEnd()
27268
      oprot.writeFieldEnd()
27220
    oprot.writeFieldStop()
27269
    oprot.writeFieldStop()
27221
    oprot.writeStructEnd()
27270
    oprot.writeStructEnd()
27222
 
27271
 
27223
  def validate(self):
27272
  def validate(self):
-
 
27273
    return
-
 
27274
 
-
 
27275
 
-
 
27276
  def __repr__(self):
-
 
27277
    L = ['%s=%r' % (key, value)
-
 
27278
      for key, value in self.__dict__.iteritems()]
-
 
27279
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
27280
 
-
 
27281
  def __eq__(self, other):
-
 
27282
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
27283
 
-
 
27284
  def __ne__(self, other):
-
 
27285
    return not (self == other)
-
 
27286
 
-
 
27287
class getFlipkartItemBySkyAtFlipkart_args:
-
 
27288
  """
-
 
27289
  Attributes:
-
 
27290
   - sku
-
 
27291
  """
-
 
27292
 
-
 
27293
  thrift_spec = None
-
 
27294
  def __init__(self, sku=None,):
-
 
27295
    self.sku = sku
-
 
27296
 
-
 
27297
  def read(self, iprot):
-
 
27298
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
27299
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
27300
      return
-
 
27301
    iprot.readStructBegin()
-
 
27302
    while True:
-
 
27303
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
27304
      if ftype == TType.STOP:
-
 
27305
        break
-
 
27306
      if fid == -1:
-
 
27307
        if ftype == TType.STRING:
-
 
27308
          self.sku = iprot.readString();
-
 
27309
        else:
-
 
27310
          iprot.skip(ftype)
-
 
27311
      else:
-
 
27312
        iprot.skip(ftype)
-
 
27313
      iprot.readFieldEnd()
-
 
27314
    iprot.readStructEnd()
-
 
27315
 
-
 
27316
  def write(self, oprot):
-
 
27317
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
27318
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
27319
      return
-
 
27320
    oprot.writeStructBegin('getFlipkartItemBySkyAtFlipkart_args')
-
 
27321
    if self.sku is not None:
-
 
27322
      oprot.writeFieldBegin('sku', TType.STRING, -1)
-
 
27323
      oprot.writeString(self.sku)
-
 
27324
      oprot.writeFieldEnd()
-
 
27325
    oprot.writeFieldStop()
-
 
27326
    oprot.writeStructEnd()
-
 
27327
 
-
 
27328
  def validate(self):
-
 
27329
    return
-
 
27330
 
-
 
27331
 
-
 
27332
  def __repr__(self):
-
 
27333
    L = ['%s=%r' % (key, value)
-
 
27334
      for key, value in self.__dict__.iteritems()]
-
 
27335
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
27336
 
-
 
27337
  def __eq__(self, other):
-
 
27338
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
27339
 
-
 
27340
  def __ne__(self, other):
-
 
27341
    return not (self == other)
-
 
27342
 
-
 
27343
class getFlipkartItemBySkyAtFlipkart_result:
-
 
27344
  """
-
 
27345
  Attributes:
-
 
27346
   - success
-
 
27347
  """
-
 
27348
 
-
 
27349
  thrift_spec = (
-
 
27350
    (0, TType.STRUCT, 'success', (FlipkartItem, FlipkartItem.thrift_spec), None, ), # 0
-
 
27351
  )
-
 
27352
 
-
 
27353
  def __init__(self, success=None,):
-
 
27354
    self.success = success
-
 
27355
 
-
 
27356
  def read(self, iprot):
-
 
27357
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
27358
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
27359
      return
-
 
27360
    iprot.readStructBegin()
-
 
27361
    while True:
-
 
27362
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
27363
      if ftype == TType.STOP:
-
 
27364
        break
-
 
27365
      if fid == 0:
-
 
27366
        if ftype == TType.STRUCT:
-
 
27367
          self.success = FlipkartItem()
-
 
27368
          self.success.read(iprot)
-
 
27369
        else:
-
 
27370
          iprot.skip(ftype)
-
 
27371
      else:
-
 
27372
        iprot.skip(ftype)
-
 
27373
      iprot.readFieldEnd()
-
 
27374
    iprot.readStructEnd()
-
 
27375
 
-
 
27376
  def write(self, oprot):
-
 
27377
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
27378
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
27379
      return
-
 
27380
    oprot.writeStructBegin('getFlipkartItemBySkyAtFlipkart_result')
-
 
27381
    if self.success is not None:
-
 
27382
      oprot.writeFieldBegin('success', TType.STRUCT, 0)
-
 
27383
      self.success.write(oprot)
-
 
27384
      oprot.writeFieldEnd()
-
 
27385
    oprot.writeFieldStop()
-
 
27386
    oprot.writeStructEnd()
-
 
27387
 
-
 
27388
  def validate(self):
27224
    return
27389
    return
27225
 
27390
 
27226
 
27391
 
27227
  def __repr__(self):
27392
  def __repr__(self):
27228
    L = ['%s=%r' % (key, value)
27393
    L = ['%s=%r' % (key, value)