Subversion Repositories SmartDukaan

Rev

Rev 6857 | Rev 7281 | Go to most recent revision | 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.GenericService
from ttypes import *
from thrift.Thrift import TProcessor
from thrift.transport import TTransport
from thrift.protocol import TBinaryProtocol, TProtocol
try:
  from thrift.protocol import fastbinary
except:
  fastbinary = None


class Iface(shop2020.thriftpy.generic.GenericService.Iface):
  def addWarehouse(self, warehouse):
    """
    Parameters:
     - warehouse
    """
    pass

  def addVendor(self, vendor):
    """
    add a new vendor

    Parameters:
     - vendor
    """
    pass

  def updateInventoryHistory(self, warehouse_id, timestamp, availability):
    """
    Stores the incremental warehouse updates of items.

    Parameters:
     - warehouse_id
     - timestamp
     - availability
    """
    pass

  def updateInventory(self, warehouse_id, timestamp, availability):
    """
    Stores the final inventory stocks of items.

    Parameters:
     - warehouse_id
     - timestamp
     - availability
    """
    pass

  def addInventory(self, itemId, warehouseId, quantity):
    """
    Add the inventory to existing stock.

    Parameters:
     - itemId
     - warehouseId
     - quantity
    """
    pass

  def retireWarehouse(self, warehouse_id):
    """
    Parameters:
     - warehouse_id
    """
    pass

  def getItemInventoryByItemId(self, item_id):
    """
    Parameters:
     - item_id
    """
    pass

  def getItemAvailibilityAtWarehouse(self, warehouse_id, item_id):
    """
    Parameters:
     - warehouse_id
     - item_id
    """
    pass

  def getItemAvailabilityAtLocation(self, itemId, sourceId):
    """
    Determines the warehouse that should be used to fulfil an order for the given item.
    It first checks all the warehouses which are in the logistics location given by the
    warehouse_loc parameter. If none of the warehouses there have any inventory, then the
    preferred warehouse for the item is used.

    Returns an ordered list of size 4 with following elements in the given order:
    1. Id of the fulfillment warehouse which was finally picked up.
    2. Expected delay added by the category manager.
    3. Id of the billing warehouse which was finally picked up.

    Parameters:
     - itemId
     - sourceId
    """
    pass

  def getAllWarehouses(self, isActive):
    """
    Parameters:
     - isActive
    """
    pass

  def getWarehouse(self, warehouse_id):
    """
    Returns the warehouse with the given id.

    Parameters:
     - warehouse_id
    """
    pass

  def getAllItemsForWarehouse(self, warehouse_id):
    """
    Parameters:
     - warehouse_id
    """
    pass

  def isOrderBillable(self, itemId, warehouseId, sourceId, orderId):
    """
    Depending on reservation in the table, verify if we can bill this order or not.

    Parameters:
     - itemId
     - warehouseId
     - sourceId
     - orderId
    """
    pass

  def reserveItemInWarehouse(self, itemId, warehouseId, sourceId, orderId, createdTimestamp, promisedShippingTimestamp, quantity):
    """
    Increases the reservation count for an item in a warehouse. Should always succeed normally.

    Parameters:
     - itemId
     - warehouseId
     - sourceId
     - orderId
     - createdTimestamp
     - promisedShippingTimestamp
     - quantity
    """
    pass

  def reduceReservationCount(self, itemId, warehouseId, sourceId, orderId, quantity):
    """
    Decreases the reservation count for an item in a warehouse. Should always succeed normally.

    Parameters:
     - itemId
     - warehouseId
     - sourceId
     - orderId
     - quantity
    """
    pass

  def getItemPricing(self, itemId, vendorId):
    """
    Returns the pricing information of an item associated with the vendor of the given warehouse.
    Raises an exception if either the item, vendor or the associated pricing information can't be found.

    Parameters:
     - itemId
     - vendorId
    """
    pass

  def getAllItemPricing(self, itemId):
    """
    Returns the list of vendor pricing information of an item.
    Raises an exception if item not found corresponding to itemId

    Parameters:
     - itemId
    """
    pass

  def addVendorItemPricing(self, vendorItemPricing):
    """
    Adds vendor prices corresponding to the item. If pricing already exists then updates the prices.
    Raises an exception if either the item or vendor can't be found corresponding to their ids.

    Parameters:
     - vendorItemPricing
    """
    pass

  def getVendor(self, vendorId):
    """
    Returns a vendor given its id

    Parameters:
     - vendorId
    """
    pass

  def getAllVendors(self, ):
    """
    Return list of all vendors
    """
    pass

  def addVendorItemMapping(self, key, vendorItemMapping):
    """
    Adds VendorItemMapping. Updates VendorItemMapping if exists corresponding to the item key.

    Parameters:
     - key
     - vendorItemMapping
    """
    pass

  def getVendorItemMappings(self, itemId):
    """
    Returns the list of vendor item mapping corresponding to itemId passed as parameter.
    Raises an exception if item not found corresponding to itemId

    Parameters:
     - itemId
    """
    pass

  def getPendingOrdersInventory(self, vendorid):
    """
    Returns a list of inventory stock for items for which there are pending orders for the given vendor.

    Parameters:
     - vendorid
    """
    pass

  def getWarehouses(self, warehouseType, inventoryType, vendorId, billingWarehouseId, shippingWarehouseId):
    """
    This method returns all warehouses for a given warehosueType, inventoryType, vendor, billingWarehouse and shippingWarehouse.
    getWarehouses(WarehouseType.OURS, InventoryType.GOOD, 3, 7, 7) would return ours warehouse with GOOD type inventory for vendor 1 for billing warehouse 7 and shipping warehouse 7
    getWarehouses(WarehouseType.OURS, InventoryType.GOOD, 3, 7, 7) would return ours warehouse with GOOD type inventory for vendor 3 for billing warehouse 7 and shipping warehouse 7
       getWarehouses(null, null, 3, 7, 7) would return all type warehouses with all type inventory for vendor 3 for billing warehouse 7 and shipping warehouse 7
       getWarehouses(null, null, 0, 0, 7) would return all type warehouses with all type inventory for all vendors for all billing warehouses at shipping warehouse 7

    Parameters:
     - warehouseType
     - inventoryType
     - vendorId
     - billingWarehouseId
     - shippingWarehouseId
    """
    pass

  def resetAvailability(self, itemKey, vendorId, quantity, warehouseId):
    """
    Resets availability of an item to the quantity mentioned in a warehouse.

    Parameters:
     - itemKey
     - vendorId
     - quantity
     - warehouseId
    """
    pass

  def resetAvailabilityForWarehouse(self, warehouseId):
    """
    Resets availability of a warehouse to zero.

    Parameters:
     - warehouseId
    """
    pass

  def getItemKeysToBeProcessed(self, warehouseId):
    """
    Returns the list of item keys which need to be processed for a given warehouse.
    This is currently used by Support application to send item keys whose inventory needs
    to be updated from PLB

    Parameters:
     - warehouseId
    """
    pass

  def markMissedInventoryUpdatesAsProcessed(self, itemKey, warehouseId):
    """
    Marks/Deletes missed inventory updates for a given key and warehouse.
    This generally happens when updates from PLB are applied on the currentinventorysnapshot for an item

    Parameters:
     - itemKey
     - warehouseId
    """
    pass

  def getIgnoredItemKeys(self, ):
    """
    Returns all the item key mappings that have been ignored until date. Value of map has the warehouse id
    and the timestamp from where alert was raised.
    """
    pass

  def addBadInventory(self, itemId, warehouseId, quantity):
    """
    Add the BAD type inventory to existing stock.

    Parameters:
     - itemId
     - warehouseId
     - quantity
    """
    pass

  def getShippingLocations(self, ):
    """
    Returns all shipping locations
    """
    pass

  def getAllVendorItemMappings(self, ):
    """
    Fetches all the vendor item mappings present.
    """
    pass

  def getInventorySnapshot(self, warehouseId):
    """
    Gets items' inventory for a warehouse
    If warehouse is passed as zero, items' inventory across all warehouses is sent

    Parameters:
     - warehouseId
    """
    pass

  def clearItemAvailabilityCache(self, ):
    """
    Clear item availability cache.
    """
    pass

  def updateVendorString(self, warehouseId, vendorString):
    """
    Parameters:
     - warehouseId
     - vendorString
    """
    pass

  def clearItemAvailabilityCacheForItem(self, item_id):
    """
    Parameters:
     - item_id
    """
    pass

  def getOurWarehouseIdForVendor(self, vendorId):
    """
    Parameters:
     - vendorId
    """
    pass

  def getItemAvailabilitiesAtOurWarehouses(self, item_ids):
    """
    Parameters:
     - item_ids
    """
    pass

  def getMonitoredWarehouseForVendors(self, vendorIds):
    """
    Parameters:
     - vendorIds
    """
    pass

  def getIgnoredWarehouseidsAndItemids(self, ):
    pass

  def insertItemtoIgnoreInventoryUpdatelist(self, item_id, warehouse_id):
    """
    Parameters:
     - item_id
     - warehouse_id
    """
    pass

  def deleteItemFromIgnoredInventoryUpdateList(self, item_id, warehouse_id):
    """
    Parameters:
     - item_id
     - warehouse_id
    """
    pass

  def getAllIgnoredInventoryupdateItemsCount(self, ):
    pass

  def getIgnoredInventoryUpdateItemids(self, offset, limit):
    """
    Parameters:
     - offset
     - limit
    """
    pass

  def updateItemStockPurchaseParams(self, item_id, numOfDaysStock, minStockLevel):
    """
    Parameters:
     - item_id
     - numOfDaysStock
     - minStockLevel
    """
    pass

  def getItemStockPurchaseParams(self, itemId):
    """
    Parameters:
     - itemId
    """
    pass

  def addOosStatusForItem(self, oosStatusMap, date):
    """
    Parameters:
     - oosStatusMap
     - date
    """
    pass

  def getOosStatusesForXDaysForItem(self, itemId, days):
    """
    Parameters:
     - itemId
     - days
    """
    pass

  def getNonZeroItemStockPurchaseParams(self, ):
    pass

  def getBillableInventoryAndPendingOrders(self, ):
    """
    Returns a list of inventory stock for items for which there are pending orders or have billable inventory.
    """
    pass


class Client(shop2020.thriftpy.generic.GenericService.Client, Iface):
  def __init__(self, iprot, oprot=None):
    shop2020.thriftpy.generic.GenericService.Client.__init__(self, iprot, oprot)

  def addWarehouse(self, warehouse):
    """
    Parameters:
     - warehouse
    """
    self.send_addWarehouse(warehouse)
    return self.recv_addWarehouse()

  def send_addWarehouse(self, warehouse):
    self._oprot.writeMessageBegin('addWarehouse', TMessageType.CALL, self._seqid)
    args = addWarehouse_args()
    args.warehouse = warehouse
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

  def recv_addWarehouse(self, ):
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
    if mtype == TMessageType.EXCEPTION:
      x = TApplicationException()
      x.read(self._iprot)
      self._iprot.readMessageEnd()
      raise x
    result = addWarehouse_result()
    result.read(self._iprot)
    self._iprot.readMessageEnd()
    if result.success is not None:
      return result.success
    if result.cex is not None:
      raise result.cex
    raise TApplicationException(TApplicationException.MISSING_RESULT, "addWarehouse failed: unknown result");

  def addVendor(self, vendor):
    """
    add a new vendor

    Parameters:
     - vendor
    """
    self.send_addVendor(vendor)
    return self.recv_addVendor()

  def send_addVendor(self, vendor):
    self._oprot.writeMessageBegin('addVendor', TMessageType.CALL, self._seqid)
    args = addVendor_args()
    args.vendor = vendor
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

  def recv_addVendor(self, ):
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
    if mtype == TMessageType.EXCEPTION:
      x = TApplicationException()
      x.read(self._iprot)
      self._iprot.readMessageEnd()
      raise x
    result = addVendor_result()
    result.read(self._iprot)
    self._iprot.readMessageEnd()
    if result.success is not None:
      return result.success
    if result.cex is not None:
      raise result.cex
    raise TApplicationException(TApplicationException.MISSING_RESULT, "addVendor failed: unknown result");

  def updateInventoryHistory(self, warehouse_id, timestamp, availability):
    """
    Stores the incremental warehouse updates of items.

    Parameters:
     - warehouse_id
     - timestamp
     - availability
    """
    self.send_updateInventoryHistory(warehouse_id, timestamp, availability)
    self.recv_updateInventoryHistory()

  def send_updateInventoryHistory(self, warehouse_id, timestamp, availability):
    self._oprot.writeMessageBegin('updateInventoryHistory', TMessageType.CALL, self._seqid)
    args = updateInventoryHistory_args()
    args.warehouse_id = warehouse_id
    args.timestamp = timestamp
    args.availability = availability
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

  def recv_updateInventoryHistory(self, ):
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
    if mtype == TMessageType.EXCEPTION:
      x = TApplicationException()
      x.read(self._iprot)
      self._iprot.readMessageEnd()
      raise x
    result = updateInventoryHistory_result()
    result.read(self._iprot)
    self._iprot.readMessageEnd()
    if result.cex is not None:
      raise result.cex
    return

  def updateInventory(self, warehouse_id, timestamp, availability):
    """
    Stores the final inventory stocks of items.

    Parameters:
     - warehouse_id
     - timestamp
     - availability
    """
    self.send_updateInventory(warehouse_id, timestamp, availability)
    self.recv_updateInventory()

  def send_updateInventory(self, warehouse_id, timestamp, availability):
    self._oprot.writeMessageBegin('updateInventory', TMessageType.CALL, self._seqid)
    args = updateInventory_args()
    args.warehouse_id = warehouse_id
    args.timestamp = timestamp
    args.availability = availability
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

  def recv_updateInventory(self, ):
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
    if mtype == TMessageType.EXCEPTION:
      x = TApplicationException()
      x.read(self._iprot)
      self._iprot.readMessageEnd()
      raise x
    result = updateInventory_result()
    result.read(self._iprot)
    self._iprot.readMessageEnd()
    if result.cex is not None:
      raise result.cex
    return

  def addInventory(self, itemId, warehouseId, quantity):
    """
    Add the inventory to existing stock.

    Parameters:
     - itemId
     - warehouseId
     - quantity
    """
    self.send_addInventory(itemId, warehouseId, quantity)
    self.recv_addInventory()

  def send_addInventory(self, itemId, warehouseId, quantity):
    self._oprot.writeMessageBegin('addInventory', TMessageType.CALL, self._seqid)
    args = addInventory_args()
    args.itemId = itemId
    args.warehouseId = warehouseId
    args.quantity = quantity
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

  def recv_addInventory(self, ):
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
    if mtype == TMessageType.EXCEPTION:
      x = TApplicationException()
      x.read(self._iprot)
      self._iprot.readMessageEnd()
      raise x
    result = addInventory_result()
    result.read(self._iprot)
    self._iprot.readMessageEnd()
    if result.cex is not None:
      raise result.cex
    return

  def retireWarehouse(self, warehouse_id):
    """
    Parameters:
     - warehouse_id
    """
    self.send_retireWarehouse(warehouse_id)
    self.recv_retireWarehouse()

  def send_retireWarehouse(self, warehouse_id):
    self._oprot.writeMessageBegin('retireWarehouse', TMessageType.CALL, self._seqid)
    args = retireWarehouse_args()
    args.warehouse_id = warehouse_id
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

  def recv_retireWarehouse(self, ):
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
    if mtype == TMessageType.EXCEPTION:
      x = TApplicationException()
      x.read(self._iprot)
      self._iprot.readMessageEnd()
      raise x
    result = retireWarehouse_result()
    result.read(self._iprot)
    self._iprot.readMessageEnd()
    if result.cex is not None:
      raise result.cex
    return

  def getItemInventoryByItemId(self, item_id):
    """
    Parameters:
     - item_id
    """
    self.send_getItemInventoryByItemId(item_id)
    return self.recv_getItemInventoryByItemId()

  def send_getItemInventoryByItemId(self, item_id):
    self._oprot.writeMessageBegin('getItemInventoryByItemId', TMessageType.CALL, self._seqid)
    args = getItemInventoryByItemId_args()
    args.item_id = item_id
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

  def recv_getItemInventoryByItemId(self, ):
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
    if mtype == TMessageType.EXCEPTION:
      x = TApplicationException()
      x.read(self._iprot)
      self._iprot.readMessageEnd()
      raise x
    result = getItemInventoryByItemId_result()
    result.read(self._iprot)
    self._iprot.readMessageEnd()
    if result.success is not None:
      return result.success
    if result.cex is not None:
      raise result.cex
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getItemInventoryByItemId failed: unknown result");

  def getItemAvailibilityAtWarehouse(self, warehouse_id, item_id):
    """
    Parameters:
     - warehouse_id
     - item_id
    """
    self.send_getItemAvailibilityAtWarehouse(warehouse_id, item_id)
    return self.recv_getItemAvailibilityAtWarehouse()

  def send_getItemAvailibilityAtWarehouse(self, warehouse_id, item_id):
    self._oprot.writeMessageBegin('getItemAvailibilityAtWarehouse', TMessageType.CALL, self._seqid)
    args = getItemAvailibilityAtWarehouse_args()
    args.warehouse_id = warehouse_id
    args.item_id = item_id
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

  def recv_getItemAvailibilityAtWarehouse(self, ):
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
    if mtype == TMessageType.EXCEPTION:
      x = TApplicationException()
      x.read(self._iprot)
      self._iprot.readMessageEnd()
      raise x
    result = getItemAvailibilityAtWarehouse_result()
    result.read(self._iprot)
    self._iprot.readMessageEnd()
    if result.success is not None:
      return result.success
    if result.cex is not None:
      raise result.cex
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getItemAvailibilityAtWarehouse failed: unknown result");

  def getItemAvailabilityAtLocation(self, itemId, sourceId):
    """
    Determines the warehouse that should be used to fulfil an order for the given item.
    It first checks all the warehouses which are in the logistics location given by the
    warehouse_loc parameter. If none of the warehouses there have any inventory, then the
    preferred warehouse for the item is used.

    Returns an ordered list of size 4 with following elements in the given order:
    1. Id of the fulfillment warehouse which was finally picked up.
    2. Expected delay added by the category manager.
    3. Id of the billing warehouse which was finally picked up.

    Parameters:
     - itemId
     - sourceId
    """
    self.send_getItemAvailabilityAtLocation(itemId, sourceId)
    return self.recv_getItemAvailabilityAtLocation()

  def send_getItemAvailabilityAtLocation(self, itemId, sourceId):
    self._oprot.writeMessageBegin('getItemAvailabilityAtLocation', TMessageType.CALL, self._seqid)
    args = getItemAvailabilityAtLocation_args()
    args.itemId = itemId
    args.sourceId = sourceId
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

  def recv_getItemAvailabilityAtLocation(self, ):
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
    if mtype == TMessageType.EXCEPTION:
      x = TApplicationException()
      x.read(self._iprot)
      self._iprot.readMessageEnd()
      raise x
    result = getItemAvailabilityAtLocation_result()
    result.read(self._iprot)
    self._iprot.readMessageEnd()
    if result.success is not None:
      return result.success
    if result.isex is not None:
      raise result.isex
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getItemAvailabilityAtLocation failed: unknown result");

  def getAllWarehouses(self, isActive):
    """
    Parameters:
     - isActive
    """
    self.send_getAllWarehouses(isActive)
    return self.recv_getAllWarehouses()

  def send_getAllWarehouses(self, isActive):
    self._oprot.writeMessageBegin('getAllWarehouses', TMessageType.CALL, self._seqid)
    args = getAllWarehouses_args()
    args.isActive = isActive
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

  def recv_getAllWarehouses(self, ):
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
    if mtype == TMessageType.EXCEPTION:
      x = TApplicationException()
      x.read(self._iprot)
      self._iprot.readMessageEnd()
      raise x
    result = getAllWarehouses_result()
    result.read(self._iprot)
    self._iprot.readMessageEnd()
    if result.success is not None:
      return result.success
    if result.cex is not None:
      raise result.cex
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getAllWarehouses failed: unknown result");

  def getWarehouse(self, warehouse_id):
    """
    Returns the warehouse with the given id.

    Parameters:
     - warehouse_id
    """
    self.send_getWarehouse(warehouse_id)
    return self.recv_getWarehouse()

  def send_getWarehouse(self, warehouse_id):
    self._oprot.writeMessageBegin('getWarehouse', TMessageType.CALL, self._seqid)
    args = getWarehouse_args()
    args.warehouse_id = warehouse_id
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

  def recv_getWarehouse(self, ):
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
    if mtype == TMessageType.EXCEPTION:
      x = TApplicationException()
      x.read(self._iprot)
      self._iprot.readMessageEnd()
      raise x
    result = getWarehouse_result()
    result.read(self._iprot)
    self._iprot.readMessageEnd()
    if result.success is not None:
      return result.success
    if result.cex is not None:
      raise result.cex
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getWarehouse failed: unknown result");

  def getAllItemsForWarehouse(self, warehouse_id):
    """
    Parameters:
     - warehouse_id
    """
    self.send_getAllItemsForWarehouse(warehouse_id)
    return self.recv_getAllItemsForWarehouse()

  def send_getAllItemsForWarehouse(self, warehouse_id):
    self._oprot.writeMessageBegin('getAllItemsForWarehouse', TMessageType.CALL, self._seqid)
    args = getAllItemsForWarehouse_args()
    args.warehouse_id = warehouse_id
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

  def recv_getAllItemsForWarehouse(self, ):
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
    if mtype == TMessageType.EXCEPTION:
      x = TApplicationException()
      x.read(self._iprot)
      self._iprot.readMessageEnd()
      raise x
    result = getAllItemsForWarehouse_result()
    result.read(self._iprot)
    self._iprot.readMessageEnd()
    if result.success is not None:
      return result.success
    if result.cex is not None:
      raise result.cex
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getAllItemsForWarehouse failed: unknown result");

  def isOrderBillable(self, itemId, warehouseId, sourceId, orderId):
    """
    Depending on reservation in the table, verify if we can bill this order or not.

    Parameters:
     - itemId
     - warehouseId
     - sourceId
     - orderId
    """
    self.send_isOrderBillable(itemId, warehouseId, sourceId, orderId)
    return self.recv_isOrderBillable()

  def send_isOrderBillable(self, itemId, warehouseId, sourceId, orderId):
    self._oprot.writeMessageBegin('isOrderBillable', TMessageType.CALL, self._seqid)
    args = isOrderBillable_args()
    args.itemId = itemId
    args.warehouseId = warehouseId
    args.sourceId = sourceId
    args.orderId = orderId
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

  def recv_isOrderBillable(self, ):
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
    if mtype == TMessageType.EXCEPTION:
      x = TApplicationException()
      x.read(self._iprot)
      self._iprot.readMessageEnd()
      raise x
    result = isOrderBillable_result()
    result.read(self._iprot)
    self._iprot.readMessageEnd()
    if result.success is not None:
      return result.success
    raise TApplicationException(TApplicationException.MISSING_RESULT, "isOrderBillable failed: unknown result");

  def reserveItemInWarehouse(self, itemId, warehouseId, sourceId, orderId, createdTimestamp, promisedShippingTimestamp, quantity):
    """
    Increases the reservation count for an item in a warehouse. Should always succeed normally.

    Parameters:
     - itemId
     - warehouseId
     - sourceId
     - orderId
     - createdTimestamp
     - promisedShippingTimestamp
     - quantity
    """
    self.send_reserveItemInWarehouse(itemId, warehouseId, sourceId, orderId, createdTimestamp, promisedShippingTimestamp, quantity)
    return self.recv_reserveItemInWarehouse()

  def send_reserveItemInWarehouse(self, itemId, warehouseId, sourceId, orderId, createdTimestamp, promisedShippingTimestamp, quantity):
    self._oprot.writeMessageBegin('reserveItemInWarehouse', TMessageType.CALL, self._seqid)
    args = reserveItemInWarehouse_args()
    args.itemId = itemId
    args.warehouseId = warehouseId
    args.sourceId = sourceId
    args.orderId = orderId
    args.createdTimestamp = createdTimestamp
    args.promisedShippingTimestamp = promisedShippingTimestamp
    args.quantity = quantity
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

  def recv_reserveItemInWarehouse(self, ):
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
    if mtype == TMessageType.EXCEPTION:
      x = TApplicationException()
      x.read(self._iprot)
      self._iprot.readMessageEnd()
      raise x
    result = reserveItemInWarehouse_result()
    result.read(self._iprot)
    self._iprot.readMessageEnd()
    if result.success is not None:
      return result.success
    if result.cex is not None:
      raise result.cex
    raise TApplicationException(TApplicationException.MISSING_RESULT, "reserveItemInWarehouse failed: unknown result");

  def reduceReservationCount(self, itemId, warehouseId, sourceId, orderId, quantity):
    """
    Decreases the reservation count for an item in a warehouse. Should always succeed normally.

    Parameters:
     - itemId
     - warehouseId
     - sourceId
     - orderId
     - quantity
    """
    self.send_reduceReservationCount(itemId, warehouseId, sourceId, orderId, quantity)
    return self.recv_reduceReservationCount()

  def send_reduceReservationCount(self, itemId, warehouseId, sourceId, orderId, quantity):
    self._oprot.writeMessageBegin('reduceReservationCount', TMessageType.CALL, self._seqid)
    args = reduceReservationCount_args()
    args.itemId = itemId
    args.warehouseId = warehouseId
    args.sourceId = sourceId
    args.orderId = orderId
    args.quantity = quantity
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

  def recv_reduceReservationCount(self, ):
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
    if mtype == TMessageType.EXCEPTION:
      x = TApplicationException()
      x.read(self._iprot)
      self._iprot.readMessageEnd()
      raise x
    result = reduceReservationCount_result()
    result.read(self._iprot)
    self._iprot.readMessageEnd()
    if result.success is not None:
      return result.success
    if result.cex is not None:
      raise result.cex
    raise TApplicationException(TApplicationException.MISSING_RESULT, "reduceReservationCount failed: unknown result");

  def getItemPricing(self, itemId, vendorId):
    """
    Returns the pricing information of an item associated with the vendor of the given warehouse.
    Raises an exception if either the item, vendor or the associated pricing information can't be found.

    Parameters:
     - itemId
     - vendorId
    """
    self.send_getItemPricing(itemId, vendorId)
    return self.recv_getItemPricing()

  def send_getItemPricing(self, itemId, vendorId):
    self._oprot.writeMessageBegin('getItemPricing', TMessageType.CALL, self._seqid)
    args = getItemPricing_args()
    args.itemId = itemId
    args.vendorId = vendorId
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

  def recv_getItemPricing(self, ):
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
    if mtype == TMessageType.EXCEPTION:
      x = TApplicationException()
      x.read(self._iprot)
      self._iprot.readMessageEnd()
      raise x
    result = getItemPricing_result()
    result.read(self._iprot)
    self._iprot.readMessageEnd()
    if result.success is not None:
      return result.success
    if result.cex is not None:
      raise result.cex
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getItemPricing failed: unknown result");

  def getAllItemPricing(self, itemId):
    """
    Returns the list of vendor pricing information of an item.
    Raises an exception if item not found corresponding to itemId

    Parameters:
     - itemId
    """
    self.send_getAllItemPricing(itemId)
    return self.recv_getAllItemPricing()

  def send_getAllItemPricing(self, itemId):
    self._oprot.writeMessageBegin('getAllItemPricing', TMessageType.CALL, self._seqid)
    args = getAllItemPricing_args()
    args.itemId = itemId
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

  def recv_getAllItemPricing(self, ):
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
    if mtype == TMessageType.EXCEPTION:
      x = TApplicationException()
      x.read(self._iprot)
      self._iprot.readMessageEnd()
      raise x
    result = getAllItemPricing_result()
    result.read(self._iprot)
    self._iprot.readMessageEnd()
    if result.success is not None:
      return result.success
    if result.cex is not None:
      raise result.cex
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getAllItemPricing failed: unknown result");

  def addVendorItemPricing(self, vendorItemPricing):
    """
    Adds vendor prices corresponding to the item. If pricing already exists then updates the prices.
    Raises an exception if either the item or vendor can't be found corresponding to their ids.

    Parameters:
     - vendorItemPricing
    """
    self.send_addVendorItemPricing(vendorItemPricing)
    self.recv_addVendorItemPricing()

  def send_addVendorItemPricing(self, vendorItemPricing):
    self._oprot.writeMessageBegin('addVendorItemPricing', TMessageType.CALL, self._seqid)
    args = addVendorItemPricing_args()
    args.vendorItemPricing = vendorItemPricing
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

  def recv_addVendorItemPricing(self, ):
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
    if mtype == TMessageType.EXCEPTION:
      x = TApplicationException()
      x.read(self._iprot)
      self._iprot.readMessageEnd()
      raise x
    result = addVendorItemPricing_result()
    result.read(self._iprot)
    self._iprot.readMessageEnd()
    if result.cex is not None:
      raise result.cex
    return

  def getVendor(self, vendorId):
    """
    Returns a vendor given its id

    Parameters:
     - vendorId
    """
    self.send_getVendor(vendorId)
    return self.recv_getVendor()

  def send_getVendor(self, vendorId):
    self._oprot.writeMessageBegin('getVendor', TMessageType.CALL, self._seqid)
    args = getVendor_args()
    args.vendorId = vendorId
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

  def recv_getVendor(self, ):
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
    if mtype == TMessageType.EXCEPTION:
      x = TApplicationException()
      x.read(self._iprot)
      self._iprot.readMessageEnd()
      raise x
    result = getVendor_result()
    result.read(self._iprot)
    self._iprot.readMessageEnd()
    if result.success is not None:
      return result.success
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getVendor failed: unknown result");

  def getAllVendors(self, ):
    """
    Return list of all vendors
    """
    self.send_getAllVendors()
    return self.recv_getAllVendors()

  def send_getAllVendors(self, ):
    self._oprot.writeMessageBegin('getAllVendors', TMessageType.CALL, self._seqid)
    args = getAllVendors_args()
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

  def recv_getAllVendors(self, ):
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
    if mtype == TMessageType.EXCEPTION:
      x = TApplicationException()
      x.read(self._iprot)
      self._iprot.readMessageEnd()
      raise x
    result = getAllVendors_result()
    result.read(self._iprot)
    self._iprot.readMessageEnd()
    if result.success is not None:
      return result.success
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getAllVendors failed: unknown result");

  def addVendorItemMapping(self, key, vendorItemMapping):
    """
    Adds VendorItemMapping. Updates VendorItemMapping if exists corresponding to the item key.

    Parameters:
     - key
     - vendorItemMapping
    """
    self.send_addVendorItemMapping(key, vendorItemMapping)
    self.recv_addVendorItemMapping()

  def send_addVendorItemMapping(self, key, vendorItemMapping):
    self._oprot.writeMessageBegin('addVendorItemMapping', TMessageType.CALL, self._seqid)
    args = addVendorItemMapping_args()
    args.key = key
    args.vendorItemMapping = vendorItemMapping
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

  def recv_addVendorItemMapping(self, ):
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
    if mtype == TMessageType.EXCEPTION:
      x = TApplicationException()
      x.read(self._iprot)
      self._iprot.readMessageEnd()
      raise x
    result = addVendorItemMapping_result()
    result.read(self._iprot)
    self._iprot.readMessageEnd()
    if result.cex is not None:
      raise result.cex
    return

  def getVendorItemMappings(self, itemId):
    """
    Returns the list of vendor item mapping corresponding to itemId passed as parameter.
    Raises an exception if item not found corresponding to itemId

    Parameters:
     - itemId
    """
    self.send_getVendorItemMappings(itemId)
    return self.recv_getVendorItemMappings()

  def send_getVendorItemMappings(self, itemId):
    self._oprot.writeMessageBegin('getVendorItemMappings', TMessageType.CALL, self._seqid)
    args = getVendorItemMappings_args()
    args.itemId = itemId
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

  def recv_getVendorItemMappings(self, ):
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
    if mtype == TMessageType.EXCEPTION:
      x = TApplicationException()
      x.read(self._iprot)
      self._iprot.readMessageEnd()
      raise x
    result = getVendorItemMappings_result()
    result.read(self._iprot)
    self._iprot.readMessageEnd()
    if result.success is not None:
      return result.success
    if result.cex is not None:
      raise result.cex
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getVendorItemMappings failed: unknown result");

  def getPendingOrdersInventory(self, vendorid):
    """
    Returns a list of inventory stock for items for which there are pending orders for the given vendor.

    Parameters:
     - vendorid
    """
    self.send_getPendingOrdersInventory(vendorid)
    return self.recv_getPendingOrdersInventory()

  def send_getPendingOrdersInventory(self, vendorid):
    self._oprot.writeMessageBegin('getPendingOrdersInventory', TMessageType.CALL, self._seqid)
    args = getPendingOrdersInventory_args()
    args.vendorid = vendorid
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

  def recv_getPendingOrdersInventory(self, ):
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
    if mtype == TMessageType.EXCEPTION:
      x = TApplicationException()
      x.read(self._iprot)
      self._iprot.readMessageEnd()
      raise x
    result = getPendingOrdersInventory_result()
    result.read(self._iprot)
    self._iprot.readMessageEnd()
    if result.success is not None:
      return result.success
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getPendingOrdersInventory failed: unknown result");

  def getWarehouses(self, warehouseType, inventoryType, vendorId, billingWarehouseId, shippingWarehouseId):
    """
    This method returns all warehouses for a given warehosueType, inventoryType, vendor, billingWarehouse and shippingWarehouse.
    getWarehouses(WarehouseType.OURS, InventoryType.GOOD, 3, 7, 7) would return ours warehouse with GOOD type inventory for vendor 1 for billing warehouse 7 and shipping warehouse 7
    getWarehouses(WarehouseType.OURS, InventoryType.GOOD, 3, 7, 7) would return ours warehouse with GOOD type inventory for vendor 3 for billing warehouse 7 and shipping warehouse 7
       getWarehouses(null, null, 3, 7, 7) would return all type warehouses with all type inventory for vendor 3 for billing warehouse 7 and shipping warehouse 7
       getWarehouses(null, null, 0, 0, 7) would return all type warehouses with all type inventory for all vendors for all billing warehouses at shipping warehouse 7

    Parameters:
     - warehouseType
     - inventoryType
     - vendorId
     - billingWarehouseId
     - shippingWarehouseId
    """
    self.send_getWarehouses(warehouseType, inventoryType, vendorId, billingWarehouseId, shippingWarehouseId)
    return self.recv_getWarehouses()

  def send_getWarehouses(self, warehouseType, inventoryType, vendorId, billingWarehouseId, shippingWarehouseId):
    self._oprot.writeMessageBegin('getWarehouses', TMessageType.CALL, self._seqid)
    args = getWarehouses_args()
    args.warehouseType = warehouseType
    args.inventoryType = inventoryType
    args.vendorId = vendorId
    args.billingWarehouseId = billingWarehouseId
    args.shippingWarehouseId = shippingWarehouseId
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

  def recv_getWarehouses(self, ):
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
    if mtype == TMessageType.EXCEPTION:
      x = TApplicationException()
      x.read(self._iprot)
      self._iprot.readMessageEnd()
      raise x
    result = getWarehouses_result()
    result.read(self._iprot)
    self._iprot.readMessageEnd()
    if result.success is not None:
      return result.success
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getWarehouses failed: unknown result");

  def resetAvailability(self, itemKey, vendorId, quantity, warehouseId):
    """
    Resets availability of an item to the quantity mentioned in a warehouse.

    Parameters:
     - itemKey
     - vendorId
     - quantity
     - warehouseId
    """
    self.send_resetAvailability(itemKey, vendorId, quantity, warehouseId)
    self.recv_resetAvailability()

  def send_resetAvailability(self, itemKey, vendorId, quantity, warehouseId):
    self._oprot.writeMessageBegin('resetAvailability', TMessageType.CALL, self._seqid)
    args = resetAvailability_args()
    args.itemKey = itemKey
    args.vendorId = vendorId
    args.quantity = quantity
    args.warehouseId = warehouseId
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

  def recv_resetAvailability(self, ):
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
    if mtype == TMessageType.EXCEPTION:
      x = TApplicationException()
      x.read(self._iprot)
      self._iprot.readMessageEnd()
      raise x
    result = resetAvailability_result()
    result.read(self._iprot)
    self._iprot.readMessageEnd()
    if result.cex is not None:
      raise result.cex
    return

  def resetAvailabilityForWarehouse(self, warehouseId):
    """
    Resets availability of a warehouse to zero.

    Parameters:
     - warehouseId
    """
    self.send_resetAvailabilityForWarehouse(warehouseId)
    self.recv_resetAvailabilityForWarehouse()

  def send_resetAvailabilityForWarehouse(self, warehouseId):
    self._oprot.writeMessageBegin('resetAvailabilityForWarehouse', TMessageType.CALL, self._seqid)
    args = resetAvailabilityForWarehouse_args()
    args.warehouseId = warehouseId
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

  def recv_resetAvailabilityForWarehouse(self, ):
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
    if mtype == TMessageType.EXCEPTION:
      x = TApplicationException()
      x.read(self._iprot)
      self._iprot.readMessageEnd()
      raise x
    result = resetAvailabilityForWarehouse_result()
    result.read(self._iprot)
    self._iprot.readMessageEnd()
    if result.cex is not None:
      raise result.cex
    return

  def getItemKeysToBeProcessed(self, warehouseId):
    """
    Returns the list of item keys which need to be processed for a given warehouse.
    This is currently used by Support application to send item keys whose inventory needs
    to be updated from PLB

    Parameters:
     - warehouseId
    """
    self.send_getItemKeysToBeProcessed(warehouseId)
    return self.recv_getItemKeysToBeProcessed()

  def send_getItemKeysToBeProcessed(self, warehouseId):
    self._oprot.writeMessageBegin('getItemKeysToBeProcessed', TMessageType.CALL, self._seqid)
    args = getItemKeysToBeProcessed_args()
    args.warehouseId = warehouseId
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

  def recv_getItemKeysToBeProcessed(self, ):
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
    if mtype == TMessageType.EXCEPTION:
      x = TApplicationException()
      x.read(self._iprot)
      self._iprot.readMessageEnd()
      raise x
    result = getItemKeysToBeProcessed_result()
    result.read(self._iprot)
    self._iprot.readMessageEnd()
    if result.success is not None:
      return result.success
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getItemKeysToBeProcessed failed: unknown result");

  def markMissedInventoryUpdatesAsProcessed(self, itemKey, warehouseId):
    """
    Marks/Deletes missed inventory updates for a given key and warehouse.
    This generally happens when updates from PLB are applied on the currentinventorysnapshot for an item

    Parameters:
     - itemKey
     - warehouseId
    """
    self.send_markMissedInventoryUpdatesAsProcessed(itemKey, warehouseId)
    self.recv_markMissedInventoryUpdatesAsProcessed()

  def send_markMissedInventoryUpdatesAsProcessed(self, itemKey, warehouseId):
    self._oprot.writeMessageBegin('markMissedInventoryUpdatesAsProcessed', TMessageType.CALL, self._seqid)
    args = markMissedInventoryUpdatesAsProcessed_args()
    args.itemKey = itemKey
    args.warehouseId = warehouseId
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

  def recv_markMissedInventoryUpdatesAsProcessed(self, ):
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
    if mtype == TMessageType.EXCEPTION:
      x = TApplicationException()
      x.read(self._iprot)
      self._iprot.readMessageEnd()
      raise x
    result = markMissedInventoryUpdatesAsProcessed_result()
    result.read(self._iprot)
    self._iprot.readMessageEnd()
    return

  def getIgnoredItemKeys(self, ):
    """
    Returns all the item key mappings that have been ignored until date. Value of map has the warehouse id
    and the timestamp from where alert was raised.
    """
    self.send_getIgnoredItemKeys()
    return self.recv_getIgnoredItemKeys()

  def send_getIgnoredItemKeys(self, ):
    self._oprot.writeMessageBegin('getIgnoredItemKeys', TMessageType.CALL, self._seqid)
    args = getIgnoredItemKeys_args()
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

  def recv_getIgnoredItemKeys(self, ):
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
    if mtype == TMessageType.EXCEPTION:
      x = TApplicationException()
      x.read(self._iprot)
      self._iprot.readMessageEnd()
      raise x
    result = getIgnoredItemKeys_result()
    result.read(self._iprot)
    self._iprot.readMessageEnd()
    if result.success is not None:
      return result.success
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getIgnoredItemKeys failed: unknown result");

  def addBadInventory(self, itemId, warehouseId, quantity):
    """
    Add the BAD type inventory to existing stock.

    Parameters:
     - itemId
     - warehouseId
     - quantity
    """
    self.send_addBadInventory(itemId, warehouseId, quantity)
    self.recv_addBadInventory()

  def send_addBadInventory(self, itemId, warehouseId, quantity):
    self._oprot.writeMessageBegin('addBadInventory', TMessageType.CALL, self._seqid)
    args = addBadInventory_args()
    args.itemId = itemId
    args.warehouseId = warehouseId
    args.quantity = quantity
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

  def recv_addBadInventory(self, ):
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
    if mtype == TMessageType.EXCEPTION:
      x = TApplicationException()
      x.read(self._iprot)
      self._iprot.readMessageEnd()
      raise x
    result = addBadInventory_result()
    result.read(self._iprot)
    self._iprot.readMessageEnd()
    if result.cex is not None:
      raise result.cex
    return

  def getShippingLocations(self, ):
    """
    Returns all shipping locations
    """
    self.send_getShippingLocations()
    return self.recv_getShippingLocations()

  def send_getShippingLocations(self, ):
    self._oprot.writeMessageBegin('getShippingLocations', TMessageType.CALL, self._seqid)
    args = getShippingLocations_args()
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

  def recv_getShippingLocations(self, ):
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
    if mtype == TMessageType.EXCEPTION:
      x = TApplicationException()
      x.read(self._iprot)
      self._iprot.readMessageEnd()
      raise x
    result = getShippingLocations_result()
    result.read(self._iprot)
    self._iprot.readMessageEnd()
    if result.success is not None:
      return result.success
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getShippingLocations failed: unknown result");

  def getAllVendorItemMappings(self, ):
    """
    Fetches all the vendor item mappings present.
    """
    self.send_getAllVendorItemMappings()
    return self.recv_getAllVendorItemMappings()

  def send_getAllVendorItemMappings(self, ):
    self._oprot.writeMessageBegin('getAllVendorItemMappings', TMessageType.CALL, self._seqid)
    args = getAllVendorItemMappings_args()
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

  def recv_getAllVendorItemMappings(self, ):
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
    if mtype == TMessageType.EXCEPTION:
      x = TApplicationException()
      x.read(self._iprot)
      self._iprot.readMessageEnd()
      raise x
    result = getAllVendorItemMappings_result()
    result.read(self._iprot)
    self._iprot.readMessageEnd()
    if result.success is not None:
      return result.success
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getAllVendorItemMappings failed: unknown result");

  def getInventorySnapshot(self, warehouseId):
    """
    Gets items' inventory for a warehouse
    If warehouse is passed as zero, items' inventory across all warehouses is sent

    Parameters:
     - warehouseId
    """
    self.send_getInventorySnapshot(warehouseId)
    return self.recv_getInventorySnapshot()

  def send_getInventorySnapshot(self, warehouseId):
    self._oprot.writeMessageBegin('getInventorySnapshot', TMessageType.CALL, self._seqid)
    args = getInventorySnapshot_args()
    args.warehouseId = warehouseId
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

  def recv_getInventorySnapshot(self, ):
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
    if mtype == TMessageType.EXCEPTION:
      x = TApplicationException()
      x.read(self._iprot)
      self._iprot.readMessageEnd()
      raise x
    result = getInventorySnapshot_result()
    result.read(self._iprot)
    self._iprot.readMessageEnd()
    if result.success is not None:
      return result.success
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getInventorySnapshot failed: unknown result");

  def clearItemAvailabilityCache(self, ):
    """
    Clear item availability cache.
    """
    self.send_clearItemAvailabilityCache()
    self.recv_clearItemAvailabilityCache()

  def send_clearItemAvailabilityCache(self, ):
    self._oprot.writeMessageBegin('clearItemAvailabilityCache', TMessageType.CALL, self._seqid)
    args = clearItemAvailabilityCache_args()
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

  def recv_clearItemAvailabilityCache(self, ):
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
    if mtype == TMessageType.EXCEPTION:
      x = TApplicationException()
      x.read(self._iprot)
      self._iprot.readMessageEnd()
      raise x
    result = clearItemAvailabilityCache_result()
    result.read(self._iprot)
    self._iprot.readMessageEnd()
    return

  def updateVendorString(self, warehouseId, vendorString):
    """
    Parameters:
     - warehouseId
     - vendorString
    """
    self.send_updateVendorString(warehouseId, vendorString)
    self.recv_updateVendorString()

  def send_updateVendorString(self, warehouseId, vendorString):
    self._oprot.writeMessageBegin('updateVendorString', TMessageType.CALL, self._seqid)
    args = updateVendorString_args()
    args.warehouseId = warehouseId
    args.vendorString = vendorString
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

  def recv_updateVendorString(self, ):
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
    if mtype == TMessageType.EXCEPTION:
      x = TApplicationException()
      x.read(self._iprot)
      self._iprot.readMessageEnd()
      raise x
    result = updateVendorString_result()
    result.read(self._iprot)
    self._iprot.readMessageEnd()
    return

  def clearItemAvailabilityCacheForItem(self, item_id):
    """
    Parameters:
     - item_id
    """
    self.send_clearItemAvailabilityCacheForItem(item_id)
    self.recv_clearItemAvailabilityCacheForItem()

  def send_clearItemAvailabilityCacheForItem(self, item_id):
    self._oprot.writeMessageBegin('clearItemAvailabilityCacheForItem', TMessageType.CALL, self._seqid)
    args = clearItemAvailabilityCacheForItem_args()
    args.item_id = item_id
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

  def recv_clearItemAvailabilityCacheForItem(self, ):
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
    if mtype == TMessageType.EXCEPTION:
      x = TApplicationException()
      x.read(self._iprot)
      self._iprot.readMessageEnd()
      raise x
    result = clearItemAvailabilityCacheForItem_result()
    result.read(self._iprot)
    self._iprot.readMessageEnd()
    return

  def getOurWarehouseIdForVendor(self, vendorId):
    """
    Parameters:
     - vendorId
    """
    self.send_getOurWarehouseIdForVendor(vendorId)
    return self.recv_getOurWarehouseIdForVendor()

  def send_getOurWarehouseIdForVendor(self, vendorId):
    self._oprot.writeMessageBegin('getOurWarehouseIdForVendor', TMessageType.CALL, self._seqid)
    args = getOurWarehouseIdForVendor_args()
    args.vendorId = vendorId
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

  def recv_getOurWarehouseIdForVendor(self, ):
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
    if mtype == TMessageType.EXCEPTION:
      x = TApplicationException()
      x.read(self._iprot)
      self._iprot.readMessageEnd()
      raise x
    result = getOurWarehouseIdForVendor_result()
    result.read(self._iprot)
    self._iprot.readMessageEnd()
    if result.success is not None:
      return result.success
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getOurWarehouseIdForVendor failed: unknown result");

  def getItemAvailabilitiesAtOurWarehouses(self, item_ids):
    """
    Parameters:
     - item_ids
    """
    self.send_getItemAvailabilitiesAtOurWarehouses(item_ids)
    return self.recv_getItemAvailabilitiesAtOurWarehouses()

  def send_getItemAvailabilitiesAtOurWarehouses(self, item_ids):
    self._oprot.writeMessageBegin('getItemAvailabilitiesAtOurWarehouses', TMessageType.CALL, self._seqid)
    args = getItemAvailabilitiesAtOurWarehouses_args()
    args.item_ids = item_ids
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

  def recv_getItemAvailabilitiesAtOurWarehouses(self, ):
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
    if mtype == TMessageType.EXCEPTION:
      x = TApplicationException()
      x.read(self._iprot)
      self._iprot.readMessageEnd()
      raise x
    result = getItemAvailabilitiesAtOurWarehouses_result()
    result.read(self._iprot)
    self._iprot.readMessageEnd()
    if result.success is not None:
      return result.success
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getItemAvailabilitiesAtOurWarehouses failed: unknown result");

  def getMonitoredWarehouseForVendors(self, vendorIds):
    """
    Parameters:
     - vendorIds
    """
    self.send_getMonitoredWarehouseForVendors(vendorIds)
    return self.recv_getMonitoredWarehouseForVendors()

  def send_getMonitoredWarehouseForVendors(self, vendorIds):
    self._oprot.writeMessageBegin('getMonitoredWarehouseForVendors', TMessageType.CALL, self._seqid)
    args = getMonitoredWarehouseForVendors_args()
    args.vendorIds = vendorIds
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

  def recv_getMonitoredWarehouseForVendors(self, ):
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
    if mtype == TMessageType.EXCEPTION:
      x = TApplicationException()
      x.read(self._iprot)
      self._iprot.readMessageEnd()
      raise x
    result = getMonitoredWarehouseForVendors_result()
    result.read(self._iprot)
    self._iprot.readMessageEnd()
    if result.success is not None:
      return result.success
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getMonitoredWarehouseForVendors failed: unknown result");

  def getIgnoredWarehouseidsAndItemids(self, ):
    self.send_getIgnoredWarehouseidsAndItemids()
    return self.recv_getIgnoredWarehouseidsAndItemids()

  def send_getIgnoredWarehouseidsAndItemids(self, ):
    self._oprot.writeMessageBegin('getIgnoredWarehouseidsAndItemids', TMessageType.CALL, self._seqid)
    args = getIgnoredWarehouseidsAndItemids_args()
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

  def recv_getIgnoredWarehouseidsAndItemids(self, ):
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
    if mtype == TMessageType.EXCEPTION:
      x = TApplicationException()
      x.read(self._iprot)
      self._iprot.readMessageEnd()
      raise x
    result = getIgnoredWarehouseidsAndItemids_result()
    result.read(self._iprot)
    self._iprot.readMessageEnd()
    if result.success is not None:
      return result.success
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getIgnoredWarehouseidsAndItemids failed: unknown result");

  def insertItemtoIgnoreInventoryUpdatelist(self, item_id, warehouse_id):
    """
    Parameters:
     - item_id
     - warehouse_id
    """
    self.send_insertItemtoIgnoreInventoryUpdatelist(item_id, warehouse_id)
    return self.recv_insertItemtoIgnoreInventoryUpdatelist()

  def send_insertItemtoIgnoreInventoryUpdatelist(self, item_id, warehouse_id):
    self._oprot.writeMessageBegin('insertItemtoIgnoreInventoryUpdatelist', TMessageType.CALL, self._seqid)
    args = insertItemtoIgnoreInventoryUpdatelist_args()
    args.item_id = item_id
    args.warehouse_id = warehouse_id
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

  def recv_insertItemtoIgnoreInventoryUpdatelist(self, ):
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
    if mtype == TMessageType.EXCEPTION:
      x = TApplicationException()
      x.read(self._iprot)
      self._iprot.readMessageEnd()
      raise x
    result = insertItemtoIgnoreInventoryUpdatelist_result()
    result.read(self._iprot)
    self._iprot.readMessageEnd()
    if result.success is not None:
      return result.success
    raise TApplicationException(TApplicationException.MISSING_RESULT, "insertItemtoIgnoreInventoryUpdatelist failed: unknown result");

  def deleteItemFromIgnoredInventoryUpdateList(self, item_id, warehouse_id):
    """
    Parameters:
     - item_id
     - warehouse_id
    """
    self.send_deleteItemFromIgnoredInventoryUpdateList(item_id, warehouse_id)
    return self.recv_deleteItemFromIgnoredInventoryUpdateList()

  def send_deleteItemFromIgnoredInventoryUpdateList(self, item_id, warehouse_id):
    self._oprot.writeMessageBegin('deleteItemFromIgnoredInventoryUpdateList', TMessageType.CALL, self._seqid)
    args = deleteItemFromIgnoredInventoryUpdateList_args()
    args.item_id = item_id
    args.warehouse_id = warehouse_id
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

  def recv_deleteItemFromIgnoredInventoryUpdateList(self, ):
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
    if mtype == TMessageType.EXCEPTION:
      x = TApplicationException()
      x.read(self._iprot)
      self._iprot.readMessageEnd()
      raise x
    result = deleteItemFromIgnoredInventoryUpdateList_result()
    result.read(self._iprot)
    self._iprot.readMessageEnd()
    if result.success is not None:
      return result.success
    raise TApplicationException(TApplicationException.MISSING_RESULT, "deleteItemFromIgnoredInventoryUpdateList failed: unknown result");

  def getAllIgnoredInventoryupdateItemsCount(self, ):
    self.send_getAllIgnoredInventoryupdateItemsCount()
    return self.recv_getAllIgnoredInventoryupdateItemsCount()

  def send_getAllIgnoredInventoryupdateItemsCount(self, ):
    self._oprot.writeMessageBegin('getAllIgnoredInventoryupdateItemsCount', TMessageType.CALL, self._seqid)
    args = getAllIgnoredInventoryupdateItemsCount_args()
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

  def recv_getAllIgnoredInventoryupdateItemsCount(self, ):
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
    if mtype == TMessageType.EXCEPTION:
      x = TApplicationException()
      x.read(self._iprot)
      self._iprot.readMessageEnd()
      raise x
    result = getAllIgnoredInventoryupdateItemsCount_result()
    result.read(self._iprot)
    self._iprot.readMessageEnd()
    if result.success is not None:
      return result.success
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getAllIgnoredInventoryupdateItemsCount failed: unknown result");

  def getIgnoredInventoryUpdateItemids(self, offset, limit):
    """
    Parameters:
     - offset
     - limit
    """
    self.send_getIgnoredInventoryUpdateItemids(offset, limit)
    return self.recv_getIgnoredInventoryUpdateItemids()

  def send_getIgnoredInventoryUpdateItemids(self, offset, limit):
    self._oprot.writeMessageBegin('getIgnoredInventoryUpdateItemids', TMessageType.CALL, self._seqid)
    args = getIgnoredInventoryUpdateItemids_args()
    args.offset = offset
    args.limit = limit
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

  def recv_getIgnoredInventoryUpdateItemids(self, ):
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
    if mtype == TMessageType.EXCEPTION:
      x = TApplicationException()
      x.read(self._iprot)
      self._iprot.readMessageEnd()
      raise x
    result = getIgnoredInventoryUpdateItemids_result()
    result.read(self._iprot)
    self._iprot.readMessageEnd()
    if result.success is not None:
      return result.success
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getIgnoredInventoryUpdateItemids failed: unknown result");

  def updateItemStockPurchaseParams(self, item_id, numOfDaysStock, minStockLevel):
    """
    Parameters:
     - item_id
     - numOfDaysStock
     - minStockLevel
    """
    self.send_updateItemStockPurchaseParams(item_id, numOfDaysStock, minStockLevel)
    self.recv_updateItemStockPurchaseParams()

  def send_updateItemStockPurchaseParams(self, item_id, numOfDaysStock, minStockLevel):
    self._oprot.writeMessageBegin('updateItemStockPurchaseParams', TMessageType.CALL, self._seqid)
    args = updateItemStockPurchaseParams_args()
    args.item_id = item_id
    args.numOfDaysStock = numOfDaysStock
    args.minStockLevel = minStockLevel
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

  def recv_updateItemStockPurchaseParams(self, ):
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
    if mtype == TMessageType.EXCEPTION:
      x = TApplicationException()
      x.read(self._iprot)
      self._iprot.readMessageEnd()
      raise x
    result = updateItemStockPurchaseParams_result()
    result.read(self._iprot)
    self._iprot.readMessageEnd()
    return

  def getItemStockPurchaseParams(self, itemId):
    """
    Parameters:
     - itemId
    """
    self.send_getItemStockPurchaseParams(itemId)
    return self.recv_getItemStockPurchaseParams()

  def send_getItemStockPurchaseParams(self, itemId):
    self._oprot.writeMessageBegin('getItemStockPurchaseParams', TMessageType.CALL, self._seqid)
    args = getItemStockPurchaseParams_args()
    args.itemId = itemId
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

  def recv_getItemStockPurchaseParams(self, ):
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
    if mtype == TMessageType.EXCEPTION:
      x = TApplicationException()
      x.read(self._iprot)
      self._iprot.readMessageEnd()
      raise x
    result = getItemStockPurchaseParams_result()
    result.read(self._iprot)
    self._iprot.readMessageEnd()
    if result.success is not None:
      return result.success
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getItemStockPurchaseParams failed: unknown result");

  def addOosStatusForItem(self, oosStatusMap, date):
    """
    Parameters:
     - oosStatusMap
     - date
    """
    self.send_addOosStatusForItem(oosStatusMap, date)
    self.recv_addOosStatusForItem()

  def send_addOosStatusForItem(self, oosStatusMap, date):
    self._oprot.writeMessageBegin('addOosStatusForItem', TMessageType.CALL, self._seqid)
    args = addOosStatusForItem_args()
    args.oosStatusMap = oosStatusMap
    args.date = date
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

  def recv_addOosStatusForItem(self, ):
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
    if mtype == TMessageType.EXCEPTION:
      x = TApplicationException()
      x.read(self._iprot)
      self._iprot.readMessageEnd()
      raise x
    result = addOosStatusForItem_result()
    result.read(self._iprot)
    self._iprot.readMessageEnd()
    return

  def getOosStatusesForXDaysForItem(self, itemId, days):
    """
    Parameters:
     - itemId
     - days
    """
    self.send_getOosStatusesForXDaysForItem(itemId, days)
    return self.recv_getOosStatusesForXDaysForItem()

  def send_getOosStatusesForXDaysForItem(self, itemId, days):
    self._oprot.writeMessageBegin('getOosStatusesForXDaysForItem', TMessageType.CALL, self._seqid)
    args = getOosStatusesForXDaysForItem_args()
    args.itemId = itemId
    args.days = days
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

  def recv_getOosStatusesForXDaysForItem(self, ):
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
    if mtype == TMessageType.EXCEPTION:
      x = TApplicationException()
      x.read(self._iprot)
      self._iprot.readMessageEnd()
      raise x
    result = getOosStatusesForXDaysForItem_result()
    result.read(self._iprot)
    self._iprot.readMessageEnd()
    if result.success is not None:
      return result.success
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getOosStatusesForXDaysForItem failed: unknown result");

  def getNonZeroItemStockPurchaseParams(self, ):
    self.send_getNonZeroItemStockPurchaseParams()
    return self.recv_getNonZeroItemStockPurchaseParams()

  def send_getNonZeroItemStockPurchaseParams(self, ):
    self._oprot.writeMessageBegin('getNonZeroItemStockPurchaseParams', TMessageType.CALL, self._seqid)
    args = getNonZeroItemStockPurchaseParams_args()
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

  def recv_getNonZeroItemStockPurchaseParams(self, ):
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
    if mtype == TMessageType.EXCEPTION:
      x = TApplicationException()
      x.read(self._iprot)
      self._iprot.readMessageEnd()
      raise x
    result = getNonZeroItemStockPurchaseParams_result()
    result.read(self._iprot)
    self._iprot.readMessageEnd()
    if result.success is not None:
      return result.success
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getNonZeroItemStockPurchaseParams failed: unknown result");

  def getBillableInventoryAndPendingOrders(self, ):
    """
    Returns a list of inventory stock for items for which there are pending orders or have billable inventory.
    """
    self.send_getBillableInventoryAndPendingOrders()
    return self.recv_getBillableInventoryAndPendingOrders()

  def send_getBillableInventoryAndPendingOrders(self, ):
    self._oprot.writeMessageBegin('getBillableInventoryAndPendingOrders', TMessageType.CALL, self._seqid)
    args = getBillableInventoryAndPendingOrders_args()
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

  def recv_getBillableInventoryAndPendingOrders(self, ):
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
    if mtype == TMessageType.EXCEPTION:
      x = TApplicationException()
      x.read(self._iprot)
      self._iprot.readMessageEnd()
      raise x
    result = getBillableInventoryAndPendingOrders_result()
    result.read(self._iprot)
    self._iprot.readMessageEnd()
    if result.success is not None:
      return result.success
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getBillableInventoryAndPendingOrders failed: unknown result");


class Processor(shop2020.thriftpy.generic.GenericService.Processor, Iface, TProcessor):
  def __init__(self, handler):
    shop2020.thriftpy.generic.GenericService.Processor.__init__(self, handler)
    self._processMap["addWarehouse"] = Processor.process_addWarehouse
    self._processMap["addVendor"] = Processor.process_addVendor
    self._processMap["updateInventoryHistory"] = Processor.process_updateInventoryHistory
    self._processMap["updateInventory"] = Processor.process_updateInventory
    self._processMap["addInventory"] = Processor.process_addInventory
    self._processMap["retireWarehouse"] = Processor.process_retireWarehouse
    self._processMap["getItemInventoryByItemId"] = Processor.process_getItemInventoryByItemId
    self._processMap["getItemAvailibilityAtWarehouse"] = Processor.process_getItemAvailibilityAtWarehouse
    self._processMap["getItemAvailabilityAtLocation"] = Processor.process_getItemAvailabilityAtLocation
    self._processMap["getAllWarehouses"] = Processor.process_getAllWarehouses
    self._processMap["getWarehouse"] = Processor.process_getWarehouse
    self._processMap["getAllItemsForWarehouse"] = Processor.process_getAllItemsForWarehouse
    self._processMap["isOrderBillable"] = Processor.process_isOrderBillable
    self._processMap["reserveItemInWarehouse"] = Processor.process_reserveItemInWarehouse
    self._processMap["reduceReservationCount"] = Processor.process_reduceReservationCount
    self._processMap["getItemPricing"] = Processor.process_getItemPricing
    self._processMap["getAllItemPricing"] = Processor.process_getAllItemPricing
    self._processMap["addVendorItemPricing"] = Processor.process_addVendorItemPricing
    self._processMap["getVendor"] = Processor.process_getVendor
    self._processMap["getAllVendors"] = Processor.process_getAllVendors
    self._processMap["addVendorItemMapping"] = Processor.process_addVendorItemMapping
    self._processMap["getVendorItemMappings"] = Processor.process_getVendorItemMappings
    self._processMap["getPendingOrdersInventory"] = Processor.process_getPendingOrdersInventory
    self._processMap["getWarehouses"] = Processor.process_getWarehouses
    self._processMap["resetAvailability"] = Processor.process_resetAvailability
    self._processMap["resetAvailabilityForWarehouse"] = Processor.process_resetAvailabilityForWarehouse
    self._processMap["getItemKeysToBeProcessed"] = Processor.process_getItemKeysToBeProcessed
    self._processMap["markMissedInventoryUpdatesAsProcessed"] = Processor.process_markMissedInventoryUpdatesAsProcessed
    self._processMap["getIgnoredItemKeys"] = Processor.process_getIgnoredItemKeys
    self._processMap["addBadInventory"] = Processor.process_addBadInventory
    self._processMap["getShippingLocations"] = Processor.process_getShippingLocations
    self._processMap["getAllVendorItemMappings"] = Processor.process_getAllVendorItemMappings
    self._processMap["getInventorySnapshot"] = Processor.process_getInventorySnapshot
    self._processMap["clearItemAvailabilityCache"] = Processor.process_clearItemAvailabilityCache
    self._processMap["updateVendorString"] = Processor.process_updateVendorString
    self._processMap["clearItemAvailabilityCacheForItem"] = Processor.process_clearItemAvailabilityCacheForItem
    self._processMap["getOurWarehouseIdForVendor"] = Processor.process_getOurWarehouseIdForVendor
    self._processMap["getItemAvailabilitiesAtOurWarehouses"] = Processor.process_getItemAvailabilitiesAtOurWarehouses
    self._processMap["getMonitoredWarehouseForVendors"] = Processor.process_getMonitoredWarehouseForVendors
    self._processMap["getIgnoredWarehouseidsAndItemids"] = Processor.process_getIgnoredWarehouseidsAndItemids
    self._processMap["insertItemtoIgnoreInventoryUpdatelist"] = Processor.process_insertItemtoIgnoreInventoryUpdatelist
    self._processMap["deleteItemFromIgnoredInventoryUpdateList"] = Processor.process_deleteItemFromIgnoredInventoryUpdateList
    self._processMap["getAllIgnoredInventoryupdateItemsCount"] = Processor.process_getAllIgnoredInventoryupdateItemsCount
    self._processMap["getIgnoredInventoryUpdateItemids"] = Processor.process_getIgnoredInventoryUpdateItemids
    self._processMap["updateItemStockPurchaseParams"] = Processor.process_updateItemStockPurchaseParams
    self._processMap["getItemStockPurchaseParams"] = Processor.process_getItemStockPurchaseParams
    self._processMap["addOosStatusForItem"] = Processor.process_addOosStatusForItem
    self._processMap["getOosStatusesForXDaysForItem"] = Processor.process_getOosStatusesForXDaysForItem
    self._processMap["getNonZeroItemStockPurchaseParams"] = Processor.process_getNonZeroItemStockPurchaseParams
    self._processMap["getBillableInventoryAndPendingOrders"] = Processor.process_getBillableInventoryAndPendingOrders

  def process(self, iprot, oprot):
    (name, type, seqid) = iprot.readMessageBegin()
    if name not in self._processMap:
      iprot.skip(TType.STRUCT)
      iprot.readMessageEnd()
      x = TApplicationException(TApplicationException.UNKNOWN_METHOD, 'Unknown function %s' % (name))
      oprot.writeMessageBegin(name, TMessageType.EXCEPTION, seqid)
      x.write(oprot)
      oprot.writeMessageEnd()
      oprot.trans.flush()
      return
    else:
      self._processMap[name](self, seqid, iprot, oprot)
    return True

  def process_addWarehouse(self, seqid, iprot, oprot):
    args = addWarehouse_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = addWarehouse_result()
    try:
      result.success = self._handler.addWarehouse(args.warehouse)
    except InventoryServiceException, cex:
      result.cex = cex
    oprot.writeMessageBegin("addWarehouse", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_addVendor(self, seqid, iprot, oprot):
    args = addVendor_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = addVendor_result()
    try:
      result.success = self._handler.addVendor(args.vendor)
    except InventoryServiceException, cex:
      result.cex = cex
    oprot.writeMessageBegin("addVendor", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_updateInventoryHistory(self, seqid, iprot, oprot):
    args = updateInventoryHistory_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = updateInventoryHistory_result()
    try:
      self._handler.updateInventoryHistory(args.warehouse_id, args.timestamp, args.availability)
    except InventoryServiceException, cex:
      result.cex = cex
    oprot.writeMessageBegin("updateInventoryHistory", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_updateInventory(self, seqid, iprot, oprot):
    args = updateInventory_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = updateInventory_result()
    try:
      self._handler.updateInventory(args.warehouse_id, args.timestamp, args.availability)
    except InventoryServiceException, cex:
      result.cex = cex
    oprot.writeMessageBegin("updateInventory", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_addInventory(self, seqid, iprot, oprot):
    args = addInventory_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = addInventory_result()
    try:
      self._handler.addInventory(args.itemId, args.warehouseId, args.quantity)
    except InventoryServiceException, cex:
      result.cex = cex
    oprot.writeMessageBegin("addInventory", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_retireWarehouse(self, seqid, iprot, oprot):
    args = retireWarehouse_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = retireWarehouse_result()
    try:
      self._handler.retireWarehouse(args.warehouse_id)
    except InventoryServiceException, cex:
      result.cex = cex
    oprot.writeMessageBegin("retireWarehouse", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_getItemInventoryByItemId(self, seqid, iprot, oprot):
    args = getItemInventoryByItemId_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = getItemInventoryByItemId_result()
    try:
      result.success = self._handler.getItemInventoryByItemId(args.item_id)
    except InventoryServiceException, cex:
      result.cex = cex
    oprot.writeMessageBegin("getItemInventoryByItemId", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_getItemAvailibilityAtWarehouse(self, seqid, iprot, oprot):
    args = getItemAvailibilityAtWarehouse_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = getItemAvailibilityAtWarehouse_result()
    try:
      result.success = self._handler.getItemAvailibilityAtWarehouse(args.warehouse_id, args.item_id)
    except InventoryServiceException, cex:
      result.cex = cex
    oprot.writeMessageBegin("getItemAvailibilityAtWarehouse", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_getItemAvailabilityAtLocation(self, seqid, iprot, oprot):
    args = getItemAvailabilityAtLocation_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = getItemAvailabilityAtLocation_result()
    try:
      result.success = self._handler.getItemAvailabilityAtLocation(args.itemId, args.sourceId)
    except InventoryServiceException, isex:
      result.isex = isex
    oprot.writeMessageBegin("getItemAvailabilityAtLocation", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_getAllWarehouses(self, seqid, iprot, oprot):
    args = getAllWarehouses_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = getAllWarehouses_result()
    try:
      result.success = self._handler.getAllWarehouses(args.isActive)
    except InventoryServiceException, cex:
      result.cex = cex
    oprot.writeMessageBegin("getAllWarehouses", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_getWarehouse(self, seqid, iprot, oprot):
    args = getWarehouse_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = getWarehouse_result()
    try:
      result.success = self._handler.getWarehouse(args.warehouse_id)
    except InventoryServiceException, cex:
      result.cex = cex
    oprot.writeMessageBegin("getWarehouse", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_getAllItemsForWarehouse(self, seqid, iprot, oprot):
    args = getAllItemsForWarehouse_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = getAllItemsForWarehouse_result()
    try:
      result.success = self._handler.getAllItemsForWarehouse(args.warehouse_id)
    except InventoryServiceException, cex:
      result.cex = cex
    oprot.writeMessageBegin("getAllItemsForWarehouse", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_isOrderBillable(self, seqid, iprot, oprot):
    args = isOrderBillable_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = isOrderBillable_result()
    result.success = self._handler.isOrderBillable(args.itemId, args.warehouseId, args.sourceId, args.orderId)
    oprot.writeMessageBegin("isOrderBillable", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_reserveItemInWarehouse(self, seqid, iprot, oprot):
    args = reserveItemInWarehouse_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = reserveItemInWarehouse_result()
    try:
      result.success = self._handler.reserveItemInWarehouse(args.itemId, args.warehouseId, args.sourceId, args.orderId, args.createdTimestamp, args.promisedShippingTimestamp, args.quantity)
    except InventoryServiceException, cex:
      result.cex = cex
    oprot.writeMessageBegin("reserveItemInWarehouse", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_reduceReservationCount(self, seqid, iprot, oprot):
    args = reduceReservationCount_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = reduceReservationCount_result()
    try:
      result.success = self._handler.reduceReservationCount(args.itemId, args.warehouseId, args.sourceId, args.orderId, args.quantity)
    except InventoryServiceException, cex:
      result.cex = cex
    oprot.writeMessageBegin("reduceReservationCount", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_getItemPricing(self, seqid, iprot, oprot):
    args = getItemPricing_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = getItemPricing_result()
    try:
      result.success = self._handler.getItemPricing(args.itemId, args.vendorId)
    except InventoryServiceException, cex:
      result.cex = cex
    oprot.writeMessageBegin("getItemPricing", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_getAllItemPricing(self, seqid, iprot, oprot):
    args = getAllItemPricing_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = getAllItemPricing_result()
    try:
      result.success = self._handler.getAllItemPricing(args.itemId)
    except InventoryServiceException, cex:
      result.cex = cex
    oprot.writeMessageBegin("getAllItemPricing", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_addVendorItemPricing(self, seqid, iprot, oprot):
    args = addVendorItemPricing_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = addVendorItemPricing_result()
    try:
      self._handler.addVendorItemPricing(args.vendorItemPricing)
    except InventoryServiceException, cex:
      result.cex = cex
    oprot.writeMessageBegin("addVendorItemPricing", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_getVendor(self, seqid, iprot, oprot):
    args = getVendor_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = getVendor_result()
    result.success = self._handler.getVendor(args.vendorId)
    oprot.writeMessageBegin("getVendor", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_getAllVendors(self, seqid, iprot, oprot):
    args = getAllVendors_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = getAllVendors_result()
    result.success = self._handler.getAllVendors()
    oprot.writeMessageBegin("getAllVendors", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_addVendorItemMapping(self, seqid, iprot, oprot):
    args = addVendorItemMapping_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = addVendorItemMapping_result()
    try:
      self._handler.addVendorItemMapping(args.key, args.vendorItemMapping)
    except InventoryServiceException, cex:
      result.cex = cex
    oprot.writeMessageBegin("addVendorItemMapping", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_getVendorItemMappings(self, seqid, iprot, oprot):
    args = getVendorItemMappings_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = getVendorItemMappings_result()
    try:
      result.success = self._handler.getVendorItemMappings(args.itemId)
    except InventoryServiceException, cex:
      result.cex = cex
    oprot.writeMessageBegin("getVendorItemMappings", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_getPendingOrdersInventory(self, seqid, iprot, oprot):
    args = getPendingOrdersInventory_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = getPendingOrdersInventory_result()
    result.success = self._handler.getPendingOrdersInventory(args.vendorid)
    oprot.writeMessageBegin("getPendingOrdersInventory", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_getWarehouses(self, seqid, iprot, oprot):
    args = getWarehouses_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = getWarehouses_result()
    result.success = self._handler.getWarehouses(args.warehouseType, args.inventoryType, args.vendorId, args.billingWarehouseId, args.shippingWarehouseId)
    oprot.writeMessageBegin("getWarehouses", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_resetAvailability(self, seqid, iprot, oprot):
    args = resetAvailability_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = resetAvailability_result()
    try:
      self._handler.resetAvailability(args.itemKey, args.vendorId, args.quantity, args.warehouseId)
    except InventoryServiceException, cex:
      result.cex = cex
    oprot.writeMessageBegin("resetAvailability", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_resetAvailabilityForWarehouse(self, seqid, iprot, oprot):
    args = resetAvailabilityForWarehouse_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = resetAvailabilityForWarehouse_result()
    try:
      self._handler.resetAvailabilityForWarehouse(args.warehouseId)
    except InventoryServiceException, cex:
      result.cex = cex
    oprot.writeMessageBegin("resetAvailabilityForWarehouse", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_getItemKeysToBeProcessed(self, seqid, iprot, oprot):
    args = getItemKeysToBeProcessed_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = getItemKeysToBeProcessed_result()
    result.success = self._handler.getItemKeysToBeProcessed(args.warehouseId)
    oprot.writeMessageBegin("getItemKeysToBeProcessed", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_markMissedInventoryUpdatesAsProcessed(self, seqid, iprot, oprot):
    args = markMissedInventoryUpdatesAsProcessed_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = markMissedInventoryUpdatesAsProcessed_result()
    self._handler.markMissedInventoryUpdatesAsProcessed(args.itemKey, args.warehouseId)
    oprot.writeMessageBegin("markMissedInventoryUpdatesAsProcessed", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_getIgnoredItemKeys(self, seqid, iprot, oprot):
    args = getIgnoredItemKeys_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = getIgnoredItemKeys_result()
    result.success = self._handler.getIgnoredItemKeys()
    oprot.writeMessageBegin("getIgnoredItemKeys", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_addBadInventory(self, seqid, iprot, oprot):
    args = addBadInventory_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = addBadInventory_result()
    try:
      self._handler.addBadInventory(args.itemId, args.warehouseId, args.quantity)
    except InventoryServiceException, cex:
      result.cex = cex
    oprot.writeMessageBegin("addBadInventory", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_getShippingLocations(self, seqid, iprot, oprot):
    args = getShippingLocations_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = getShippingLocations_result()
    result.success = self._handler.getShippingLocations()
    oprot.writeMessageBegin("getShippingLocations", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_getAllVendorItemMappings(self, seqid, iprot, oprot):
    args = getAllVendorItemMappings_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = getAllVendorItemMappings_result()
    result.success = self._handler.getAllVendorItemMappings()
    oprot.writeMessageBegin("getAllVendorItemMappings", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_getInventorySnapshot(self, seqid, iprot, oprot):
    args = getInventorySnapshot_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = getInventorySnapshot_result()
    result.success = self._handler.getInventorySnapshot(args.warehouseId)
    oprot.writeMessageBegin("getInventorySnapshot", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_clearItemAvailabilityCache(self, seqid, iprot, oprot):
    args = clearItemAvailabilityCache_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = clearItemAvailabilityCache_result()
    self._handler.clearItemAvailabilityCache()
    oprot.writeMessageBegin("clearItemAvailabilityCache", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_updateVendorString(self, seqid, iprot, oprot):
    args = updateVendorString_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = updateVendorString_result()
    self._handler.updateVendorString(args.warehouseId, args.vendorString)
    oprot.writeMessageBegin("updateVendorString", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_clearItemAvailabilityCacheForItem(self, seqid, iprot, oprot):
    args = clearItemAvailabilityCacheForItem_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = clearItemAvailabilityCacheForItem_result()
    self._handler.clearItemAvailabilityCacheForItem(args.item_id)
    oprot.writeMessageBegin("clearItemAvailabilityCacheForItem", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_getOurWarehouseIdForVendor(self, seqid, iprot, oprot):
    args = getOurWarehouseIdForVendor_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = getOurWarehouseIdForVendor_result()
    result.success = self._handler.getOurWarehouseIdForVendor(args.vendorId)
    oprot.writeMessageBegin("getOurWarehouseIdForVendor", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_getItemAvailabilitiesAtOurWarehouses(self, seqid, iprot, oprot):
    args = getItemAvailabilitiesAtOurWarehouses_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = getItemAvailabilitiesAtOurWarehouses_result()
    result.success = self._handler.getItemAvailabilitiesAtOurWarehouses(args.item_ids)
    oprot.writeMessageBegin("getItemAvailabilitiesAtOurWarehouses", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_getMonitoredWarehouseForVendors(self, seqid, iprot, oprot):
    args = getMonitoredWarehouseForVendors_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = getMonitoredWarehouseForVendors_result()
    result.success = self._handler.getMonitoredWarehouseForVendors(args.vendorIds)
    oprot.writeMessageBegin("getMonitoredWarehouseForVendors", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_getIgnoredWarehouseidsAndItemids(self, seqid, iprot, oprot):
    args = getIgnoredWarehouseidsAndItemids_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = getIgnoredWarehouseidsAndItemids_result()
    result.success = self._handler.getIgnoredWarehouseidsAndItemids()
    oprot.writeMessageBegin("getIgnoredWarehouseidsAndItemids", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_insertItemtoIgnoreInventoryUpdatelist(self, seqid, iprot, oprot):
    args = insertItemtoIgnoreInventoryUpdatelist_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = insertItemtoIgnoreInventoryUpdatelist_result()
    result.success = self._handler.insertItemtoIgnoreInventoryUpdatelist(args.item_id, args.warehouse_id)
    oprot.writeMessageBegin("insertItemtoIgnoreInventoryUpdatelist", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_deleteItemFromIgnoredInventoryUpdateList(self, seqid, iprot, oprot):
    args = deleteItemFromIgnoredInventoryUpdateList_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = deleteItemFromIgnoredInventoryUpdateList_result()
    result.success = self._handler.deleteItemFromIgnoredInventoryUpdateList(args.item_id, args.warehouse_id)
    oprot.writeMessageBegin("deleteItemFromIgnoredInventoryUpdateList", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_getAllIgnoredInventoryupdateItemsCount(self, seqid, iprot, oprot):
    args = getAllIgnoredInventoryupdateItemsCount_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = getAllIgnoredInventoryupdateItemsCount_result()
    result.success = self._handler.getAllIgnoredInventoryupdateItemsCount()
    oprot.writeMessageBegin("getAllIgnoredInventoryupdateItemsCount", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_getIgnoredInventoryUpdateItemids(self, seqid, iprot, oprot):
    args = getIgnoredInventoryUpdateItemids_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = getIgnoredInventoryUpdateItemids_result()
    result.success = self._handler.getIgnoredInventoryUpdateItemids(args.offset, args.limit)
    oprot.writeMessageBegin("getIgnoredInventoryUpdateItemids", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_updateItemStockPurchaseParams(self, seqid, iprot, oprot):
    args = updateItemStockPurchaseParams_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = updateItemStockPurchaseParams_result()
    self._handler.updateItemStockPurchaseParams(args.item_id, args.numOfDaysStock, args.minStockLevel)
    oprot.writeMessageBegin("updateItemStockPurchaseParams", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_getItemStockPurchaseParams(self, seqid, iprot, oprot):
    args = getItemStockPurchaseParams_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = getItemStockPurchaseParams_result()
    result.success = self._handler.getItemStockPurchaseParams(args.itemId)
    oprot.writeMessageBegin("getItemStockPurchaseParams", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_addOosStatusForItem(self, seqid, iprot, oprot):
    args = addOosStatusForItem_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = addOosStatusForItem_result()
    self._handler.addOosStatusForItem(args.oosStatusMap, args.date)
    oprot.writeMessageBegin("addOosStatusForItem", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_getOosStatusesForXDaysForItem(self, seqid, iprot, oprot):
    args = getOosStatusesForXDaysForItem_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = getOosStatusesForXDaysForItem_result()
    result.success = self._handler.getOosStatusesForXDaysForItem(args.itemId, args.days)
    oprot.writeMessageBegin("getOosStatusesForXDaysForItem", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_getNonZeroItemStockPurchaseParams(self, seqid, iprot, oprot):
    args = getNonZeroItemStockPurchaseParams_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = getNonZeroItemStockPurchaseParams_result()
    result.success = self._handler.getNonZeroItemStockPurchaseParams()
    oprot.writeMessageBegin("getNonZeroItemStockPurchaseParams", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_getBillableInventoryAndPendingOrders(self, seqid, iprot, oprot):
    args = getBillableInventoryAndPendingOrders_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = getBillableInventoryAndPendingOrders_result()
    result.success = self._handler.getBillableInventoryAndPendingOrders()
    oprot.writeMessageBegin("getBillableInventoryAndPendingOrders", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()


# HELPER FUNCTIONS AND STRUCTURES

class addWarehouse_args:
  """
  Attributes:
   - warehouse
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRUCT, 'warehouse', (Warehouse, Warehouse.thrift_spec), None, ), # 1
  )

  def __init__(self, warehouse=None,):
    self.warehouse = warehouse

  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.STRUCT:
          self.warehouse = Warehouse()
          self.warehouse.read(iprot)
        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('addWarehouse_args')
    if self.warehouse is not None:
      oprot.writeFieldBegin('warehouse', TType.STRUCT, 1)
      self.warehouse.write(oprot)
      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 addWarehouse_result:
  """
  Attributes:
   - success
   - cex
  """

  thrift_spec = (
    (0, TType.I64, 'success', None, None, ), # 0
    (1, TType.STRUCT, 'cex', (InventoryServiceException, InventoryServiceException.thrift_spec), None, ), # 1
  )

  def __init__(self, success=None, cex=None,):
    self.success = success
    self.cex = cex

  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 == 0:
        if ftype == TType.I64:
          self.success = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 1:
        if ftype == TType.STRUCT:
          self.cex = InventoryServiceException()
          self.cex.read(iprot)
        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('addWarehouse_result')
    if self.success is not None:
      oprot.writeFieldBegin('success', TType.I64, 0)
      oprot.writeI64(self.success)
      oprot.writeFieldEnd()
    if self.cex is not None:
      oprot.writeFieldBegin('cex', TType.STRUCT, 1)
      self.cex.write(oprot)
      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 addVendor_args:
  """
  Attributes:
   - vendor
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRUCT, 'vendor', (Vendor, Vendor.thrift_spec), None, ), # 1
  )

  def __init__(self, vendor=None,):
    self.vendor = vendor

  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.STRUCT:
          self.vendor = Vendor()
          self.vendor.read(iprot)
        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('addVendor_args')
    if self.vendor is not None:
      oprot.writeFieldBegin('vendor', TType.STRUCT, 1)
      self.vendor.write(oprot)
      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 addVendor_result:
  """
  Attributes:
   - success
   - cex
  """

  thrift_spec = (
    (0, TType.I64, 'success', None, None, ), # 0
    (1, TType.STRUCT, 'cex', (InventoryServiceException, InventoryServiceException.thrift_spec), None, ), # 1
  )

  def __init__(self, success=None, cex=None,):
    self.success = success
    self.cex = cex

  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 == 0:
        if ftype == TType.I64:
          self.success = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 1:
        if ftype == TType.STRUCT:
          self.cex = InventoryServiceException()
          self.cex.read(iprot)
        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('addVendor_result')
    if self.success is not None:
      oprot.writeFieldBegin('success', TType.I64, 0)
      oprot.writeI64(self.success)
      oprot.writeFieldEnd()
    if self.cex is not None:
      oprot.writeFieldBegin('cex', TType.STRUCT, 1)
      self.cex.write(oprot)
      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 updateInventoryHistory_args:
  """
  Attributes:
   - warehouse_id
   - timestamp
   - availability
  """

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

  def __init__(self, warehouse_id=None, timestamp=None, availability=None,):
    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.warehouse_id = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.STRING:
          self.timestamp = iprot.readString();
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.MAP:
          self.availability = {}
          (_ktype19, _vtype20, _size18 ) = iprot.readMapBegin() 
          for _i22 in xrange(_size18):
            _key23 = iprot.readString();
            _val24 = iprot.readI64();
            self.availability[_key23] = _val24
          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('updateInventoryHistory_args')
    if self.warehouse_id is not None:
      oprot.writeFieldBegin('warehouse_id', TType.I64, 1)
      oprot.writeI64(self.warehouse_id)
      oprot.writeFieldEnd()
    if self.timestamp is not None:
      oprot.writeFieldBegin('timestamp', TType.STRING, 2)
      oprot.writeString(self.timestamp)
      oprot.writeFieldEnd()
    if self.availability is not None:
      oprot.writeFieldBegin('availability', TType.MAP, 3)
      oprot.writeMapBegin(TType.STRING, TType.I64, len(self.availability))
      for kiter25,viter26 in self.availability.items():
        oprot.writeString(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 updateInventoryHistory_result:
  """
  Attributes:
   - cex
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRUCT, 'cex', (InventoryServiceException, InventoryServiceException.thrift_spec), None, ), # 1
  )

  def __init__(self, cex=None,):
    self.cex = cex

  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.STRUCT:
          self.cex = InventoryServiceException()
          self.cex.read(iprot)
        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('updateInventoryHistory_result')
    if self.cex is not None:
      oprot.writeFieldBegin('cex', TType.STRUCT, 1)
      self.cex.write(oprot)
      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 updateInventory_args:
  """
  Attributes:
   - warehouse_id
   - timestamp
   - availability
  """

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

  def __init__(self, warehouse_id=None, timestamp=None, availability=None,):
    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.warehouse_id = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.STRING:
          self.timestamp = iprot.readString();
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.MAP:
          self.availability = {}
          (_ktype28, _vtype29, _size27 ) = iprot.readMapBegin() 
          for _i31 in xrange(_size27):
            _key32 = iprot.readString();
            _val33 = iprot.readI64();
            self.availability[_key32] = _val33
          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('updateInventory_args')
    if self.warehouse_id is not None:
      oprot.writeFieldBegin('warehouse_id', TType.I64, 1)
      oprot.writeI64(self.warehouse_id)
      oprot.writeFieldEnd()
    if self.timestamp is not None:
      oprot.writeFieldBegin('timestamp', TType.STRING, 2)
      oprot.writeString(self.timestamp)
      oprot.writeFieldEnd()
    if self.availability is not None:
      oprot.writeFieldBegin('availability', TType.MAP, 3)
      oprot.writeMapBegin(TType.STRING, TType.I64, len(self.availability))
      for kiter34,viter35 in self.availability.items():
        oprot.writeString(kiter34)
        oprot.writeI64(viter35)
      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 updateInventory_result:
  """
  Attributes:
   - cex
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRUCT, 'cex', (InventoryServiceException, InventoryServiceException.thrift_spec), None, ), # 1
  )

  def __init__(self, cex=None,):
    self.cex = cex

  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.STRUCT:
          self.cex = InventoryServiceException()
          self.cex.read(iprot)
        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('updateInventory_result')
    if self.cex is not None:
      oprot.writeFieldBegin('cex', TType.STRUCT, 1)
      self.cex.write(oprot)
      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 addInventory_args:
  """
  Attributes:
   - itemId
   - warehouseId
   - quantity
  """

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

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

  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)
      elif fid == 3:
        if ftype == TType.I64:
          self.quantity = 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('addInventory_args')
    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()
    if self.quantity is not None:
      oprot.writeFieldBegin('quantity', TType.I64, 3)
      oprot.writeI64(self.quantity)
      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 addInventory_result:
  """
  Attributes:
   - cex
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRUCT, 'cex', (InventoryServiceException, InventoryServiceException.thrift_spec), None, ), # 1
  )

  def __init__(self, cex=None,):
    self.cex = cex

  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.STRUCT:
          self.cex = InventoryServiceException()
          self.cex.read(iprot)
        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('addInventory_result')
    if self.cex is not None:
      oprot.writeFieldBegin('cex', TType.STRUCT, 1)
      self.cex.write(oprot)
      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 retireWarehouse_args:
  """
  Attributes:
   - warehouse_id
  """

  thrift_spec = (
    None, # 0
    (1, TType.I64, 'warehouse_id', None, None, ), # 1
  )

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

  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.warehouse_id = 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('retireWarehouse_args')
    if self.warehouse_id is not None:
      oprot.writeFieldBegin('warehouse_id', TType.I64, 1)
      oprot.writeI64(self.warehouse_id)
      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 retireWarehouse_result:
  """
  Attributes:
   - cex
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRUCT, 'cex', (InventoryServiceException, InventoryServiceException.thrift_spec), None, ), # 1
  )

  def __init__(self, cex=None,):
    self.cex = cex

  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.STRUCT:
          self.cex = InventoryServiceException()
          self.cex.read(iprot)
        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('retireWarehouse_result')
    if self.cex is not None:
      oprot.writeFieldBegin('cex', TType.STRUCT, 1)
      self.cex.write(oprot)
      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 getItemInventoryByItemId_args:
  """
  Attributes:
   - item_id
  """

  thrift_spec = (
    None, # 0
    (1, TType.I64, 'item_id', None, None, ), # 1
  )

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

  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)
      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('getItemInventoryByItemId_args')
    if self.item_id is not None:
      oprot.writeFieldBegin('item_id', TType.I64, 1)
      oprot.writeI64(self.item_id)
      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 getItemInventoryByItemId_result:
  """
  Attributes:
   - success
   - cex
  """

  thrift_spec = (
    (0, TType.STRUCT, 'success', (ItemInventory, ItemInventory.thrift_spec), None, ), # 0
    (1, TType.STRUCT, 'cex', (InventoryServiceException, InventoryServiceException.thrift_spec), None, ), # 1
  )

  def __init__(self, success=None, cex=None,):
    self.success = success
    self.cex = cex

  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 == 0:
        if ftype == TType.STRUCT:
          self.success = ItemInventory()
          self.success.read(iprot)
        else:
          iprot.skip(ftype)
      elif fid == 1:
        if ftype == TType.STRUCT:
          self.cex = InventoryServiceException()
          self.cex.read(iprot)
        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('getItemInventoryByItemId_result')
    if self.success is not None:
      oprot.writeFieldBegin('success', TType.STRUCT, 0)
      self.success.write(oprot)
      oprot.writeFieldEnd()
    if self.cex is not None:
      oprot.writeFieldBegin('cex', TType.STRUCT, 1)
      self.cex.write(oprot)
      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 getItemAvailibilityAtWarehouse_args:
  """
  Attributes:
   - warehouse_id
   - item_id
  """

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

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

  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.warehouse_id = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.I64:
          self.item_id = 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('getItemAvailibilityAtWarehouse_args')
    if self.warehouse_id is not None:
      oprot.writeFieldBegin('warehouse_id', TType.I64, 1)
      oprot.writeI64(self.warehouse_id)
      oprot.writeFieldEnd()
    if self.item_id is not None:
      oprot.writeFieldBegin('item_id', TType.I64, 2)
      oprot.writeI64(self.item_id)
      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 getItemAvailibilityAtWarehouse_result:
  """
  Attributes:
   - success
   - cex
  """

  thrift_spec = (
    (0, TType.I64, 'success', None, None, ), # 0
    (1, TType.STRUCT, 'cex', (InventoryServiceException, InventoryServiceException.thrift_spec), None, ), # 1
  )

  def __init__(self, success=None, cex=None,):
    self.success = success
    self.cex = cex

  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 == 0:
        if ftype == TType.I64:
          self.success = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 1:
        if ftype == TType.STRUCT:
          self.cex = InventoryServiceException()
          self.cex.read(iprot)
        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('getItemAvailibilityAtWarehouse_result')
    if self.success is not None:
      oprot.writeFieldBegin('success', TType.I64, 0)
      oprot.writeI64(self.success)
      oprot.writeFieldEnd()
    if self.cex is not None:
      oprot.writeFieldBegin('cex', TType.STRUCT, 1)
      self.cex.write(oprot)
      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 getItemAvailabilityAtLocation_args:
  """
  Attributes:
   - itemId
   - sourceId
  """

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

  def __init__(self, itemId=None, sourceId=None,):
    self.itemId = itemId
    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.itemId = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.I64:
          self.sourceId = 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('getItemAvailabilityAtLocation_args')
    if self.itemId is not None:
      oprot.writeFieldBegin('itemId', TType.I64, 1)
      oprot.writeI64(self.itemId)
      oprot.writeFieldEnd()
    if self.sourceId is not None:
      oprot.writeFieldBegin('sourceId', TType.I64, 2)
      oprot.writeI64(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 getItemAvailabilityAtLocation_result:
  """
  Attributes:
   - success
   - isex
  """

  thrift_spec = (
    (0, TType.LIST, 'success', (TType.I64,None), None, ), # 0
    (1, TType.STRUCT, 'isex', (InventoryServiceException, InventoryServiceException.thrift_spec), None, ), # 1
  )

  def __init__(self, success=None, isex=None,):
    self.success = success
    self.isex = isex

  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 == 0:
        if ftype == TType.LIST:
          self.success = []
          (_etype39, _size36) = iprot.readListBegin()
          for _i40 in xrange(_size36):
            _elem41 = iprot.readI64();
            self.success.append(_elem41)
          iprot.readListEnd()
        else:
          iprot.skip(ftype)
      elif fid == 1:
        if ftype == TType.STRUCT:
          self.isex = InventoryServiceException()
          self.isex.read(iprot)
        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('getItemAvailabilityAtLocation_result')
    if self.success is not None:
      oprot.writeFieldBegin('success', TType.LIST, 0)
      oprot.writeListBegin(TType.I64, len(self.success))
      for iter42 in self.success:
        oprot.writeI64(iter42)
      oprot.writeListEnd()
      oprot.writeFieldEnd()
    if self.isex is not None:
      oprot.writeFieldBegin('isex', TType.STRUCT, 1)
      self.isex.write(oprot)
      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 getAllWarehouses_args:
  """
  Attributes:
   - isActive
  """

  thrift_spec = (
    None, # 0
    (1, TType.BOOL, 'isActive', None, None, ), # 1
  )

  def __init__(self, isActive=None,):
    self.isActive = isActive

  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.BOOL:
          self.isActive = 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('getAllWarehouses_args')
    if self.isActive is not None:
      oprot.writeFieldBegin('isActive', TType.BOOL, 1)
      oprot.writeBool(self.isActive)
      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 getAllWarehouses_result:
  """
  Attributes:
   - success
   - cex
  """

  thrift_spec = (
    (0, TType.LIST, 'success', (TType.STRUCT,(Warehouse, Warehouse.thrift_spec)), None, ), # 0
    (1, TType.STRUCT, 'cex', (InventoryServiceException, InventoryServiceException.thrift_spec), None, ), # 1
  )

  def __init__(self, success=None, cex=None,):
    self.success = success
    self.cex = cex

  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 == 0:
        if ftype == TType.LIST:
          self.success = []
          (_etype46, _size43) = iprot.readListBegin()
          for _i47 in xrange(_size43):
            _elem48 = Warehouse()
            _elem48.read(iprot)
            self.success.append(_elem48)
          iprot.readListEnd()
        else:
          iprot.skip(ftype)
      elif fid == 1:
        if ftype == TType.STRUCT:
          self.cex = InventoryServiceException()
          self.cex.read(iprot)
        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('getAllWarehouses_result')
    if self.success is not None:
      oprot.writeFieldBegin('success', TType.LIST, 0)
      oprot.writeListBegin(TType.STRUCT, len(self.success))
      for iter49 in self.success:
        iter49.write(oprot)
      oprot.writeListEnd()
      oprot.writeFieldEnd()
    if self.cex is not None:
      oprot.writeFieldBegin('cex', TType.STRUCT, 1)
      self.cex.write(oprot)
      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 getWarehouse_args:
  """
  Attributes:
   - warehouse_id
  """

  thrift_spec = (
    None, # 0
    (1, TType.I64, 'warehouse_id', None, None, ), # 1
  )

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

  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.warehouse_id = 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('getWarehouse_args')
    if self.warehouse_id is not None:
      oprot.writeFieldBegin('warehouse_id', TType.I64, 1)
      oprot.writeI64(self.warehouse_id)
      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 getWarehouse_result:
  """
  Attributes:
   - success
   - cex
  """

  thrift_spec = (
    (0, TType.STRUCT, 'success', (Warehouse, Warehouse.thrift_spec), None, ), # 0
    (1, TType.STRUCT, 'cex', (InventoryServiceException, InventoryServiceException.thrift_spec), None, ), # 1
  )

  def __init__(self, success=None, cex=None,):
    self.success = success
    self.cex = cex

  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 == 0:
        if ftype == TType.STRUCT:
          self.success = Warehouse()
          self.success.read(iprot)
        else:
          iprot.skip(ftype)
      elif fid == 1:
        if ftype == TType.STRUCT:
          self.cex = InventoryServiceException()
          self.cex.read(iprot)
        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('getWarehouse_result')
    if self.success is not None:
      oprot.writeFieldBegin('success', TType.STRUCT, 0)
      self.success.write(oprot)
      oprot.writeFieldEnd()
    if self.cex is not None:
      oprot.writeFieldBegin('cex', TType.STRUCT, 1)
      self.cex.write(oprot)
      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 getAllItemsForWarehouse_args:
  """
  Attributes:
   - warehouse_id
  """

  thrift_spec = (
    None, # 0
    (1, TType.I64, 'warehouse_id', None, None, ), # 1
  )

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

  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.warehouse_id = 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('getAllItemsForWarehouse_args')
    if self.warehouse_id is not None:
      oprot.writeFieldBegin('warehouse_id', TType.I64, 1)
      oprot.writeI64(self.warehouse_id)
      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 getAllItemsForWarehouse_result:
  """
  Attributes:
   - success
   - cex
  """

  thrift_spec = (
    (0, TType.LIST, 'success', (TType.I64,None), None, ), # 0
    (1, TType.STRUCT, 'cex', (InventoryServiceException, InventoryServiceException.thrift_spec), None, ), # 1
  )

  def __init__(self, success=None, cex=None,):
    self.success = success
    self.cex = cex

  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 == 0:
        if ftype == TType.LIST:
          self.success = []
          (_etype53, _size50) = iprot.readListBegin()
          for _i54 in xrange(_size50):
            _elem55 = iprot.readI64();
            self.success.append(_elem55)
          iprot.readListEnd()
        else:
          iprot.skip(ftype)
      elif fid == 1:
        if ftype == TType.STRUCT:
          self.cex = InventoryServiceException()
          self.cex.read(iprot)
        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('getAllItemsForWarehouse_result')
    if self.success is not None:
      oprot.writeFieldBegin('success', TType.LIST, 0)
      oprot.writeListBegin(TType.I64, len(self.success))
      for iter56 in self.success:
        oprot.writeI64(iter56)
      oprot.writeListEnd()
      oprot.writeFieldEnd()
    if self.cex is not None:
      oprot.writeFieldBegin('cex', TType.STRUCT, 1)
      self.cex.write(oprot)
      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 isOrderBillable_args:
  """
  Attributes:
   - itemId
   - warehouseId
   - sourceId
   - orderId
  """

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

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

  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)
      elif fid == 3:
        if ftype == TType.I64:
          self.sourceId = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.I64:
          self.orderId = 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('isOrderBillable_args')
    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()
    if self.sourceId is not None:
      oprot.writeFieldBegin('sourceId', TType.I64, 3)
      oprot.writeI64(self.sourceId)
      oprot.writeFieldEnd()
    if self.orderId is not None:
      oprot.writeFieldBegin('orderId', TType.I64, 4)
      oprot.writeI64(self.orderId)
      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 isOrderBillable_result:
  """
  Attributes:
   - success
  """

  thrift_spec = (
    (0, TType.BOOL, 'success', None, None, ), # 0
  )

  def __init__(self, success=None,):
    self.success = success

  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 == 0:
        if ftype == TType.BOOL:
          self.success = 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('isOrderBillable_result')
    if self.success is not None:
      oprot.writeFieldBegin('success', TType.BOOL, 0)
      oprot.writeBool(self.success)
      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 reserveItemInWarehouse_args:
  """
  Attributes:
   - itemId
   - warehouseId
   - sourceId
   - orderId
   - createdTimestamp
   - promisedShippingTimestamp
   - quantity
  """

  thrift_spec = (
    None, # 0
    (1, TType.I64, 'itemId', None, None, ), # 1
    (2, TType.I64, 'warehouseId', None, None, ), # 2
    (3, TType.I64, 'sourceId', None, None, ), # 3
    (4, TType.I64, 'orderId', None, None, ), # 4
    (5, TType.I64, 'createdTimestamp', None, None, ), # 5
    (6, TType.I64, 'promisedShippingTimestamp', None, None, ), # 6
    (7, TType.DOUBLE, 'quantity', None, None, ), # 7
  )

  def __init__(self, itemId=None, warehouseId=None, sourceId=None, orderId=None, createdTimestamp=None, promisedShippingTimestamp=None, quantity=None,):
    self.itemId = itemId
    self.warehouseId = warehouseId
    self.sourceId = sourceId
    self.orderId = orderId
    self.createdTimestamp = createdTimestamp
    self.promisedShippingTimestamp = promisedShippingTimestamp
    self.quantity = quantity

  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)
      elif fid == 3:
        if ftype == TType.I64:
          self.sourceId = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.I64:
          self.orderId = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 5:
        if ftype == TType.I64:
          self.createdTimestamp = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 6:
        if ftype == TType.I64:
          self.promisedShippingTimestamp = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 7:
        if ftype == TType.DOUBLE:
          self.quantity = 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('reserveItemInWarehouse_args')
    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()
    if self.sourceId is not None:
      oprot.writeFieldBegin('sourceId', TType.I64, 3)
      oprot.writeI64(self.sourceId)
      oprot.writeFieldEnd()
    if self.orderId is not None:
      oprot.writeFieldBegin('orderId', TType.I64, 4)
      oprot.writeI64(self.orderId)
      oprot.writeFieldEnd()
    if self.createdTimestamp is not None:
      oprot.writeFieldBegin('createdTimestamp', TType.I64, 5)
      oprot.writeI64(self.createdTimestamp)
      oprot.writeFieldEnd()
    if self.promisedShippingTimestamp is not None:
      oprot.writeFieldBegin('promisedShippingTimestamp', TType.I64, 6)
      oprot.writeI64(self.promisedShippingTimestamp)
      oprot.writeFieldEnd()
    if self.quantity is not None:
      oprot.writeFieldBegin('quantity', TType.DOUBLE, 7)
      oprot.writeDouble(self.quantity)
      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 reserveItemInWarehouse_result:
  """
  Attributes:
   - success
   - cex
  """

  thrift_spec = (
    (0, TType.BOOL, 'success', None, None, ), # 0
    (1, TType.STRUCT, 'cex', (InventoryServiceException, InventoryServiceException.thrift_spec), None, ), # 1
  )

  def __init__(self, success=None, cex=None,):
    self.success = success
    self.cex = cex

  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 == 0:
        if ftype == TType.BOOL:
          self.success = iprot.readBool();
        else:
          iprot.skip(ftype)
      elif fid == 1:
        if ftype == TType.STRUCT:
          self.cex = InventoryServiceException()
          self.cex.read(iprot)
        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('reserveItemInWarehouse_result')
    if self.success is not None:
      oprot.writeFieldBegin('success', TType.BOOL, 0)
      oprot.writeBool(self.success)
      oprot.writeFieldEnd()
    if self.cex is not None:
      oprot.writeFieldBegin('cex', TType.STRUCT, 1)
      self.cex.write(oprot)
      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 reduceReservationCount_args:
  """
  Attributes:
   - itemId
   - warehouseId
   - sourceId
   - orderId
   - quantity
  """

  thrift_spec = (
    None, # 0
    (1, TType.I64, 'itemId', None, None, ), # 1
    (2, TType.I64, 'warehouseId', None, None, ), # 2
    (3, TType.I64, 'sourceId', None, None, ), # 3
    (4, TType.I64, 'orderId', None, None, ), # 4
    (5, TType.DOUBLE, 'quantity', None, None, ), # 5
  )

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

  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)
      elif fid == 3:
        if ftype == TType.I64:
          self.sourceId = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.I64:
          self.orderId = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 5:
        if ftype == TType.DOUBLE:
          self.quantity = 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('reduceReservationCount_args')
    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()
    if self.sourceId is not None:
      oprot.writeFieldBegin('sourceId', TType.I64, 3)
      oprot.writeI64(self.sourceId)
      oprot.writeFieldEnd()
    if self.orderId is not None:
      oprot.writeFieldBegin('orderId', TType.I64, 4)
      oprot.writeI64(self.orderId)
      oprot.writeFieldEnd()
    if self.quantity is not None:
      oprot.writeFieldBegin('quantity', TType.DOUBLE, 5)
      oprot.writeDouble(self.quantity)
      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 reduceReservationCount_result:
  """
  Attributes:
   - success
   - cex
  """

  thrift_spec = (
    (0, TType.BOOL, 'success', None, None, ), # 0
    (1, TType.STRUCT, 'cex', (InventoryServiceException, InventoryServiceException.thrift_spec), None, ), # 1
  )

  def __init__(self, success=None, cex=None,):
    self.success = success
    self.cex = cex

  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 == 0:
        if ftype == TType.BOOL:
          self.success = iprot.readBool();
        else:
          iprot.skip(ftype)
      elif fid == 1:
        if ftype == TType.STRUCT:
          self.cex = InventoryServiceException()
          self.cex.read(iprot)
        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('reduceReservationCount_result')
    if self.success is not None:
      oprot.writeFieldBegin('success', TType.BOOL, 0)
      oprot.writeBool(self.success)
      oprot.writeFieldEnd()
    if self.cex is not None:
      oprot.writeFieldBegin('cex', TType.STRUCT, 1)
      self.cex.write(oprot)
      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 getItemPricing_args:
  """
  Attributes:
   - itemId
   - vendorId
  """

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

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

  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.vendorId = 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('getItemPricing_args')
    if self.itemId is not None:
      oprot.writeFieldBegin('itemId', TType.I64, 1)
      oprot.writeI64(self.itemId)
      oprot.writeFieldEnd()
    if self.vendorId is not None:
      oprot.writeFieldBegin('vendorId', TType.I64, 2)
      oprot.writeI64(self.vendorId)
      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 getItemPricing_result:
  """
  Attributes:
   - success
   - cex
  """

  thrift_spec = (
    (0, TType.STRUCT, 'success', (VendorItemPricing, VendorItemPricing.thrift_spec), None, ), # 0
    (1, TType.STRUCT, 'cex', (InventoryServiceException, InventoryServiceException.thrift_spec), None, ), # 1
  )

  def __init__(self, success=None, cex=None,):
    self.success = success
    self.cex = cex

  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 == 0:
        if ftype == TType.STRUCT:
          self.success = VendorItemPricing()
          self.success.read(iprot)
        else:
          iprot.skip(ftype)
      elif fid == 1:
        if ftype == TType.STRUCT:
          self.cex = InventoryServiceException()
          self.cex.read(iprot)
        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('getItemPricing_result')
    if self.success is not None:
      oprot.writeFieldBegin('success', TType.STRUCT, 0)
      self.success.write(oprot)
      oprot.writeFieldEnd()
    if self.cex is not None:
      oprot.writeFieldBegin('cex', TType.STRUCT, 1)
      self.cex.write(oprot)
      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 getAllItemPricing_args:
  """
  Attributes:
   - itemId
  """

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

  def __init__(self, itemId=None,):
    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.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('getAllItemPricing_args')
    if self.itemId is not None:
      oprot.writeFieldBegin('itemId', TType.I64, 1)
      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 getAllItemPricing_result:
  """
  Attributes:
   - success
   - cex
  """

  thrift_spec = (
    (0, TType.LIST, 'success', (TType.STRUCT,(VendorItemPricing, VendorItemPricing.thrift_spec)), None, ), # 0
    (1, TType.STRUCT, 'cex', (InventoryServiceException, InventoryServiceException.thrift_spec), None, ), # 1
  )

  def __init__(self, success=None, cex=None,):
    self.success = success
    self.cex = cex

  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 == 0:
        if ftype == TType.LIST:
          self.success = []
          (_etype60, _size57) = iprot.readListBegin()
          for _i61 in xrange(_size57):
            _elem62 = VendorItemPricing()
            _elem62.read(iprot)
            self.success.append(_elem62)
          iprot.readListEnd()
        else:
          iprot.skip(ftype)
      elif fid == 1:
        if ftype == TType.STRUCT:
          self.cex = InventoryServiceException()
          self.cex.read(iprot)
        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('getAllItemPricing_result')
    if self.success is not None:
      oprot.writeFieldBegin('success', TType.LIST, 0)
      oprot.writeListBegin(TType.STRUCT, len(self.success))
      for iter63 in self.success:
        iter63.write(oprot)
      oprot.writeListEnd()
      oprot.writeFieldEnd()
    if self.cex is not None:
      oprot.writeFieldBegin('cex', TType.STRUCT, 1)
      self.cex.write(oprot)
      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 addVendorItemPricing_args:
  """
  Attributes:
   - vendorItemPricing
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRUCT, 'vendorItemPricing', (VendorItemPricing, VendorItemPricing.thrift_spec), None, ), # 1
  )

  def __init__(self, vendorItemPricing=None,):
    self.vendorItemPricing = vendorItemPricing

  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.STRUCT:
          self.vendorItemPricing = VendorItemPricing()
          self.vendorItemPricing.read(iprot)
        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('addVendorItemPricing_args')
    if self.vendorItemPricing is not None:
      oprot.writeFieldBegin('vendorItemPricing', TType.STRUCT, 1)
      self.vendorItemPricing.write(oprot)
      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 addVendorItemPricing_result:
  """
  Attributes:
   - cex
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRUCT, 'cex', (InventoryServiceException, InventoryServiceException.thrift_spec), None, ), # 1
  )

  def __init__(self, cex=None,):
    self.cex = cex

  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.STRUCT:
          self.cex = InventoryServiceException()
          self.cex.read(iprot)
        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('addVendorItemPricing_result')
    if self.cex is not None:
      oprot.writeFieldBegin('cex', TType.STRUCT, 1)
      self.cex.write(oprot)
      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 getVendor_args:
  """
  Attributes:
   - vendorId
  """

  thrift_spec = (
    None, # 0
    (1, TType.I64, 'vendorId', None, None, ), # 1
  )

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

  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)
      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('getVendor_args')
    if self.vendorId is not None:
      oprot.writeFieldBegin('vendorId', TType.I64, 1)
      oprot.writeI64(self.vendorId)
      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 getVendor_result:
  """
  Attributes:
   - success
  """

  thrift_spec = (
    (0, TType.STRUCT, 'success', (Vendor, Vendor.thrift_spec), None, ), # 0
  )

  def __init__(self, success=None,):
    self.success = success

  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 == 0:
        if ftype == TType.STRUCT:
          self.success = Vendor()
          self.success.read(iprot)
        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('getVendor_result')
    if self.success is not None:
      oprot.writeFieldBegin('success', TType.STRUCT, 0)
      self.success.write(oprot)
      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 getAllVendors_args:

  thrift_spec = (
  )

  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
      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('getAllVendors_args')
    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 getAllVendors_result:
  """
  Attributes:
   - success
  """

  thrift_spec = (
    (0, TType.LIST, 'success', (TType.STRUCT,(Vendor, Vendor.thrift_spec)), None, ), # 0
  )

  def __init__(self, success=None,):
    self.success = success

  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 == 0:
        if ftype == TType.LIST:
          self.success = []
          (_etype67, _size64) = iprot.readListBegin()
          for _i68 in xrange(_size64):
            _elem69 = Vendor()
            _elem69.read(iprot)
            self.success.append(_elem69)
          iprot.readListEnd()
        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('getAllVendors_result')
    if self.success is not None:
      oprot.writeFieldBegin('success', TType.LIST, 0)
      oprot.writeListBegin(TType.STRUCT, len(self.success))
      for iter70 in self.success:
        iter70.write(oprot)
      oprot.writeListEnd()
      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 addVendorItemMapping_args:
  """
  Attributes:
   - key
   - vendorItemMapping
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRING, 'key', None, None, ), # 1
    (2, TType.STRUCT, 'vendorItemMapping', (VendorItemMapping, VendorItemMapping.thrift_spec), None, ), # 2
  )

  def __init__(self, key=None, vendorItemMapping=None,):
    self.key = key
    self.vendorItemMapping = vendorItemMapping

  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.STRING:
          self.key = iprot.readString();
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.STRUCT:
          self.vendorItemMapping = VendorItemMapping()
          self.vendorItemMapping.read(iprot)
        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('addVendorItemMapping_args')
    if self.key is not None:
      oprot.writeFieldBegin('key', TType.STRING, 1)
      oprot.writeString(self.key)
      oprot.writeFieldEnd()
    if self.vendorItemMapping is not None:
      oprot.writeFieldBegin('vendorItemMapping', TType.STRUCT, 2)
      self.vendorItemMapping.write(oprot)
      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 addVendorItemMapping_result:
  """
  Attributes:
   - cex
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRUCT, 'cex', (InventoryServiceException, InventoryServiceException.thrift_spec), None, ), # 1
  )

  def __init__(self, cex=None,):
    self.cex = cex

  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.STRUCT:
          self.cex = InventoryServiceException()
          self.cex.read(iprot)
        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('addVendorItemMapping_result')
    if self.cex is not None:
      oprot.writeFieldBegin('cex', TType.STRUCT, 1)
      self.cex.write(oprot)
      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 getVendorItemMappings_args:
  """
  Attributes:
   - itemId
  """

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

  def __init__(self, itemId=None,):
    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.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('getVendorItemMappings_args')
    if self.itemId is not None:
      oprot.writeFieldBegin('itemId', TType.I64, 1)
      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 getVendorItemMappings_result:
  """
  Attributes:
   - success
   - cex
  """

  thrift_spec = (
    (0, TType.LIST, 'success', (TType.STRUCT,(VendorItemMapping, VendorItemMapping.thrift_spec)), None, ), # 0
    (1, TType.STRUCT, 'cex', (InventoryServiceException, InventoryServiceException.thrift_spec), None, ), # 1
  )

  def __init__(self, success=None, cex=None,):
    self.success = success
    self.cex = cex

  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 == 0:
        if ftype == TType.LIST:
          self.success = []
          (_etype74, _size71) = iprot.readListBegin()
          for _i75 in xrange(_size71):
            _elem76 = VendorItemMapping()
            _elem76.read(iprot)
            self.success.append(_elem76)
          iprot.readListEnd()
        else:
          iprot.skip(ftype)
      elif fid == 1:
        if ftype == TType.STRUCT:
          self.cex = InventoryServiceException()
          self.cex.read(iprot)
        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('getVendorItemMappings_result')
    if self.success is not None:
      oprot.writeFieldBegin('success', TType.LIST, 0)
      oprot.writeListBegin(TType.STRUCT, len(self.success))
      for iter77 in self.success:
        iter77.write(oprot)
      oprot.writeListEnd()
      oprot.writeFieldEnd()
    if self.cex is not None:
      oprot.writeFieldBegin('cex', TType.STRUCT, 1)
      self.cex.write(oprot)
      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 getPendingOrdersInventory_args:
  """
  Attributes:
   - vendorid
  """

  thrift_spec = (
    None, # 0
    (1, TType.I64, 'vendorid', None, None, ), # 1
  )

  def __init__(self, vendorid=None,):
    self.vendorid = vendorid

  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)
      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('getPendingOrdersInventory_args')
    if self.vendorid is not None:
      oprot.writeFieldBegin('vendorid', TType.I64, 1)
      oprot.writeI64(self.vendorid)
      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 getPendingOrdersInventory_result:
  """
  Attributes:
   - success
  """

  thrift_spec = (
    (0, TType.LIST, 'success', (TType.STRUCT,(AvailableAndReservedStock, AvailableAndReservedStock.thrift_spec)), None, ), # 0
  )

  def __init__(self, success=None,):
    self.success = success

  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 == 0:
        if ftype == TType.LIST:
          self.success = []
          (_etype81, _size78) = iprot.readListBegin()
          for _i82 in xrange(_size78):
            _elem83 = AvailableAndReservedStock()
            _elem83.read(iprot)
            self.success.append(_elem83)
          iprot.readListEnd()
        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('getPendingOrdersInventory_result')
    if self.success is not None:
      oprot.writeFieldBegin('success', TType.LIST, 0)
      oprot.writeListBegin(TType.STRUCT, len(self.success))
      for iter84 in self.success:
        iter84.write(oprot)
      oprot.writeListEnd()
      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 getWarehouses_args:
  """
  Attributes:
   - warehouseType
   - inventoryType
   - vendorId
   - billingWarehouseId
   - shippingWarehouseId
  """

  thrift_spec = (
    None, # 0
    (1, TType.I32, 'warehouseType', None, None, ), # 1
    (2, TType.I32, 'inventoryType', None, None, ), # 2
    (3, TType.I64, 'vendorId', None, None, ), # 3
    (4, TType.I64, 'billingWarehouseId', None, None, ), # 4
    (5, TType.I64, 'shippingWarehouseId', None, None, ), # 5
  )

  def __init__(self, warehouseType=None, inventoryType=None, vendorId=None, billingWarehouseId=None, shippingWarehouseId=None,):
    self.warehouseType = warehouseType
    self.inventoryType = inventoryType
    self.vendorId = vendorId
    self.billingWarehouseId = billingWarehouseId
    self.shippingWarehouseId = shippingWarehouseId

  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.I32:
          self.warehouseType = iprot.readI32();
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.I32:
          self.inventoryType = iprot.readI32();
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.I64:
          self.vendorId = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.I64:
          self.billingWarehouseId = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 5:
        if ftype == TType.I64:
          self.shippingWarehouseId = 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('getWarehouses_args')
    if self.warehouseType is not None:
      oprot.writeFieldBegin('warehouseType', TType.I32, 1)
      oprot.writeI32(self.warehouseType)
      oprot.writeFieldEnd()
    if self.inventoryType is not None:
      oprot.writeFieldBegin('inventoryType', TType.I32, 2)
      oprot.writeI32(self.inventoryType)
      oprot.writeFieldEnd()
    if self.vendorId is not None:
      oprot.writeFieldBegin('vendorId', TType.I64, 3)
      oprot.writeI64(self.vendorId)
      oprot.writeFieldEnd()
    if self.billingWarehouseId is not None:
      oprot.writeFieldBegin('billingWarehouseId', TType.I64, 4)
      oprot.writeI64(self.billingWarehouseId)
      oprot.writeFieldEnd()
    if self.shippingWarehouseId is not None:
      oprot.writeFieldBegin('shippingWarehouseId', TType.I64, 5)
      oprot.writeI64(self.shippingWarehouseId)
      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 getWarehouses_result:
  """
  Attributes:
   - success
  """

  thrift_spec = (
    (0, TType.LIST, 'success', (TType.STRUCT,(Warehouse, Warehouse.thrift_spec)), None, ), # 0
  )

  def __init__(self, success=None,):
    self.success = success

  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 == 0:
        if ftype == TType.LIST:
          self.success = []
          (_etype88, _size85) = iprot.readListBegin()
          for _i89 in xrange(_size85):
            _elem90 = Warehouse()
            _elem90.read(iprot)
            self.success.append(_elem90)
          iprot.readListEnd()
        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('getWarehouses_result')
    if self.success is not None:
      oprot.writeFieldBegin('success', TType.LIST, 0)
      oprot.writeListBegin(TType.STRUCT, len(self.success))
      for iter91 in self.success:
        iter91.write(oprot)
      oprot.writeListEnd()
      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 resetAvailability_args:
  """
  Attributes:
   - itemKey
   - vendorId
   - quantity
   - warehouseId
  """

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

  def __init__(self, itemKey=None, vendorId=None, quantity=None, warehouseId=None,):
    self.itemKey = itemKey
    self.vendorId = vendorId
    self.quantity = quantity
    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.STRING:
          self.itemKey = iprot.readString();
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.I64:
          self.vendorId = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.I64:
          self.quantity = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 4:
        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('resetAvailability_args')
    if self.itemKey is not None:
      oprot.writeFieldBegin('itemKey', TType.STRING, 1)
      oprot.writeString(self.itemKey)
      oprot.writeFieldEnd()
    if self.vendorId is not None:
      oprot.writeFieldBegin('vendorId', TType.I64, 2)
      oprot.writeI64(self.vendorId)
      oprot.writeFieldEnd()
    if self.quantity is not None:
      oprot.writeFieldBegin('quantity', TType.I64, 3)
      oprot.writeI64(self.quantity)
      oprot.writeFieldEnd()
    if self.warehouseId is not None:
      oprot.writeFieldBegin('warehouseId', TType.I64, 4)
      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 resetAvailability_result:
  """
  Attributes:
   - cex
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRUCT, 'cex', (InventoryServiceException, InventoryServiceException.thrift_spec), None, ), # 1
  )

  def __init__(self, cex=None,):
    self.cex = cex

  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.STRUCT:
          self.cex = InventoryServiceException()
          self.cex.read(iprot)
        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('resetAvailability_result')
    if self.cex is not None:
      oprot.writeFieldBegin('cex', TType.STRUCT, 1)
      self.cex.write(oprot)
      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 resetAvailabilityForWarehouse_args:
  """
  Attributes:
   - warehouseId
  """

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

  def __init__(self, warehouseId=None,):
    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.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('resetAvailabilityForWarehouse_args')
    if self.warehouseId is not None:
      oprot.writeFieldBegin('warehouseId', TType.I64, 1)
      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 resetAvailabilityForWarehouse_result:
  """
  Attributes:
   - cex
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRUCT, 'cex', (InventoryServiceException, InventoryServiceException.thrift_spec), None, ), # 1
  )

  def __init__(self, cex=None,):
    self.cex = cex

  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.STRUCT:
          self.cex = InventoryServiceException()
          self.cex.read(iprot)
        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('resetAvailabilityForWarehouse_result')
    if self.cex is not None:
      oprot.writeFieldBegin('cex', TType.STRUCT, 1)
      self.cex.write(oprot)
      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 getItemKeysToBeProcessed_args:
  """
  Attributes:
   - warehouseId
  """

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

  def __init__(self, warehouseId=None,):
    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.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('getItemKeysToBeProcessed_args')
    if self.warehouseId is not None:
      oprot.writeFieldBegin('warehouseId', TType.I64, 1)
      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 getItemKeysToBeProcessed_result:
  """
  Attributes:
   - success
  """

  thrift_spec = (
    (0, TType.LIST, 'success', (TType.STRING,None), None, ), # 0
  )

  def __init__(self, success=None,):
    self.success = success

  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 == 0:
        if ftype == TType.LIST:
          self.success = []
          (_etype95, _size92) = iprot.readListBegin()
          for _i96 in xrange(_size92):
            _elem97 = iprot.readString();
            self.success.append(_elem97)
          iprot.readListEnd()
        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('getItemKeysToBeProcessed_result')
    if self.success is not None:
      oprot.writeFieldBegin('success', TType.LIST, 0)
      oprot.writeListBegin(TType.STRING, len(self.success))
      for iter98 in self.success:
        oprot.writeString(iter98)
      oprot.writeListEnd()
      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 markMissedInventoryUpdatesAsProcessed_args:
  """
  Attributes:
   - itemKey
   - warehouseId
  """

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

  def __init__(self, itemKey=None, warehouseId=None,):
    self.itemKey = itemKey
    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.STRING:
          self.itemKey = iprot.readString();
        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('markMissedInventoryUpdatesAsProcessed_args')
    if self.itemKey is not None:
      oprot.writeFieldBegin('itemKey', TType.STRING, 1)
      oprot.writeString(self.itemKey)
      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 markMissedInventoryUpdatesAsProcessed_result:

  thrift_spec = (
  )

  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
      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('markMissedInventoryUpdatesAsProcessed_result')
    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 getIgnoredItemKeys_args:

  thrift_spec = (
  )

  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
      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('getIgnoredItemKeys_args')
    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 getIgnoredItemKeys_result:
  """
  Attributes:
   - success
  """

  thrift_spec = (
    (0, TType.MAP, 'success', (TType.STRING,None,TType.MAP,(TType.I64,None,TType.I64,None)), None, ), # 0
  )

  def __init__(self, success=None,):
    self.success = success

  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 == 0:
        if ftype == TType.MAP:
          self.success = {}
          (_ktype100, _vtype101, _size99 ) = iprot.readMapBegin() 
          for _i103 in xrange(_size99):
            _key104 = iprot.readString();
            _val105 = {}
            (_ktype107, _vtype108, _size106 ) = iprot.readMapBegin() 
            for _i110 in xrange(_size106):
              _key111 = iprot.readI64();
              _val112 = iprot.readI64();
              _val105[_key111] = _val112
            iprot.readMapEnd()
            self.success[_key104] = _val105
          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('getIgnoredItemKeys_result')
    if self.success is not None:
      oprot.writeFieldBegin('success', TType.MAP, 0)
      oprot.writeMapBegin(TType.STRING, TType.MAP, len(self.success))
      for kiter113,viter114 in self.success.items():
        oprot.writeString(kiter113)
        oprot.writeMapBegin(TType.I64, TType.I64, len(viter114))
        for kiter115,viter116 in viter114.items():
          oprot.writeI64(kiter115)
          oprot.writeI64(viter116)
        oprot.writeMapEnd()
      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 addBadInventory_args:
  """
  Attributes:
   - itemId
   - warehouseId
   - quantity
  """

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

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

  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)
      elif fid == 3:
        if ftype == TType.I64:
          self.quantity = 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('addBadInventory_args')
    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()
    if self.quantity is not None:
      oprot.writeFieldBegin('quantity', TType.I64, 3)
      oprot.writeI64(self.quantity)
      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 addBadInventory_result:
  """
  Attributes:
   - cex
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRUCT, 'cex', (InventoryServiceException, InventoryServiceException.thrift_spec), None, ), # 1
  )

  def __init__(self, cex=None,):
    self.cex = cex

  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.STRUCT:
          self.cex = InventoryServiceException()
          self.cex.read(iprot)
        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('addBadInventory_result')
    if self.cex is not None:
      oprot.writeFieldBegin('cex', TType.STRUCT, 1)
      self.cex.write(oprot)
      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 getShippingLocations_args:

  thrift_spec = (
  )

  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
      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('getShippingLocations_args')
    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 getShippingLocations_result:
  """
  Attributes:
   - success
  """

  thrift_spec = (
    (0, TType.LIST, 'success', (TType.STRUCT,(Warehouse, Warehouse.thrift_spec)), None, ), # 0
  )

  def __init__(self, success=None,):
    self.success = success

  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 == 0:
        if ftype == TType.LIST:
          self.success = []
          (_etype120, _size117) = iprot.readListBegin()
          for _i121 in xrange(_size117):
            _elem122 = Warehouse()
            _elem122.read(iprot)
            self.success.append(_elem122)
          iprot.readListEnd()
        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('getShippingLocations_result')
    if self.success is not None:
      oprot.writeFieldBegin('success', TType.LIST, 0)
      oprot.writeListBegin(TType.STRUCT, len(self.success))
      for iter123 in self.success:
        iter123.write(oprot)
      oprot.writeListEnd()
      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 getAllVendorItemMappings_args:

  thrift_spec = (
  )

  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
      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('getAllVendorItemMappings_args')
    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 getAllVendorItemMappings_result:
  """
  Attributes:
   - success
  """

  thrift_spec = (
    (0, TType.LIST, 'success', (TType.STRUCT,(VendorItemMapping, VendorItemMapping.thrift_spec)), None, ), # 0
  )

  def __init__(self, success=None,):
    self.success = success

  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 == 0:
        if ftype == TType.LIST:
          self.success = []
          (_etype127, _size124) = iprot.readListBegin()
          for _i128 in xrange(_size124):
            _elem129 = VendorItemMapping()
            _elem129.read(iprot)
            self.success.append(_elem129)
          iprot.readListEnd()
        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('getAllVendorItemMappings_result')
    if self.success is not None:
      oprot.writeFieldBegin('success', TType.LIST, 0)
      oprot.writeListBegin(TType.STRUCT, len(self.success))
      for iter130 in self.success:
        iter130.write(oprot)
      oprot.writeListEnd()
      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 getInventorySnapshot_args:
  """
  Attributes:
   - warehouseId
  """

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

  def __init__(self, warehouseId=None,):
    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.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('getInventorySnapshot_args')
    if self.warehouseId is not None:
      oprot.writeFieldBegin('warehouseId', TType.I64, 1)
      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 getInventorySnapshot_result:
  """
  Attributes:
   - success
  """

  thrift_spec = (
    (0, TType.MAP, 'success', (TType.I64,None,TType.STRUCT,(ItemInventory, ItemInventory.thrift_spec)), None, ), # 0
  )

  def __init__(self, success=None,):
    self.success = success

  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 == 0:
        if ftype == TType.MAP:
          self.success = {}
          (_ktype132, _vtype133, _size131 ) = iprot.readMapBegin() 
          for _i135 in xrange(_size131):
            _key136 = iprot.readI64();
            _val137 = ItemInventory()
            _val137.read(iprot)
            self.success[_key136] = _val137
          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('getInventorySnapshot_result')
    if self.success is not None:
      oprot.writeFieldBegin('success', TType.MAP, 0)
      oprot.writeMapBegin(TType.I64, TType.STRUCT, len(self.success))
      for kiter138,viter139 in self.success.items():
        oprot.writeI64(kiter138)
        viter139.write(oprot)
      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 clearItemAvailabilityCache_args:

  thrift_spec = (
  )

  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
      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('clearItemAvailabilityCache_args')
    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 clearItemAvailabilityCache_result:

  thrift_spec = (
  )

  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
      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('clearItemAvailabilityCache_result')
    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 updateVendorString_args:
  """
  Attributes:
   - warehouseId
   - vendorString
  """

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

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

  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.warehouseId = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.STRING:
          self.vendorString = 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('updateVendorString_args')
    if self.warehouseId is not None:
      oprot.writeFieldBegin('warehouseId', TType.I64, 1)
      oprot.writeI64(self.warehouseId)
      oprot.writeFieldEnd()
    if self.vendorString is not None:
      oprot.writeFieldBegin('vendorString', TType.STRING, 2)
      oprot.writeString(self.vendorString)
      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 updateVendorString_result:

  thrift_spec = (
  )

  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
      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('updateVendorString_result')
    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 clearItemAvailabilityCacheForItem_args:
  """
  Attributes:
   - item_id
  """

  thrift_spec = (
    None, # 0
    (1, TType.I64, 'item_id', None, None, ), # 1
  )

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

  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)
      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('clearItemAvailabilityCacheForItem_args')
    if self.item_id is not None:
      oprot.writeFieldBegin('item_id', TType.I64, 1)
      oprot.writeI64(self.item_id)
      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 clearItemAvailabilityCacheForItem_result:

  thrift_spec = (
  )

  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
      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('clearItemAvailabilityCacheForItem_result')
    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 getOurWarehouseIdForVendor_args:
  """
  Attributes:
   - vendorId
  """

  thrift_spec = (
    None, # 0
    (1, TType.I64, 'vendorId', None, None, ), # 1
  )

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

  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)
      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('getOurWarehouseIdForVendor_args')
    if self.vendorId is not None:
      oprot.writeFieldBegin('vendorId', TType.I64, 1)
      oprot.writeI64(self.vendorId)
      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 getOurWarehouseIdForVendor_result:
  """
  Attributes:
   - success
  """

  thrift_spec = (
    (0, TType.I64, 'success', None, None, ), # 0
  )

  def __init__(self, success=None,):
    self.success = success

  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 == 0:
        if ftype == TType.I64:
          self.success = 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('getOurWarehouseIdForVendor_result')
    if self.success is not None:
      oprot.writeFieldBegin('success', TType.I64, 0)
      oprot.writeI64(self.success)
      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 getItemAvailabilitiesAtOurWarehouses_args:
  """
  Attributes:
   - item_ids
  """

  thrift_spec = (
    None, # 0
    (1, TType.LIST, 'item_ids', (TType.I64,None), None, ), # 1
  )

  def __init__(self, item_ids=None,):
    self.item_ids = item_ids

  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.LIST:
          self.item_ids = []
          (_etype143, _size140) = iprot.readListBegin()
          for _i144 in xrange(_size140):
            _elem145 = iprot.readI64();
            self.item_ids.append(_elem145)
          iprot.readListEnd()
        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('getItemAvailabilitiesAtOurWarehouses_args')
    if self.item_ids is not None:
      oprot.writeFieldBegin('item_ids', TType.LIST, 1)
      oprot.writeListBegin(TType.I64, len(self.item_ids))
      for iter146 in self.item_ids:
        oprot.writeI64(iter146)
      oprot.writeListEnd()
      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 getItemAvailabilitiesAtOurWarehouses_result:
  """
  Attributes:
   - success
  """

  thrift_spec = (
    (0, TType.MAP, 'success', (TType.I64,None,TType.I64,None), None, ), # 0
  )

  def __init__(self, success=None,):
    self.success = success

  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 == 0:
        if ftype == TType.MAP:
          self.success = {}
          (_ktype148, _vtype149, _size147 ) = iprot.readMapBegin() 
          for _i151 in xrange(_size147):
            _key152 = iprot.readI64();
            _val153 = iprot.readI64();
            self.success[_key152] = _val153
          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('getItemAvailabilitiesAtOurWarehouses_result')
    if self.success is not None:
      oprot.writeFieldBegin('success', TType.MAP, 0)
      oprot.writeMapBegin(TType.I64, TType.I64, len(self.success))
      for kiter154,viter155 in self.success.items():
        oprot.writeI64(kiter154)
        oprot.writeI64(viter155)
      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 getMonitoredWarehouseForVendors_args:
  """
  Attributes:
   - vendorIds
  """

  thrift_spec = (
    None, # 0
    (1, TType.LIST, 'vendorIds', (TType.I64,None), None, ), # 1
  )

  def __init__(self, vendorIds=None,):
    self.vendorIds = vendorIds

  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.LIST:
          self.vendorIds = []
          (_etype159, _size156) = iprot.readListBegin()
          for _i160 in xrange(_size156):
            _elem161 = iprot.readI64();
            self.vendorIds.append(_elem161)
          iprot.readListEnd()
        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('getMonitoredWarehouseForVendors_args')
    if self.vendorIds is not None:
      oprot.writeFieldBegin('vendorIds', TType.LIST, 1)
      oprot.writeListBegin(TType.I64, len(self.vendorIds))
      for iter162 in self.vendorIds:
        oprot.writeI64(iter162)
      oprot.writeListEnd()
      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 getMonitoredWarehouseForVendors_result:
  """
  Attributes:
   - success
  """

  thrift_spec = (
    (0, TType.LIST, 'success', (TType.I64,None), None, ), # 0
  )

  def __init__(self, success=None,):
    self.success = success

  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 == 0:
        if ftype == TType.LIST:
          self.success = []
          (_etype166, _size163) = iprot.readListBegin()
          for _i167 in xrange(_size163):
            _elem168 = iprot.readI64();
            self.success.append(_elem168)
          iprot.readListEnd()
        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('getMonitoredWarehouseForVendors_result')
    if self.success is not None:
      oprot.writeFieldBegin('success', TType.LIST, 0)
      oprot.writeListBegin(TType.I64, len(self.success))
      for iter169 in self.success:
        oprot.writeI64(iter169)
      oprot.writeListEnd()
      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 getIgnoredWarehouseidsAndItemids_args:

  thrift_spec = (
  )

  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
      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('getIgnoredWarehouseidsAndItemids_args')
    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 getIgnoredWarehouseidsAndItemids_result:
  """
  Attributes:
   - success
  """

  thrift_spec = (
    (0, TType.LIST, 'success', (TType.STRUCT,(IgnoredInventoryUpdateItems, IgnoredInventoryUpdateItems.thrift_spec)), None, ), # 0
  )

  def __init__(self, success=None,):
    self.success = success

  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 == 0:
        if ftype == TType.LIST:
          self.success = []
          (_etype173, _size170) = iprot.readListBegin()
          for _i174 in xrange(_size170):
            _elem175 = IgnoredInventoryUpdateItems()
            _elem175.read(iprot)
            self.success.append(_elem175)
          iprot.readListEnd()
        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('getIgnoredWarehouseidsAndItemids_result')
    if self.success is not None:
      oprot.writeFieldBegin('success', TType.LIST, 0)
      oprot.writeListBegin(TType.STRUCT, len(self.success))
      for iter176 in self.success:
        iter176.write(oprot)
      oprot.writeListEnd()
      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 insertItemtoIgnoreInventoryUpdatelist_args:
  """
  Attributes:
   - item_id
   - warehouse_id
  """

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

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

  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)
      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('insertItemtoIgnoreInventoryUpdatelist_args')
    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()
    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 insertItemtoIgnoreInventoryUpdatelist_result:
  """
  Attributes:
   - success
  """

  thrift_spec = (
    (0, TType.BOOL, 'success', None, None, ), # 0
  )

  def __init__(self, success=None,):
    self.success = success

  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 == 0:
        if ftype == TType.BOOL:
          self.success = 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('insertItemtoIgnoreInventoryUpdatelist_result')
    if self.success is not None:
      oprot.writeFieldBegin('success', TType.BOOL, 0)
      oprot.writeBool(self.success)
      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 deleteItemFromIgnoredInventoryUpdateList_args:
  """
  Attributes:
   - item_id
   - warehouse_id
  """

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

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

  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)
      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('deleteItemFromIgnoredInventoryUpdateList_args')
    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()
    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 deleteItemFromIgnoredInventoryUpdateList_result:
  """
  Attributes:
   - success
  """

  thrift_spec = (
    (0, TType.BOOL, 'success', None, None, ), # 0
  )

  def __init__(self, success=None,):
    self.success = success

  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 == 0:
        if ftype == TType.BOOL:
          self.success = 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('deleteItemFromIgnoredInventoryUpdateList_result')
    if self.success is not None:
      oprot.writeFieldBegin('success', TType.BOOL, 0)
      oprot.writeBool(self.success)
      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 getAllIgnoredInventoryupdateItemsCount_args:

  thrift_spec = (
  )

  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
      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('getAllIgnoredInventoryupdateItemsCount_args')
    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 getAllIgnoredInventoryupdateItemsCount_result:
  """
  Attributes:
   - success
  """

  thrift_spec = (
    (0, TType.I32, 'success', None, None, ), # 0
  )

  def __init__(self, success=None,):
    self.success = success

  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 == 0:
        if ftype == TType.I32:
          self.success = 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('getAllIgnoredInventoryupdateItemsCount_result')
    if self.success is not None:
      oprot.writeFieldBegin('success', TType.I32, 0)
      oprot.writeI32(self.success)
      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 getIgnoredInventoryUpdateItemids_args:
  """
  Attributes:
   - offset
   - limit
  """

  thrift_spec = (
    None, # 0
    (1, TType.I32, 'offset', None, None, ), # 1
    (2, TType.I32, 'limit', None, None, ), # 2
  )

  def __init__(self, offset=None, limit=None,):
    self.offset = offset
    self.limit = limit

  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.I32:
          self.offset = iprot.readI32();
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.I32:
          self.limit = 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('getIgnoredInventoryUpdateItemids_args')
    if self.offset is not None:
      oprot.writeFieldBegin('offset', TType.I32, 1)
      oprot.writeI32(self.offset)
      oprot.writeFieldEnd()
    if self.limit is not None:
      oprot.writeFieldBegin('limit', TType.I32, 2)
      oprot.writeI32(self.limit)
      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 getIgnoredInventoryUpdateItemids_result:
  """
  Attributes:
   - success
  """

  thrift_spec = (
    (0, TType.LIST, 'success', (TType.I64,None), None, ), # 0
  )

  def __init__(self, success=None,):
    self.success = success

  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 == 0:
        if ftype == TType.LIST:
          self.success = []
          (_etype180, _size177) = iprot.readListBegin()
          for _i181 in xrange(_size177):
            _elem182 = iprot.readI64();
            self.success.append(_elem182)
          iprot.readListEnd()
        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('getIgnoredInventoryUpdateItemids_result')
    if self.success is not None:
      oprot.writeFieldBegin('success', TType.LIST, 0)
      oprot.writeListBegin(TType.I64, len(self.success))
      for iter183 in self.success:
        oprot.writeI64(iter183)
      oprot.writeListEnd()
      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 updateItemStockPurchaseParams_args:
  """
  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('updateItemStockPurchaseParams_args')
    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 updateItemStockPurchaseParams_result:

  thrift_spec = (
  )

  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
      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('updateItemStockPurchaseParams_result')
    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 getItemStockPurchaseParams_args:
  """
  Attributes:
   - itemId
  """

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

  def __init__(self, itemId=None,):
    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.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('getItemStockPurchaseParams_args')
    if self.itemId is not None:
      oprot.writeFieldBegin('itemId', TType.I64, 1)
      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 getItemStockPurchaseParams_result:
  """
  Attributes:
   - success
  """

  thrift_spec = (
    (0, TType.STRUCT, 'success', (ItemStockPurchaseParams, ItemStockPurchaseParams.thrift_spec), None, ), # 0
  )

  def __init__(self, success=None,):
    self.success = success

  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 == 0:
        if ftype == TType.STRUCT:
          self.success = ItemStockPurchaseParams()
          self.success.read(iprot)
        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('getItemStockPurchaseParams_result')
    if self.success is not None:
      oprot.writeFieldBegin('success', TType.STRUCT, 0)
      self.success.write(oprot)
      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 addOosStatusForItem_args:
  """
  Attributes:
   - oosStatusMap
   - date
  """

  thrift_spec = (
    None, # 0
    (1, TType.MAP, 'oosStatusMap', (TType.I64,None,TType.BOOL,None), None, ), # 1
    (2, TType.I64, 'date', None, None, ), # 2
  )

  def __init__(self, oosStatusMap=None, date=None,):
    self.oosStatusMap = oosStatusMap
    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.MAP:
          self.oosStatusMap = {}
          (_ktype185, _vtype186, _size184 ) = iprot.readMapBegin() 
          for _i188 in xrange(_size184):
            _key189 = iprot.readI64();
            _val190 = iprot.readBool();
            self.oosStatusMap[_key189] = _val190
          iprot.readMapEnd()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        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('addOosStatusForItem_args')
    if self.oosStatusMap is not None:
      oprot.writeFieldBegin('oosStatusMap', TType.MAP, 1)
      oprot.writeMapBegin(TType.I64, TType.BOOL, len(self.oosStatusMap))
      for kiter191,viter192 in self.oosStatusMap.items():
        oprot.writeI64(kiter191)
        oprot.writeBool(viter192)
      oprot.writeMapEnd()
      oprot.writeFieldEnd()
    if self.date is not None:
      oprot.writeFieldBegin('date', TType.I64, 2)
      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 addOosStatusForItem_result:

  thrift_spec = (
  )

  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
      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('addOosStatusForItem_result')
    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 getOosStatusesForXDaysForItem_args:
  """
  Attributes:
   - itemId
   - days
  """

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

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

  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.I32:
          self.days = 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('getOosStatusesForXDaysForItem_args')
    if self.itemId is not None:
      oprot.writeFieldBegin('itemId', TType.I64, 1)
      oprot.writeI64(self.itemId)
      oprot.writeFieldEnd()
    if self.days is not None:
      oprot.writeFieldBegin('days', TType.I32, 2)
      oprot.writeI32(self.days)
      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 getOosStatusesForXDaysForItem_result:
  """
  Attributes:
   - success
  """

  thrift_spec = (
    (0, TType.LIST, 'success', (TType.STRUCT,(OOSStatus, OOSStatus.thrift_spec)), None, ), # 0
  )

  def __init__(self, success=None,):
    self.success = success

  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 == 0:
        if ftype == TType.LIST:
          self.success = []
          (_etype196, _size193) = iprot.readListBegin()
          for _i197 in xrange(_size193):
            _elem198 = OOSStatus()
            _elem198.read(iprot)
            self.success.append(_elem198)
          iprot.readListEnd()
        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('getOosStatusesForXDaysForItem_result')
    if self.success is not None:
      oprot.writeFieldBegin('success', TType.LIST, 0)
      oprot.writeListBegin(TType.STRUCT, len(self.success))
      for iter199 in self.success:
        iter199.write(oprot)
      oprot.writeListEnd()
      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 getNonZeroItemStockPurchaseParams_args:

  thrift_spec = (
  )

  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
      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('getNonZeroItemStockPurchaseParams_args')
    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 getNonZeroItemStockPurchaseParams_result:
  """
  Attributes:
   - success
  """

  thrift_spec = (
    (0, TType.LIST, 'success', (TType.STRUCT,(ItemStockPurchaseParams, ItemStockPurchaseParams.thrift_spec)), None, ), # 0
  )

  def __init__(self, success=None,):
    self.success = success

  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 == 0:
        if ftype == TType.LIST:
          self.success = []
          (_etype203, _size200) = iprot.readListBegin()
          for _i204 in xrange(_size200):
            _elem205 = ItemStockPurchaseParams()
            _elem205.read(iprot)
            self.success.append(_elem205)
          iprot.readListEnd()
        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('getNonZeroItemStockPurchaseParams_result')
    if self.success is not None:
      oprot.writeFieldBegin('success', TType.LIST, 0)
      oprot.writeListBegin(TType.STRUCT, len(self.success))
      for iter206 in self.success:
        iter206.write(oprot)
      oprot.writeListEnd()
      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 getBillableInventoryAndPendingOrders_args:

  thrift_spec = (
  )

  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
      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('getBillableInventoryAndPendingOrders_args')
    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 getBillableInventoryAndPendingOrders_result:
  """
  Attributes:
   - success
  """

  thrift_spec = (
    (0, TType.LIST, 'success', (TType.STRUCT,(AvailableAndReservedStock, AvailableAndReservedStock.thrift_spec)), None, ), # 0
  )

  def __init__(self, success=None,):
    self.success = success

  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 == 0:
        if ftype == TType.LIST:
          self.success = []
          (_etype210, _size207) = iprot.readListBegin()
          for _i211 in xrange(_size207):
            _elem212 = AvailableAndReservedStock()
            _elem212.read(iprot)
            self.success.append(_elem212)
          iprot.readListEnd()
        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('getBillableInventoryAndPendingOrders_result')
    if self.success is not None:
      oprot.writeFieldBegin('success', TType.LIST, 0)
      oprot.writeListBegin(TType.STRUCT, len(self.success))
      for iter213 in self.success:
        iter213.write(oprot)
      oprot.writeListEnd()
      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)