Subversion Repositories SmartDukaan

Rev

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

Rev 5527 Rev 5553
Line 130... Line 130...
130
    Parameters:
130
    Parameters:
131
     - pickUp
131
     - pickUp
132
    """
132
    """
133
    pass
133
    pass
134
 
134
 
-
 
135
  def getAllPickupStores(self, ):
-
 
136
    pass
-
 
137
 
-
 
138
  def getPickupStore(self, storeId):
-
 
139
    """
-
 
140
    Parameters:
-
 
141
     - storeId
-
 
142
    """
-
 
143
    pass
-
 
144
 
135
 
145
 
136
class Client(shop2020.thriftpy.generic.GenericService.Client, Iface):
146
class Client(shop2020.thriftpy.generic.GenericService.Client, Iface):
137
  def __init__(self, iprot, oprot=None):
147
  def __init__(self, iprot, oprot=None):
138
    shop2020.thriftpy.generic.GenericService.Client.__init__(self, iprot, oprot)
148
    shop2020.thriftpy.generic.GenericService.Client.__init__(self, iprot, oprot)
139
 
149
 
Line 529... Line 539...
529
    self._iprot.readMessageEnd()
539
    self._iprot.readMessageEnd()
530
    if result.success is not None:
540
    if result.success is not None:
531
      return result.success
541
      return result.success
532
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getProviderForPickupType failed: unknown result");
542
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getProviderForPickupType failed: unknown result");
533
 
543
 
-
 
544
  def getAllPickupStores(self, ):
-
 
545
    self.send_getAllPickupStores()
-
 
546
    return self.recv_getAllPickupStores()
-
 
547
 
-
 
548
  def send_getAllPickupStores(self, ):
-
 
549
    self._oprot.writeMessageBegin('getAllPickupStores', TMessageType.CALL, self._seqid)
-
 
550
    args = getAllPickupStores_args()
-
 
551
    args.write(self._oprot)
-
 
552
    self._oprot.writeMessageEnd()
-
 
553
    self._oprot.trans.flush()
-
 
554
 
-
 
555
  def recv_getAllPickupStores(self, ):
-
 
556
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
-
 
557
    if mtype == TMessageType.EXCEPTION:
-
 
558
      x = TApplicationException()
-
 
559
      x.read(self._iprot)
-
 
560
      self._iprot.readMessageEnd()
-
 
561
      raise x
-
 
562
    result = getAllPickupStores_result()
-
 
563
    result.read(self._iprot)
-
 
564
    self._iprot.readMessageEnd()
-
 
565
    if result.success is not None:
-
 
566
      return result.success
-
 
567
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getAllPickupStores failed: unknown result");
-
 
568
 
-
 
569
  def getPickupStore(self, storeId):
-
 
570
    """
-
 
571
    Parameters:
-
 
572
     - storeId
-
 
573
    """
-
 
574
    self.send_getPickupStore(storeId)
-
 
575
    return self.recv_getPickupStore()
-
 
576
 
-
 
577
  def send_getPickupStore(self, storeId):
-
 
578
    self._oprot.writeMessageBegin('getPickupStore', TMessageType.CALL, self._seqid)
-
 
579
    args = getPickupStore_args()
-
 
580
    args.storeId = storeId
-
 
581
    args.write(self._oprot)
-
 
582
    self._oprot.writeMessageEnd()
-
 
583
    self._oprot.trans.flush()
-
 
584
 
-
 
585
  def recv_getPickupStore(self, ):
-
 
586
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
-
 
587
    if mtype == TMessageType.EXCEPTION:
-
 
588
      x = TApplicationException()
-
 
589
      x.read(self._iprot)
-
 
590
      self._iprot.readMessageEnd()
-
 
591
      raise x
-
 
592
    result = getPickupStore_result()
-
 
593
    result.read(self._iprot)
-
 
594
    self._iprot.readMessageEnd()
-
 
595
    if result.success is not None:
-
 
596
      return result.success
-
 
597
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getPickupStore failed: unknown result");
-
 
598
 
534
 
599
 
535
class Processor(shop2020.thriftpy.generic.GenericService.Processor, Iface, TProcessor):
600
class Processor(shop2020.thriftpy.generic.GenericService.Processor, Iface, TProcessor):
536
  def __init__(self, handler):
601
  def __init__(self, handler):
537
    shop2020.thriftpy.generic.GenericService.Processor.__init__(self, handler)
602
    shop2020.thriftpy.generic.GenericService.Processor.__init__(self, handler)
538
    self._processMap["getProvider"] = Processor.process_getProvider
603
    self._processMap["getProvider"] = Processor.process_getProvider
Line 544... Line 609...
544
    self._processMap["getDestinationCode"] = Processor.process_getDestinationCode
609
    self._processMap["getDestinationCode"] = Processor.process_getDestinationCode
545
    self._processMap["getFreeAwbCount"] = Processor.process_getFreeAwbCount
610
    self._processMap["getFreeAwbCount"] = Processor.process_getFreeAwbCount
546
    self._processMap["getHolidays"] = Processor.process_getHolidays
611
    self._processMap["getHolidays"] = Processor.process_getHolidays
547
    self._processMap["getEntityLogisticsEstimation"] = Processor.process_getEntityLogisticsEstimation
612
    self._processMap["getEntityLogisticsEstimation"] = Processor.process_getEntityLogisticsEstimation
548
    self._processMap["getProviderForPickupType"] = Processor.process_getProviderForPickupType
613
    self._processMap["getProviderForPickupType"] = Processor.process_getProviderForPickupType
-
 
614
    self._processMap["getAllPickupStores"] = Processor.process_getAllPickupStores
-
 
615
    self._processMap["getPickupStore"] = Processor.process_getPickupStore
549
 
616
 
550
  def process(self, iprot, oprot):
617
  def process(self, iprot, oprot):
551
    (name, type, seqid) = iprot.readMessageBegin()
618
    (name, type, seqid) = iprot.readMessageBegin()
552
    if name not in self._processMap:
619
    if name not in self._processMap:
553
      iprot.skip(TType.STRUCT)
620
      iprot.skip(TType.STRUCT)
Line 705... Line 772...
705
    oprot.writeMessageBegin("getProviderForPickupType", TMessageType.REPLY, seqid)
772
    oprot.writeMessageBegin("getProviderForPickupType", TMessageType.REPLY, seqid)
706
    result.write(oprot)
773
    result.write(oprot)
707
    oprot.writeMessageEnd()
774
    oprot.writeMessageEnd()
708
    oprot.trans.flush()
775
    oprot.trans.flush()
709
 
776
 
-
 
777
  def process_getAllPickupStores(self, seqid, iprot, oprot):
-
 
778
    args = getAllPickupStores_args()
-
 
779
    args.read(iprot)
-
 
780
    iprot.readMessageEnd()
-
 
781
    result = getAllPickupStores_result()
-
 
782
    result.success = self._handler.getAllPickupStores()
-
 
783
    oprot.writeMessageBegin("getAllPickupStores", TMessageType.REPLY, seqid)
-
 
784
    result.write(oprot)
-
 
785
    oprot.writeMessageEnd()
-
 
786
    oprot.trans.flush()
-
 
787
 
-
 
788
  def process_getPickupStore(self, seqid, iprot, oprot):
-
 
789
    args = getPickupStore_args()
-
 
790
    args.read(iprot)
-
 
791
    iprot.readMessageEnd()
-
 
792
    result = getPickupStore_result()
-
 
793
    result.success = self._handler.getPickupStore(args.storeId)
-
 
794
    oprot.writeMessageBegin("getPickupStore", TMessageType.REPLY, seqid)
-
 
795
    result.write(oprot)
-
 
796
    oprot.writeMessageEnd()
-
 
797
    oprot.trans.flush()
-
 
798
 
710
 
799
 
711
# HELPER FUNCTIONS AND STRUCTURES
800
# HELPER FUNCTIONS AND STRUCTURES
712
 
801
 
713
class getProvider_args:
802
class getProvider_args:
714
  """
803
  """
Line 2253... Line 2342...
2253
      oprot.writeFieldEnd()
2342
      oprot.writeFieldEnd()
2254
    oprot.writeFieldStop()
2343
    oprot.writeFieldStop()
2255
    oprot.writeStructEnd()
2344
    oprot.writeStructEnd()
2256
 
2345
 
2257
  def validate(self):
2346
  def validate(self):
-
 
2347
    return
-
 
2348
 
-
 
2349
 
-
 
2350
  def __repr__(self):
-
 
2351
    L = ['%s=%r' % (key, value)
-
 
2352
      for key, value in self.__dict__.iteritems()]
-
 
2353
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
2354
 
-
 
2355
  def __eq__(self, other):
-
 
2356
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
2357
 
-
 
2358
  def __ne__(self, other):
-
 
2359
    return not (self == other)
-
 
2360
 
-
 
2361
class getAllPickupStores_args:
-
 
2362
 
-
 
2363
  thrift_spec = (
-
 
2364
  )
-
 
2365
 
-
 
2366
  def read(self, iprot):
-
 
2367
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
2368
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
2369
      return
-
 
2370
    iprot.readStructBegin()
-
 
2371
    while True:
-
 
2372
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
2373
      if ftype == TType.STOP:
-
 
2374
        break
-
 
2375
      else:
-
 
2376
        iprot.skip(ftype)
-
 
2377
      iprot.readFieldEnd()
-
 
2378
    iprot.readStructEnd()
-
 
2379
 
-
 
2380
  def write(self, oprot):
-
 
2381
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
2382
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
2383
      return
-
 
2384
    oprot.writeStructBegin('getAllPickupStores_args')
-
 
2385
    oprot.writeFieldStop()
-
 
2386
    oprot.writeStructEnd()
-
 
2387
 
-
 
2388
  def validate(self):
-
 
2389
    return
-
 
2390
 
-
 
2391
 
-
 
2392
  def __repr__(self):
-
 
2393
    L = ['%s=%r' % (key, value)
-
 
2394
      for key, value in self.__dict__.iteritems()]
-
 
2395
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
2396
 
-
 
2397
  def __eq__(self, other):
-
 
2398
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
2399
 
-
 
2400
  def __ne__(self, other):
-
 
2401
    return not (self == other)
-
 
2402
 
-
 
2403
class getAllPickupStores_result:
-
 
2404
  """
-
 
2405
  Attributes:
-
 
2406
   - success
-
 
2407
  """
-
 
2408
 
-
 
2409
  thrift_spec = (
-
 
2410
    (0, TType.LIST, 'success', (TType.STRUCT,(PickupStore, PickupStore.thrift_spec)), None, ), # 0
-
 
2411
  )
-
 
2412
 
-
 
2413
  def __init__(self, success=None,):
-
 
2414
    self.success = success
-
 
2415
 
-
 
2416
  def read(self, iprot):
-
 
2417
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
2418
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
2419
      return
-
 
2420
    iprot.readStructBegin()
-
 
2421
    while True:
-
 
2422
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
2423
      if ftype == TType.STOP:
-
 
2424
        break
-
 
2425
      if fid == 0:
-
 
2426
        if ftype == TType.LIST:
-
 
2427
          self.success = []
-
 
2428
          (_etype40, _size37) = iprot.readListBegin()
-
 
2429
          for _i41 in xrange(_size37):
-
 
2430
            _elem42 = PickupStore()
-
 
2431
            _elem42.read(iprot)
-
 
2432
            self.success.append(_elem42)
-
 
2433
          iprot.readListEnd()
-
 
2434
        else:
-
 
2435
          iprot.skip(ftype)
-
 
2436
      else:
-
 
2437
        iprot.skip(ftype)
-
 
2438
      iprot.readFieldEnd()
-
 
2439
    iprot.readStructEnd()
-
 
2440
 
-
 
2441
  def write(self, oprot):
-
 
2442
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
2443
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
2444
      return
-
 
2445
    oprot.writeStructBegin('getAllPickupStores_result')
-
 
2446
    if self.success is not None:
-
 
2447
      oprot.writeFieldBegin('success', TType.LIST, 0)
-
 
2448
      oprot.writeListBegin(TType.STRUCT, len(self.success))
-
 
2449
      for iter43 in self.success:
-
 
2450
        iter43.write(oprot)
-
 
2451
      oprot.writeListEnd()
-
 
2452
      oprot.writeFieldEnd()
-
 
2453
    oprot.writeFieldStop()
-
 
2454
    oprot.writeStructEnd()
-
 
2455
 
-
 
2456
  def validate(self):
-
 
2457
    return
-
 
2458
 
-
 
2459
 
-
 
2460
  def __repr__(self):
-
 
2461
    L = ['%s=%r' % (key, value)
-
 
2462
      for key, value in self.__dict__.iteritems()]
-
 
2463
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
2464
 
-
 
2465
  def __eq__(self, other):
-
 
2466
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
2467
 
-
 
2468
  def __ne__(self, other):
-
 
2469
    return not (self == other)
-
 
2470
 
-
 
2471
class getPickupStore_args:
-
 
2472
  """
-
 
2473
  Attributes:
-
 
2474
   - storeId
-
 
2475
  """
-
 
2476
 
-
 
2477
  thrift_spec = (
-
 
2478
    None, # 0
-
 
2479
    (1, TType.I64, 'storeId', None, None, ), # 1
-
 
2480
  )
-
 
2481
 
-
 
2482
  def __init__(self, storeId=None,):
-
 
2483
    self.storeId = storeId
-
 
2484
 
-
 
2485
  def read(self, iprot):
-
 
2486
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
2487
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
2488
      return
-
 
2489
    iprot.readStructBegin()
-
 
2490
    while True:
-
 
2491
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
2492
      if ftype == TType.STOP:
-
 
2493
        break
-
 
2494
      if fid == 1:
-
 
2495
        if ftype == TType.I64:
-
 
2496
          self.storeId = iprot.readI64();
-
 
2497
        else:
-
 
2498
          iprot.skip(ftype)
-
 
2499
      else:
-
 
2500
        iprot.skip(ftype)
-
 
2501
      iprot.readFieldEnd()
-
 
2502
    iprot.readStructEnd()
-
 
2503
 
-
 
2504
  def write(self, oprot):
-
 
2505
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
2506
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
2507
      return
-
 
2508
    oprot.writeStructBegin('getPickupStore_args')
-
 
2509
    if self.storeId is not None:
-
 
2510
      oprot.writeFieldBegin('storeId', TType.I64, 1)
-
 
2511
      oprot.writeI64(self.storeId)
-
 
2512
      oprot.writeFieldEnd()
-
 
2513
    oprot.writeFieldStop()
-
 
2514
    oprot.writeStructEnd()
-
 
2515
 
-
 
2516
  def validate(self):
-
 
2517
    return
-
 
2518
 
-
 
2519
 
-
 
2520
  def __repr__(self):
-
 
2521
    L = ['%s=%r' % (key, value)
-
 
2522
      for key, value in self.__dict__.iteritems()]
-
 
2523
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
2524
 
-
 
2525
  def __eq__(self, other):
-
 
2526
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
2527
 
-
 
2528
  def __ne__(self, other):
-
 
2529
    return not (self == other)
-
 
2530
 
-
 
2531
class getPickupStore_result:
-
 
2532
  """
-
 
2533
  Attributes:
-
 
2534
   - success
-
 
2535
  """
-
 
2536
 
-
 
2537
  thrift_spec = (
-
 
2538
    (0, TType.STRUCT, 'success', (PickupStore, PickupStore.thrift_spec), None, ), # 0
-
 
2539
  )
-
 
2540
 
-
 
2541
  def __init__(self, success=None,):
-
 
2542
    self.success = success
-
 
2543
 
-
 
2544
  def read(self, iprot):
-
 
2545
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
2546
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
2547
      return
-
 
2548
    iprot.readStructBegin()
-
 
2549
    while True:
-
 
2550
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
2551
      if ftype == TType.STOP:
-
 
2552
        break
-
 
2553
      if fid == 0:
-
 
2554
        if ftype == TType.STRUCT:
-
 
2555
          self.success = PickupStore()
-
 
2556
          self.success.read(iprot)
-
 
2557
        else:
-
 
2558
          iprot.skip(ftype)
-
 
2559
      else:
-
 
2560
        iprot.skip(ftype)
-
 
2561
      iprot.readFieldEnd()
-
 
2562
    iprot.readStructEnd()
-
 
2563
 
-
 
2564
  def write(self, oprot):
-
 
2565
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
2566
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
2567
      return
-
 
2568
    oprot.writeStructBegin('getPickupStore_result')
-
 
2569
    if self.success is not None:
-
 
2570
      oprot.writeFieldBegin('success', TType.STRUCT, 0)
-
 
2571
      self.success.write(oprot)
-
 
2572
      oprot.writeFieldEnd()
-
 
2573
    oprot.writeFieldStop()
-
 
2574
    oprot.writeStructEnd()
-
 
2575
 
-
 
2576
  def validate(self):
2258
    return
2577
    return
2259
 
2578
 
2260
 
2579
 
2261
  def __repr__(self):
2580
  def __repr__(self):
2262
    L = ['%s=%r' % (key, value)
2581
    L = ['%s=%r' % (key, value)