Subversion Repositories SmartDukaan

Rev

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

Rev 6096 Rev 6467
Line 363... Line 363...
363
    Parameters:
363
    Parameters:
364
     - item_id
364
     - item_id
365
    """
365
    """
366
    pass
366
    pass
367
 
367
 
-
 
368
  def getOurWarehouseIdForVendor(self, vendorId):
-
 
369
    """
-
 
370
    Parameters:
-
 
371
     - vendorId
-
 
372
    """
-
 
373
    pass
-
 
374
 
368
 
375
 
369
class Client(shop2020.thriftpy.generic.GenericService.Client, Iface):
376
class Client(shop2020.thriftpy.generic.GenericService.Client, Iface):
370
  def __init__(self, iprot, oprot=None):
377
  def __init__(self, iprot, oprot=None):
371
    shop2020.thriftpy.generic.GenericService.Client.__init__(self, iprot, oprot)
378
    shop2020.thriftpy.generic.GenericService.Client.__init__(self, iprot, oprot)
372
 
379
 
Line 1591... Line 1598...
1591
    result = clearItemAvailabilityCacheForItem_result()
1598
    result = clearItemAvailabilityCacheForItem_result()
1592
    result.read(self._iprot)
1599
    result.read(self._iprot)
1593
    self._iprot.readMessageEnd()
1600
    self._iprot.readMessageEnd()
1594
    return
1601
    return
1595
 
1602
 
-
 
1603
  def getOurWarehouseIdForVendor(self, vendorId):
-
 
1604
    """
-
 
1605
    Parameters:
-
 
1606
     - vendorId
-
 
1607
    """
-
 
1608
    self.send_getOurWarehouseIdForVendor(vendorId)
-
 
1609
    return self.recv_getOurWarehouseIdForVendor()
-
 
1610
 
-
 
1611
  def send_getOurWarehouseIdForVendor(self, vendorId):
-
 
1612
    self._oprot.writeMessageBegin('getOurWarehouseIdForVendor', TMessageType.CALL, self._seqid)
-
 
1613
    args = getOurWarehouseIdForVendor_args()
-
 
1614
    args.vendorId = vendorId
-
 
1615
    args.write(self._oprot)
-
 
1616
    self._oprot.writeMessageEnd()
-
 
1617
    self._oprot.trans.flush()
-
 
1618
 
-
 
1619
  def recv_getOurWarehouseIdForVendor(self, ):
-
 
1620
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
-
 
1621
    if mtype == TMessageType.EXCEPTION:
-
 
1622
      x = TApplicationException()
-
 
1623
      x.read(self._iprot)
-
 
1624
      self._iprot.readMessageEnd()
-
 
1625
      raise x
-
 
1626
    result = getOurWarehouseIdForVendor_result()
-
 
1627
    result.read(self._iprot)
-
 
1628
    self._iprot.readMessageEnd()
-
 
1629
    if result.success is not None:
-
 
1630
      return result.success
-
 
1631
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getOurWarehouseIdForVendor failed: unknown result");
-
 
1632
 
1596
 
1633
 
1597
class Processor(shop2020.thriftpy.generic.GenericService.Processor, Iface, TProcessor):
1634
class Processor(shop2020.thriftpy.generic.GenericService.Processor, Iface, TProcessor):
1598
  def __init__(self, handler):
1635
  def __init__(self, handler):
1599
    shop2020.thriftpy.generic.GenericService.Processor.__init__(self, handler)
1636
    shop2020.thriftpy.generic.GenericService.Processor.__init__(self, handler)
1600
    self._processMap["addWarehouse"] = Processor.process_addWarehouse
1637
    self._processMap["addWarehouse"] = Processor.process_addWarehouse
Line 1631... Line 1668...
1631
    self._processMap["getAllVendorItemMappings"] = Processor.process_getAllVendorItemMappings
1668
    self._processMap["getAllVendorItemMappings"] = Processor.process_getAllVendorItemMappings
1632
    self._processMap["getInventorySnapshot"] = Processor.process_getInventorySnapshot
1669
    self._processMap["getInventorySnapshot"] = Processor.process_getInventorySnapshot
1633
    self._processMap["clearItemAvailabilityCache"] = Processor.process_clearItemAvailabilityCache
1670
    self._processMap["clearItemAvailabilityCache"] = Processor.process_clearItemAvailabilityCache
1634
    self._processMap["updateVendorString"] = Processor.process_updateVendorString
1671
    self._processMap["updateVendorString"] = Processor.process_updateVendorString
1635
    self._processMap["clearItemAvailabilityCacheForItem"] = Processor.process_clearItemAvailabilityCacheForItem
1672
    self._processMap["clearItemAvailabilityCacheForItem"] = Processor.process_clearItemAvailabilityCacheForItem
-
 
1673
    self._processMap["getOurWarehouseIdForVendor"] = Processor.process_getOurWarehouseIdForVendor
1636
 
1674
 
1637
  def process(self, iprot, oprot):
1675
  def process(self, iprot, oprot):
1638
    (name, type, seqid) = iprot.readMessageBegin()
1676
    (name, type, seqid) = iprot.readMessageBegin()
1639
    if name not in self._processMap:
1677
    if name not in self._processMap:
1640
      iprot.skip(TType.STRUCT)
1678
      iprot.skip(TType.STRUCT)
Line 2109... Line 2147...
2109
    oprot.writeMessageBegin("clearItemAvailabilityCacheForItem", TMessageType.REPLY, seqid)
2147
    oprot.writeMessageBegin("clearItemAvailabilityCacheForItem", TMessageType.REPLY, seqid)
2110
    result.write(oprot)
2148
    result.write(oprot)
2111
    oprot.writeMessageEnd()
2149
    oprot.writeMessageEnd()
2112
    oprot.trans.flush()
2150
    oprot.trans.flush()
2113
 
2151
 
-
 
2152
  def process_getOurWarehouseIdForVendor(self, seqid, iprot, oprot):
-
 
2153
    args = getOurWarehouseIdForVendor_args()
-
 
2154
    args.read(iprot)
-
 
2155
    iprot.readMessageEnd()
-
 
2156
    result = getOurWarehouseIdForVendor_result()
-
 
2157
    result.success = self._handler.getOurWarehouseIdForVendor(args.vendorId)
-
 
2158
    oprot.writeMessageBegin("getOurWarehouseIdForVendor", TMessageType.REPLY, seqid)
-
 
2159
    result.write(oprot)
-
 
2160
    oprot.writeMessageEnd()
-
 
2161
    oprot.trans.flush()
-
 
2162
 
2114
 
2163
 
2115
# HELPER FUNCTIONS AND STRUCTURES
2164
# HELPER FUNCTIONS AND STRUCTURES
2116
 
2165
 
2117
class addWarehouse_args:
2166
class addWarehouse_args:
2118
  """
2167
  """
Line 6975... Line 7024...
6975
    oprot.writeFieldStop()
7024
    oprot.writeFieldStop()
6976
    oprot.writeStructEnd()
7025
    oprot.writeStructEnd()
6977
 
7026
 
6978
  def validate(self):
7027
  def validate(self):
6979
    return
7028
    return
-
 
7029
 
-
 
7030
 
-
 
7031
  def __repr__(self):
-
 
7032
    L = ['%s=%r' % (key, value)
-
 
7033
      for key, value in self.__dict__.iteritems()]
-
 
7034
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
7035
 
-
 
7036
  def __eq__(self, other):
-
 
7037
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
7038
 
-
 
7039
  def __ne__(self, other):
-
 
7040
    return not (self == other)
-
 
7041
 
-
 
7042
class getOurWarehouseIdForVendor_args:
-
 
7043
  """
-
 
7044
  Attributes:
-
 
7045
   - vendorId
-
 
7046
  """
-
 
7047
 
-
 
7048
  thrift_spec = (
-
 
7049
    None, # 0
-
 
7050
    (1, TType.I64, 'vendorId', None, None, ), # 1
-
 
7051
  )
-
 
7052
 
-
 
7053
  def __init__(self, vendorId=None,):
-
 
7054
    self.vendorId = vendorId
-
 
7055
 
-
 
7056
  def read(self, iprot):
-
 
7057
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
7058
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
7059
      return
-
 
7060
    iprot.readStructBegin()
-
 
7061
    while True:
-
 
7062
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
7063
      if ftype == TType.STOP:
-
 
7064
        break
-
 
7065
      if fid == 1:
-
 
7066
        if ftype == TType.I64:
-
 
7067
          self.vendorId = iprot.readI64();
-
 
7068
        else:
-
 
7069
          iprot.skip(ftype)
-
 
7070
      else:
-
 
7071
        iprot.skip(ftype)
-
 
7072
      iprot.readFieldEnd()
-
 
7073
    iprot.readStructEnd()
-
 
7074
 
-
 
7075
  def write(self, oprot):
-
 
7076
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
7077
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
7078
      return
-
 
7079
    oprot.writeStructBegin('getOurWarehouseIdForVendor_args')
-
 
7080
    if self.vendorId is not None:
-
 
7081
      oprot.writeFieldBegin('vendorId', TType.I64, 1)
-
 
7082
      oprot.writeI64(self.vendorId)
-
 
7083
      oprot.writeFieldEnd()
-
 
7084
    oprot.writeFieldStop()
-
 
7085
    oprot.writeStructEnd()
-
 
7086
 
-
 
7087
  def validate(self):
-
 
7088
    return
-
 
7089
 
-
 
7090
 
-
 
7091
  def __repr__(self):
-
 
7092
    L = ['%s=%r' % (key, value)
-
 
7093
      for key, value in self.__dict__.iteritems()]
-
 
7094
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
7095
 
-
 
7096
  def __eq__(self, other):
-
 
7097
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
7098
 
-
 
7099
  def __ne__(self, other):
-
 
7100
    return not (self == other)
-
 
7101
 
-
 
7102
class getOurWarehouseIdForVendor_result:
-
 
7103
  """
-
 
7104
  Attributes:
-
 
7105
   - success
-
 
7106
  """
-
 
7107
 
-
 
7108
  thrift_spec = (
-
 
7109
    (0, TType.I64, 'success', None, None, ), # 0
-
 
7110
  )
-
 
7111
 
-
 
7112
  def __init__(self, success=None,):
-
 
7113
    self.success = success
-
 
7114
 
-
 
7115
  def read(self, iprot):
-
 
7116
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
7117
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
7118
      return
-
 
7119
    iprot.readStructBegin()
-
 
7120
    while True:
-
 
7121
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
7122
      if ftype == TType.STOP:
-
 
7123
        break
-
 
7124
      if fid == 0:
-
 
7125
        if ftype == TType.I64:
-
 
7126
          self.success = iprot.readI64();
-
 
7127
        else:
-
 
7128
          iprot.skip(ftype)
-
 
7129
      else:
-
 
7130
        iprot.skip(ftype)
-
 
7131
      iprot.readFieldEnd()
-
 
7132
    iprot.readStructEnd()
-
 
7133
 
-
 
7134
  def write(self, oprot):
-
 
7135
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
7136
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
7137
      return
-
 
7138
    oprot.writeStructBegin('getOurWarehouseIdForVendor_result')
-
 
7139
    if self.success is not None:
-
 
7140
      oprot.writeFieldBegin('success', TType.I64, 0)
-
 
7141
      oprot.writeI64(self.success)
-
 
7142
      oprot.writeFieldEnd()
-
 
7143
    oprot.writeFieldStop()
-
 
7144
    oprot.writeStructEnd()
-
 
7145
 
-
 
7146
  def validate(self):
-
 
7147
    return
6980
 
7148
 
6981
 
7149
 
6982
  def __repr__(self):
7150
  def __repr__(self):
6983
    L = ['%s=%r' % (key, value)
7151
    L = ['%s=%r' % (key, value)
6984
      for key, value in self.__dict__.iteritems()]
7152
      for key, value in self.__dict__.iteritems()]