Subversion Repositories SmartDukaan

Rev

Rev 21838 | Blame | Compare with Previous | Last modification | View Log | RSS feed

#
# Autogenerated by Thrift Compiler (0.7.0)
#
# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
#

from thrift.Thrift import *
import shop2020.thriftpy.generic.ttypes


from thrift.transport import TTransport
from thrift.protocol import TBinaryProtocol, TProtocol
try:
  from thrift.protocol import fastbinary
except:
  fastbinary = None


class AmazonFCWarehouseLocation:
  Mumbai = 0
  Bangalore = 1
  Gurgaon = 2
  Delhi = 3

  _VALUES_TO_NAMES = {
    0: "Mumbai",
    1: "Bangalore",
    2: "Gurgaon",
    3: "Delhi",
  }

  _NAMES_TO_VALUES = {
    "Mumbai": 0,
    "Bangalore": 1,
    "Gurgaon": 2,
    "Delhi": 3,
  }

class WarehouseLocation:
  Delhi = 0
  Mumbai = 1
  Karnataka = 2
  Haryana = 3
  Rajasthan = 4
  Telangana = 5
  Gujrat = 6

  _VALUES_TO_NAMES = {
    0: "Delhi",
    1: "Mumbai",
    2: "Karnataka",
    3: "Haryana",
    4: "Rajasthan",
    5: "Telangana",
    6: "Gujrat",
  }

  _NAMES_TO_VALUES = {
    "Delhi": 0,
    "Mumbai": 1,
    "Karnataka": 2,
    "Haryana": 3,
    "Rajasthan": 4,
    "Telangana": 5,
    "Gujrat": 6,
  }

class VatType:
  SP = 0
  MRP = 1

  _VALUES_TO_NAMES = {
    0: "SP",
    1: "MRP",
  }

  _NAMES_TO_VALUES = {
    "SP": 0,
    "MRP": 1,
  }

class BillingType:
  OURS = 0
  EXTERNAL = 1
  OURS_EXTERNAL = 2

  _VALUES_TO_NAMES = {
    0: "OURS",
    1: "EXTERNAL",
    2: "OURS_EXTERNAL",
  }

  _NAMES_TO_VALUES = {
    "OURS": 0,
    "EXTERNAL": 1,
    "OURS_EXTERNAL": 2,
  }

class WarehouseType:
  OURS = 0
  THIRD_PARTY = 1
  OURS_THIRDPARTY = 2

  _VALUES_TO_NAMES = {
    0: "OURS",
    1: "THIRD_PARTY",
    2: "OURS_THIRDPARTY",
  }

  _NAMES_TO_VALUES = {
    "OURS": 0,
    "THIRD_PARTY": 1,
    "OURS_THIRDPARTY": 2,
  }

class InventoryType:
  GOOD = 0
  BAD = 1
  VIRTUAL = 2

  _VALUES_TO_NAMES = {
    0: "GOOD",
    1: "BAD",
    2: "VIRTUAL",
  }

  _NAMES_TO_VALUES = {
    "GOOD": 0,
    "BAD": 1,
    "VIRTUAL": 2,
  }

class HolidayType:
  WEEKLY = 0
  MONTHLY = 1
  SPECIFIC = 2

  _VALUES_TO_NAMES = {
    0: "WEEKLY",
    1: "MONTHLY",
    2: "SPECIFIC",
  }

  _NAMES_TO_VALUES = {
    "WEEKLY": 0,
    "MONTHLY": 1,
    "SPECIFIC": 2,
  }


class Vendor:
  """
  Attributes:
   - id
   - name
  """

  thrift_spec = (
    None, # 0
    (1, TType.I64, 'id', None, None, ), # 1
    (2, TType.STRING, 'name', None, None, ), # 2
  )

  def __init__(self, id=None, name=None,):
    self.id = id
    self.name = name

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 1:
        if ftype == TType.I64:
          self.id = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.STRING:
          self.name = iprot.readString();
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('Vendor')
    if self.id is not None:
      oprot.writeFieldBegin('id', TType.I64, 1)
      oprot.writeI64(self.id)
      oprot.writeFieldEnd()
    if self.name is not None:
      oprot.writeFieldBegin('name', TType.STRING, 2)
      oprot.writeString(self.name)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __repr__(self):
    L = ['%s=%r' % (key, value)
      for key, value in self.__dict__.iteritems()]
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

  def __eq__(self, other):
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

  def __ne__(self, other):
    return not (self == other)

class Warehouse:
  """
  Attributes:
   - id
   - displayName
   - location
   - addedOn
   - lastCheckedOn
   - tinNumber
   - pincode
   - vendorString
   - logisticsLocation
   - billingType
   - warehouseType
   - inventoryType
   - vendor
   - shippingWarehouseId
   - billingWarehouseId
   - isAvailabilityMonitored
   - transferDelayInHours
   - stateId
   - source
   - gstin
  """

  thrift_spec = (
    None, # 0
    (1, TType.I64, 'id', None, None, ), # 1
    (2, TType.STRING, 'displayName', None, None, ), # 2
    (3, TType.STRING, 'location', None, None, ), # 3
    None, # 4
    (5, TType.I64, 'addedOn', None, None, ), # 5
    (6, TType.I64, 'lastCheckedOn', None, None, ), # 6
    (7, TType.STRING, 'tinNumber', None, None, ), # 7
    (8, TType.STRING, 'pincode', None, None, ), # 8
    (9, TType.STRING, 'vendorString', None, None, ), # 9
    (10, TType.I32, 'logisticsLocation', None, None, ), # 10
    None, # 11
    (12, TType.I32, 'billingType', None, None, ), # 12
    (13, TType.I32, 'warehouseType', None, None, ), # 13
    (14, TType.I32, 'inventoryType', None, None, ), # 14
    (15, TType.STRUCT, 'vendor', (Vendor, Vendor.thrift_spec), None, ), # 15
    (16, TType.I64, 'shippingWarehouseId', None, None, ), # 16
    (17, TType.I64, 'billingWarehouseId', None, None, ), # 17
    (18, TType.BOOL, 'isAvailabilityMonitored', None, None, ), # 18
    (19, TType.I64, 'transferDelayInHours', None, None, ), # 19
    (20, TType.I64, 'stateId', None, None, ), # 20
    (21, TType.I64, 'source', None, None, ), # 21
    (22, TType.STRING, 'gstin', None, None, ), # 22
  )

  def __init__(self, id=None, displayName=None, location=None, addedOn=None, lastCheckedOn=None, tinNumber=None, pincode=None, vendorString=None, logisticsLocation=None, billingType=None, warehouseType=None, inventoryType=None, vendor=None, shippingWarehouseId=None, billingWarehouseId=None, isAvailabilityMonitored=None, transferDelayInHours=None, stateId=None, source=None, gstin=None,):
    self.id = id
    self.displayName = displayName
    self.location = location
    self.addedOn = addedOn
    self.lastCheckedOn = lastCheckedOn
    self.tinNumber = tinNumber
    self.pincode = pincode
    self.vendorString = vendorString
    self.logisticsLocation = logisticsLocation
    self.billingType = billingType
    self.warehouseType = warehouseType
    self.inventoryType = inventoryType
    self.vendor = vendor
    self.shippingWarehouseId = shippingWarehouseId
    self.billingWarehouseId = billingWarehouseId
    self.isAvailabilityMonitored = isAvailabilityMonitored
    self.transferDelayInHours = transferDelayInHours
    self.stateId = stateId
    self.source = source
    self.gstin = gstin

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 1:
        if ftype == TType.I64:
          self.id = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.STRING:
          self.displayName = iprot.readString();
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.STRING:
          self.location = iprot.readString();
        else:
          iprot.skip(ftype)
      elif fid == 5:
        if ftype == TType.I64:
          self.addedOn = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 6:
        if ftype == TType.I64:
          self.lastCheckedOn = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 7:
        if ftype == TType.STRING:
          self.tinNumber = iprot.readString();
        else:
          iprot.skip(ftype)
      elif fid == 8:
        if ftype == TType.STRING:
          self.pincode = iprot.readString();
        else:
          iprot.skip(ftype)
      elif fid == 9:
        if ftype == TType.STRING:
          self.vendorString = iprot.readString();
        else:
          iprot.skip(ftype)
      elif fid == 10:
        if ftype == TType.I32:
          self.logisticsLocation = iprot.readI32();
        else:
          iprot.skip(ftype)
      elif fid == 12:
        if ftype == TType.I32:
          self.billingType = iprot.readI32();
        else:
          iprot.skip(ftype)
      elif fid == 13:
        if ftype == TType.I32:
          self.warehouseType = iprot.readI32();
        else:
          iprot.skip(ftype)
      elif fid == 14:
        if ftype == TType.I32:
          self.inventoryType = iprot.readI32();
        else:
          iprot.skip(ftype)
      elif fid == 15:
        if ftype == TType.STRUCT:
          self.vendor = Vendor()
          self.vendor.read(iprot)
        else:
          iprot.skip(ftype)
      elif fid == 16:
        if ftype == TType.I64:
          self.shippingWarehouseId = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 17:
        if ftype == TType.I64:
          self.billingWarehouseId = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 18:
        if ftype == TType.BOOL:
          self.isAvailabilityMonitored = iprot.readBool();
        else:
          iprot.skip(ftype)
      elif fid == 19:
        if ftype == TType.I64:
          self.transferDelayInHours = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 20:
        if ftype == TType.I64:
          self.stateId = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 21:
        if ftype == TType.I64:
          self.source = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 22:
        if ftype == TType.STRING:
          self.gstin = iprot.readString();
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('Warehouse')
    if self.id is not None:
      oprot.writeFieldBegin('id', TType.I64, 1)
      oprot.writeI64(self.id)
      oprot.writeFieldEnd()
    if self.displayName is not None:
      oprot.writeFieldBegin('displayName', TType.STRING, 2)
      oprot.writeString(self.displayName)
      oprot.writeFieldEnd()
    if self.location is not None:
      oprot.writeFieldBegin('location', TType.STRING, 3)
      oprot.writeString(self.location)
      oprot.writeFieldEnd()
    if self.addedOn is not None:
      oprot.writeFieldBegin('addedOn', TType.I64, 5)
      oprot.writeI64(self.addedOn)
      oprot.writeFieldEnd()
    if self.lastCheckedOn is not None:
      oprot.writeFieldBegin('lastCheckedOn', TType.I64, 6)
      oprot.writeI64(self.lastCheckedOn)
      oprot.writeFieldEnd()
    if self.tinNumber is not None:
      oprot.writeFieldBegin('tinNumber', TType.STRING, 7)
      oprot.writeString(self.tinNumber)
      oprot.writeFieldEnd()
    if self.pincode is not None:
      oprot.writeFieldBegin('pincode', TType.STRING, 8)
      oprot.writeString(self.pincode)
      oprot.writeFieldEnd()
    if self.vendorString is not None:
      oprot.writeFieldBegin('vendorString', TType.STRING, 9)
      oprot.writeString(self.vendorString)
      oprot.writeFieldEnd()
    if self.logisticsLocation is not None:
      oprot.writeFieldBegin('logisticsLocation', TType.I32, 10)
      oprot.writeI32(self.logisticsLocation)
      oprot.writeFieldEnd()
    if self.billingType is not None:
      oprot.writeFieldBegin('billingType', TType.I32, 12)
      oprot.writeI32(self.billingType)
      oprot.writeFieldEnd()
    if self.warehouseType is not None:
      oprot.writeFieldBegin('warehouseType', TType.I32, 13)
      oprot.writeI32(self.warehouseType)
      oprot.writeFieldEnd()
    if self.inventoryType is not None:
      oprot.writeFieldBegin('inventoryType', TType.I32, 14)
      oprot.writeI32(self.inventoryType)
      oprot.writeFieldEnd()
    if self.vendor is not None:
      oprot.writeFieldBegin('vendor', TType.STRUCT, 15)
      self.vendor.write(oprot)
      oprot.writeFieldEnd()
    if self.shippingWarehouseId is not None:
      oprot.writeFieldBegin('shippingWarehouseId', TType.I64, 16)
      oprot.writeI64(self.shippingWarehouseId)
      oprot.writeFieldEnd()
    if self.billingWarehouseId is not None:
      oprot.writeFieldBegin('billingWarehouseId', TType.I64, 17)
      oprot.writeI64(self.billingWarehouseId)
      oprot.writeFieldEnd()
    if self.isAvailabilityMonitored is not None:
      oprot.writeFieldBegin('isAvailabilityMonitored', TType.BOOL, 18)
      oprot.writeBool(self.isAvailabilityMonitored)
      oprot.writeFieldEnd()
    if self.transferDelayInHours is not None:
      oprot.writeFieldBegin('transferDelayInHours', TType.I64, 19)
      oprot.writeI64(self.transferDelayInHours)
      oprot.writeFieldEnd()
    if self.stateId is not None:
      oprot.writeFieldBegin('stateId', TType.I64, 20)
      oprot.writeI64(self.stateId)
      oprot.writeFieldEnd()
    if self.source is not None:
      oprot.writeFieldBegin('source', TType.I64, 21)
      oprot.writeI64(self.source)
      oprot.writeFieldEnd()
    if self.gstin is not None:
      oprot.writeFieldBegin('gstin', TType.STRING, 22)
      oprot.writeString(self.gstin)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __repr__(self):
    L = ['%s=%r' % (key, value)
      for key, value in self.__dict__.iteritems()]
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

  def __eq__(self, other):
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

  def __ne__(self, other):
    return not (self == other)

class StateInfo:
  """
  Attributes:
   - id
   - stateName
   - vatType
   - stateCode
   - shortName
  """

  thrift_spec = (
    None, # 0
    (1, TType.I64, 'id', None, None, ), # 1
    (2, TType.STRING, 'stateName', None, None, ), # 2
    (3, TType.I32, 'vatType', None, None, ), # 3
    (4, TType.STRING, 'stateCode', None, None, ), # 4
    (5, TType.STRING, 'shortName', None, None, ), # 5
  )

  def __init__(self, id=None, stateName=None, vatType=None, stateCode=None, shortName=None,):
    self.id = id
    self.stateName = stateName
    self.vatType = vatType
    self.stateCode = stateCode
    self.shortName = shortName

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 1:
        if ftype == TType.I64:
          self.id = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.STRING:
          self.stateName = iprot.readString();
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.I32:
          self.vatType = iprot.readI32();
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.STRING:
          self.stateCode = iprot.readString();
        else:
          iprot.skip(ftype)
      elif fid == 5:
        if ftype == TType.STRING:
          self.shortName = iprot.readString();
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('StateInfo')
    if self.id is not None:
      oprot.writeFieldBegin('id', TType.I64, 1)
      oprot.writeI64(self.id)
      oprot.writeFieldEnd()
    if self.stateName is not None:
      oprot.writeFieldBegin('stateName', TType.STRING, 2)
      oprot.writeString(self.stateName)
      oprot.writeFieldEnd()
    if self.vatType is not None:
      oprot.writeFieldBegin('vatType', TType.I32, 3)
      oprot.writeI32(self.vatType)
      oprot.writeFieldEnd()
    if self.stateCode is not None:
      oprot.writeFieldBegin('stateCode', TType.STRING, 4)
      oprot.writeString(self.stateCode)
      oprot.writeFieldEnd()
    if self.shortName is not None:
      oprot.writeFieldBegin('shortName', TType.STRING, 5)
      oprot.writeString(self.shortName)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __repr__(self):
    L = ['%s=%r' % (key, value)
      for key, value in self.__dict__.iteritems()]
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

  def __eq__(self, other):
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

  def __ne__(self, other):
    return not (self == other)

class ItemInventory:
  """
  Attributes:
   - id
   - availability
   - reserved
   - held
  """

  thrift_spec = (
    None, # 0
    (1, TType.I64, 'id', None, None, ), # 1
    (2, TType.MAP, 'availability', (TType.I64,None,TType.I64,None), None, ), # 2
    (3, TType.MAP, 'reserved', (TType.I64,None,TType.I64,None), None, ), # 3
    (4, TType.MAP, 'held', (TType.I64,None,TType.I64,None), None, ), # 4
  )

  def __init__(self, id=None, availability=None, reserved=None, held=None,):
    self.id = id
    self.availability = availability
    self.reserved = reserved
    self.held = held

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 1:
        if ftype == TType.I64:
          self.id = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.MAP:
          self.availability = {}
          (_ktype1, _vtype2, _size0 ) = iprot.readMapBegin() 
          for _i4 in xrange(_size0):
            _key5 = iprot.readI64();
            _val6 = iprot.readI64();
            self.availability[_key5] = _val6
          iprot.readMapEnd()
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.MAP:
          self.reserved = {}
          (_ktype8, _vtype9, _size7 ) = iprot.readMapBegin() 
          for _i11 in xrange(_size7):
            _key12 = iprot.readI64();
            _val13 = iprot.readI64();
            self.reserved[_key12] = _val13
          iprot.readMapEnd()
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.MAP:
          self.held = {}
          (_ktype15, _vtype16, _size14 ) = iprot.readMapBegin() 
          for _i18 in xrange(_size14):
            _key19 = iprot.readI64();
            _val20 = iprot.readI64();
            self.held[_key19] = _val20
          iprot.readMapEnd()
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('ItemInventory')
    if self.id is not None:
      oprot.writeFieldBegin('id', TType.I64, 1)
      oprot.writeI64(self.id)
      oprot.writeFieldEnd()
    if self.availability is not None:
      oprot.writeFieldBegin('availability', TType.MAP, 2)
      oprot.writeMapBegin(TType.I64, TType.I64, len(self.availability))
      for kiter21,viter22 in self.availability.items():
        oprot.writeI64(kiter21)
        oprot.writeI64(viter22)
      oprot.writeMapEnd()
      oprot.writeFieldEnd()
    if self.reserved is not None:
      oprot.writeFieldBegin('reserved', TType.MAP, 3)
      oprot.writeMapBegin(TType.I64, TType.I64, len(self.reserved))
      for kiter23,viter24 in self.reserved.items():
        oprot.writeI64(kiter23)
        oprot.writeI64(viter24)
      oprot.writeMapEnd()
      oprot.writeFieldEnd()
    if self.held is not None:
      oprot.writeFieldBegin('held', TType.MAP, 4)
      oprot.writeMapBegin(TType.I64, TType.I64, len(self.held))
      for kiter25,viter26 in self.held.items():
        oprot.writeI64(kiter25)
        oprot.writeI64(viter26)
      oprot.writeMapEnd()
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __repr__(self):
    L = ['%s=%r' % (key, value)
      for key, value in self.__dict__.iteritems()]
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

  def __eq__(self, other):
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

  def __ne__(self, other):
    return not (self == other)

class ItemInventoryHistory:
  """
  Attributes:
   - item_id
   - warehouse_id
   - timestamp
   - availability
  """

  thrift_spec = (
    None, # 0
    (1, TType.I64, 'item_id', None, None, ), # 1
    (2, TType.I64, 'warehouse_id', None, None, ), # 2
    (3, TType.I64, 'timestamp', None, None, ), # 3
    (4, TType.I64, 'availability', None, None, ), # 4
  )

  def __init__(self, item_id=None, warehouse_id=None, timestamp=None, availability=None,):
    self.item_id = item_id
    self.warehouse_id = warehouse_id
    self.timestamp = timestamp
    self.availability = availability

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 1:
        if ftype == TType.I64:
          self.item_id = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.I64:
          self.warehouse_id = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.I64:
          self.timestamp = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.I64:
          self.availability = iprot.readI64();
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('ItemInventoryHistory')
    if self.item_id is not None:
      oprot.writeFieldBegin('item_id', TType.I64, 1)
      oprot.writeI64(self.item_id)
      oprot.writeFieldEnd()
    if self.warehouse_id is not None:
      oprot.writeFieldBegin('warehouse_id', TType.I64, 2)
      oprot.writeI64(self.warehouse_id)
      oprot.writeFieldEnd()
    if self.timestamp is not None:
      oprot.writeFieldBegin('timestamp', TType.I64, 3)
      oprot.writeI64(self.timestamp)
      oprot.writeFieldEnd()
    if self.availability is not None:
      oprot.writeFieldBegin('availability', TType.I64, 4)
      oprot.writeI64(self.availability)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __repr__(self):
    L = ['%s=%r' % (key, value)
      for key, value in self.__dict__.iteritems()]
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

  def __eq__(self, other):
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

  def __ne__(self, other):
    return not (self == other)

class VendorItemPricing:
  """
  Attributes:
   - vendorId
   - itemId
   - transferPrice
   - mop
   - dealerPrice
   - nlc
  """

  thrift_spec = (
    None, # 0
    (1, TType.I64, 'vendorId', None, None, ), # 1
    (2, TType.I64, 'itemId', None, None, ), # 2
    (3, TType.DOUBLE, 'transferPrice', None, None, ), # 3
    (4, TType.DOUBLE, 'mop', None, None, ), # 4
    (5, TType.DOUBLE, 'dealerPrice', None, None, ), # 5
    (6, TType.DOUBLE, 'nlc', None, None, ), # 6
  )

  def __init__(self, vendorId=None, itemId=None, transferPrice=None, mop=None, dealerPrice=None, nlc=None,):
    self.vendorId = vendorId
    self.itemId = itemId
    self.transferPrice = transferPrice
    self.mop = mop
    self.dealerPrice = dealerPrice
    self.nlc = nlc

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 1:
        if ftype == TType.I64:
          self.vendorId = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.I64:
          self.itemId = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.DOUBLE:
          self.transferPrice = iprot.readDouble();
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.DOUBLE:
          self.mop = iprot.readDouble();
        else:
          iprot.skip(ftype)
      elif fid == 5:
        if ftype == TType.DOUBLE:
          self.dealerPrice = iprot.readDouble();
        else:
          iprot.skip(ftype)
      elif fid == 6:
        if ftype == TType.DOUBLE:
          self.nlc = iprot.readDouble();
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('VendorItemPricing')
    if self.vendorId is not None:
      oprot.writeFieldBegin('vendorId', TType.I64, 1)
      oprot.writeI64(self.vendorId)
      oprot.writeFieldEnd()
    if self.itemId is not None:
      oprot.writeFieldBegin('itemId', TType.I64, 2)
      oprot.writeI64(self.itemId)
      oprot.writeFieldEnd()
    if self.transferPrice is not None:
      oprot.writeFieldBegin('transferPrice', TType.DOUBLE, 3)
      oprot.writeDouble(self.transferPrice)
      oprot.writeFieldEnd()
    if self.mop is not None:
      oprot.writeFieldBegin('mop', TType.DOUBLE, 4)
      oprot.writeDouble(self.mop)
      oprot.writeFieldEnd()
    if self.dealerPrice is not None:
      oprot.writeFieldBegin('dealerPrice', TType.DOUBLE, 5)
      oprot.writeDouble(self.dealerPrice)
      oprot.writeFieldEnd()
    if self.nlc is not None:
      oprot.writeFieldBegin('nlc', TType.DOUBLE, 6)
      oprot.writeDouble(self.nlc)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __repr__(self):
    L = ['%s=%r' % (key, value)
      for key, value in self.__dict__.iteritems()]
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

  def __eq__(self, other):
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

  def __ne__(self, other):
    return not (self == other)

class VendorItemMapping:
  """
  Attributes:
   - vendorId
   - itemKey
   - itemId
  """

  thrift_spec = (
    None, # 0
    (1, TType.I64, 'vendorId', None, None, ), # 1
    (2, TType.STRING, 'itemKey', None, None, ), # 2
    (3, TType.I64, 'itemId', None, None, ), # 3
  )

  def __init__(self, vendorId=None, itemKey=None, itemId=None,):
    self.vendorId = vendorId
    self.itemKey = itemKey
    self.itemId = itemId

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 1:
        if ftype == TType.I64:
          self.vendorId = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.STRING:
          self.itemKey = iprot.readString();
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.I64:
          self.itemId = iprot.readI64();
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('VendorItemMapping')
    if self.vendorId is not None:
      oprot.writeFieldBegin('vendorId', TType.I64, 1)
      oprot.writeI64(self.vendorId)
      oprot.writeFieldEnd()
    if self.itemKey is not None:
      oprot.writeFieldBegin('itemKey', TType.STRING, 2)
      oprot.writeString(self.itemKey)
      oprot.writeFieldEnd()
    if self.itemId is not None:
      oprot.writeFieldBegin('itemId', TType.I64, 3)
      oprot.writeI64(self.itemId)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __repr__(self):
    L = ['%s=%r' % (key, value)
      for key, value in self.__dict__.iteritems()]
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

  def __eq__(self, other):
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

  def __ne__(self, other):
    return not (self == other)

class AvailableAndReservedStock:
  """
  Attributes:
   - itemId
   - available
   - reserved
   - minimumStock
  """

  thrift_spec = (
    None, # 0
    (1, TType.I64, 'itemId', None, None, ), # 1
    (2, TType.I64, 'available', None, None, ), # 2
    (3, TType.I64, 'reserved', None, None, ), # 3
    (4, TType.I64, 'minimumStock', None, None, ), # 4
  )

  def __init__(self, itemId=None, available=None, reserved=None, minimumStock=None,):
    self.itemId = itemId
    self.available = available
    self.reserved = reserved
    self.minimumStock = minimumStock

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 1:
        if ftype == TType.I64:
          self.itemId = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.I64:
          self.available = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.I64:
          self.reserved = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.I64:
          self.minimumStock = iprot.readI64();
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('AvailableAndReservedStock')
    if self.itemId is not None:
      oprot.writeFieldBegin('itemId', TType.I64, 1)
      oprot.writeI64(self.itemId)
      oprot.writeFieldEnd()
    if self.available is not None:
      oprot.writeFieldBegin('available', TType.I64, 2)
      oprot.writeI64(self.available)
      oprot.writeFieldEnd()
    if self.reserved is not None:
      oprot.writeFieldBegin('reserved', TType.I64, 3)
      oprot.writeI64(self.reserved)
      oprot.writeFieldEnd()
    if self.minimumStock is not None:
      oprot.writeFieldBegin('minimumStock', TType.I64, 4)
      oprot.writeI64(self.minimumStock)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __repr__(self):
    L = ['%s=%r' % (key, value)
      for key, value in self.__dict__.iteritems()]
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

  def __eq__(self, other):
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

  def __ne__(self, other):
    return not (self == other)

class IgnoredInventoryUpdateItems:
  """
  Attributes:
   - itemId
   - warehouseId
  """

  thrift_spec = (
    None, # 0
    (1, TType.I64, 'itemId', None, None, ), # 1
    (2, TType.I64, 'warehouseId', None, None, ), # 2
  )

  def __init__(self, itemId=None, warehouseId=None,):
    self.itemId = itemId
    self.warehouseId = warehouseId

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 1:
        if ftype == TType.I64:
          self.itemId = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.I64:
          self.warehouseId = iprot.readI64();
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('IgnoredInventoryUpdateItems')
    if self.itemId is not None:
      oprot.writeFieldBegin('itemId', TType.I64, 1)
      oprot.writeI64(self.itemId)
      oprot.writeFieldEnd()
    if self.warehouseId is not None:
      oprot.writeFieldBegin('warehouseId', TType.I64, 2)
      oprot.writeI64(self.warehouseId)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __repr__(self):
    L = ['%s=%r' % (key, value)
      for key, value in self.__dict__.iteritems()]
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

  def __eq__(self, other):
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

  def __ne__(self, other):
    return not (self == other)

class ItemStockPurchaseParams:
  """
  Attributes:
   - item_id
   - numOfDaysStock
   - minStockLevel
  """

  thrift_spec = (
    None, # 0
    (1, TType.I64, 'item_id', None, None, ), # 1
    (2, TType.I32, 'numOfDaysStock', None, None, ), # 2
    (3, TType.I64, 'minStockLevel', None, None, ), # 3
  )

  def __init__(self, item_id=None, numOfDaysStock=None, minStockLevel=None,):
    self.item_id = item_id
    self.numOfDaysStock = numOfDaysStock
    self.minStockLevel = minStockLevel

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 1:
        if ftype == TType.I64:
          self.item_id = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.I32:
          self.numOfDaysStock = iprot.readI32();
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.I64:
          self.minStockLevel = iprot.readI64();
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('ItemStockPurchaseParams')
    if self.item_id is not None:
      oprot.writeFieldBegin('item_id', TType.I64, 1)
      oprot.writeI64(self.item_id)
      oprot.writeFieldEnd()
    if self.numOfDaysStock is not None:
      oprot.writeFieldBegin('numOfDaysStock', TType.I32, 2)
      oprot.writeI32(self.numOfDaysStock)
      oprot.writeFieldEnd()
    if self.minStockLevel is not None:
      oprot.writeFieldBegin('minStockLevel', TType.I64, 3)
      oprot.writeI64(self.minStockLevel)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __repr__(self):
    L = ['%s=%r' % (key, value)
      for key, value in self.__dict__.iteritems()]
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

  def __eq__(self, other):
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

  def __ne__(self, other):
    return not (self == other)

class InventoryServiceException(Exception):
  """
  Attributes:
   - id
   - message
  """

  thrift_spec = (
    None, # 0
    (1, TType.I64, 'id', None, None, ), # 1
    (2, TType.STRING, 'message', None, None, ), # 2
  )

  def __init__(self, id=None, message=None,):
    self.id = id
    self.message = message

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 1:
        if ftype == TType.I64:
          self.id = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.STRING:
          self.message = iprot.readString();
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('InventoryServiceException')
    if self.id is not None:
      oprot.writeFieldBegin('id', TType.I64, 1)
      oprot.writeI64(self.id)
      oprot.writeFieldEnd()
    if self.message is not None:
      oprot.writeFieldBegin('message', TType.STRING, 2)
      oprot.writeString(self.message)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __str__(self):
    return repr(self)

  def __repr__(self):
    L = ['%s=%r' % (key, value)
      for key, value in self.__dict__.iteritems()]
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

  def __eq__(self, other):
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

  def __ne__(self, other):
    return not (self == other)

class OOSStatus:
  """
  Attributes:
   - item_id
   - date
   - is_oos
   - num_orders
   - rto_orders
   - sourceId
  """

  thrift_spec = (
    None, # 0
    (1, TType.I64, 'item_id', None, None, ), # 1
    (2, TType.I64, 'date', None, None, ), # 2
    (3, TType.BOOL, 'is_oos', None, None, ), # 3
    (4, TType.I64, 'num_orders', None, None, ), # 4
    (5, TType.I64, 'rto_orders', None, None, ), # 5
    (6, TType.I32, 'sourceId', None, None, ), # 6
  )

  def __init__(self, item_id=None, date=None, is_oos=None, num_orders=None, rto_orders=None, sourceId=None,):
    self.item_id = item_id
    self.date = date
    self.is_oos = is_oos
    self.num_orders = num_orders
    self.rto_orders = rto_orders
    self.sourceId = sourceId

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 1:
        if ftype == TType.I64:
          self.item_id = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.I64:
          self.date = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.BOOL:
          self.is_oos = iprot.readBool();
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.I64:
          self.num_orders = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 5:
        if ftype == TType.I64:
          self.rto_orders = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 6:
        if ftype == TType.I32:
          self.sourceId = iprot.readI32();
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('OOSStatus')
    if self.item_id is not None:
      oprot.writeFieldBegin('item_id', TType.I64, 1)
      oprot.writeI64(self.item_id)
      oprot.writeFieldEnd()
    if self.date is not None:
      oprot.writeFieldBegin('date', TType.I64, 2)
      oprot.writeI64(self.date)
      oprot.writeFieldEnd()
    if self.is_oos is not None:
      oprot.writeFieldBegin('is_oos', TType.BOOL, 3)
      oprot.writeBool(self.is_oos)
      oprot.writeFieldEnd()
    if self.num_orders is not None:
      oprot.writeFieldBegin('num_orders', TType.I64, 4)
      oprot.writeI64(self.num_orders)
      oprot.writeFieldEnd()
    if self.rto_orders is not None:
      oprot.writeFieldBegin('rto_orders', TType.I64, 5)
      oprot.writeI64(self.rto_orders)
      oprot.writeFieldEnd()
    if self.sourceId is not None:
      oprot.writeFieldBegin('sourceId', TType.I32, 6)
      oprot.writeI32(self.sourceId)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __repr__(self):
    L = ['%s=%r' % (key, value)
      for key, value in self.__dict__.iteritems()]
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

  def __eq__(self, other):
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

  def __ne__(self, other):
    return not (self == other)

class AmazonInventorySnapshot:
  """
  Attributes:
   - item_id
   - availability
   - reserved
   - is_oos
  """

  thrift_spec = (
    None, # 0
    (1, TType.I64, 'item_id', None, None, ), # 1
    (2, TType.I64, 'availability', None, None, ), # 2
    (3, TType.I64, 'reserved', None, None, ), # 3
    (4, TType.BOOL, 'is_oos', None, None, ), # 4
  )

  def __init__(self, item_id=None, availability=None, reserved=None, is_oos=None,):
    self.item_id = item_id
    self.availability = availability
    self.reserved = reserved
    self.is_oos = is_oos

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 1:
        if ftype == TType.I64:
          self.item_id = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.I64:
          self.availability = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.I64:
          self.reserved = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.BOOL:
          self.is_oos = iprot.readBool();
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('AmazonInventorySnapshot')
    if self.item_id is not None:
      oprot.writeFieldBegin('item_id', TType.I64, 1)
      oprot.writeI64(self.item_id)
      oprot.writeFieldEnd()
    if self.availability is not None:
      oprot.writeFieldBegin('availability', TType.I64, 2)
      oprot.writeI64(self.availability)
      oprot.writeFieldEnd()
    if self.reserved is not None:
      oprot.writeFieldBegin('reserved', TType.I64, 3)
      oprot.writeI64(self.reserved)
      oprot.writeFieldEnd()
    if self.is_oos is not None:
      oprot.writeFieldBegin('is_oos', TType.BOOL, 4)
      oprot.writeBool(self.is_oos)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __repr__(self):
    L = ['%s=%r' % (key, value)
      for key, value in self.__dict__.iteritems()]
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

  def __eq__(self, other):
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

  def __ne__(self, other):
    return not (self == other)

class AmazonFbaInventorySnapshot:
  """
  Attributes:
   - item_id
   - availability
   - location
   - unfulfillable
   - reserved
   - inbound
  """

  thrift_spec = (
    None, # 0
    (1, TType.I64, 'item_id', None, None, ), # 1
    (2, TType.I64, 'availability', None, None, ), # 2
    (3, TType.I32, 'location', None, None, ), # 3
    (4, TType.I64, 'unfulfillable', None, None, ), # 4
    (5, TType.I64, 'reserved', None, None, ), # 5
    (6, TType.I64, 'inbound', None, None, ), # 6
  )

  def __init__(self, item_id=None, availability=None, location=None, unfulfillable=None, reserved=None, inbound=None,):
    self.item_id = item_id
    self.availability = availability
    self.location = location
    self.unfulfillable = unfulfillable
    self.reserved = reserved
    self.inbound = inbound

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 1:
        if ftype == TType.I64:
          self.item_id = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.I64:
          self.availability = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.I32:
          self.location = iprot.readI32();
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.I64:
          self.unfulfillable = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 5:
        if ftype == TType.I64:
          self.reserved = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 6:
        if ftype == TType.I64:
          self.inbound = iprot.readI64();
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('AmazonFbaInventorySnapshot')
    if self.item_id is not None:
      oprot.writeFieldBegin('item_id', TType.I64, 1)
      oprot.writeI64(self.item_id)
      oprot.writeFieldEnd()
    if self.availability is not None:
      oprot.writeFieldBegin('availability', TType.I64, 2)
      oprot.writeI64(self.availability)
      oprot.writeFieldEnd()
    if self.location is not None:
      oprot.writeFieldBegin('location', TType.I32, 3)
      oprot.writeI32(self.location)
      oprot.writeFieldEnd()
    if self.unfulfillable is not None:
      oprot.writeFieldBegin('unfulfillable', TType.I64, 4)
      oprot.writeI64(self.unfulfillable)
      oprot.writeFieldEnd()
    if self.reserved is not None:
      oprot.writeFieldBegin('reserved', TType.I64, 5)
      oprot.writeI64(self.reserved)
      oprot.writeFieldEnd()
    if self.inbound is not None:
      oprot.writeFieldBegin('inbound', TType.I64, 6)
      oprot.writeI64(self.inbound)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __repr__(self):
    L = ['%s=%r' % (key, value)
      for key, value in self.__dict__.iteritems()]
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

  def __eq__(self, other):
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

  def __ne__(self, other):
    return not (self == other)

class HoldInventoryDetail:
  """
  Attributes:
   - item_id
   - warehouse_id
   - held
   - source
  """

  thrift_spec = (
    None, # 0
    (1, TType.I64, 'item_id', None, None, ), # 1
    (2, TType.I64, 'warehouse_id', None, None, ), # 2
    (3, TType.I64, 'held', None, None, ), # 3
    (4, TType.I64, 'source', None, None, ), # 4
  )

  def __init__(self, item_id=None, warehouse_id=None, held=None, source=None,):
    self.item_id = item_id
    self.warehouse_id = warehouse_id
    self.held = held
    self.source = source

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 1:
        if ftype == TType.I64:
          self.item_id = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.I64:
          self.warehouse_id = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.I64:
          self.held = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.I64:
          self.source = iprot.readI64();
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('HoldInventoryDetail')
    if self.item_id is not None:
      oprot.writeFieldBegin('item_id', TType.I64, 1)
      oprot.writeI64(self.item_id)
      oprot.writeFieldEnd()
    if self.warehouse_id is not None:
      oprot.writeFieldBegin('warehouse_id', TType.I64, 2)
      oprot.writeI64(self.warehouse_id)
      oprot.writeFieldEnd()
    if self.held is not None:
      oprot.writeFieldBegin('held', TType.I64, 3)
      oprot.writeI64(self.held)
      oprot.writeFieldEnd()
    if self.source is not None:
      oprot.writeFieldBegin('source', TType.I64, 4)
      oprot.writeI64(self.source)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __repr__(self):
    L = ['%s=%r' % (key, value)
      for key, value in self.__dict__.iteritems()]
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

  def __eq__(self, other):
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

  def __ne__(self, other):
    return not (self == other)

class SnapdealInventoryItem:
  """
  Attributes:
   - item_id
   - availability
   - lastUpdatedOnSnapdeal
   - pendingOrders
   - is_oos
  """

  thrift_spec = (
    None, # 0
    (1, TType.I64, 'item_id', None, None, ), # 1
    (2, TType.I64, 'availability', None, None, ), # 2
    (3, TType.I64, 'lastUpdatedOnSnapdeal', None, None, ), # 3
    (4, TType.I64, 'pendingOrders', None, None, ), # 4
    (5, TType.BOOL, 'is_oos', None, None, ), # 5
  )

  def __init__(self, item_id=None, availability=None, lastUpdatedOnSnapdeal=None, pendingOrders=None, is_oos=None,):
    self.item_id = item_id
    self.availability = availability
    self.lastUpdatedOnSnapdeal = lastUpdatedOnSnapdeal
    self.pendingOrders = pendingOrders
    self.is_oos = is_oos

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 1:
        if ftype == TType.I64:
          self.item_id = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.I64:
          self.availability = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.I64:
          self.lastUpdatedOnSnapdeal = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.I64:
          self.pendingOrders = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 5:
        if ftype == TType.BOOL:
          self.is_oos = iprot.readBool();
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('SnapdealInventoryItem')
    if self.item_id is not None:
      oprot.writeFieldBegin('item_id', TType.I64, 1)
      oprot.writeI64(self.item_id)
      oprot.writeFieldEnd()
    if self.availability is not None:
      oprot.writeFieldBegin('availability', TType.I64, 2)
      oprot.writeI64(self.availability)
      oprot.writeFieldEnd()
    if self.lastUpdatedOnSnapdeal is not None:
      oprot.writeFieldBegin('lastUpdatedOnSnapdeal', TType.I64, 3)
      oprot.writeI64(self.lastUpdatedOnSnapdeal)
      oprot.writeFieldEnd()
    if self.pendingOrders is not None:
      oprot.writeFieldBegin('pendingOrders', TType.I64, 4)
      oprot.writeI64(self.pendingOrders)
      oprot.writeFieldEnd()
    if self.is_oos is not None:
      oprot.writeFieldBegin('is_oos', TType.BOOL, 5)
      oprot.writeBool(self.is_oos)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __repr__(self):
    L = ['%s=%r' % (key, value)
      for key, value in self.__dict__.iteritems()]
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

  def __eq__(self, other):
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

  def __ne__(self, other):
    return not (self == other)

class FlipkartInventorySnapshot:
  """
  Attributes:
   - item_id
   - availability
   - createdOrders
   - heldOrders
   - is_oos
  """

  thrift_spec = (
    None, # 0
    (1, TType.I64, 'item_id', None, None, ), # 1
    (2, TType.I64, 'availability', None, None, ), # 2
    (3, TType.I64, 'createdOrders', None, None, ), # 3
    (4, TType.I64, 'heldOrders', None, None, ), # 4
    (5, TType.BOOL, 'is_oos', None, None, ), # 5
  )

  def __init__(self, item_id=None, availability=None, createdOrders=None, heldOrders=None, is_oos=None,):
    self.item_id = item_id
    self.availability = availability
    self.createdOrders = createdOrders
    self.heldOrders = heldOrders
    self.is_oos = is_oos

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 1:
        if ftype == TType.I64:
          self.item_id = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.I64:
          self.availability = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.I64:
          self.createdOrders = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.I64:
          self.heldOrders = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 5:
        if ftype == TType.BOOL:
          self.is_oos = iprot.readBool();
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('FlipkartInventorySnapshot')
    if self.item_id is not None:
      oprot.writeFieldBegin('item_id', TType.I64, 1)
      oprot.writeI64(self.item_id)
      oprot.writeFieldEnd()
    if self.availability is not None:
      oprot.writeFieldBegin('availability', TType.I64, 2)
      oprot.writeI64(self.availability)
      oprot.writeFieldEnd()
    if self.createdOrders is not None:
      oprot.writeFieldBegin('createdOrders', TType.I64, 3)
      oprot.writeI64(self.createdOrders)
      oprot.writeFieldEnd()
    if self.heldOrders is not None:
      oprot.writeFieldBegin('heldOrders', TType.I64, 4)
      oprot.writeI64(self.heldOrders)
      oprot.writeFieldEnd()
    if self.is_oos is not None:
      oprot.writeFieldBegin('is_oos', TType.BOOL, 5)
      oprot.writeBool(self.is_oos)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __repr__(self):
    L = ['%s=%r' % (key, value)
      for key, value in self.__dict__.iteritems()]
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

  def __eq__(self, other):
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

  def __ne__(self, other):
    return not (self == other)

class SnapdealStockAtEOD:
  """
  Attributes:
   - item_id
   - availability
   - date
  """

  thrift_spec = (
    None, # 0
    (1, TType.I64, 'item_id', None, None, ), # 1
    (2, TType.I64, 'availability', None, None, ), # 2
    (3, TType.I64, 'date', None, None, ), # 3
  )

  def __init__(self, item_id=None, availability=None, date=None,):
    self.item_id = item_id
    self.availability = availability
    self.date = date

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 1:
        if ftype == TType.I64:
          self.item_id = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.I64:
          self.availability = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.I64:
          self.date = iprot.readI64();
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('SnapdealStockAtEOD')
    if self.item_id is not None:
      oprot.writeFieldBegin('item_id', TType.I64, 1)
      oprot.writeI64(self.item_id)
      oprot.writeFieldEnd()
    if self.availability is not None:
      oprot.writeFieldBegin('availability', TType.I64, 2)
      oprot.writeI64(self.availability)
      oprot.writeFieldEnd()
    if self.date is not None:
      oprot.writeFieldBegin('date', TType.I64, 3)
      oprot.writeI64(self.date)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __repr__(self):
    L = ['%s=%r' % (key, value)
      for key, value in self.__dict__.iteritems()]
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

  def __eq__(self, other):
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

  def __ne__(self, other):
    return not (self == other)

class FlipkartStockAtEOD:
  """
  Attributes:
   - item_id
   - availability
   - date
  """

  thrift_spec = (
    None, # 0
    (1, TType.I64, 'item_id', None, None, ), # 1
    (2, TType.I64, 'availability', None, None, ), # 2
    (3, TType.I64, 'date', None, None, ), # 3
  )

  def __init__(self, item_id=None, availability=None, date=None,):
    self.item_id = item_id
    self.availability = availability
    self.date = date

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 1:
        if ftype == TType.I64:
          self.item_id = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.I64:
          self.availability = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.I64:
          self.date = iprot.readI64();
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('FlipkartStockAtEOD')
    if self.item_id is not None:
      oprot.writeFieldBegin('item_id', TType.I64, 1)
      oprot.writeI64(self.item_id)
      oprot.writeFieldEnd()
    if self.availability is not None:
      oprot.writeFieldBegin('availability', TType.I64, 2)
      oprot.writeI64(self.availability)
      oprot.writeFieldEnd()
    if self.date is not None:
      oprot.writeFieldBegin('date', TType.I64, 3)
      oprot.writeI64(self.date)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __repr__(self):
    L = ['%s=%r' % (key, value)
      for key, value in self.__dict__.iteritems()]
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

  def __eq__(self, other):
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

  def __ne__(self, other):
    return not (self == other)

class StockWeightedNlcInfo:
  """
  Attributes:
   - itemId
   - source
   - updatedTimestamp
   - stockQuantity
   - grnDetail
   - avgWeightedNlc
  """

  thrift_spec = (
    None, # 0
    (1, TType.I64, 'itemId', None, None, ), # 1
    (2, TType.I64, 'source', None, None, ), # 2
    (3, TType.I64, 'updatedTimestamp', None, None, ), # 3
    (4, TType.I64, 'stockQuantity', None, None, ), # 4
    (5, TType.STRING, 'grnDetail', None, None, ), # 5
    (6, TType.DOUBLE, 'avgWeightedNlc', None, None, ), # 6
  )

  def __init__(self, itemId=None, source=None, updatedTimestamp=None, stockQuantity=None, grnDetail=None, avgWeightedNlc=None,):
    self.itemId = itemId
    self.source = source
    self.updatedTimestamp = updatedTimestamp
    self.stockQuantity = stockQuantity
    self.grnDetail = grnDetail
    self.avgWeightedNlc = avgWeightedNlc

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 1:
        if ftype == TType.I64:
          self.itemId = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.I64:
          self.source = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.I64:
          self.updatedTimestamp = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.I64:
          self.stockQuantity = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 5:
        if ftype == TType.STRING:
          self.grnDetail = iprot.readString();
        else:
          iprot.skip(ftype)
      elif fid == 6:
        if ftype == TType.DOUBLE:
          self.avgWeightedNlc = iprot.readDouble();
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('StockWeightedNlcInfo')
    if self.itemId is not None:
      oprot.writeFieldBegin('itemId', TType.I64, 1)
      oprot.writeI64(self.itemId)
      oprot.writeFieldEnd()
    if self.source is not None:
      oprot.writeFieldBegin('source', TType.I64, 2)
      oprot.writeI64(self.source)
      oprot.writeFieldEnd()
    if self.updatedTimestamp is not None:
      oprot.writeFieldBegin('updatedTimestamp', TType.I64, 3)
      oprot.writeI64(self.updatedTimestamp)
      oprot.writeFieldEnd()
    if self.stockQuantity is not None:
      oprot.writeFieldBegin('stockQuantity', TType.I64, 4)
      oprot.writeI64(self.stockQuantity)
      oprot.writeFieldEnd()
    if self.grnDetail is not None:
      oprot.writeFieldBegin('grnDetail', TType.STRING, 5)
      oprot.writeString(self.grnDetail)
      oprot.writeFieldEnd()
    if self.avgWeightedNlc is not None:
      oprot.writeFieldBegin('avgWeightedNlc', TType.DOUBLE, 6)
      oprot.writeDouble(self.avgWeightedNlc)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __repr__(self):
    L = ['%s=%r' % (key, value)
      for key, value in self.__dict__.iteritems()]
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

  def __eq__(self, other):
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

  def __ne__(self, other):
    return not (self == other)

class BulkAddInventory:
  """
  Attributes:
   - item_id
   - warehouse_id
   - inventory
  """

  thrift_spec = (
    None, # 0
    (1, TType.I64, 'item_id', None, None, ), # 1
    (2, TType.I64, 'warehouse_id', None, None, ), # 2
    (3, TType.I64, 'inventory', None, None, ), # 3
  )

  def __init__(self, item_id=None, warehouse_id=None, inventory=None,):
    self.item_id = item_id
    self.warehouse_id = warehouse_id
    self.inventory = inventory

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 1:
        if ftype == TType.I64:
          self.item_id = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.I64:
          self.warehouse_id = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.I64:
          self.inventory = iprot.readI64();
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('BulkAddInventory')
    if self.item_id is not None:
      oprot.writeFieldBegin('item_id', TType.I64, 1)
      oprot.writeI64(self.item_id)
      oprot.writeFieldEnd()
    if self.warehouse_id is not None:
      oprot.writeFieldBegin('warehouse_id', TType.I64, 2)
      oprot.writeI64(self.warehouse_id)
      oprot.writeFieldEnd()
    if self.inventory is not None:
      oprot.writeFieldBegin('inventory', TType.I64, 3)
      oprot.writeI64(self.inventory)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __repr__(self):
    L = ['%s=%r' % (key, value)
      for key, value in self.__dict__.iteritems()]
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

  def __eq__(self, other):
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

  def __ne__(self, other):
    return not (self == other)

class ItemLocationAvailability:
  """
  Attributes:
   - itemId
   - locationId
   - physicalQty
   - virtualQty
   - minTransferDelay
   - maxTransferDelay
  """

  thrift_spec = (
    None, # 0
    (1, TType.I64, 'itemId', None, None, ), # 1
    (2, TType.I64, 'locationId', None, None, ), # 2
    (3, TType.I64, 'physicalQty', None, None, ), # 3
    (4, TType.I64, 'virtualQty', None, None, ), # 4
    (5, TType.I64, 'minTransferDelay', None, None, ), # 5
    (6, TType.I64, 'maxTransferDelay', None, None, ), # 6
  )

  def __init__(self, itemId=None, locationId=None, physicalQty=None, virtualQty=None, minTransferDelay=None, maxTransferDelay=None,):
    self.itemId = itemId
    self.locationId = locationId
    self.physicalQty = physicalQty
    self.virtualQty = virtualQty
    self.minTransferDelay = minTransferDelay
    self.maxTransferDelay = maxTransferDelay

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 1:
        if ftype == TType.I64:
          self.itemId = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.I64:
          self.locationId = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.I64:
          self.physicalQty = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.I64:
          self.virtualQty = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 5:
        if ftype == TType.I64:
          self.minTransferDelay = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 6:
        if ftype == TType.I64:
          self.maxTransferDelay = iprot.readI64();
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('ItemLocationAvailability')
    if self.itemId is not None:
      oprot.writeFieldBegin('itemId', TType.I64, 1)
      oprot.writeI64(self.itemId)
      oprot.writeFieldEnd()
    if self.locationId is not None:
      oprot.writeFieldBegin('locationId', TType.I64, 2)
      oprot.writeI64(self.locationId)
      oprot.writeFieldEnd()
    if self.physicalQty is not None:
      oprot.writeFieldBegin('physicalQty', TType.I64, 3)
      oprot.writeI64(self.physicalQty)
      oprot.writeFieldEnd()
    if self.virtualQty is not None:
      oprot.writeFieldBegin('virtualQty', TType.I64, 4)
      oprot.writeI64(self.virtualQty)
      oprot.writeFieldEnd()
    if self.minTransferDelay is not None:
      oprot.writeFieldBegin('minTransferDelay', TType.I64, 5)
      oprot.writeI64(self.minTransferDelay)
      oprot.writeFieldEnd()
    if self.maxTransferDelay is not None:
      oprot.writeFieldBegin('maxTransferDelay', TType.I64, 6)
      oprot.writeI64(self.maxTransferDelay)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __repr__(self):
    L = ['%s=%r' % (key, value)
      for key, value in self.__dict__.iteritems()]
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

  def __eq__(self, other):
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

  def __ne__(self, other):
    return not (self == other)

class ItemPincodeAvailability:
  """
  Attributes:
   - itemId
   - pinCode
   - vatQty
   - totalQty
   - minDeliveryDate
   - maxDeliveryDate
  """

  thrift_spec = (
    None, # 0
    (1, TType.I64, 'itemId', None, None, ), # 1
    (2, TType.STRING, 'pinCode', None, None, ), # 2
    (3, TType.I64, 'vatQty', None, None, ), # 3
    (4, TType.I64, 'totalQty', None, None, ), # 4
    (5, TType.I64, 'minDeliveryDate', None, None, ), # 5
    (6, TType.I64, 'maxDeliveryDate', None, None, ), # 6
  )

  def __init__(self, itemId=None, pinCode=None, vatQty=None, totalQty=None, minDeliveryDate=None, maxDeliveryDate=None,):
    self.itemId = itemId
    self.pinCode = pinCode
    self.vatQty = vatQty
    self.totalQty = totalQty
    self.minDeliveryDate = minDeliveryDate
    self.maxDeliveryDate = maxDeliveryDate

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 1:
        if ftype == TType.I64:
          self.itemId = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.STRING:
          self.pinCode = iprot.readString();
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.I64:
          self.vatQty = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.I64:
          self.totalQty = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 5:
        if ftype == TType.I64:
          self.minDeliveryDate = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 6:
        if ftype == TType.I64:
          self.maxDeliveryDate = iprot.readI64();
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('ItemPincodeAvailability')
    if self.itemId is not None:
      oprot.writeFieldBegin('itemId', TType.I64, 1)
      oprot.writeI64(self.itemId)
      oprot.writeFieldEnd()
    if self.pinCode is not None:
      oprot.writeFieldBegin('pinCode', TType.STRING, 2)
      oprot.writeString(self.pinCode)
      oprot.writeFieldEnd()
    if self.vatQty is not None:
      oprot.writeFieldBegin('vatQty', TType.I64, 3)
      oprot.writeI64(self.vatQty)
      oprot.writeFieldEnd()
    if self.totalQty is not None:
      oprot.writeFieldBegin('totalQty', TType.I64, 4)
      oprot.writeI64(self.totalQty)
      oprot.writeFieldEnd()
    if self.minDeliveryDate is not None:
      oprot.writeFieldBegin('minDeliveryDate', TType.I64, 5)
      oprot.writeI64(self.minDeliveryDate)
      oprot.writeFieldEnd()
    if self.maxDeliveryDate is not None:
      oprot.writeFieldBegin('maxDeliveryDate', TType.I64, 6)
      oprot.writeI64(self.maxDeliveryDate)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


  def __repr__(self):
    L = ['%s=%r' % (key, value)
      for key, value in self.__dict__.iteritems()]
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))

  def __eq__(self, other):
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__

  def __ne__(self, other):
    return not (self == other)