Subversion Repositories SmartDukaan

Rev

Rev 6766 | Rev 7190 | 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 getInventoryItem(self, serialNumber):
    """
    Retrieves serialized inventory item given a serial number

    Parameters:
     - serialNumber
    """
    pass

  def getNonSeralizedInventoryItem(self, itemNumber, itemId, fulfilmentWarehouseId):
    """
    Retrieves non-serialized inventory item from a given supplier

    Parameters:
     - itemNumber
     - itemId
     - fulfilmentWarehouseId
    """
    pass

  def scan(self, inventoryItem, type, quantity, billingWarehouseId):
    """
    Scan non-serialized items.

    Parameters:
     - inventoryItem
     - type
     - quantity
     - billingWarehouseId
    """
    pass

  def scanSerializedItemForOrder(self, serialNumber, type, orderId, fulfilmentWarehouseId, quantity, billingWarehouseId):
    """
    Scan serialized items linked with an order. Returns its price.

    Parameters:
     - serialNumber
     - type
     - orderId
     - fulfilmentWarehouseId
     - quantity
     - billingWarehouseId
    """
    pass

  def scanForOrder(self, inventoryItem, type, quantity, orderId, fulfilmentWarehouseId, billingWarehouseId):
    """
    Scan non-serialized items linked with an order.

    Parameters:
     - inventoryItem
     - type
     - quantity
     - orderId
     - fulfilmentWarehouseId
     - billingWarehouseId
    """
    pass

  def createItemNumberMapping(self, itemNumber, itemId):
    """
    Created item number to item id mapping

    Parameters:
     - itemNumber
     - itemId
    """
    pass

  def getItemNumbers(self, itemId):
    """
    Get itemNumber mappings for itemId

    Parameters:
     - itemId
    """
    pass

  def getItemIds(self, itemNumber):
    """
    Gets item ids for a given item number

    Parameters:
     - itemNumber
    """
    pass

  def getInventoryItemsFromLastScanType(self, lastScanType):
    """
    Retrieves all inventory items given a last scan type

    Parameters:
     - lastScanType
    """
    pass

  def getInventoryItemFromId(self, inventoryItemId):
    """
    Retrieves inventory item given a inventoryItem id

    Parameters:
     - inventoryItemId
    """
    pass

  def getPurchaseScans(self, startDate, endDate):
    """
    Returns the purchase scans grouped by items for Purchase register reconciliation

    Parameters:
     - startDate
     - endDate
    """
    pass

  def fetchScansPerInvoiceNumber(self, date):
    """
    Returns the invoices and the count of scans against on a given day.

    Parameters:
     - date
    """
    pass

  def getInventoryItemFromOrder(self, orderId):
    """
    Returns inventory item for a given order

    Parameters:
     - orderId
    """
    pass

  def getInventoryAge(self, ):
    """
    Fetches the stock inventory age week-wise
    """
    pass

  def getInventoryScansForItem(self, itemId, fromDate, toDate):
    """
    Fetches the scanRecords for a given item for a given time interval

    Parameters:
     - itemId
     - fromDate
     - toDate
    """
    pass

  def getScanRecordsForSerialNumber(self, serialNumber):
    """
    Fetches the scanRecords for a given serialNumber for a given time interval

    Parameters:
     - serialNumber
    """
    pass

  def scanForPurchaseReturn(self, saleReturnItems, vendorId):
    """
    Inserts outgoing scans for Returned Items and updates returnId in InventoryItems

    Parameters:
     - saleReturnItems
     - vendorId
    """
    pass

  def scanForLostItem(self, lostItems, vendorId):
    """
    Inserts scans for lost Items and updates lastScanType in InventoryItems

    Parameters:
     - lostItems
     - vendorId
    """
    pass

  def getCurrentSerializedInventoryByScans(self, ):
    """
    Get inventory count for available Serialized items in our warehouses using entries in ScanNew table
    """
    pass

  def getCurrentNonSerializedInventoryByScans(self, ):
    """
    Get inventory count for available Serialized items in our warehouses using entries in ScanNew table
    """
    pass

  def getHistoricSerializedInventoryByScans(self, date):
    """
    Get inventory for Serialized items in our warehouses at a given date using entries in ScanNew table

    Parameters:
     - date
    """
    pass

  def getHistoricNonSerializedInventoryByScans(self, date):
    """
    Get inventory for Non Serialized items in our warehouses at a given date using entries in ScanNew table

    Parameters:
     - date
    """
    pass

  def scanForOursExternalSale(self, itemId, serialNumber, itemNumber, invoiceNumber, warehouseId, unitPrice, orderId):
    """
    Insert Purchase/Sale Entries for product billed by Hotspot using OURS_EXTERNAL Billing

    Parameters:
     - itemId
     - serialNumber
     - itemNumber
     - invoiceNumber
     - warehouseId
     - unitPrice
     - orderId
    """
    pass

  def scanForOursExternalSaleReturn(self, orderId, unitPrice):
    """
    Insert Purchase_Ret/Sale_Ret Entries for product billed by Hotspot using OURS_EXTERNAL Billing

    Parameters:
     - orderId
     - unitPrice
    """
    pass

  def getMovementNonSerializedInventoryByScans(self, startDate, endDate):
    """
    Parameters:
     - startDate
     - endDate
    """
    pass

  def getMovementSerializedInventoryByScans(self, startDate, endDate):
    """
    Parameters:
     - startDate
     - endDate
    """
    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 getInventoryItem(self, serialNumber):
    """
    Retrieves serialized inventory item given a serial number

    Parameters:
     - serialNumber
    """
    self.send_getInventoryItem(serialNumber)
    return self.recv_getInventoryItem()

  def send_getInventoryItem(self, serialNumber):
    self._oprot.writeMessageBegin('getInventoryItem', TMessageType.CALL, self._seqid)
    args = getInventoryItem_args()
    args.serialNumber = serialNumber
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

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

  def getNonSeralizedInventoryItem(self, itemNumber, itemId, fulfilmentWarehouseId):
    """
    Retrieves non-serialized inventory item from a given supplier

    Parameters:
     - itemNumber
     - itemId
     - fulfilmentWarehouseId
    """
    self.send_getNonSeralizedInventoryItem(itemNumber, itemId, fulfilmentWarehouseId)
    return self.recv_getNonSeralizedInventoryItem()

  def send_getNonSeralizedInventoryItem(self, itemNumber, itemId, fulfilmentWarehouseId):
    self._oprot.writeMessageBegin('getNonSeralizedInventoryItem', TMessageType.CALL, self._seqid)
    args = getNonSeralizedInventoryItem_args()
    args.itemNumber = itemNumber
    args.itemId = itemId
    args.fulfilmentWarehouseId = fulfilmentWarehouseId
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

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

  def scan(self, inventoryItem, type, quantity, billingWarehouseId):
    """
    Scan non-serialized items.

    Parameters:
     - inventoryItem
     - type
     - quantity
     - billingWarehouseId
    """
    self.send_scan(inventoryItem, type, quantity, billingWarehouseId)
    self.recv_scan()

  def send_scan(self, inventoryItem, type, quantity, billingWarehouseId):
    self._oprot.writeMessageBegin('scan', TMessageType.CALL, self._seqid)
    args = scan_args()
    args.inventoryItem = inventoryItem
    args.type = type
    args.quantity = quantity
    args.billingWarehouseId = billingWarehouseId
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

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

  def scanSerializedItemForOrder(self, serialNumber, type, orderId, fulfilmentWarehouseId, quantity, billingWarehouseId):
    """
    Scan serialized items linked with an order. Returns its price.

    Parameters:
     - serialNumber
     - type
     - orderId
     - fulfilmentWarehouseId
     - quantity
     - billingWarehouseId
    """
    self.send_scanSerializedItemForOrder(serialNumber, type, orderId, fulfilmentWarehouseId, quantity, billingWarehouseId)
    return self.recv_scanSerializedItemForOrder()

  def send_scanSerializedItemForOrder(self, serialNumber, type, orderId, fulfilmentWarehouseId, quantity, billingWarehouseId):
    self._oprot.writeMessageBegin('scanSerializedItemForOrder', TMessageType.CALL, self._seqid)
    args = scanSerializedItemForOrder_args()
    args.serialNumber = serialNumber
    args.type = type
    args.orderId = orderId
    args.fulfilmentWarehouseId = fulfilmentWarehouseId
    args.quantity = quantity
    args.billingWarehouseId = billingWarehouseId
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

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

  def scanForOrder(self, inventoryItem, type, quantity, orderId, fulfilmentWarehouseId, billingWarehouseId):
    """
    Scan non-serialized items linked with an order.

    Parameters:
     - inventoryItem
     - type
     - quantity
     - orderId
     - fulfilmentWarehouseId
     - billingWarehouseId
    """
    self.send_scanForOrder(inventoryItem, type, quantity, orderId, fulfilmentWarehouseId, billingWarehouseId)
    return self.recv_scanForOrder()

  def send_scanForOrder(self, inventoryItem, type, quantity, orderId, fulfilmentWarehouseId, billingWarehouseId):
    self._oprot.writeMessageBegin('scanForOrder', TMessageType.CALL, self._seqid)
    args = scanForOrder_args()
    args.inventoryItem = inventoryItem
    args.type = type
    args.quantity = quantity
    args.orderId = orderId
    args.fulfilmentWarehouseId = fulfilmentWarehouseId
    args.billingWarehouseId = billingWarehouseId
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

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

  def createItemNumberMapping(self, itemNumber, itemId):
    """
    Created item number to item id mapping

    Parameters:
     - itemNumber
     - itemId
    """
    self.send_createItemNumberMapping(itemNumber, itemId)
    self.recv_createItemNumberMapping()

  def send_createItemNumberMapping(self, itemNumber, itemId):
    self._oprot.writeMessageBegin('createItemNumberMapping', TMessageType.CALL, self._seqid)
    args = createItemNumberMapping_args()
    args.itemNumber = itemNumber
    args.itemId = itemId
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

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

  def getItemNumbers(self, itemId):
    """
    Get itemNumber mappings for itemId

    Parameters:
     - itemId
    """
    self.send_getItemNumbers(itemId)
    return self.recv_getItemNumbers()

  def send_getItemNumbers(self, itemId):
    self._oprot.writeMessageBegin('getItemNumbers', TMessageType.CALL, self._seqid)
    args = getItemNumbers_args()
    args.itemId = itemId
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

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

  def getItemIds(self, itemNumber):
    """
    Gets item ids for a given item number

    Parameters:
     - itemNumber
    """
    self.send_getItemIds(itemNumber)
    return self.recv_getItemIds()

  def send_getItemIds(self, itemNumber):
    self._oprot.writeMessageBegin('getItemIds', TMessageType.CALL, self._seqid)
    args = getItemIds_args()
    args.itemNumber = itemNumber
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

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

  def getInventoryItemsFromLastScanType(self, lastScanType):
    """
    Retrieves all inventory items given a last scan type

    Parameters:
     - lastScanType
    """
    self.send_getInventoryItemsFromLastScanType(lastScanType)
    return self.recv_getInventoryItemsFromLastScanType()

  def send_getInventoryItemsFromLastScanType(self, lastScanType):
    self._oprot.writeMessageBegin('getInventoryItemsFromLastScanType', TMessageType.CALL, self._seqid)
    args = getInventoryItemsFromLastScanType_args()
    args.lastScanType = lastScanType
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

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

  def getInventoryItemFromId(self, inventoryItemId):
    """
    Retrieves inventory item given a inventoryItem id

    Parameters:
     - inventoryItemId
    """
    self.send_getInventoryItemFromId(inventoryItemId)
    return self.recv_getInventoryItemFromId()

  def send_getInventoryItemFromId(self, inventoryItemId):
    self._oprot.writeMessageBegin('getInventoryItemFromId', TMessageType.CALL, self._seqid)
    args = getInventoryItemFromId_args()
    args.inventoryItemId = inventoryItemId
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

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

  def getPurchaseScans(self, startDate, endDate):
    """
    Returns the purchase scans grouped by items for Purchase register reconciliation

    Parameters:
     - startDate
     - endDate
    """
    self.send_getPurchaseScans(startDate, endDate)
    return self.recv_getPurchaseScans()

  def send_getPurchaseScans(self, startDate, endDate):
    self._oprot.writeMessageBegin('getPurchaseScans', TMessageType.CALL, self._seqid)
    args = getPurchaseScans_args()
    args.startDate = startDate
    args.endDate = endDate
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

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

  def fetchScansPerInvoiceNumber(self, date):
    """
    Returns the invoices and the count of scans against on a given day.

    Parameters:
     - date
    """
    self.send_fetchScansPerInvoiceNumber(date)
    return self.recv_fetchScansPerInvoiceNumber()

  def send_fetchScansPerInvoiceNumber(self, date):
    self._oprot.writeMessageBegin('fetchScansPerInvoiceNumber', TMessageType.CALL, self._seqid)
    args = fetchScansPerInvoiceNumber_args()
    args.date = date
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

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

  def getInventoryItemFromOrder(self, orderId):
    """
    Returns inventory item for a given order

    Parameters:
     - orderId
    """
    self.send_getInventoryItemFromOrder(orderId)
    return self.recv_getInventoryItemFromOrder()

  def send_getInventoryItemFromOrder(self, orderId):
    self._oprot.writeMessageBegin('getInventoryItemFromOrder', TMessageType.CALL, self._seqid)
    args = getInventoryItemFromOrder_args()
    args.orderId = orderId
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

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

  def getInventoryAge(self, ):
    """
    Fetches the stock inventory age week-wise
    """
    self.send_getInventoryAge()
    return self.recv_getInventoryAge()

  def send_getInventoryAge(self, ):
    self._oprot.writeMessageBegin('getInventoryAge', TMessageType.CALL, self._seqid)
    args = getInventoryAge_args()
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

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

  def getInventoryScansForItem(self, itemId, fromDate, toDate):
    """
    Fetches the scanRecords for a given item for a given time interval

    Parameters:
     - itemId
     - fromDate
     - toDate
    """
    self.send_getInventoryScansForItem(itemId, fromDate, toDate)
    return self.recv_getInventoryScansForItem()

  def send_getInventoryScansForItem(self, itemId, fromDate, toDate):
    self._oprot.writeMessageBegin('getInventoryScansForItem', TMessageType.CALL, self._seqid)
    args = getInventoryScansForItem_args()
    args.itemId = itemId
    args.fromDate = fromDate
    args.toDate = toDate
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

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

  def getScanRecordsForSerialNumber(self, serialNumber):
    """
    Fetches the scanRecords for a given serialNumber for a given time interval

    Parameters:
     - serialNumber
    """
    self.send_getScanRecordsForSerialNumber(serialNumber)
    return self.recv_getScanRecordsForSerialNumber()

  def send_getScanRecordsForSerialNumber(self, serialNumber):
    self._oprot.writeMessageBegin('getScanRecordsForSerialNumber', TMessageType.CALL, self._seqid)
    args = getScanRecordsForSerialNumber_args()
    args.serialNumber = serialNumber
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

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

  def scanForPurchaseReturn(self, saleReturnItems, vendorId):
    """
    Inserts outgoing scans for Returned Items and updates returnId in InventoryItems

    Parameters:
     - saleReturnItems
     - vendorId
    """
    self.send_scanForPurchaseReturn(saleReturnItems, vendorId)
    self.recv_scanForPurchaseReturn()

  def send_scanForPurchaseReturn(self, saleReturnItems, vendorId):
    self._oprot.writeMessageBegin('scanForPurchaseReturn', TMessageType.CALL, self._seqid)
    args = scanForPurchaseReturn_args()
    args.saleReturnItems = saleReturnItems
    args.vendorId = vendorId
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

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

  def scanForLostItem(self, lostItems, vendorId):
    """
    Inserts scans for lost Items and updates lastScanType in InventoryItems

    Parameters:
     - lostItems
     - vendorId
    """
    self.send_scanForLostItem(lostItems, vendorId)
    self.recv_scanForLostItem()

  def send_scanForLostItem(self, lostItems, vendorId):
    self._oprot.writeMessageBegin('scanForLostItem', TMessageType.CALL, self._seqid)
    args = scanForLostItem_args()
    args.lostItems = lostItems
    args.vendorId = vendorId
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

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

  def getCurrentSerializedInventoryByScans(self, ):
    """
    Get inventory count for available Serialized items in our warehouses using entries in ScanNew table
    """
    self.send_getCurrentSerializedInventoryByScans()
    return self.recv_getCurrentSerializedInventoryByScans()

  def send_getCurrentSerializedInventoryByScans(self, ):
    self._oprot.writeMessageBegin('getCurrentSerializedInventoryByScans', TMessageType.CALL, self._seqid)
    args = getCurrentSerializedInventoryByScans_args()
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

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

  def getCurrentNonSerializedInventoryByScans(self, ):
    """
    Get inventory count for available Serialized items in our warehouses using entries in ScanNew table
    """
    self.send_getCurrentNonSerializedInventoryByScans()
    return self.recv_getCurrentNonSerializedInventoryByScans()

  def send_getCurrentNonSerializedInventoryByScans(self, ):
    self._oprot.writeMessageBegin('getCurrentNonSerializedInventoryByScans', TMessageType.CALL, self._seqid)
    args = getCurrentNonSerializedInventoryByScans_args()
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

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

  def getHistoricSerializedInventoryByScans(self, date):
    """
    Get inventory for Serialized items in our warehouses at a given date using entries in ScanNew table

    Parameters:
     - date
    """
    self.send_getHistoricSerializedInventoryByScans(date)
    return self.recv_getHistoricSerializedInventoryByScans()

  def send_getHistoricSerializedInventoryByScans(self, date):
    self._oprot.writeMessageBegin('getHistoricSerializedInventoryByScans', TMessageType.CALL, self._seqid)
    args = getHistoricSerializedInventoryByScans_args()
    args.date = date
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

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

  def getHistoricNonSerializedInventoryByScans(self, date):
    """
    Get inventory for Non Serialized items in our warehouses at a given date using entries in ScanNew table

    Parameters:
     - date
    """
    self.send_getHistoricNonSerializedInventoryByScans(date)
    return self.recv_getHistoricNonSerializedInventoryByScans()

  def send_getHistoricNonSerializedInventoryByScans(self, date):
    self._oprot.writeMessageBegin('getHistoricNonSerializedInventoryByScans', TMessageType.CALL, self._seqid)
    args = getHistoricNonSerializedInventoryByScans_args()
    args.date = date
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

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

  def scanForOursExternalSale(self, itemId, serialNumber, itemNumber, invoiceNumber, warehouseId, unitPrice, orderId):
    """
    Insert Purchase/Sale Entries for product billed by Hotspot using OURS_EXTERNAL Billing

    Parameters:
     - itemId
     - serialNumber
     - itemNumber
     - invoiceNumber
     - warehouseId
     - unitPrice
     - orderId
    """
    self.send_scanForOursExternalSale(itemId, serialNumber, itemNumber, invoiceNumber, warehouseId, unitPrice, orderId)
    return self.recv_scanForOursExternalSale()

  def send_scanForOursExternalSale(self, itemId, serialNumber, itemNumber, invoiceNumber, warehouseId, unitPrice, orderId):
    self._oprot.writeMessageBegin('scanForOursExternalSale', TMessageType.CALL, self._seqid)
    args = scanForOursExternalSale_args()
    args.itemId = itemId
    args.serialNumber = serialNumber
    args.itemNumber = itemNumber
    args.invoiceNumber = invoiceNumber
    args.warehouseId = warehouseId
    args.unitPrice = unitPrice
    args.orderId = orderId
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

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

  def scanForOursExternalSaleReturn(self, orderId, unitPrice):
    """
    Insert Purchase_Ret/Sale_Ret Entries for product billed by Hotspot using OURS_EXTERNAL Billing

    Parameters:
     - orderId
     - unitPrice
    """
    self.send_scanForOursExternalSaleReturn(orderId, unitPrice)
    self.recv_scanForOursExternalSaleReturn()

  def send_scanForOursExternalSaleReturn(self, orderId, unitPrice):
    self._oprot.writeMessageBegin('scanForOursExternalSaleReturn', TMessageType.CALL, self._seqid)
    args = scanForOursExternalSaleReturn_args()
    args.orderId = orderId
    args.unitPrice = unitPrice
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

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

  def getMovementNonSerializedInventoryByScans(self, startDate, endDate):
    """
    Parameters:
     - startDate
     - endDate
    """
    self.send_getMovementNonSerializedInventoryByScans(startDate, endDate)
    return self.recv_getMovementNonSerializedInventoryByScans()

  def send_getMovementNonSerializedInventoryByScans(self, startDate, endDate):
    self._oprot.writeMessageBegin('getMovementNonSerializedInventoryByScans', TMessageType.CALL, self._seqid)
    args = getMovementNonSerializedInventoryByScans_args()
    args.startDate = startDate
    args.endDate = endDate
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

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

  def getMovementSerializedInventoryByScans(self, startDate, endDate):
    """
    Parameters:
     - startDate
     - endDate
    """
    self.send_getMovementSerializedInventoryByScans(startDate, endDate)
    return self.recv_getMovementSerializedInventoryByScans()

  def send_getMovementSerializedInventoryByScans(self, startDate, endDate):
    self._oprot.writeMessageBegin('getMovementSerializedInventoryByScans', TMessageType.CALL, self._seqid)
    args = getMovementSerializedInventoryByScans_args()
    args.startDate = startDate
    args.endDate = endDate
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

  def recv_getMovementSerializedInventoryByScans(self, ):
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
    if mtype == TMessageType.EXCEPTION:
      x = TApplicationException()
      x.read(self._iprot)
      self._iprot.readMessageEnd()
      raise x
    result = getMovementSerializedInventoryByScans_result()
    result.read(self._iprot)
    self._iprot.readMessageEnd()
    if result.success is not None:
      return result.success
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getMovementSerializedInventoryByScans 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["getInventoryItem"] = Processor.process_getInventoryItem
    self._processMap["getNonSeralizedInventoryItem"] = Processor.process_getNonSeralizedInventoryItem
    self._processMap["scan"] = Processor.process_scan
    self._processMap["scanSerializedItemForOrder"] = Processor.process_scanSerializedItemForOrder
    self._processMap["scanForOrder"] = Processor.process_scanForOrder
    self._processMap["createItemNumberMapping"] = Processor.process_createItemNumberMapping
    self._processMap["getItemNumbers"] = Processor.process_getItemNumbers
    self._processMap["getItemIds"] = Processor.process_getItemIds
    self._processMap["getInventoryItemsFromLastScanType"] = Processor.process_getInventoryItemsFromLastScanType
    self._processMap["getInventoryItemFromId"] = Processor.process_getInventoryItemFromId
    self._processMap["getPurchaseScans"] = Processor.process_getPurchaseScans
    self._processMap["fetchScansPerInvoiceNumber"] = Processor.process_fetchScansPerInvoiceNumber
    self._processMap["getInventoryItemFromOrder"] = Processor.process_getInventoryItemFromOrder
    self._processMap["getInventoryAge"] = Processor.process_getInventoryAge
    self._processMap["getInventoryScansForItem"] = Processor.process_getInventoryScansForItem
    self._processMap["getScanRecordsForSerialNumber"] = Processor.process_getScanRecordsForSerialNumber
    self._processMap["scanForPurchaseReturn"] = Processor.process_scanForPurchaseReturn
    self._processMap["scanForLostItem"] = Processor.process_scanForLostItem
    self._processMap["getCurrentSerializedInventoryByScans"] = Processor.process_getCurrentSerializedInventoryByScans
    self._processMap["getCurrentNonSerializedInventoryByScans"] = Processor.process_getCurrentNonSerializedInventoryByScans
    self._processMap["getHistoricSerializedInventoryByScans"] = Processor.process_getHistoricSerializedInventoryByScans
    self._processMap["getHistoricNonSerializedInventoryByScans"] = Processor.process_getHistoricNonSerializedInventoryByScans
    self._processMap["scanForOursExternalSale"] = Processor.process_scanForOursExternalSale
    self._processMap["scanForOursExternalSaleReturn"] = Processor.process_scanForOursExternalSaleReturn
    self._processMap["getMovementNonSerializedInventoryByScans"] = Processor.process_getMovementNonSerializedInventoryByScans
    self._processMap["getMovementSerializedInventoryByScans"] = Processor.process_getMovementSerializedInventoryByScans

  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_getInventoryItem(self, seqid, iprot, oprot):
    args = getInventoryItem_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = getInventoryItem_result()
    try:
      result.success = self._handler.getInventoryItem(args.serialNumber)
    except WarehouseServiceException, wex:
      result.wex = wex
    oprot.writeMessageBegin("getInventoryItem", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_getNonSeralizedInventoryItem(self, seqid, iprot, oprot):
    args = getNonSeralizedInventoryItem_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = getNonSeralizedInventoryItem_result()
    try:
      result.success = self._handler.getNonSeralizedInventoryItem(args.itemNumber, args.itemId, args.fulfilmentWarehouseId)
    except WarehouseServiceException, wex:
      result.wex = wex
    oprot.writeMessageBegin("getNonSeralizedInventoryItem", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_scan(self, seqid, iprot, oprot):
    args = scan_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = scan_result()
    try:
      self._handler.scan(args.inventoryItem, args.type, args.quantity, args.billingWarehouseId)
    except WarehouseServiceException, wex:
      result.wex = wex
    oprot.writeMessageBegin("scan", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_scanSerializedItemForOrder(self, seqid, iprot, oprot):
    args = scanSerializedItemForOrder_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = scanSerializedItemForOrder_result()
    try:
      result.success = self._handler.scanSerializedItemForOrder(args.serialNumber, args.type, args.orderId, args.fulfilmentWarehouseId, args.quantity, args.billingWarehouseId)
    except WarehouseServiceException, wex:
      result.wex = wex
    oprot.writeMessageBegin("scanSerializedItemForOrder", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_scanForOrder(self, seqid, iprot, oprot):
    args = scanForOrder_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = scanForOrder_result()
    try:
      result.success = self._handler.scanForOrder(args.inventoryItem, args.type, args.quantity, args.orderId, args.fulfilmentWarehouseId, args.billingWarehouseId)
    except WarehouseServiceException, wex:
      result.wex = wex
    oprot.writeMessageBegin("scanForOrder", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_createItemNumberMapping(self, seqid, iprot, oprot):
    args = createItemNumberMapping_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = createItemNumberMapping_result()
    self._handler.createItemNumberMapping(args.itemNumber, args.itemId)
    oprot.writeMessageBegin("createItemNumberMapping", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_getItemNumbers(self, seqid, iprot, oprot):
    args = getItemNumbers_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = getItemNumbers_result()
    result.success = self._handler.getItemNumbers(args.itemId)
    oprot.writeMessageBegin("getItemNumbers", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_getItemIds(self, seqid, iprot, oprot):
    args = getItemIds_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = getItemIds_result()
    result.success = self._handler.getItemIds(args.itemNumber)
    oprot.writeMessageBegin("getItemIds", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_getInventoryItemsFromLastScanType(self, seqid, iprot, oprot):
    args = getInventoryItemsFromLastScanType_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = getInventoryItemsFromLastScanType_result()
    try:
      result.success = self._handler.getInventoryItemsFromLastScanType(args.lastScanType)
    except WarehouseServiceException, wex:
      result.wex = wex
    oprot.writeMessageBegin("getInventoryItemsFromLastScanType", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_getInventoryItemFromId(self, seqid, iprot, oprot):
    args = getInventoryItemFromId_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = getInventoryItemFromId_result()
    try:
      result.success = self._handler.getInventoryItemFromId(args.inventoryItemId)
    except WarehouseServiceException, wex:
      result.wex = wex
    oprot.writeMessageBegin("getInventoryItemFromId", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_getPurchaseScans(self, seqid, iprot, oprot):
    args = getPurchaseScans_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = getPurchaseScans_result()
    result.success = self._handler.getPurchaseScans(args.startDate, args.endDate)
    oprot.writeMessageBegin("getPurchaseScans", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_fetchScansPerInvoiceNumber(self, seqid, iprot, oprot):
    args = fetchScansPerInvoiceNumber_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = fetchScansPerInvoiceNumber_result()
    result.success = self._handler.fetchScansPerInvoiceNumber(args.date)
    oprot.writeMessageBegin("fetchScansPerInvoiceNumber", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_getInventoryItemFromOrder(self, seqid, iprot, oprot):
    args = getInventoryItemFromOrder_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = getInventoryItemFromOrder_result()
    try:
      result.success = self._handler.getInventoryItemFromOrder(args.orderId)
    except WarehouseServiceException, we:
      result.we = we
    oprot.writeMessageBegin("getInventoryItemFromOrder", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_getInventoryAge(self, seqid, iprot, oprot):
    args = getInventoryAge_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = getInventoryAge_result()
    result.success = self._handler.getInventoryAge()
    oprot.writeMessageBegin("getInventoryAge", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_getInventoryScansForItem(self, seqid, iprot, oprot):
    args = getInventoryScansForItem_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = getInventoryScansForItem_result()
    result.success = self._handler.getInventoryScansForItem(args.itemId, args.fromDate, args.toDate)
    oprot.writeMessageBegin("getInventoryScansForItem", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_getScanRecordsForSerialNumber(self, seqid, iprot, oprot):
    args = getScanRecordsForSerialNumber_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = getScanRecordsForSerialNumber_result()
    result.success = self._handler.getScanRecordsForSerialNumber(args.serialNumber)
    oprot.writeMessageBegin("getScanRecordsForSerialNumber", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_scanForPurchaseReturn(self, seqid, iprot, oprot):
    args = scanForPurchaseReturn_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = scanForPurchaseReturn_result()
    try:
      self._handler.scanForPurchaseReturn(args.saleReturnItems, args.vendorId)
    except WarehouseServiceException, ex:
      result.ex = ex
    oprot.writeMessageBegin("scanForPurchaseReturn", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_scanForLostItem(self, seqid, iprot, oprot):
    args = scanForLostItem_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = scanForLostItem_result()
    try:
      self._handler.scanForLostItem(args.lostItems, args.vendorId)
    except WarehouseServiceException, ex:
      result.ex = ex
    oprot.writeMessageBegin("scanForLostItem", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_getCurrentSerializedInventoryByScans(self, seqid, iprot, oprot):
    args = getCurrentSerializedInventoryByScans_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = getCurrentSerializedInventoryByScans_result()
    result.success = self._handler.getCurrentSerializedInventoryByScans()
    oprot.writeMessageBegin("getCurrentSerializedInventoryByScans", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_getCurrentNonSerializedInventoryByScans(self, seqid, iprot, oprot):
    args = getCurrentNonSerializedInventoryByScans_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = getCurrentNonSerializedInventoryByScans_result()
    result.success = self._handler.getCurrentNonSerializedInventoryByScans()
    oprot.writeMessageBegin("getCurrentNonSerializedInventoryByScans", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_getHistoricSerializedInventoryByScans(self, seqid, iprot, oprot):
    args = getHistoricSerializedInventoryByScans_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = getHistoricSerializedInventoryByScans_result()
    result.success = self._handler.getHistoricSerializedInventoryByScans(args.date)
    oprot.writeMessageBegin("getHistoricSerializedInventoryByScans", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_getHistoricNonSerializedInventoryByScans(self, seqid, iprot, oprot):
    args = getHistoricNonSerializedInventoryByScans_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = getHistoricNonSerializedInventoryByScans_result()
    result.success = self._handler.getHistoricNonSerializedInventoryByScans(args.date)
    oprot.writeMessageBegin("getHistoricNonSerializedInventoryByScans", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_scanForOursExternalSale(self, seqid, iprot, oprot):
    args = scanForOursExternalSale_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = scanForOursExternalSale_result()
    try:
      result.success = self._handler.scanForOursExternalSale(args.itemId, args.serialNumber, args.itemNumber, args.invoiceNumber, args.warehouseId, args.unitPrice, args.orderId)
    except WarehouseServiceException, ex:
      result.ex = ex
    oprot.writeMessageBegin("scanForOursExternalSale", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_scanForOursExternalSaleReturn(self, seqid, iprot, oprot):
    args = scanForOursExternalSaleReturn_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = scanForOursExternalSaleReturn_result()
    self._handler.scanForOursExternalSaleReturn(args.orderId, args.unitPrice)
    oprot.writeMessageBegin("scanForOursExternalSaleReturn", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_getMovementNonSerializedInventoryByScans(self, seqid, iprot, oprot):
    args = getMovementNonSerializedInventoryByScans_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = getMovementNonSerializedInventoryByScans_result()
    result.success = self._handler.getMovementNonSerializedInventoryByScans(args.startDate, args.endDate)
    oprot.writeMessageBegin("getMovementNonSerializedInventoryByScans", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_getMovementSerializedInventoryByScans(self, seqid, iprot, oprot):
    args = getMovementSerializedInventoryByScans_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = getMovementSerializedInventoryByScans_result()
    result.success = self._handler.getMovementSerializedInventoryByScans(args.startDate, args.endDate)
    oprot.writeMessageBegin("getMovementSerializedInventoryByScans", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()


# HELPER FUNCTIONS AND STRUCTURES

class getInventoryItem_args:
  """
  Attributes:
   - serialNumber
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRING, 'serialNumber', None, None, ), # 1
  )

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

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_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.serialNumber = 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('getInventoryItem_args')
    if self.serialNumber is not None:
      oprot.writeFieldBegin('serialNumber', TType.STRING, 1)
      oprot.writeString(self.serialNumber)
      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 getInventoryItem_result:
  """
  Attributes:
   - success
   - wex
  """

  thrift_spec = (
    (0, TType.STRUCT, 'success', (InventoryItem, InventoryItem.thrift_spec), None, ), # 0
    (1, TType.STRUCT, 'wex', (WarehouseServiceException, WarehouseServiceException.thrift_spec), None, ), # 1
  )

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

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_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 = InventoryItem()
          self.success.read(iprot)
        else:
          iprot.skip(ftype)
      elif fid == 1:
        if ftype == TType.STRUCT:
          self.wex = WarehouseServiceException()
          self.wex.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('getInventoryItem_result')
    if self.success is not None:
      oprot.writeFieldBegin('success', TType.STRUCT, 0)
      self.success.write(oprot)
      oprot.writeFieldEnd()
    if self.wex is not None:
      oprot.writeFieldBegin('wex', TType.STRUCT, 1)
      self.wex.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 getNonSeralizedInventoryItem_args:
  """
  Attributes:
   - itemNumber
   - itemId
   - fulfilmentWarehouseId
  """

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

  def __init__(self, itemNumber=None, itemId=None, fulfilmentWarehouseId=None,):
    self.itemNumber = itemNumber
    self.itemId = itemId
    self.fulfilmentWarehouseId = fulfilmentWarehouseId

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_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.itemNumber = iprot.readString();
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.I64:
          self.itemId = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.I64:
          self.fulfilmentWarehouseId = 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('getNonSeralizedInventoryItem_args')
    if self.itemNumber is not None:
      oprot.writeFieldBegin('itemNumber', TType.STRING, 1)
      oprot.writeString(self.itemNumber)
      oprot.writeFieldEnd()
    if self.itemId is not None:
      oprot.writeFieldBegin('itemId', TType.I64, 2)
      oprot.writeI64(self.itemId)
      oprot.writeFieldEnd()
    if self.fulfilmentWarehouseId is not None:
      oprot.writeFieldBegin('fulfilmentWarehouseId', TType.I64, 3)
      oprot.writeI64(self.fulfilmentWarehouseId)
      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 getNonSeralizedInventoryItem_result:
  """
  Attributes:
   - success
   - wex
  """

  thrift_spec = (
    (0, TType.STRUCT, 'success', (InventoryItem, InventoryItem.thrift_spec), None, ), # 0
    (1, TType.STRUCT, 'wex', (WarehouseServiceException, WarehouseServiceException.thrift_spec), None, ), # 1
  )

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

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_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 = InventoryItem()
          self.success.read(iprot)
        else:
          iprot.skip(ftype)
      elif fid == 1:
        if ftype == TType.STRUCT:
          self.wex = WarehouseServiceException()
          self.wex.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('getNonSeralizedInventoryItem_result')
    if self.success is not None:
      oprot.writeFieldBegin('success', TType.STRUCT, 0)
      self.success.write(oprot)
      oprot.writeFieldEnd()
    if self.wex is not None:
      oprot.writeFieldBegin('wex', TType.STRUCT, 1)
      self.wex.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 scan_args:
  """
  Attributes:
   - inventoryItem
   - type
   - quantity
   - billingWarehouseId
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRUCT, 'inventoryItem', (InventoryItem, InventoryItem.thrift_spec), None, ), # 1
    (2, TType.I32, 'type', None, None, ), # 2
    (3, TType.I64, 'quantity', None, None, ), # 3
    (4, TType.I64, 'billingWarehouseId', None, None, ), # 4
  )

  def __init__(self, inventoryItem=None, type=None, quantity=None, billingWarehouseId=None,):
    self.inventoryItem = inventoryItem
    self.type = type
    self.quantity = quantity
    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.STRUCT:
          self.inventoryItem = InventoryItem()
          self.inventoryItem.read(iprot)
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.I32:
          self.type = iprot.readI32();
        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.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('scan_args')
    if self.inventoryItem is not None:
      oprot.writeFieldBegin('inventoryItem', TType.STRUCT, 1)
      self.inventoryItem.write(oprot)
      oprot.writeFieldEnd()
    if self.type is not None:
      oprot.writeFieldBegin('type', TType.I32, 2)
      oprot.writeI32(self.type)
      oprot.writeFieldEnd()
    if self.quantity is not None:
      oprot.writeFieldBegin('quantity', TType.I64, 3)
      oprot.writeI64(self.quantity)
      oprot.writeFieldEnd()
    if self.billingWarehouseId is not None:
      oprot.writeFieldBegin('billingWarehouseId', TType.I64, 4)
      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 scan_result:
  """
  Attributes:
   - wex
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRUCT, 'wex', (WarehouseServiceException, WarehouseServiceException.thrift_spec), None, ), # 1
  )

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

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_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.wex = WarehouseServiceException()
          self.wex.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('scan_result')
    if self.wex is not None:
      oprot.writeFieldBegin('wex', TType.STRUCT, 1)
      self.wex.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 scanSerializedItemForOrder_args:
  """
  Attributes:
   - serialNumber
   - type
   - orderId
   - fulfilmentWarehouseId
   - quantity
   - billingWarehouseId
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRING, 'serialNumber', None, None, ), # 1
    (2, TType.I32, 'type', None, None, ), # 2
    (3, TType.I64, 'orderId', None, None, ), # 3
    (4, TType.I64, 'fulfilmentWarehouseId', None, None, ), # 4
    (5, TType.DOUBLE, 'quantity', None, None, ), # 5
    (6, TType.I64, 'billingWarehouseId', None, None, ), # 6
  )

  def __init__(self, serialNumber=None, type=None, orderId=None, fulfilmentWarehouseId=None, quantity=None, billingWarehouseId=None,):
    self.serialNumber = serialNumber
    self.type = type
    self.orderId = orderId
    self.fulfilmentWarehouseId = fulfilmentWarehouseId
    self.quantity = quantity
    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.STRING:
          self.serialNumber = iprot.readString();
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.I32:
          self.type = iprot.readI32();
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.I64:
          self.orderId = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.I64:
          self.fulfilmentWarehouseId = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 5:
        if ftype == TType.DOUBLE:
          self.quantity = iprot.readDouble();
        else:
          iprot.skip(ftype)
      elif fid == 6:
        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('scanSerializedItemForOrder_args')
    if self.serialNumber is not None:
      oprot.writeFieldBegin('serialNumber', TType.STRING, 1)
      oprot.writeString(self.serialNumber)
      oprot.writeFieldEnd()
    if self.type is not None:
      oprot.writeFieldBegin('type', TType.I32, 2)
      oprot.writeI32(self.type)
      oprot.writeFieldEnd()
    if self.orderId is not None:
      oprot.writeFieldBegin('orderId', TType.I64, 3)
      oprot.writeI64(self.orderId)
      oprot.writeFieldEnd()
    if self.fulfilmentWarehouseId is not None:
      oprot.writeFieldBegin('fulfilmentWarehouseId', TType.I64, 4)
      oprot.writeI64(self.fulfilmentWarehouseId)
      oprot.writeFieldEnd()
    if self.quantity is not None:
      oprot.writeFieldBegin('quantity', TType.DOUBLE, 5)
      oprot.writeDouble(self.quantity)
      oprot.writeFieldEnd()
    if self.billingWarehouseId is not None:
      oprot.writeFieldBegin('billingWarehouseId', TType.I64, 6)
      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 scanSerializedItemForOrder_result:
  """
  Attributes:
   - success
   - wex
  """

  thrift_spec = (
    (0, TType.STRUCT, 'success', (InventoryItem, InventoryItem.thrift_spec), None, ), # 0
    (1, TType.STRUCT, 'wex', (WarehouseServiceException, WarehouseServiceException.thrift_spec), None, ), # 1
  )

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

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_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 = InventoryItem()
          self.success.read(iprot)
        else:
          iprot.skip(ftype)
      elif fid == 1:
        if ftype == TType.STRUCT:
          self.wex = WarehouseServiceException()
          self.wex.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('scanSerializedItemForOrder_result')
    if self.success is not None:
      oprot.writeFieldBegin('success', TType.STRUCT, 0)
      self.success.write(oprot)
      oprot.writeFieldEnd()
    if self.wex is not None:
      oprot.writeFieldBegin('wex', TType.STRUCT, 1)
      self.wex.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 scanForOrder_args:
  """
  Attributes:
   - inventoryItem
   - type
   - quantity
   - orderId
   - fulfilmentWarehouseId
   - billingWarehouseId
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRUCT, 'inventoryItem', (InventoryItem, InventoryItem.thrift_spec), None, ), # 1
    (2, TType.I32, 'type', None, None, ), # 2
    (3, TType.I64, 'quantity', None, None, ), # 3
    (4, TType.I64, 'orderId', None, None, ), # 4
    (5, TType.I64, 'fulfilmentWarehouseId', None, None, ), # 5
    (6, TType.I64, 'billingWarehouseId', None, None, ), # 6
  )

  def __init__(self, inventoryItem=None, type=None, quantity=None, orderId=None, fulfilmentWarehouseId=None, billingWarehouseId=None,):
    self.inventoryItem = inventoryItem
    self.type = type
    self.quantity = quantity
    self.orderId = orderId
    self.fulfilmentWarehouseId = fulfilmentWarehouseId
    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.STRUCT:
          self.inventoryItem = InventoryItem()
          self.inventoryItem.read(iprot)
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.I32:
          self.type = iprot.readI32();
        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.orderId = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 5:
        if ftype == TType.I64:
          self.fulfilmentWarehouseId = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 6:
        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('scanForOrder_args')
    if self.inventoryItem is not None:
      oprot.writeFieldBegin('inventoryItem', TType.STRUCT, 1)
      self.inventoryItem.write(oprot)
      oprot.writeFieldEnd()
    if self.type is not None:
      oprot.writeFieldBegin('type', TType.I32, 2)
      oprot.writeI32(self.type)
      oprot.writeFieldEnd()
    if self.quantity is not None:
      oprot.writeFieldBegin('quantity', TType.I64, 3)
      oprot.writeI64(self.quantity)
      oprot.writeFieldEnd()
    if self.orderId is not None:
      oprot.writeFieldBegin('orderId', TType.I64, 4)
      oprot.writeI64(self.orderId)
      oprot.writeFieldEnd()
    if self.fulfilmentWarehouseId is not None:
      oprot.writeFieldBegin('fulfilmentWarehouseId', TType.I64, 5)
      oprot.writeI64(self.fulfilmentWarehouseId)
      oprot.writeFieldEnd()
    if self.billingWarehouseId is not None:
      oprot.writeFieldBegin('billingWarehouseId', TType.I64, 6)
      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 scanForOrder_result:
  """
  Attributes:
   - success
   - wex
  """

  thrift_spec = (
    (0, TType.STRUCT, 'success', (InventoryItem, InventoryItem.thrift_spec), None, ), # 0
    (1, TType.STRUCT, 'wex', (WarehouseServiceException, WarehouseServiceException.thrift_spec), None, ), # 1
  )

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

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_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 = InventoryItem()
          self.success.read(iprot)
        else:
          iprot.skip(ftype)
      elif fid == 1:
        if ftype == TType.STRUCT:
          self.wex = WarehouseServiceException()
          self.wex.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('scanForOrder_result')
    if self.success is not None:
      oprot.writeFieldBegin('success', TType.STRUCT, 0)
      self.success.write(oprot)
      oprot.writeFieldEnd()
    if self.wex is not None:
      oprot.writeFieldBegin('wex', TType.STRUCT, 1)
      self.wex.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 createItemNumberMapping_args:
  """
  Attributes:
   - itemNumber
   - itemId
  """

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

  def __init__(self, itemNumber=None, itemId=None,):
    self.itemNumber = itemNumber
    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.STRING:
          self.itemNumber = iprot.readString();
        else:
          iprot.skip(ftype)
      elif fid == 2:
        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('createItemNumberMapping_args')
    if self.itemNumber is not None:
      oprot.writeFieldBegin('itemNumber', TType.STRING, 1)
      oprot.writeString(self.itemNumber)
      oprot.writeFieldEnd()
    if self.itemId is not None:
      oprot.writeFieldBegin('itemId', TType.I64, 2)
      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 createItemNumberMapping_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('createItemNumberMapping_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 getItemNumbers_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('getItemNumbers_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 getItemNumbers_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 = []
          (_etype3, _size0) = iprot.readListBegin()
          for _i4 in xrange(_size0):
            _elem5 = iprot.readString();
            self.success.append(_elem5)
          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('getItemNumbers_result')
    if self.success is not None:
      oprot.writeFieldBegin('success', TType.LIST, 0)
      oprot.writeListBegin(TType.STRING, len(self.success))
      for iter6 in self.success:
        oprot.writeString(iter6)
      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 getItemIds_args:
  """
  Attributes:
   - itemNumber
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRING, 'itemNumber', None, None, ), # 1
  )

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

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_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.itemNumber = 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('getItemIds_args')
    if self.itemNumber is not None:
      oprot.writeFieldBegin('itemNumber', TType.STRING, 1)
      oprot.writeString(self.itemNumber)
      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 getItemIds_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 = []
          (_etype10, _size7) = iprot.readListBegin()
          for _i11 in xrange(_size7):
            _elem12 = iprot.readI64();
            self.success.append(_elem12)
          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('getItemIds_result')
    if self.success is not None:
      oprot.writeFieldBegin('success', TType.LIST, 0)
      oprot.writeListBegin(TType.I64, len(self.success))
      for iter13 in self.success:
        oprot.writeI64(iter13)
      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 getInventoryItemsFromLastScanType_args:
  """
  Attributes:
   - lastScanType
  """

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

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

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_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.lastScanType = 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('getInventoryItemsFromLastScanType_args')
    if self.lastScanType is not None:
      oprot.writeFieldBegin('lastScanType', TType.I32, 1)
      oprot.writeI32(self.lastScanType)
      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 getInventoryItemsFromLastScanType_result:
  """
  Attributes:
   - success
   - wex
  """

  thrift_spec = (
    (0, TType.LIST, 'success', (TType.STRUCT,(InventoryItem, InventoryItem.thrift_spec)), None, ), # 0
    (1, TType.STRUCT, 'wex', (WarehouseServiceException, WarehouseServiceException.thrift_spec), None, ), # 1
  )

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

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_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 = []
          (_etype17, _size14) = iprot.readListBegin()
          for _i18 in xrange(_size14):
            _elem19 = InventoryItem()
            _elem19.read(iprot)
            self.success.append(_elem19)
          iprot.readListEnd()
        else:
          iprot.skip(ftype)
      elif fid == 1:
        if ftype == TType.STRUCT:
          self.wex = WarehouseServiceException()
          self.wex.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('getInventoryItemsFromLastScanType_result')
    if self.success is not None:
      oprot.writeFieldBegin('success', TType.LIST, 0)
      oprot.writeListBegin(TType.STRUCT, len(self.success))
      for iter20 in self.success:
        iter20.write(oprot)
      oprot.writeListEnd()
      oprot.writeFieldEnd()
    if self.wex is not None:
      oprot.writeFieldBegin('wex', TType.STRUCT, 1)
      self.wex.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 getInventoryItemFromId_args:
  """
  Attributes:
   - inventoryItemId
  """

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

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

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_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.inventoryItemId = 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('getInventoryItemFromId_args')
    if self.inventoryItemId is not None:
      oprot.writeFieldBegin('inventoryItemId', TType.I64, 1)
      oprot.writeI64(self.inventoryItemId)
      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 getInventoryItemFromId_result:
  """
  Attributes:
   - success
   - wex
  """

  thrift_spec = (
    (0, TType.STRUCT, 'success', (InventoryItem, InventoryItem.thrift_spec), None, ), # 0
    (1, TType.STRUCT, 'wex', (WarehouseServiceException, WarehouseServiceException.thrift_spec), None, ), # 1
  )

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

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_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 = InventoryItem()
          self.success.read(iprot)
        else:
          iprot.skip(ftype)
      elif fid == 1:
        if ftype == TType.STRUCT:
          self.wex = WarehouseServiceException()
          self.wex.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('getInventoryItemFromId_result')
    if self.success is not None:
      oprot.writeFieldBegin('success', TType.STRUCT, 0)
      self.success.write(oprot)
      oprot.writeFieldEnd()
    if self.wex is not None:
      oprot.writeFieldBegin('wex', TType.STRUCT, 1)
      self.wex.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 getPurchaseScans_args:
  """
  Attributes:
   - startDate
   - endDate
  """

  thrift_spec = (
    None, # 0
    (1, TType.I64, 'startDate', None, None, ), # 1
    (2, TType.I64, 'endDate', None, None, ), # 2
  )

  def __init__(self, startDate=None, endDate=None,):
    self.startDate = startDate
    self.endDate = endDate

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_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.startDate = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.I64:
          self.endDate = 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('getPurchaseScans_args')
    if self.startDate is not None:
      oprot.writeFieldBegin('startDate', TType.I64, 1)
      oprot.writeI64(self.startDate)
      oprot.writeFieldEnd()
    if self.endDate is not None:
      oprot.writeFieldBegin('endDate', TType.I64, 2)
      oprot.writeI64(self.endDate)
      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 getPurchaseScans_result:
  """
  Attributes:
   - success
  """

  thrift_spec = (
    (0, TType.LIST, 'success', (TType.STRUCT,(DetailedPurchaseScan, DetailedPurchaseScan.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 = []
          (_etype24, _size21) = iprot.readListBegin()
          for _i25 in xrange(_size21):
            _elem26 = DetailedPurchaseScan()
            _elem26.read(iprot)
            self.success.append(_elem26)
          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('getPurchaseScans_result')
    if self.success is not None:
      oprot.writeFieldBegin('success', TType.LIST, 0)
      oprot.writeListBegin(TType.STRUCT, len(self.success))
      for iter27 in self.success:
        iter27.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 fetchScansPerInvoiceNumber_args:
  """
  Attributes:
   - date
  """

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

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

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 1:
        if ftype == TType.I64:
          self.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('fetchScansPerInvoiceNumber_args')
    if self.date is not None:
      oprot.writeFieldBegin('date', TType.I64, 1)
      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 fetchScansPerInvoiceNumber_result:
  """
  Attributes:
   - success
  """

  thrift_spec = (
    (0, TType.LIST, 'success', (TType.STRUCT,(InvoiceScan, InvoiceScan.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 = []
          (_etype31, _size28) = iprot.readListBegin()
          for _i32 in xrange(_size28):
            _elem33 = InvoiceScan()
            _elem33.read(iprot)
            self.success.append(_elem33)
          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('fetchScansPerInvoiceNumber_result')
    if self.success is not None:
      oprot.writeFieldBegin('success', TType.LIST, 0)
      oprot.writeListBegin(TType.STRUCT, len(self.success))
      for iter34 in self.success:
        iter34.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 getInventoryItemFromOrder_args:
  """
  Attributes:
   - orderId
  """

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

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

  thrift_spec = (
    (0, TType.STRUCT, 'success', (InventoryItem, InventoryItem.thrift_spec), None, ), # 0
    (1, TType.STRUCT, 'we', (WarehouseServiceException, WarehouseServiceException.thrift_spec), None, ), # 1
  )

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

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_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 = InventoryItem()
          self.success.read(iprot)
        else:
          iprot.skip(ftype)
      elif fid == 1:
        if ftype == TType.STRUCT:
          self.we = WarehouseServiceException()
          self.we.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('getInventoryItemFromOrder_result')
    if self.success is not None:
      oprot.writeFieldBegin('success', TType.STRUCT, 0)
      self.success.write(oprot)
      oprot.writeFieldEnd()
    if self.we is not None:
      oprot.writeFieldBegin('we', TType.STRUCT, 1)
      self.we.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 getInventoryAge_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('getInventoryAge_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 getInventoryAge_result:
  """
  Attributes:
   - success
  """

  thrift_spec = (
    (0, TType.LIST, 'success', (TType.STRUCT,(InventoryAge, InventoryAge.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 = []
          (_etype38, _size35) = iprot.readListBegin()
          for _i39 in xrange(_size35):
            _elem40 = InventoryAge()
            _elem40.read(iprot)
            self.success.append(_elem40)
          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('getInventoryAge_result')
    if self.success is not None:
      oprot.writeFieldBegin('success', TType.LIST, 0)
      oprot.writeListBegin(TType.STRUCT, len(self.success))
      for iter41 in self.success:
        iter41.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 getInventoryScansForItem_args:
  """
  Attributes:
   - itemId
   - fromDate
   - toDate
  """

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

  def __init__(self, itemId=None, fromDate=None, toDate=None,):
    self.itemId = itemId
    self.fromDate = fromDate
    self.toDate = toDate

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_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.fromDate = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.I64:
          self.toDate = 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('getInventoryScansForItem_args')
    if self.itemId is not None:
      oprot.writeFieldBegin('itemId', TType.I64, 1)
      oprot.writeI64(self.itemId)
      oprot.writeFieldEnd()
    if self.fromDate is not None:
      oprot.writeFieldBegin('fromDate', TType.I64, 2)
      oprot.writeI64(self.fromDate)
      oprot.writeFieldEnd()
    if self.toDate is not None:
      oprot.writeFieldBegin('toDate', TType.I64, 3)
      oprot.writeI64(self.toDate)
      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 getInventoryScansForItem_result:
  """
  Attributes:
   - success
  """

  thrift_spec = (
    (0, TType.LIST, 'success', (TType.STRUCT,(Scan, Scan.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 = []
          (_etype45, _size42) = iprot.readListBegin()
          for _i46 in xrange(_size42):
            _elem47 = Scan()
            _elem47.read(iprot)
            self.success.append(_elem47)
          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('getInventoryScansForItem_result')
    if self.success is not None:
      oprot.writeFieldBegin('success', TType.LIST, 0)
      oprot.writeListBegin(TType.STRUCT, len(self.success))
      for iter48 in self.success:
        iter48.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 getScanRecordsForSerialNumber_args:
  """
  Attributes:
   - serialNumber
  """

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

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

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_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.serialNumber = 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('getScanRecordsForSerialNumber_args')
    if self.serialNumber is not None:
      oprot.writeFieldBegin('serialNumber', TType.I64, 1)
      oprot.writeI64(self.serialNumber)
      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 getScanRecordsForSerialNumber_result:
  """
  Attributes:
   - success
  """

  thrift_spec = (
    (0, TType.LIST, 'success', (TType.STRUCT,(Scan, Scan.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 = []
          (_etype52, _size49) = iprot.readListBegin()
          for _i53 in xrange(_size49):
            _elem54 = Scan()
            _elem54.read(iprot)
            self.success.append(_elem54)
          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('getScanRecordsForSerialNumber_result')
    if self.success is not None:
      oprot.writeFieldBegin('success', TType.LIST, 0)
      oprot.writeListBegin(TType.STRUCT, len(self.success))
      for iter55 in self.success:
        iter55.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 scanForPurchaseReturn_args:
  """
  Attributes:
   - saleReturnItems
   - vendorId
  """

  thrift_spec = (
    None, # 0
    (1, TType.LIST, 'saleReturnItems', (TType.STRUCT,(InventoryItem, InventoryItem.thrift_spec)), None, ), # 1
    (2, TType.I64, 'vendorId', None, None, ), # 2
  )

  def __init__(self, saleReturnItems=None, vendorId=None,):
    self.saleReturnItems = saleReturnItems
    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.LIST:
          self.saleReturnItems = []
          (_etype59, _size56) = iprot.readListBegin()
          for _i60 in xrange(_size56):
            _elem61 = InventoryItem()
            _elem61.read(iprot)
            self.saleReturnItems.append(_elem61)
          iprot.readListEnd()
        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('scanForPurchaseReturn_args')
    if self.saleReturnItems is not None:
      oprot.writeFieldBegin('saleReturnItems', TType.LIST, 1)
      oprot.writeListBegin(TType.STRUCT, len(self.saleReturnItems))
      for iter62 in self.saleReturnItems:
        iter62.write(oprot)
      oprot.writeListEnd()
      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 scanForPurchaseReturn_result:
  """
  Attributes:
   - ex
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRUCT, 'ex', (WarehouseServiceException, WarehouseServiceException.thrift_spec), None, ), # 1
  )

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

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_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.ex = WarehouseServiceException()
          self.ex.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('scanForPurchaseReturn_result')
    if self.ex is not None:
      oprot.writeFieldBegin('ex', TType.STRUCT, 1)
      self.ex.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 scanForLostItem_args:
  """
  Attributes:
   - lostItems
   - vendorId
  """

  thrift_spec = (
    None, # 0
    (1, TType.LIST, 'lostItems', (TType.STRUCT,(InventoryItem, InventoryItem.thrift_spec)), None, ), # 1
    (2, TType.I64, 'vendorId', None, None, ), # 2
  )

  def __init__(self, lostItems=None, vendorId=None,):
    self.lostItems = lostItems
    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.LIST:
          self.lostItems = []
          (_etype66, _size63) = iprot.readListBegin()
          for _i67 in xrange(_size63):
            _elem68 = InventoryItem()
            _elem68.read(iprot)
            self.lostItems.append(_elem68)
          iprot.readListEnd()
        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('scanForLostItem_args')
    if self.lostItems is not None:
      oprot.writeFieldBegin('lostItems', TType.LIST, 1)
      oprot.writeListBegin(TType.STRUCT, len(self.lostItems))
      for iter69 in self.lostItems:
        iter69.write(oprot)
      oprot.writeListEnd()
      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 scanForLostItem_result:
  """
  Attributes:
   - ex
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRUCT, 'ex', (WarehouseServiceException, WarehouseServiceException.thrift_spec), None, ), # 1
  )

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

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_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.ex = WarehouseServiceException()
          self.ex.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('scanForLostItem_result')
    if self.ex is not None:
      oprot.writeFieldBegin('ex', TType.STRUCT, 1)
      self.ex.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 getCurrentSerializedInventoryByScans_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('getCurrentSerializedInventoryByScans_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 getCurrentSerializedInventoryByScans_result:
  """
  Attributes:
   - success
  """

  thrift_spec = (
    (0, TType.LIST, 'success', (TType.STRUCT,(InventoryAvailability, InventoryAvailability.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 = []
          (_etype73, _size70) = iprot.readListBegin()
          for _i74 in xrange(_size70):
            _elem75 = InventoryAvailability()
            _elem75.read(iprot)
            self.success.append(_elem75)
          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('getCurrentSerializedInventoryByScans_result')
    if self.success is not None:
      oprot.writeFieldBegin('success', TType.LIST, 0)
      oprot.writeListBegin(TType.STRUCT, len(self.success))
      for iter76 in self.success:
        iter76.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 getCurrentNonSerializedInventoryByScans_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('getCurrentNonSerializedInventoryByScans_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 getCurrentNonSerializedInventoryByScans_result:
  """
  Attributes:
   - success
  """

  thrift_spec = (
    (0, TType.LIST, 'success', (TType.STRUCT,(InventoryAvailability, InventoryAvailability.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 = []
          (_etype80, _size77) = iprot.readListBegin()
          for _i81 in xrange(_size77):
            _elem82 = InventoryAvailability()
            _elem82.read(iprot)
            self.success.append(_elem82)
          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('getCurrentNonSerializedInventoryByScans_result')
    if self.success is not None:
      oprot.writeFieldBegin('success', TType.LIST, 0)
      oprot.writeListBegin(TType.STRUCT, len(self.success))
      for iter83 in self.success:
        iter83.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 getHistoricSerializedInventoryByScans_args:
  """
  Attributes:
   - date
  """

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

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

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 1:
        if ftype == TType.I64:
          self.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('getHistoricSerializedInventoryByScans_args')
    if self.date is not None:
      oprot.writeFieldBegin('date', TType.I64, 1)
      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 getHistoricSerializedInventoryByScans_result:
  """
  Attributes:
   - success
  """

  thrift_spec = (
    (0, TType.LIST, 'success', (TType.STRUCT,(InventoryAvailability, InventoryAvailability.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 = []
          (_etype87, _size84) = iprot.readListBegin()
          for _i88 in xrange(_size84):
            _elem89 = InventoryAvailability()
            _elem89.read(iprot)
            self.success.append(_elem89)
          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('getHistoricSerializedInventoryByScans_result')
    if self.success is not None:
      oprot.writeFieldBegin('success', TType.LIST, 0)
      oprot.writeListBegin(TType.STRUCT, len(self.success))
      for iter90 in self.success:
        iter90.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 getHistoricNonSerializedInventoryByScans_args:
  """
  Attributes:
   - date
  """

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

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

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 1:
        if ftype == TType.I64:
          self.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('getHistoricNonSerializedInventoryByScans_args')
    if self.date is not None:
      oprot.writeFieldBegin('date', TType.I64, 1)
      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 getHistoricNonSerializedInventoryByScans_result:
  """
  Attributes:
   - success
  """

  thrift_spec = (
    (0, TType.LIST, 'success', (TType.STRUCT,(InventoryAvailability, InventoryAvailability.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 = []
          (_etype94, _size91) = iprot.readListBegin()
          for _i95 in xrange(_size91):
            _elem96 = InventoryAvailability()
            _elem96.read(iprot)
            self.success.append(_elem96)
          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('getHistoricNonSerializedInventoryByScans_result')
    if self.success is not None:
      oprot.writeFieldBegin('success', TType.LIST, 0)
      oprot.writeListBegin(TType.STRUCT, len(self.success))
      for iter97 in self.success:
        iter97.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 scanForOursExternalSale_args:
  """
  Attributes:
   - itemId
   - serialNumber
   - itemNumber
   - invoiceNumber
   - warehouseId
   - unitPrice
   - orderId
  """

  thrift_spec = (
    None, # 0
    (1, TType.I64, 'itemId', None, None, ), # 1
    (2, TType.STRING, 'serialNumber', None, None, ), # 2
    (3, TType.STRING, 'itemNumber', None, None, ), # 3
    (4, TType.STRING, 'invoiceNumber', None, None, ), # 4
    (5, TType.I64, 'warehouseId', None, None, ), # 5
    (6, TType.DOUBLE, 'unitPrice', None, None, ), # 6
    (7, TType.I64, 'orderId', None, None, ), # 7
  )

  def __init__(self, itemId=None, serialNumber=None, itemNumber=None, invoiceNumber=None, warehouseId=None, unitPrice=None, orderId=None,):
    self.itemId = itemId
    self.serialNumber = serialNumber
    self.itemNumber = itemNumber
    self.invoiceNumber = invoiceNumber
    self.warehouseId = warehouseId
    self.unitPrice = unitPrice
    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.STRING:
          self.serialNumber = iprot.readString();
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.STRING:
          self.itemNumber = iprot.readString();
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.STRING:
          self.invoiceNumber = iprot.readString();
        else:
          iprot.skip(ftype)
      elif fid == 5:
        if ftype == TType.I64:
          self.warehouseId = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 6:
        if ftype == TType.DOUBLE:
          self.unitPrice = iprot.readDouble();
        else:
          iprot.skip(ftype)
      elif fid == 7:
        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('scanForOursExternalSale_args')
    if self.itemId is not None:
      oprot.writeFieldBegin('itemId', TType.I64, 1)
      oprot.writeI64(self.itemId)
      oprot.writeFieldEnd()
    if self.serialNumber is not None:
      oprot.writeFieldBegin('serialNumber', TType.STRING, 2)
      oprot.writeString(self.serialNumber)
      oprot.writeFieldEnd()
    if self.itemNumber is not None:
      oprot.writeFieldBegin('itemNumber', TType.STRING, 3)
      oprot.writeString(self.itemNumber)
      oprot.writeFieldEnd()
    if self.invoiceNumber is not None:
      oprot.writeFieldBegin('invoiceNumber', TType.STRING, 4)
      oprot.writeString(self.invoiceNumber)
      oprot.writeFieldEnd()
    if self.warehouseId is not None:
      oprot.writeFieldBegin('warehouseId', TType.I64, 5)
      oprot.writeI64(self.warehouseId)
      oprot.writeFieldEnd()
    if self.unitPrice is not None:
      oprot.writeFieldBegin('unitPrice', TType.DOUBLE, 6)
      oprot.writeDouble(self.unitPrice)
      oprot.writeFieldEnd()
    if self.orderId is not None:
      oprot.writeFieldBegin('orderId', TType.I64, 7)
      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 scanForOursExternalSale_result:
  """
  Attributes:
   - success
   - ex
  """

  thrift_spec = (
    (0, TType.STRUCT, 'success', (InventoryItem, InventoryItem.thrift_spec), None, ), # 0
    (1, TType.STRUCT, 'ex', (WarehouseServiceException, WarehouseServiceException.thrift_spec), None, ), # 1
  )

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

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_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 = InventoryItem()
          self.success.read(iprot)
        else:
          iprot.skip(ftype)
      elif fid == 1:
        if ftype == TType.STRUCT:
          self.ex = WarehouseServiceException()
          self.ex.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('scanForOursExternalSale_result')
    if self.success is not None:
      oprot.writeFieldBegin('success', TType.STRUCT, 0)
      self.success.write(oprot)
      oprot.writeFieldEnd()
    if self.ex is not None:
      oprot.writeFieldBegin('ex', TType.STRUCT, 1)
      self.ex.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 scanForOursExternalSaleReturn_args:
  """
  Attributes:
   - orderId
   - unitPrice
  """

  thrift_spec = (
    None, # 0
    (1, TType.I64, 'orderId', None, None, ), # 1
    (2, TType.DOUBLE, 'unitPrice', None, None, ), # 2
  )

  def __init__(self, orderId=None, unitPrice=None,):
    self.orderId = orderId
    self.unitPrice = unitPrice

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_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.orderId = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.DOUBLE:
          self.unitPrice = 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('scanForOursExternalSaleReturn_args')
    if self.orderId is not None:
      oprot.writeFieldBegin('orderId', TType.I64, 1)
      oprot.writeI64(self.orderId)
      oprot.writeFieldEnd()
    if self.unitPrice is not None:
      oprot.writeFieldBegin('unitPrice', TType.DOUBLE, 2)
      oprot.writeDouble(self.unitPrice)
      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 scanForOursExternalSaleReturn_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('scanForOursExternalSaleReturn_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 getMovementNonSerializedInventoryByScans_args:
  """
  Attributes:
   - startDate
   - endDate
  """

  thrift_spec = (
    None, # 0
    (1, TType.I64, 'startDate', None, None, ), # 1
    (2, TType.I64, 'endDate', None, None, ), # 2
  )

  def __init__(self, startDate=None, endDate=None,):
    self.startDate = startDate
    self.endDate = endDate

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_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.startDate = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.I64:
          self.endDate = 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('getMovementNonSerializedInventoryByScans_args')
    if self.startDate is not None:
      oprot.writeFieldBegin('startDate', TType.I64, 1)
      oprot.writeI64(self.startDate)
      oprot.writeFieldEnd()
    if self.endDate is not None:
      oprot.writeFieldBegin('endDate', TType.I64, 2)
      oprot.writeI64(self.endDate)
      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 getMovementNonSerializedInventoryByScans_result:
  """
  Attributes:
   - success
  """

  thrift_spec = (
    (0, TType.LIST, 'success', (TType.STRUCT,(InventoryMovement, InventoryMovement.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 = []
          (_etype101, _size98) = iprot.readListBegin()
          for _i102 in xrange(_size98):
            _elem103 = InventoryMovement()
            _elem103.read(iprot)
            self.success.append(_elem103)
          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('getMovementNonSerializedInventoryByScans_result')
    if self.success is not None:
      oprot.writeFieldBegin('success', TType.LIST, 0)
      oprot.writeListBegin(TType.STRUCT, len(self.success))
      for iter104 in self.success:
        iter104.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 getMovementSerializedInventoryByScans_args:
  """
  Attributes:
   - startDate
   - endDate
  """

  thrift_spec = (
    None, # 0
    (1, TType.I64, 'startDate', None, None, ), # 1
    (2, TType.I64, 'endDate', None, None, ), # 2
  )

  def __init__(self, startDate=None, endDate=None,):
    self.startDate = startDate
    self.endDate = endDate

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_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.startDate = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.I64:
          self.endDate = 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('getMovementSerializedInventoryByScans_args')
    if self.startDate is not None:
      oprot.writeFieldBegin('startDate', TType.I64, 1)
      oprot.writeI64(self.startDate)
      oprot.writeFieldEnd()
    if self.endDate is not None:
      oprot.writeFieldBegin('endDate', TType.I64, 2)
      oprot.writeI64(self.endDate)
      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 getMovementSerializedInventoryByScans_result:
  """
  Attributes:
   - success
  """

  thrift_spec = (
    (0, TType.LIST, 'success', (TType.STRUCT,(InventoryMovement, InventoryMovement.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 = []
          (_etype108, _size105) = iprot.readListBegin()
          for _i109 in xrange(_size105):
            _elem110 = InventoryMovement()
            _elem110.read(iprot)
            self.success.append(_elem110)
          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('getMovementSerializedInventoryByScans_result')
    if self.success is not None:
      oprot.writeFieldBegin('success', TType.LIST, 0)
      oprot.writeListBegin(TType.STRUCT, len(self.success))
      for iter111 in self.success:
        iter111.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)