Subversion Repositories SmartDukaan

Rev

Rev 12280 | Rev 19247 | 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 updateReservationForOrder(self, itemId, warehouseId, sourceId, orderId, createdTimestamp, promisedShippingTimestamp, quantity):
    """
    Updates the reservation for Order

    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, billingWarehouseId):
    """
    Parameters:
     - vendorId
     - billingWarehouseId
    """
    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, sourceId, days):
    """
    Parameters:
     - itemId
     - sourceId
     - days
    """
    pass

  def getOosStatusesForXDays(self, sourceId, days):
    """
    Parameters:
     - sourceId
     - days
    """
    pass

  def getAllVendorItemPricing(self, itemId, vendorId):
    """
    Parameters:
     - itemId
     - vendorId
    """
    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

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

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

  def getAllAmazonInventory(self, ):
    pass

  def addOrUpdateAmazonInventoryForItem(self, amazonInventorySnapshot, time):
    """
    Parameters:
     - amazonInventorySnapshot
     - time
    """
    pass

  def getLastNdaySaleForItem(self, itemId, numberOfDays):
    """
    Parameters:
     - itemId
     - numberOfDays
    """
    pass

  def addOrUpdateAmazonFbaInventory(self, amazonfbainventorysnapshot):
    """
    Parameters:
     - amazonfbainventorysnapshot
    """
    pass

  def addUpdateHoldInventory(self, itemId, warehouseId, holdQuantity, source):
    """
    Parameters:
     - itemId
     - warehouseId
     - holdQuantity
     - source
    """
    pass

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

  def getAllAmazonFbaItemInventory(self, ):
    pass

  def getOursGoodWarehouseIdsForLocation(self, state_id):
    """
    Parameters:
     - state_id
    """
    pass

  def getHoldInventoryDetailForItemForWarehouseIdExceptSource(self, id, warehouse_id, source):
    """
    Parameters:
     - id
     - warehouse_id
     - source
    """
    pass

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

  def addOrUpdateSnapdealInventoryForItem(self, snapdealinventoryitem):
    """
    Parameters:
     - snapdealinventoryitem
    """
    pass

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

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

  def addOrUpdateAllAmazonFbaInventory(self, allamazonfbainventorysnapshot):
    """
    Parameters:
     - allamazonfbainventorysnapshot
    """
    pass

  def addOrUpdateAllSnapdealInventory(self, allsnapdealinventorysnapshot):
    """
    Parameters:
     - allsnapdealinventorysnapshot
    """
    pass

  def getSnapdealInventorySnapshot(self, ):
    pass

  def getHoldInventoryDetails(self, itemId, warehouseId, source):
    """
    Parameters:
     - itemId
     - warehouseId
     - source
    """
    pass

  def addOrUpdateFlipkartInventorySnapshot(self, flipkartInventorySnapshot, time):
    """
    Parameters:
     - flipkartInventorySnapshot
     - time
    """
    pass

  def getFlipkartInventorySnapshot(self, ):
    pass

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

  def getStateMaster(self, ):
    pass

  def updateSnapdealStockAtEOD(self, allsnapdealstock):
    """
    Parameters:
     - allsnapdealstock
    """
    pass

  def updateFlipkartStockAtEOD(self, allflipkartstock):
    """
    Parameters:
     - allflipkartstock
    """
    pass

  def getWanNlcForSource(self, item_id, source):
    """
    Parameters:
     - item_id
     - source
    """
    pass

  def getAllAvailableAmazonFbaItemInventory(self, ):
    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 updateReservationForOrder(self, itemId, warehouseId, sourceId, orderId, createdTimestamp, promisedShippingTimestamp, quantity):
    """
    Updates the reservation for Order

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

  def send_updateReservationForOrder(self, itemId, warehouseId, sourceId, orderId, createdTimestamp, promisedShippingTimestamp, quantity):
    self._oprot.writeMessageBegin('updateReservationForOrder', TMessageType.CALL, self._seqid)
    args = updateReservationForOrder_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_updateReservationForOrder(self, ):
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
    if mtype == TMessageType.EXCEPTION:
      x = TApplicationException()
      x.read(self._iprot)
      self._iprot.readMessageEnd()
      raise x
    result = updateReservationForOrder_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, "updateReservationForOrder 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, billingWarehouseId):
    """
    Parameters:
     - vendorId
     - billingWarehouseId
    """
    self.send_getOurWarehouseIdForVendor(vendorId, billingWarehouseId)
    return self.recv_getOurWarehouseIdForVendor()

  def send_getOurWarehouseIdForVendor(self, vendorId, billingWarehouseId):
    self._oprot.writeMessageBegin('getOurWarehouseIdForVendor', TMessageType.CALL, self._seqid)
    args = getOurWarehouseIdForVendor_args()
    args.vendorId = vendorId
    args.billingWarehouseId = billingWarehouseId
    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, sourceId, days):
    """
    Parameters:
     - itemId
     - sourceId
     - days
    """
    self.send_getOosStatusesForXDaysForItem(itemId, sourceId, days)
    return self.recv_getOosStatusesForXDaysForItem()

  def send_getOosStatusesForXDaysForItem(self, itemId, sourceId, days):
    self._oprot.writeMessageBegin('getOosStatusesForXDaysForItem', TMessageType.CALL, self._seqid)
    args = getOosStatusesForXDaysForItem_args()
    args.itemId = itemId
    args.sourceId = sourceId
    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 getOosStatusesForXDays(self, sourceId, days):
    """
    Parameters:
     - sourceId
     - days
    """
    self.send_getOosStatusesForXDays(sourceId, days)
    return self.recv_getOosStatusesForXDays()

  def send_getOosStatusesForXDays(self, sourceId, days):
    self._oprot.writeMessageBegin('getOosStatusesForXDays', TMessageType.CALL, self._seqid)
    args = getOosStatusesForXDays_args()
    args.sourceId = sourceId
    args.days = days
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

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

  def getAllVendorItemPricing(self, itemId, vendorId):
    """
    Parameters:
     - itemId
     - vendorId
    """
    self.send_getAllVendorItemPricing(itemId, vendorId)
    return self.recv_getAllVendorItemPricing()

  def send_getAllVendorItemPricing(self, itemId, vendorId):
    self._oprot.writeMessageBegin('getAllVendorItemPricing', TMessageType.CALL, self._seqid)
    args = getAllVendorItemPricing_args()
    args.itemId = itemId
    args.vendorId = vendorId
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

  def recv_getAllVendorItemPricing(self, ):
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
    if mtype == TMessageType.EXCEPTION:
      x = TApplicationException()
      x.read(self._iprot)
      self._iprot.readMessageEnd()
      raise x
    result = getAllVendorItemPricing_result()
    result.read(self._iprot)
    self._iprot.readMessageEnd()
    if result.success is not None:
      return result.success
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getAllVendorItemPricing 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");

  def getWarehouseName(self, warehouse_id):
    """
    Parameters:
     - warehouse_id
    """
    self.send_getWarehouseName(warehouse_id)
    return self.recv_getWarehouseName()

  def send_getWarehouseName(self, warehouse_id):
    self._oprot.writeMessageBegin('getWarehouseName', TMessageType.CALL, self._seqid)
    args = getWarehouseName_args()
    args.warehouse_id = warehouse_id
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

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

  def getAmazonInventoryForItem(self, item_id):
    """
    Parameters:
     - item_id
    """
    self.send_getAmazonInventoryForItem(item_id)
    return self.recv_getAmazonInventoryForItem()

  def send_getAmazonInventoryForItem(self, item_id):
    self._oprot.writeMessageBegin('getAmazonInventoryForItem', TMessageType.CALL, self._seqid)
    args = getAmazonInventoryForItem_args()
    args.item_id = item_id
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

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

  def getAllAmazonInventory(self, ):
    self.send_getAllAmazonInventory()
    return self.recv_getAllAmazonInventory()

  def send_getAllAmazonInventory(self, ):
    self._oprot.writeMessageBegin('getAllAmazonInventory', TMessageType.CALL, self._seqid)
    args = getAllAmazonInventory_args()
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

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

  def addOrUpdateAmazonInventoryForItem(self, amazonInventorySnapshot, time):
    """
    Parameters:
     - amazonInventorySnapshot
     - time
    """
    self.send_addOrUpdateAmazonInventoryForItem(amazonInventorySnapshot, time)
    self.recv_addOrUpdateAmazonInventoryForItem()

  def send_addOrUpdateAmazonInventoryForItem(self, amazonInventorySnapshot, time):
    self._oprot.writeMessageBegin('addOrUpdateAmazonInventoryForItem', TMessageType.CALL, self._seqid)
    args = addOrUpdateAmazonInventoryForItem_args()
    args.amazonInventorySnapshot = amazonInventorySnapshot
    args.time = time
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

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

  def getLastNdaySaleForItem(self, itemId, numberOfDays):
    """
    Parameters:
     - itemId
     - numberOfDays
    """
    self.send_getLastNdaySaleForItem(itemId, numberOfDays)
    return self.recv_getLastNdaySaleForItem()

  def send_getLastNdaySaleForItem(self, itemId, numberOfDays):
    self._oprot.writeMessageBegin('getLastNdaySaleForItem', TMessageType.CALL, self._seqid)
    args = getLastNdaySaleForItem_args()
    args.itemId = itemId
    args.numberOfDays = numberOfDays
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

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

  def addOrUpdateAmazonFbaInventory(self, amazonfbainventorysnapshot):
    """
    Parameters:
     - amazonfbainventorysnapshot
    """
    self.send_addOrUpdateAmazonFbaInventory(amazonfbainventorysnapshot)
    self.recv_addOrUpdateAmazonFbaInventory()

  def send_addOrUpdateAmazonFbaInventory(self, amazonfbainventorysnapshot):
    self._oprot.writeMessageBegin('addOrUpdateAmazonFbaInventory', TMessageType.CALL, self._seqid)
    args = addOrUpdateAmazonFbaInventory_args()
    args.amazonfbainventorysnapshot = amazonfbainventorysnapshot
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

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

  def addUpdateHoldInventory(self, itemId, warehouseId, holdQuantity, source):
    """
    Parameters:
     - itemId
     - warehouseId
     - holdQuantity
     - source
    """
    self.send_addUpdateHoldInventory(itemId, warehouseId, holdQuantity, source)
    self.recv_addUpdateHoldInventory()

  def send_addUpdateHoldInventory(self, itemId, warehouseId, holdQuantity, source):
    self._oprot.writeMessageBegin('addUpdateHoldInventory', TMessageType.CALL, self._seqid)
    args = addUpdateHoldInventory_args()
    args.itemId = itemId
    args.warehouseId = warehouseId
    args.holdQuantity = holdQuantity
    args.source = source
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

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

  def getAmazonFbaItemInventory(self, itemId):
    """
    Parameters:
     - itemId
    """
    self.send_getAmazonFbaItemInventory(itemId)
    return self.recv_getAmazonFbaItemInventory()

  def send_getAmazonFbaItemInventory(self, itemId):
    self._oprot.writeMessageBegin('getAmazonFbaItemInventory', TMessageType.CALL, self._seqid)
    args = getAmazonFbaItemInventory_args()
    args.itemId = itemId
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

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

  def getAllAmazonFbaItemInventory(self, ):
    self.send_getAllAmazonFbaItemInventory()
    return self.recv_getAllAmazonFbaItemInventory()

  def send_getAllAmazonFbaItemInventory(self, ):
    self._oprot.writeMessageBegin('getAllAmazonFbaItemInventory', TMessageType.CALL, self._seqid)
    args = getAllAmazonFbaItemInventory_args()
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

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

  def getOursGoodWarehouseIdsForLocation(self, state_id):
    """
    Parameters:
     - state_id
    """
    self.send_getOursGoodWarehouseIdsForLocation(state_id)
    return self.recv_getOursGoodWarehouseIdsForLocation()

  def send_getOursGoodWarehouseIdsForLocation(self, state_id):
    self._oprot.writeMessageBegin('getOursGoodWarehouseIdsForLocation', TMessageType.CALL, self._seqid)
    args = getOursGoodWarehouseIdsForLocation_args()
    args.state_id = state_id
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

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

  def getHoldInventoryDetailForItemForWarehouseIdExceptSource(self, id, warehouse_id, source):
    """
    Parameters:
     - id
     - warehouse_id
     - source
    """
    self.send_getHoldInventoryDetailForItemForWarehouseIdExceptSource(id, warehouse_id, source)
    return self.recv_getHoldInventoryDetailForItemForWarehouseIdExceptSource()

  def send_getHoldInventoryDetailForItemForWarehouseIdExceptSource(self, id, warehouse_id, source):
    self._oprot.writeMessageBegin('getHoldInventoryDetailForItemForWarehouseIdExceptSource', TMessageType.CALL, self._seqid)
    args = getHoldInventoryDetailForItemForWarehouseIdExceptSource_args()
    args.id = id
    args.warehouse_id = warehouse_id
    args.source = source
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

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

  def getSnapdealInventoryForItem(self, item_id):
    """
    Parameters:
     - item_id
    """
    self.send_getSnapdealInventoryForItem(item_id)
    return self.recv_getSnapdealInventoryForItem()

  def send_getSnapdealInventoryForItem(self, item_id):
    self._oprot.writeMessageBegin('getSnapdealInventoryForItem', TMessageType.CALL, self._seqid)
    args = getSnapdealInventoryForItem_args()
    args.item_id = item_id
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

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

  def addOrUpdateSnapdealInventoryForItem(self, snapdealinventoryitem):
    """
    Parameters:
     - snapdealinventoryitem
    """
    self.send_addOrUpdateSnapdealInventoryForItem(snapdealinventoryitem)
    self.recv_addOrUpdateSnapdealInventoryForItem()

  def send_addOrUpdateSnapdealInventoryForItem(self, snapdealinventoryitem):
    self._oprot.writeMessageBegin('addOrUpdateSnapdealInventoryForItem', TMessageType.CALL, self._seqid)
    args = addOrUpdateSnapdealInventoryForItem_args()
    args.snapdealinventoryitem = snapdealinventoryitem
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

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

  def getNlcForWarehouse(self, warehouse_id, item_id):
    """
    Parameters:
     - warehouse_id
     - item_id
    """
    self.send_getNlcForWarehouse(warehouse_id, item_id)
    return self.recv_getNlcForWarehouse()

  def send_getNlcForWarehouse(self, warehouse_id, item_id):
    self._oprot.writeMessageBegin('getNlcForWarehouse', TMessageType.CALL, self._seqid)
    args = getNlcForWarehouse_args()
    args.warehouse_id = warehouse_id
    args.item_id = item_id
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

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

  def getHeldInventoryMapForItem(self, item_id, warehouse_id):
    """
    Parameters:
     - item_id
     - warehouse_id
    """
    self.send_getHeldInventoryMapForItem(item_id, warehouse_id)
    return self.recv_getHeldInventoryMapForItem()

  def send_getHeldInventoryMapForItem(self, item_id, warehouse_id):
    self._oprot.writeMessageBegin('getHeldInventoryMapForItem', TMessageType.CALL, self._seqid)
    args = getHeldInventoryMapForItem_args()
    args.item_id = item_id
    args.warehouse_id = warehouse_id
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

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

  def addOrUpdateAllAmazonFbaInventory(self, allamazonfbainventorysnapshot):
    """
    Parameters:
     - allamazonfbainventorysnapshot
    """
    self.send_addOrUpdateAllAmazonFbaInventory(allamazonfbainventorysnapshot)
    self.recv_addOrUpdateAllAmazonFbaInventory()

  def send_addOrUpdateAllAmazonFbaInventory(self, allamazonfbainventorysnapshot):
    self._oprot.writeMessageBegin('addOrUpdateAllAmazonFbaInventory', TMessageType.CALL, self._seqid)
    args = addOrUpdateAllAmazonFbaInventory_args()
    args.allamazonfbainventorysnapshot = allamazonfbainventorysnapshot
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

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

  def addOrUpdateAllSnapdealInventory(self, allsnapdealinventorysnapshot):
    """
    Parameters:
     - allsnapdealinventorysnapshot
    """
    self.send_addOrUpdateAllSnapdealInventory(allsnapdealinventorysnapshot)
    self.recv_addOrUpdateAllSnapdealInventory()

  def send_addOrUpdateAllSnapdealInventory(self, allsnapdealinventorysnapshot):
    self._oprot.writeMessageBegin('addOrUpdateAllSnapdealInventory', TMessageType.CALL, self._seqid)
    args = addOrUpdateAllSnapdealInventory_args()
    args.allsnapdealinventorysnapshot = allsnapdealinventorysnapshot
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

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

  def getSnapdealInventorySnapshot(self, ):
    self.send_getSnapdealInventorySnapshot()
    return self.recv_getSnapdealInventorySnapshot()

  def send_getSnapdealInventorySnapshot(self, ):
    self._oprot.writeMessageBegin('getSnapdealInventorySnapshot', TMessageType.CALL, self._seqid)
    args = getSnapdealInventorySnapshot_args()
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

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

  def getHoldInventoryDetails(self, itemId, warehouseId, source):
    """
    Parameters:
     - itemId
     - warehouseId
     - source
    """
    self.send_getHoldInventoryDetails(itemId, warehouseId, source)
    return self.recv_getHoldInventoryDetails()

  def send_getHoldInventoryDetails(self, itemId, warehouseId, source):
    self._oprot.writeMessageBegin('getHoldInventoryDetails', TMessageType.CALL, self._seqid)
    args = getHoldInventoryDetails_args()
    args.itemId = itemId
    args.warehouseId = warehouseId
    args.source = source
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

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

  def addOrUpdateFlipkartInventorySnapshot(self, flipkartInventorySnapshot, time):
    """
    Parameters:
     - flipkartInventorySnapshot
     - time
    """
    self.send_addOrUpdateFlipkartInventorySnapshot(flipkartInventorySnapshot, time)
    self.recv_addOrUpdateFlipkartInventorySnapshot()

  def send_addOrUpdateFlipkartInventorySnapshot(self, flipkartInventorySnapshot, time):
    self._oprot.writeMessageBegin('addOrUpdateFlipkartInventorySnapshot', TMessageType.CALL, self._seqid)
    args = addOrUpdateFlipkartInventorySnapshot_args()
    args.flipkartInventorySnapshot = flipkartInventorySnapshot
    args.time = time
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

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

  def getFlipkartInventorySnapshot(self, ):
    self.send_getFlipkartInventorySnapshot()
    return self.recv_getFlipkartInventorySnapshot()

  def send_getFlipkartInventorySnapshot(self, ):
    self._oprot.writeMessageBegin('getFlipkartInventorySnapshot', TMessageType.CALL, self._seqid)
    args = getFlipkartInventorySnapshot_args()
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

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

  def getFlipkartlInventoryForItem(self, item_id):
    """
    Parameters:
     - item_id
    """
    self.send_getFlipkartlInventoryForItem(item_id)
    return self.recv_getFlipkartlInventoryForItem()

  def send_getFlipkartlInventoryForItem(self, item_id):
    self._oprot.writeMessageBegin('getFlipkartlInventoryForItem', TMessageType.CALL, self._seqid)
    args = getFlipkartlInventoryForItem_args()
    args.item_id = item_id
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

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

  def getStateMaster(self, ):
    self.send_getStateMaster()
    return self.recv_getStateMaster()

  def send_getStateMaster(self, ):
    self._oprot.writeMessageBegin('getStateMaster', TMessageType.CALL, self._seqid)
    args = getStateMaster_args()
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

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

  def updateSnapdealStockAtEOD(self, allsnapdealstock):
    """
    Parameters:
     - allsnapdealstock
    """
    self.send_updateSnapdealStockAtEOD(allsnapdealstock)
    self.recv_updateSnapdealStockAtEOD()

  def send_updateSnapdealStockAtEOD(self, allsnapdealstock):
    self._oprot.writeMessageBegin('updateSnapdealStockAtEOD', TMessageType.CALL, self._seqid)
    args = updateSnapdealStockAtEOD_args()
    args.allsnapdealstock = allsnapdealstock
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

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

  def updateFlipkartStockAtEOD(self, allflipkartstock):
    """
    Parameters:
     - allflipkartstock
    """
    self.send_updateFlipkartStockAtEOD(allflipkartstock)
    self.recv_updateFlipkartStockAtEOD()

  def send_updateFlipkartStockAtEOD(self, allflipkartstock):
    self._oprot.writeMessageBegin('updateFlipkartStockAtEOD', TMessageType.CALL, self._seqid)
    args = updateFlipkartStockAtEOD_args()
    args.allflipkartstock = allflipkartstock
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

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

  def getWanNlcForSource(self, item_id, source):
    """
    Parameters:
     - item_id
     - source
    """
    self.send_getWanNlcForSource(item_id, source)
    return self.recv_getWanNlcForSource()

  def send_getWanNlcForSource(self, item_id, source):
    self._oprot.writeMessageBegin('getWanNlcForSource', TMessageType.CALL, self._seqid)
    args = getWanNlcForSource_args()
    args.item_id = item_id
    args.source = source
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

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

  def getAllAvailableAmazonFbaItemInventory(self, ):
    self.send_getAllAvailableAmazonFbaItemInventory()
    return self.recv_getAllAvailableAmazonFbaItemInventory()

  def send_getAllAvailableAmazonFbaItemInventory(self, ):
    self._oprot.writeMessageBegin('getAllAvailableAmazonFbaItemInventory', TMessageType.CALL, self._seqid)
    args = getAllAvailableAmazonFbaItemInventory_args()
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

  def recv_getAllAvailableAmazonFbaItemInventory(self, ):
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
    if mtype == TMessageType.EXCEPTION:
      x = TApplicationException()
      x.read(self._iprot)
      self._iprot.readMessageEnd()
      raise x
    result = getAllAvailableAmazonFbaItemInventory_result()
    result.read(self._iprot)
    self._iprot.readMessageEnd()
    if result.success is not None:
      return result.success
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getAllAvailableAmazonFbaItemInventory 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["updateReservationForOrder"] = Processor.process_updateReservationForOrder
    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["getOosStatusesForXDays"] = Processor.process_getOosStatusesForXDays
    self._processMap["getAllVendorItemPricing"] = Processor.process_getAllVendorItemPricing
    self._processMap["getNonZeroItemStockPurchaseParams"] = Processor.process_getNonZeroItemStockPurchaseParams
    self._processMap["getBillableInventoryAndPendingOrders"] = Processor.process_getBillableInventoryAndPendingOrders
    self._processMap["getWarehouseName"] = Processor.process_getWarehouseName
    self._processMap["getAmazonInventoryForItem"] = Processor.process_getAmazonInventoryForItem
    self._processMap["getAllAmazonInventory"] = Processor.process_getAllAmazonInventory
    self._processMap["addOrUpdateAmazonInventoryForItem"] = Processor.process_addOrUpdateAmazonInventoryForItem
    self._processMap["getLastNdaySaleForItem"] = Processor.process_getLastNdaySaleForItem
    self._processMap["addOrUpdateAmazonFbaInventory"] = Processor.process_addOrUpdateAmazonFbaInventory
    self._processMap["addUpdateHoldInventory"] = Processor.process_addUpdateHoldInventory
    self._processMap["getAmazonFbaItemInventory"] = Processor.process_getAmazonFbaItemInventory
    self._processMap["getAllAmazonFbaItemInventory"] = Processor.process_getAllAmazonFbaItemInventory
    self._processMap["getOursGoodWarehouseIdsForLocation"] = Processor.process_getOursGoodWarehouseIdsForLocation
    self._processMap["getHoldInventoryDetailForItemForWarehouseIdExceptSource"] = Processor.process_getHoldInventoryDetailForItemForWarehouseIdExceptSource
    self._processMap["getSnapdealInventoryForItem"] = Processor.process_getSnapdealInventoryForItem
    self._processMap["addOrUpdateSnapdealInventoryForItem"] = Processor.process_addOrUpdateSnapdealInventoryForItem
    self._processMap["getNlcForWarehouse"] = Processor.process_getNlcForWarehouse
    self._processMap["getHeldInventoryMapForItem"] = Processor.process_getHeldInventoryMapForItem
    self._processMap["addOrUpdateAllAmazonFbaInventory"] = Processor.process_addOrUpdateAllAmazonFbaInventory
    self._processMap["addOrUpdateAllSnapdealInventory"] = Processor.process_addOrUpdateAllSnapdealInventory
    self._processMap["getSnapdealInventorySnapshot"] = Processor.process_getSnapdealInventorySnapshot
    self._processMap["getHoldInventoryDetails"] = Processor.process_getHoldInventoryDetails
    self._processMap["addOrUpdateFlipkartInventorySnapshot"] = Processor.process_addOrUpdateFlipkartInventorySnapshot
    self._processMap["getFlipkartInventorySnapshot"] = Processor.process_getFlipkartInventorySnapshot
    self._processMap["getFlipkartlInventoryForItem"] = Processor.process_getFlipkartlInventoryForItem
    self._processMap["getStateMaster"] = Processor.process_getStateMaster
    self._processMap["updateSnapdealStockAtEOD"] = Processor.process_updateSnapdealStockAtEOD
    self._processMap["updateFlipkartStockAtEOD"] = Processor.process_updateFlipkartStockAtEOD
    self._processMap["getWanNlcForSource"] = Processor.process_getWanNlcForSource
    self._processMap["getAllAvailableAmazonFbaItemInventory"] = Processor.process_getAllAvailableAmazonFbaItemInventory

  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_updateReservationForOrder(self, seqid, iprot, oprot):
    args = updateReservationForOrder_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = updateReservationForOrder_result()
    try:
      result.success = self._handler.updateReservationForOrder(args.itemId, args.warehouseId, args.sourceId, args.orderId, args.createdTimestamp, args.promisedShippingTimestamp, args.quantity)
    except InventoryServiceException, cex:
      result.cex = cex
    oprot.writeMessageBegin("updateReservationForOrder", 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, args.billingWarehouseId)
    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.sourceId, args.days)
    oprot.writeMessageBegin("getOosStatusesForXDaysForItem", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_getOosStatusesForXDays(self, seqid, iprot, oprot):
    args = getOosStatusesForXDays_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = getOosStatusesForXDays_result()
    result.success = self._handler.getOosStatusesForXDays(args.sourceId, args.days)
    oprot.writeMessageBegin("getOosStatusesForXDays", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_getAllVendorItemPricing(self, seqid, iprot, oprot):
    args = getAllVendorItemPricing_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = getAllVendorItemPricing_result()
    result.success = self._handler.getAllVendorItemPricing(args.itemId, args.vendorId)
    oprot.writeMessageBegin("getAllVendorItemPricing", 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()

  def process_getWarehouseName(self, seqid, iprot, oprot):
    args = getWarehouseName_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = getWarehouseName_result()
    result.success = self._handler.getWarehouseName(args.warehouse_id)
    oprot.writeMessageBegin("getWarehouseName", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_getAmazonInventoryForItem(self, seqid, iprot, oprot):
    args = getAmazonInventoryForItem_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = getAmazonInventoryForItem_result()
    result.success = self._handler.getAmazonInventoryForItem(args.item_id)
    oprot.writeMessageBegin("getAmazonInventoryForItem", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_getAllAmazonInventory(self, seqid, iprot, oprot):
    args = getAllAmazonInventory_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = getAllAmazonInventory_result()
    result.success = self._handler.getAllAmazonInventory()
    oprot.writeMessageBegin("getAllAmazonInventory", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_addOrUpdateAmazonInventoryForItem(self, seqid, iprot, oprot):
    args = addOrUpdateAmazonInventoryForItem_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = addOrUpdateAmazonInventoryForItem_result()
    self._handler.addOrUpdateAmazonInventoryForItem(args.amazonInventorySnapshot, args.time)
    oprot.writeMessageBegin("addOrUpdateAmazonInventoryForItem", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_getLastNdaySaleForItem(self, seqid, iprot, oprot):
    args = getLastNdaySaleForItem_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = getLastNdaySaleForItem_result()
    result.success = self._handler.getLastNdaySaleForItem(args.itemId, args.numberOfDays)
    oprot.writeMessageBegin("getLastNdaySaleForItem", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_addOrUpdateAmazonFbaInventory(self, seqid, iprot, oprot):
    args = addOrUpdateAmazonFbaInventory_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = addOrUpdateAmazonFbaInventory_result()
    self._handler.addOrUpdateAmazonFbaInventory(args.amazonfbainventorysnapshot)
    oprot.writeMessageBegin("addOrUpdateAmazonFbaInventory", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_addUpdateHoldInventory(self, seqid, iprot, oprot):
    args = addUpdateHoldInventory_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = addUpdateHoldInventory_result()
    try:
      self._handler.addUpdateHoldInventory(args.itemId, args.warehouseId, args.holdQuantity, args.source)
    except InventoryServiceException, cex:
      result.cex = cex
    oprot.writeMessageBegin("addUpdateHoldInventory", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_getAmazonFbaItemInventory(self, seqid, iprot, oprot):
    args = getAmazonFbaItemInventory_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = getAmazonFbaItemInventory_result()
    result.success = self._handler.getAmazonFbaItemInventory(args.itemId)
    oprot.writeMessageBegin("getAmazonFbaItemInventory", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_getAllAmazonFbaItemInventory(self, seqid, iprot, oprot):
    args = getAllAmazonFbaItemInventory_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = getAllAmazonFbaItemInventory_result()
    result.success = self._handler.getAllAmazonFbaItemInventory()
    oprot.writeMessageBegin("getAllAmazonFbaItemInventory", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_getOursGoodWarehouseIdsForLocation(self, seqid, iprot, oprot):
    args = getOursGoodWarehouseIdsForLocation_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = getOursGoodWarehouseIdsForLocation_result()
    result.success = self._handler.getOursGoodWarehouseIdsForLocation(args.state_id)
    oprot.writeMessageBegin("getOursGoodWarehouseIdsForLocation", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_getHoldInventoryDetailForItemForWarehouseIdExceptSource(self, seqid, iprot, oprot):
    args = getHoldInventoryDetailForItemForWarehouseIdExceptSource_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = getHoldInventoryDetailForItemForWarehouseIdExceptSource_result()
    result.success = self._handler.getHoldInventoryDetailForItemForWarehouseIdExceptSource(args.id, args.warehouse_id, args.source)
    oprot.writeMessageBegin("getHoldInventoryDetailForItemForWarehouseIdExceptSource", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_getSnapdealInventoryForItem(self, seqid, iprot, oprot):
    args = getSnapdealInventoryForItem_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = getSnapdealInventoryForItem_result()
    result.success = self._handler.getSnapdealInventoryForItem(args.item_id)
    oprot.writeMessageBegin("getSnapdealInventoryForItem", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_addOrUpdateSnapdealInventoryForItem(self, seqid, iprot, oprot):
    args = addOrUpdateSnapdealInventoryForItem_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = addOrUpdateSnapdealInventoryForItem_result()
    self._handler.addOrUpdateSnapdealInventoryForItem(args.snapdealinventoryitem)
    oprot.writeMessageBegin("addOrUpdateSnapdealInventoryForItem", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_getNlcForWarehouse(self, seqid, iprot, oprot):
    args = getNlcForWarehouse_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = getNlcForWarehouse_result()
    result.success = self._handler.getNlcForWarehouse(args.warehouse_id, args.item_id)
    oprot.writeMessageBegin("getNlcForWarehouse", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_getHeldInventoryMapForItem(self, seqid, iprot, oprot):
    args = getHeldInventoryMapForItem_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = getHeldInventoryMapForItem_result()
    result.success = self._handler.getHeldInventoryMapForItem(args.item_id, args.warehouse_id)
    oprot.writeMessageBegin("getHeldInventoryMapForItem", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_addOrUpdateAllAmazonFbaInventory(self, seqid, iprot, oprot):
    args = addOrUpdateAllAmazonFbaInventory_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = addOrUpdateAllAmazonFbaInventory_result()
    self._handler.addOrUpdateAllAmazonFbaInventory(args.allamazonfbainventorysnapshot)
    oprot.writeMessageBegin("addOrUpdateAllAmazonFbaInventory", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_addOrUpdateAllSnapdealInventory(self, seqid, iprot, oprot):
    args = addOrUpdateAllSnapdealInventory_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = addOrUpdateAllSnapdealInventory_result()
    self._handler.addOrUpdateAllSnapdealInventory(args.allsnapdealinventorysnapshot)
    oprot.writeMessageBegin("addOrUpdateAllSnapdealInventory", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_getSnapdealInventorySnapshot(self, seqid, iprot, oprot):
    args = getSnapdealInventorySnapshot_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = getSnapdealInventorySnapshot_result()
    result.success = self._handler.getSnapdealInventorySnapshot()
    oprot.writeMessageBegin("getSnapdealInventorySnapshot", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_getHoldInventoryDetails(self, seqid, iprot, oprot):
    args = getHoldInventoryDetails_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = getHoldInventoryDetails_result()
    result.success = self._handler.getHoldInventoryDetails(args.itemId, args.warehouseId, args.source)
    oprot.writeMessageBegin("getHoldInventoryDetails", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_addOrUpdateFlipkartInventorySnapshot(self, seqid, iprot, oprot):
    args = addOrUpdateFlipkartInventorySnapshot_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = addOrUpdateFlipkartInventorySnapshot_result()
    self._handler.addOrUpdateFlipkartInventorySnapshot(args.flipkartInventorySnapshot, args.time)
    oprot.writeMessageBegin("addOrUpdateFlipkartInventorySnapshot", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_getFlipkartInventorySnapshot(self, seqid, iprot, oprot):
    args = getFlipkartInventorySnapshot_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = getFlipkartInventorySnapshot_result()
    result.success = self._handler.getFlipkartInventorySnapshot()
    oprot.writeMessageBegin("getFlipkartInventorySnapshot", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_getFlipkartlInventoryForItem(self, seqid, iprot, oprot):
    args = getFlipkartlInventoryForItem_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = getFlipkartlInventoryForItem_result()
    result.success = self._handler.getFlipkartlInventoryForItem(args.item_id)
    oprot.writeMessageBegin("getFlipkartlInventoryForItem", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_getStateMaster(self, seqid, iprot, oprot):
    args = getStateMaster_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = getStateMaster_result()
    result.success = self._handler.getStateMaster()
    oprot.writeMessageBegin("getStateMaster", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_updateSnapdealStockAtEOD(self, seqid, iprot, oprot):
    args = updateSnapdealStockAtEOD_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = updateSnapdealStockAtEOD_result()
    self._handler.updateSnapdealStockAtEOD(args.allsnapdealstock)
    oprot.writeMessageBegin("updateSnapdealStockAtEOD", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_updateFlipkartStockAtEOD(self, seqid, iprot, oprot):
    args = updateFlipkartStockAtEOD_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = updateFlipkartStockAtEOD_result()
    self._handler.updateFlipkartStockAtEOD(args.allflipkartstock)
    oprot.writeMessageBegin("updateFlipkartStockAtEOD", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_getWanNlcForSource(self, seqid, iprot, oprot):
    args = getWanNlcForSource_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = getWanNlcForSource_result()
    result.success = self._handler.getWanNlcForSource(args.item_id, args.source)
    oprot.writeMessageBegin("getWanNlcForSource", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_getAllAvailableAmazonFbaItemInventory(self, seqid, iprot, oprot):
    args = getAllAvailableAmazonFbaItemInventory_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = getAllAvailableAmazonFbaItemInventory_result()
    result.success = self._handler.getAllAvailableAmazonFbaItemInventory()
    oprot.writeMessageBegin("getAllAvailableAmazonFbaItemInventory", 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 = {}
          (_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('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 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 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 = {}
          (_ktype37, _vtype38, _size36 ) = iprot.readMapBegin() 
          for _i40 in xrange(_size36):
            _key41 = iprot.readString();
            _val42 = iprot.readI64();
            self.availability[_key41] = _val42
          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 kiter43,viter44 in self.availability.items():
        oprot.writeString(kiter43)
        oprot.writeI64(viter44)
      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 = []
          (_etype48, _size45) = iprot.readListBegin()
          for _i49 in xrange(_size45):
            _elem50 = iprot.readI64();
            self.success.append(_elem50)
          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 iter51 in self.success:
        oprot.writeI64(iter51)
      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 = []
          (_etype55, _size52) = iprot.readListBegin()
          for _i56 in xrange(_size52):
            _elem57 = Warehouse()
            _elem57.read(iprot)
            self.success.append(_elem57)
          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 iter58 in self.success:
        iter58.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 = []
          (_etype62, _size59) = iprot.readListBegin()
          for _i63 in xrange(_size59):
            _elem64 = iprot.readI64();
            self.success.append(_elem64)
          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 iter65 in self.success:
        oprot.writeI64(iter65)
      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 updateReservationForOrder_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('updateReservationForOrder_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 updateReservationForOrder_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('updateReservationForOrder_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 = []
          (_etype69, _size66) = iprot.readListBegin()
          for _i70 in xrange(_size66):
            _elem71 = VendorItemPricing()
            _elem71.read(iprot)
            self.success.append(_elem71)
          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 iter72 in self.success:
        iter72.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 = []
          (_etype76, _size73) = iprot.readListBegin()
          for _i77 in xrange(_size73):
            _elem78 = Vendor()
            _elem78.read(iprot)
            self.success.append(_elem78)
          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 iter79 in self.success:
        iter79.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 = []
          (_etype83, _size80) = iprot.readListBegin()
          for _i84 in xrange(_size80):
            _elem85 = VendorItemMapping()
            _elem85.read(iprot)
            self.success.append(_elem85)
          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 iter86 in self.success:
        iter86.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 = []
          (_etype90, _size87) = iprot.readListBegin()
          for _i91 in xrange(_size87):
            _elem92 = AvailableAndReservedStock()
            _elem92.read(iprot)
            self.success.append(_elem92)
          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 iter93 in self.success:
        iter93.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 = []
          (_etype97, _size94) = iprot.readListBegin()
          for _i98 in xrange(_size94):
            _elem99 = Warehouse()
            _elem99.read(iprot)
            self.success.append(_elem99)
          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 iter100 in self.success:
        iter100.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 = []
          (_etype104, _size101) = iprot.readListBegin()
          for _i105 in xrange(_size101):
            _elem106 = iprot.readString();
            self.success.append(_elem106)
          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 iter107 in self.success:
        oprot.writeString(iter107)
      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 = {}
          (_ktype109, _vtype110, _size108 ) = iprot.readMapBegin() 
          for _i112 in xrange(_size108):
            _key113 = iprot.readString();
            _val114 = {}
            (_ktype116, _vtype117, _size115 ) = iprot.readMapBegin() 
            for _i119 in xrange(_size115):
              _key120 = iprot.readI64();
              _val121 = iprot.readI64();
              _val114[_key120] = _val121
            iprot.readMapEnd()
            self.success[_key113] = _val114
          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 kiter122,viter123 in self.success.items():
        oprot.writeString(kiter122)
        oprot.writeMapBegin(TType.I64, TType.I64, len(viter123))
        for kiter124,viter125 in viter123.items():
          oprot.writeI64(kiter124)
          oprot.writeI64(viter125)
        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 = []
          (_etype129, _size126) = iprot.readListBegin()
          for _i130 in xrange(_size126):
            _elem131 = Warehouse()
            _elem131.read(iprot)
            self.success.append(_elem131)
          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 iter132 in self.success:
        iter132.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 = []
          (_etype136, _size133) = iprot.readListBegin()
          for _i137 in xrange(_size133):
            _elem138 = VendorItemMapping()
            _elem138.read(iprot)
            self.success.append(_elem138)
          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 iter139 in self.success:
        iter139.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 = {}
          (_ktype141, _vtype142, _size140 ) = iprot.readMapBegin() 
          for _i144 in xrange(_size140):
            _key145 = iprot.readI64();
            _val146 = ItemInventory()
            _val146.read(iprot)
            self.success[_key145] = _val146
          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 kiter147,viter148 in self.success.items():
        oprot.writeI64(kiter147)
        viter148.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
   - billingWarehouseId
  """

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

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

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 1:
        if ftype == TType.I64:
          self.vendorId = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.I64:
          self.billingWarehouseId = 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()
    if self.billingWarehouseId is not None:
      oprot.writeFieldBegin('billingWarehouseId', TType.I64, 2)
      oprot.writeI64(self.billingWarehouseId)
      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 = []
          (_etype152, _size149) = iprot.readListBegin()
          for _i153 in xrange(_size149):
            _elem154 = iprot.readI64();
            self.item_ids.append(_elem154)
          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 iter155 in self.item_ids:
        oprot.writeI64(iter155)
      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 = {}
          (_ktype157, _vtype158, _size156 ) = iprot.readMapBegin() 
          for _i160 in xrange(_size156):
            _key161 = iprot.readI64();
            _val162 = iprot.readI64();
            self.success[_key161] = _val162
          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 kiter163,viter164 in self.success.items():
        oprot.writeI64(kiter163)
        oprot.writeI64(viter164)
      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 = []
          (_etype168, _size165) = iprot.readListBegin()
          for _i169 in xrange(_size165):
            _elem170 = iprot.readI64();
            self.vendorIds.append(_elem170)
          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 iter171 in self.vendorIds:
        oprot.writeI64(iter171)
      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 = []
          (_etype175, _size172) = iprot.readListBegin()
          for _i176 in xrange(_size172):
            _elem177 = iprot.readI64();
            self.success.append(_elem177)
          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 iter178 in self.success:
        oprot.writeI64(iter178)
      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 = []
          (_etype182, _size179) = iprot.readListBegin()
          for _i183 in xrange(_size179):
            _elem184 = IgnoredInventoryUpdateItems()
            _elem184.read(iprot)
            self.success.append(_elem184)
          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 iter185 in self.success:
        iter185.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 = []
          (_etype189, _size186) = iprot.readListBegin()
          for _i190 in xrange(_size186):
            _elem191 = iprot.readI64();
            self.success.append(_elem191)
          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 iter192 in self.success:
        oprot.writeI64(iter192)
      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 = {}
          (_ktype194, _vtype195, _size193 ) = iprot.readMapBegin() 
          for _i197 in xrange(_size193):
            _key198 = iprot.readI64();
            _val199 = iprot.readBool();
            self.oosStatusMap[_key198] = _val199
          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 kiter200,viter201 in self.oosStatusMap.items():
        oprot.writeI64(kiter200)
        oprot.writeBool(viter201)
      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
   - sourceId
   - days
  """

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

  def __init__(self, itemId=None, sourceId=None, days=None,):
    self.itemId = itemId
    self.sourceId = sourceId
    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.sourceId = iprot.readI32();
        else:
          iprot.skip(ftype)
      elif fid == 3:
        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.sourceId is not None:
      oprot.writeFieldBegin('sourceId', TType.I32, 2)
      oprot.writeI32(self.sourceId)
      oprot.writeFieldEnd()
    if self.days is not None:
      oprot.writeFieldBegin('days', TType.I32, 3)
      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 = []
          (_etype205, _size202) = iprot.readListBegin()
          for _i206 in xrange(_size202):
            _elem207 = OOSStatus()
            _elem207.read(iprot)
            self.success.append(_elem207)
          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 iter208 in self.success:
        iter208.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 getOosStatusesForXDays_args:
  """
  Attributes:
   - sourceId
   - days
  """

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

  def __init__(self, sourceId=None, days=None,):
    self.sourceId = sourceId
    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.I32:
          self.sourceId = iprot.readI32();
        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('getOosStatusesForXDays_args')
    if self.sourceId is not None:
      oprot.writeFieldBegin('sourceId', TType.I32, 1)
      oprot.writeI32(self.sourceId)
      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 getOosStatusesForXDays_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 = []
          (_etype212, _size209) = iprot.readListBegin()
          for _i213 in xrange(_size209):
            _elem214 = OOSStatus()
            _elem214.read(iprot)
            self.success.append(_elem214)
          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('getOosStatusesForXDays_result')
    if self.success is not None:
      oprot.writeFieldBegin('success', TType.LIST, 0)
      oprot.writeListBegin(TType.STRUCT, len(self.success))
      for iter215 in self.success:
        iter215.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 getAllVendorItemPricing_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('getAllVendorItemPricing_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 getAllVendorItemPricing_result:
  """
  Attributes:
   - success
  """

  thrift_spec = (
    (0, TType.LIST, 'success', (TType.STRUCT,(VendorItemPricing, VendorItemPricing.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 = []
          (_etype219, _size216) = iprot.readListBegin()
          for _i220 in xrange(_size216):
            _elem221 = VendorItemPricing()
            _elem221.read(iprot)
            self.success.append(_elem221)
          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('getAllVendorItemPricing_result')
    if self.success is not None:
      oprot.writeFieldBegin('success', TType.LIST, 0)
      oprot.writeListBegin(TType.STRUCT, len(self.success))
      for iter222 in self.success:
        iter222.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 = []
          (_etype226, _size223) = iprot.readListBegin()
          for _i227 in xrange(_size223):
            _elem228 = ItemStockPurchaseParams()
            _elem228.read(iprot)
            self.success.append(_elem228)
          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 iter229 in self.success:
        iter229.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 = []
          (_etype233, _size230) = iprot.readListBegin()
          for _i234 in xrange(_size230):
            _elem235 = AvailableAndReservedStock()
            _elem235.read(iprot)
            self.success.append(_elem235)
          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 iter236 in self.success:
        iter236.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 getWarehouseName_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('getWarehouseName_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 getWarehouseName_result:
  """
  Attributes:
   - success
  """

  thrift_spec = (
    (0, TType.STRING, '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.STRING:
          self.success = 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('getWarehouseName_result')
    if self.success is not None:
      oprot.writeFieldBegin('success', TType.STRING, 0)
      oprot.writeString(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 getAmazonInventoryForItem_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('getAmazonInventoryForItem_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 getAmazonInventoryForItem_result:
  """
  Attributes:
   - success
  """

  thrift_spec = (
    (0, TType.STRUCT, 'success', (AmazonInventorySnapshot, AmazonInventorySnapshot.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 = AmazonInventorySnapshot()
          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('getAmazonInventoryForItem_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 getAllAmazonInventory_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('getAllAmazonInventory_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 getAllAmazonInventory_result:
  """
  Attributes:
   - success
  """

  thrift_spec = (
    (0, TType.LIST, 'success', (TType.STRUCT,(AmazonInventorySnapshot, AmazonInventorySnapshot.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 = []
          (_etype240, _size237) = iprot.readListBegin()
          for _i241 in xrange(_size237):
            _elem242 = AmazonInventorySnapshot()
            _elem242.read(iprot)
            self.success.append(_elem242)
          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('getAllAmazonInventory_result')
    if self.success is not None:
      oprot.writeFieldBegin('success', TType.LIST, 0)
      oprot.writeListBegin(TType.STRUCT, len(self.success))
      for iter243 in self.success:
        iter243.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 addOrUpdateAmazonInventoryForItem_args:
  """
  Attributes:
   - amazonInventorySnapshot
   - time
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRUCT, 'amazonInventorySnapshot', (AmazonInventorySnapshot, AmazonInventorySnapshot.thrift_spec), None, ), # 1
    (2, TType.I64, 'time', None, None, ), # 2
  )

  def __init__(self, amazonInventorySnapshot=None, time=None,):
    self.amazonInventorySnapshot = amazonInventorySnapshot
    self.time = time

  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.amazonInventorySnapshot = AmazonInventorySnapshot()
          self.amazonInventorySnapshot.read(iprot)
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.I64:
          self.time = 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('addOrUpdateAmazonInventoryForItem_args')
    if self.amazonInventorySnapshot is not None:
      oprot.writeFieldBegin('amazonInventorySnapshot', TType.STRUCT, 1)
      self.amazonInventorySnapshot.write(oprot)
      oprot.writeFieldEnd()
    if self.time is not None:
      oprot.writeFieldBegin('time', TType.I64, 2)
      oprot.writeI64(self.time)
      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 addOrUpdateAmazonInventoryForItem_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('addOrUpdateAmazonInventoryForItem_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 getLastNdaySaleForItem_args:
  """
  Attributes:
   - itemId
   - numberOfDays
  """

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

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

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

  thrift_spec = (
    (0, TType.STRING, '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.STRING:
          self.success = 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('getLastNdaySaleForItem_result')
    if self.success is not None:
      oprot.writeFieldBegin('success', TType.STRING, 0)
      oprot.writeString(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 addOrUpdateAmazonFbaInventory_args:
  """
  Attributes:
   - amazonfbainventorysnapshot
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRUCT, 'amazonfbainventorysnapshot', (AmazonFbaInventorySnapshot, AmazonFbaInventorySnapshot.thrift_spec), None, ), # 1
  )

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

  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.amazonfbainventorysnapshot = AmazonFbaInventorySnapshot()
          self.amazonfbainventorysnapshot.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('addOrUpdateAmazonFbaInventory_args')
    if self.amazonfbainventorysnapshot is not None:
      oprot.writeFieldBegin('amazonfbainventorysnapshot', TType.STRUCT, 1)
      self.amazonfbainventorysnapshot.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 addOrUpdateAmazonFbaInventory_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('addOrUpdateAmazonFbaInventory_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 addUpdateHoldInventory_args:
  """
  Attributes:
   - itemId
   - warehouseId
   - holdQuantity
   - source
  """

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

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

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 1:
        if ftype == TType.I64:
          self.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.holdQuantity = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.I64:
          self.source = iprot.readI64();
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('addUpdateHoldInventory_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.holdQuantity is not None:
      oprot.writeFieldBegin('holdQuantity', TType.I64, 3)
      oprot.writeI64(self.holdQuantity)
      oprot.writeFieldEnd()
    if self.source is not None:
      oprot.writeFieldBegin('source', TType.I64, 4)
      oprot.writeI64(self.source)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


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

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

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

class addUpdateHoldInventory_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('addUpdateHoldInventory_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 getAmazonFbaItemInventory_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('getAmazonFbaItemInventory_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 getAmazonFbaItemInventory_result:
  """
  Attributes:
   - success
  """

  thrift_spec = (
    (0, TType.LIST, 'success', (TType.STRUCT,(AmazonFbaInventorySnapshot, AmazonFbaInventorySnapshot.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 = []
          (_etype247, _size244) = iprot.readListBegin()
          for _i248 in xrange(_size244):
            _elem249 = AmazonFbaInventorySnapshot()
            _elem249.read(iprot)
            self.success.append(_elem249)
          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('getAmazonFbaItemInventory_result')
    if self.success is not None:
      oprot.writeFieldBegin('success', TType.LIST, 0)
      oprot.writeListBegin(TType.STRUCT, len(self.success))
      for iter250 in self.success:
        iter250.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 getAllAmazonFbaItemInventory_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('getAllAmazonFbaItemInventory_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 getAllAmazonFbaItemInventory_result:
  """
  Attributes:
   - success
  """

  thrift_spec = (
    (0, TType.LIST, 'success', (TType.STRUCT,(AmazonFbaInventorySnapshot, AmazonFbaInventorySnapshot.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 = []
          (_etype254, _size251) = iprot.readListBegin()
          for _i255 in xrange(_size251):
            _elem256 = AmazonFbaInventorySnapshot()
            _elem256.read(iprot)
            self.success.append(_elem256)
          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('getAllAmazonFbaItemInventory_result')
    if self.success is not None:
      oprot.writeFieldBegin('success', TType.LIST, 0)
      oprot.writeListBegin(TType.STRUCT, len(self.success))
      for iter257 in self.success:
        iter257.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 getOursGoodWarehouseIdsForLocation_args:
  """
  Attributes:
   - state_id
  """

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

  def __init__(self, state_id=None,):
    self.state_id = state_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.state_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('getOursGoodWarehouseIdsForLocation_args')
    if self.state_id is not None:
      oprot.writeFieldBegin('state_id', TType.I64, 1)
      oprot.writeI64(self.state_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 getOursGoodWarehouseIdsForLocation_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 = []
          (_etype261, _size258) = iprot.readListBegin()
          for _i262 in xrange(_size258):
            _elem263 = iprot.readI64();
            self.success.append(_elem263)
          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('getOursGoodWarehouseIdsForLocation_result')
    if self.success is not None:
      oprot.writeFieldBegin('success', TType.LIST, 0)
      oprot.writeListBegin(TType.I64, len(self.success))
      for iter264 in self.success:
        oprot.writeI64(iter264)
      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 getHoldInventoryDetailForItemForWarehouseIdExceptSource_args:
  """
  Attributes:
   - id
   - warehouse_id
   - source
  """

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

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

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

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

  def validate(self):
    return


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

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

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

class getHoldInventoryDetailForItemForWarehouseIdExceptSource_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('getHoldInventoryDetailForItemForWarehouseIdExceptSource_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 getSnapdealInventoryForItem_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('getSnapdealInventoryForItem_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 getSnapdealInventoryForItem_result:
  """
  Attributes:
   - success
  """

  thrift_spec = (
    (0, TType.STRUCT, 'success', (SnapdealInventoryItem, SnapdealInventoryItem.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 = SnapdealInventoryItem()
          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('getSnapdealInventoryForItem_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 addOrUpdateSnapdealInventoryForItem_args:
  """
  Attributes:
   - snapdealinventoryitem
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRUCT, 'snapdealinventoryitem', (SnapdealInventoryItem, SnapdealInventoryItem.thrift_spec), None, ), # 1
  )

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

  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.snapdealinventoryitem = SnapdealInventoryItem()
          self.snapdealinventoryitem.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('addOrUpdateSnapdealInventoryForItem_args')
    if self.snapdealinventoryitem is not None:
      oprot.writeFieldBegin('snapdealinventoryitem', TType.STRUCT, 1)
      self.snapdealinventoryitem.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 addOrUpdateSnapdealInventoryForItem_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('addOrUpdateSnapdealInventoryForItem_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 getNlcForWarehouse_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('getNlcForWarehouse_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 getNlcForWarehouse_result:
  """
  Attributes:
   - success
  """

  thrift_spec = (
    (0, TType.DOUBLE, '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.DOUBLE:
          self.success = 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('getNlcForWarehouse_result')
    if self.success is not None:
      oprot.writeFieldBegin('success', TType.DOUBLE, 0)
      oprot.writeDouble(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 getHeldInventoryMapForItem_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('getHeldInventoryMapForItem_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 getHeldInventoryMapForItem_result:
  """
  Attributes:
   - success
  """

  thrift_spec = (
    (0, TType.MAP, 'success', (TType.I32,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 = {}
          (_ktype266, _vtype267, _size265 ) = iprot.readMapBegin() 
          for _i269 in xrange(_size265):
            _key270 = iprot.readI32();
            _val271 = iprot.readI64();
            self.success[_key270] = _val271
          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('getHeldInventoryMapForItem_result')
    if self.success is not None:
      oprot.writeFieldBegin('success', TType.MAP, 0)
      oprot.writeMapBegin(TType.I32, TType.I64, len(self.success))
      for kiter272,viter273 in self.success.items():
        oprot.writeI32(kiter272)
        oprot.writeI64(viter273)
      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 addOrUpdateAllAmazonFbaInventory_args:
  """
  Attributes:
   - allamazonfbainventorysnapshot
  """

  thrift_spec = None
  def __init__(self, allamazonfbainventorysnapshot=None,):
    self.allamazonfbainventorysnapshot = allamazonfbainventorysnapshot

  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.allamazonfbainventorysnapshot = []
          (_etype277, _size274) = iprot.readListBegin()
          for _i278 in xrange(_size274):
            _elem279 = AmazonFbaInventorySnapshot()
            _elem279.read(iprot)
            self.allamazonfbainventorysnapshot.append(_elem279)
          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('addOrUpdateAllAmazonFbaInventory_args')
    if self.allamazonfbainventorysnapshot is not None:
      oprot.writeFieldBegin('allamazonfbainventorysnapshot', TType.LIST, -1)
      oprot.writeListBegin(TType.STRUCT, len(self.allamazonfbainventorysnapshot))
      for iter280 in self.allamazonfbainventorysnapshot:
        iter280.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 addOrUpdateAllAmazonFbaInventory_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('addOrUpdateAllAmazonFbaInventory_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 addOrUpdateAllSnapdealInventory_args:
  """
  Attributes:
   - allsnapdealinventorysnapshot
  """

  thrift_spec = None
  def __init__(self, allsnapdealinventorysnapshot=None,):
    self.allsnapdealinventorysnapshot = allsnapdealinventorysnapshot

  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.allsnapdealinventorysnapshot = []
          (_etype284, _size281) = iprot.readListBegin()
          for _i285 in xrange(_size281):
            _elem286 = SnapdealInventoryItem()
            _elem286.read(iprot)
            self.allsnapdealinventorysnapshot.append(_elem286)
          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('addOrUpdateAllSnapdealInventory_args')
    if self.allsnapdealinventorysnapshot is not None:
      oprot.writeFieldBegin('allsnapdealinventorysnapshot', TType.LIST, -1)
      oprot.writeListBegin(TType.STRUCT, len(self.allsnapdealinventorysnapshot))
      for iter287 in self.allsnapdealinventorysnapshot:
        iter287.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 addOrUpdateAllSnapdealInventory_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('addOrUpdateAllSnapdealInventory_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 getSnapdealInventorySnapshot_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('getSnapdealInventorySnapshot_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 getSnapdealInventorySnapshot_result:
  """
  Attributes:
   - success
  """

  thrift_spec = (
    (0, TType.LIST, 'success', (TType.STRUCT,(SnapdealInventoryItem, SnapdealInventoryItem.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 = []
          (_etype291, _size288) = iprot.readListBegin()
          for _i292 in xrange(_size288):
            _elem293 = SnapdealInventoryItem()
            _elem293.read(iprot)
            self.success.append(_elem293)
          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('getSnapdealInventorySnapshot_result')
    if self.success is not None:
      oprot.writeFieldBegin('success', TType.LIST, 0)
      oprot.writeListBegin(TType.STRUCT, len(self.success))
      for iter294 in self.success:
        iter294.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 getHoldInventoryDetails_args:
  """
  Attributes:
   - itemId
   - warehouseId
   - source
  """

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

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

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 1:
        if ftype == TType.I64:
          self.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.source = iprot.readI64();
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('getHoldInventoryDetails_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.source is not None:
      oprot.writeFieldBegin('source', TType.I64, 3)
      oprot.writeI64(self.source)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


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

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

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

class getHoldInventoryDetails_result:
  """
  Attributes:
   - success
  """

  thrift_spec = (
    (0, TType.LIST, 'success', (TType.STRUCT,(HoldInventoryDetail, HoldInventoryDetail.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 = []
          (_etype298, _size295) = iprot.readListBegin()
          for _i299 in xrange(_size295):
            _elem300 = HoldInventoryDetail()
            _elem300.read(iprot)
            self.success.append(_elem300)
          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('getHoldInventoryDetails_result')
    if self.success is not None:
      oprot.writeFieldBegin('success', TType.LIST, 0)
      oprot.writeListBegin(TType.STRUCT, len(self.success))
      for iter301 in self.success:
        iter301.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 addOrUpdateFlipkartInventorySnapshot_args:
  """
  Attributes:
   - flipkartInventorySnapshot
   - time
  """

  thrift_spec = (
    None, # 0
    (1, TType.LIST, 'flipkartInventorySnapshot', (TType.STRUCT,(FlipkartInventorySnapshot, FlipkartInventorySnapshot.thrift_spec)), None, ), # 1
    (2, TType.I64, 'time', None, None, ), # 2
  )

  def __init__(self, flipkartInventorySnapshot=None, time=None,):
    self.flipkartInventorySnapshot = flipkartInventorySnapshot
    self.time = time

  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.flipkartInventorySnapshot = []
          (_etype305, _size302) = iprot.readListBegin()
          for _i306 in xrange(_size302):
            _elem307 = FlipkartInventorySnapshot()
            _elem307.read(iprot)
            self.flipkartInventorySnapshot.append(_elem307)
          iprot.readListEnd()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.I64:
          self.time = 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('addOrUpdateFlipkartInventorySnapshot_args')
    if self.flipkartInventorySnapshot is not None:
      oprot.writeFieldBegin('flipkartInventorySnapshot', TType.LIST, 1)
      oprot.writeListBegin(TType.STRUCT, len(self.flipkartInventorySnapshot))
      for iter308 in self.flipkartInventorySnapshot:
        iter308.write(oprot)
      oprot.writeListEnd()
      oprot.writeFieldEnd()
    if self.time is not None:
      oprot.writeFieldBegin('time', TType.I64, 2)
      oprot.writeI64(self.time)
      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 addOrUpdateFlipkartInventorySnapshot_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('addOrUpdateFlipkartInventorySnapshot_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 getFlipkartInventorySnapshot_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('getFlipkartInventorySnapshot_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 getFlipkartInventorySnapshot_result:
  """
  Attributes:
   - success
  """

  thrift_spec = (
    (0, TType.LIST, 'success', (TType.STRUCT,(FlipkartInventorySnapshot, FlipkartInventorySnapshot.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 = []
          (_etype312, _size309) = iprot.readListBegin()
          for _i313 in xrange(_size309):
            _elem314 = FlipkartInventorySnapshot()
            _elem314.read(iprot)
            self.success.append(_elem314)
          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('getFlipkartInventorySnapshot_result')
    if self.success is not None:
      oprot.writeFieldBegin('success', TType.LIST, 0)
      oprot.writeListBegin(TType.STRUCT, len(self.success))
      for iter315 in self.success:
        iter315.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 getFlipkartlInventoryForItem_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('getFlipkartlInventoryForItem_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 getFlipkartlInventoryForItem_result:
  """
  Attributes:
   - success
  """

  thrift_spec = (
    (0, TType.STRUCT, 'success', (FlipkartInventorySnapshot, FlipkartInventorySnapshot.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 = FlipkartInventorySnapshot()
          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('getFlipkartlInventoryForItem_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 getStateMaster_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('getStateMaster_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 getStateMaster_result:
  """
  Attributes:
   - success
  """

  thrift_spec = (
    (0, TType.MAP, 'success', (TType.I64,None,TType.STRUCT,(StateInfo, StateInfo.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 = {}
          (_ktype317, _vtype318, _size316 ) = iprot.readMapBegin() 
          for _i320 in xrange(_size316):
            _key321 = iprot.readI64();
            _val322 = StateInfo()
            _val322.read(iprot)
            self.success[_key321] = _val322
          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('getStateMaster_result')
    if self.success is not None:
      oprot.writeFieldBegin('success', TType.MAP, 0)
      oprot.writeMapBegin(TType.I64, TType.STRUCT, len(self.success))
      for kiter323,viter324 in self.success.items():
        oprot.writeI64(kiter323)
        viter324.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 updateSnapdealStockAtEOD_args:
  """
  Attributes:
   - allsnapdealstock
  """

  thrift_spec = None
  def __init__(self, allsnapdealstock=None,):
    self.allsnapdealstock = allsnapdealstock

  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.allsnapdealstock = []
          (_etype328, _size325) = iprot.readListBegin()
          for _i329 in xrange(_size325):
            _elem330 = SnapdealStockAtEOD()
            _elem330.read(iprot)
            self.allsnapdealstock.append(_elem330)
          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('updateSnapdealStockAtEOD_args')
    if self.allsnapdealstock is not None:
      oprot.writeFieldBegin('allsnapdealstock', TType.LIST, -1)
      oprot.writeListBegin(TType.STRUCT, len(self.allsnapdealstock))
      for iter331 in self.allsnapdealstock:
        iter331.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 updateSnapdealStockAtEOD_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('updateSnapdealStockAtEOD_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 updateFlipkartStockAtEOD_args:
  """
  Attributes:
   - allflipkartstock
  """

  thrift_spec = None
  def __init__(self, allflipkartstock=None,):
    self.allflipkartstock = allflipkartstock

  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.allflipkartstock = []
          (_etype335, _size332) = iprot.readListBegin()
          for _i336 in xrange(_size332):
            _elem337 = FlipkartStockAtEOD()
            _elem337.read(iprot)
            self.allflipkartstock.append(_elem337)
          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('updateFlipkartStockAtEOD_args')
    if self.allflipkartstock is not None:
      oprot.writeFieldBegin('allflipkartstock', TType.LIST, -1)
      oprot.writeListBegin(TType.STRUCT, len(self.allflipkartstock))
      for iter338 in self.allflipkartstock:
        iter338.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 updateFlipkartStockAtEOD_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('updateFlipkartStockAtEOD_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 getWanNlcForSource_args:
  """
  Attributes:
   - item_id
   - source
  """

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

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

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

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

  def validate(self):
    return


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

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

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

class getWanNlcForSource_result:
  """
  Attributes:
   - success
  """

  thrift_spec = (
    (0, TType.DOUBLE, '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.DOUBLE:
          self.success = 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('getWanNlcForSource_result')
    if self.success is not None:
      oprot.writeFieldBegin('success', TType.DOUBLE, 0)
      oprot.writeDouble(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 getAllAvailableAmazonFbaItemInventory_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('getAllAvailableAmazonFbaItemInventory_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 getAllAvailableAmazonFbaItemInventory_result:
  """
  Attributes:
   - success
  """

  thrift_spec = (
    (0, TType.LIST, 'success', (TType.STRUCT,(AmazonFbaInventorySnapshot, AmazonFbaInventorySnapshot.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 = []
          (_etype342, _size339) = iprot.readListBegin()
          for _i343 in xrange(_size339):
            _elem344 = AmazonFbaInventorySnapshot()
            _elem344.read(iprot)
            self.success.append(_elem344)
          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('getAllAvailableAmazonFbaItemInventory_result')
    if self.success is not None:
      oprot.writeFieldBegin('success', TType.LIST, 0)
      oprot.writeListBegin(TType.STRUCT, len(self.success))
      for iter345 in self.success:
        iter345.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)