Subversion Repositories SmartDukaan

Rev

Rev 6039 | Rev 6531 | 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 addItem(self, item):
    """
    Availability and inventory attributes

    Parameters:
     - item
    """
    pass

  def updateItem(self, item):
    """
    Parameters:
     - item
    """
    pass

  def isActive(self, itemId):
    """
    Checks if the item given to the corresponding itemId is active. If it's active,
    whether it's risky and if it's risky, its inventory position.

    Parameters:
     - itemId
    """
    pass

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

  def startItemOn(self, item_id, timestamp):
    """
    Parameters:
     - item_id
     - timestamp
    """
    pass

  def retireItemOn(self, item_id, timestamp):
    """
    Parameters:
     - item_id
     - timestamp
    """
    pass

  def changeItemStatus(self, item_id, timestamp, newstatus):
    """
    Parameters:
     - item_id
     - timestamp
     - newstatus
    """
    pass

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

  def getItemsByCatalogId(self, catalog_item_id):
    """
    Parameters:
     - catalog_item_id
    """
    pass

  def getValidItemsByCatalogId(self, catalog_item_id):
    """
    Parameters:
     - catalog_item_id
    """
    pass

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

  def getAllItemsByStatus(self, itemStatus):
    """
    Parameters:
     - itemStatus
    """
    pass

  def markItemAsContentComplete(self, entityId, category, brand, modelName, modelNumber):
    """
    Parameters:
     - entityId
     - category
     - brand
     - modelName
     - modelNumber
    """
    pass

  def getAllItemsInRange(self, offset, limit):
    """
    Gets at most 'limit' items starting at the given offset. Returns an empty list if there are no more items at the given offset.

    Parameters:
     - offset
     - limit
    """
    pass

  def getAllItemsByStatusInRange(self, itemStatus, offset, limit):
    """
    Gets at most 'limit' items starting at the given offset in the given status. Returns an empty list if there are no more items at the given offset.

    Parameters:
     - itemStatus
     - offset
     - limit
    """
    pass

  def getItemCountByStatus(self, useStatus, itemStatus):
    """
    Gets a count of all items by status

    Parameters:
     - useStatus
     - itemStatus
    """
    pass

  def getBestSellers(self, ):
    pass

  def getBestSellersCatalogIds(self, beginIndex, totalItems, brand, category):
    """
    Parameters:
     - beginIndex
     - totalItems
     - brand
     - category
    """
    pass

  def getBestSellersCount(self, ):
    pass

  def getBestDeals(self, ):
    pass

  def getBestDealsCatalogIds(self, beginIndex, totalItems, brand, category):
    """
    Parameters:
     - beginIndex
     - totalItems
     - brand
     - category
    """
    pass

  def getBestDealsCount(self, ):
    pass

  def getComingSoon(self, ):
    pass

  def getComingSoonCatalogIds(self, beginIndex, totalItems, brand, category):
    """
    Parameters:
     - beginIndex
     - totalItems
     - brand
     - category
    """
    pass

  def getComingSoonCount(self, ):
    pass

  def getLatestArrivals(self, ):
    """
    Returns a list of items sorted in the descending order by start date.
    The list is limited to the 'latest_arrivals_count' configuraiton parameter.
    """
    pass

  def getLatestArrivalsCatalogIds(self, beginIndex, totalItems, brand, categories):
    """
    Returns the list of catalog ids of latest arrivals in the given categories of the given brand.
    To ignore the categories, pass the list as empty. To ignore brand, pass it as null.

    Parameters:
     - beginIndex
     - totalItems
     - brand
     - categories
    """
    pass

  def getLatestArrivalsCount(self, ):
    """
    Get the total number of latest arrivals we are willing to show.
    The count's upper bound is the 'latest_arrivals_count' configuraiton parameter.
    """
    pass

  def generateNewEntityID(self, ):
    pass

  def addCategory(self, category):
    """
    All category related functions

    Parameters:
     - category
    """
    pass

  def getCategory(self, id):
    """
    Parameters:
     - id
    """
    pass

  def getAllCategories(self, ):
    pass

  def getAllSimilarItems(self, itemId):
    """
    Returns the list of similar items.

    Parameters:
     - itemId
    """
    pass

  def addSimilarItem(self, itemId, catalogItemId):
    """
    Adds similar item.

    Parameters:
     - itemId
     - catalogItemId
    """
    pass

  def addTag(self, displayName, itemId):
    """
    Tag Related

    Parameters:
     - displayName
     - itemId
    """
    pass

  def deleteEntityTag(self, displayName, itemId):
    """
    Parameters:
     - displayName
     - itemId
    """
    pass

  def deleteTag(self, displayName):
    """
    Parameters:
     - displayName
    """
    pass

  def getAllTags(self, ):
    pass

  def getAllEntitiesByTagName(self, displayName):
    """
    Parameters:
     - displayName
    """
    pass

  def deleteSimilarItem(self, itemId, catalogItemId):
    """
    Delete similar item.

    Parameters:
     - itemId
     - catalogItemId
    """
    pass

  def checkSimilarItem(self, brand, modelNumber, modelName, color):
    """
    Checks if similar item exists (with same Brand, ModelNumber, ModelName, Color)
    If yes, returns the itemId else returns 0

    Parameters:
     - brand
     - modelNumber
     - modelName
     - color
    """
    pass

  def validateRiskyStatus(self, itemId):
    """
    Check wether item is risky and change status if inventory is not available for risky items

    Parameters:
     - itemId
    """
    pass

  def changeItemRiskyFlag(self, itemId, risky):
    """
    Marks/Unmarks an item as risky. This flag is used for automatic marking of an item as INACTIVE in case of zero inventory.

    Parameters:
     - itemId
     - risky
    """
    pass

  def getItemsByRiskyFlag(self, ):
    """
    Returns list of items marked as risky.
    """
    pass

  def getItemsForMasterSheet(self, category, brand):
    """
    Returns list of items with any status except PHASED_OUT and filtered by category, brand.

    Parameters:
     - category
     - brand
    """
    pass

  def getSimilarItemsCatalogIds(self, beginIndex, totalItems, itemId):
    """
    Returns list of catalog ids of items with same similarity index as of the given itemId

    Parameters:
     - beginIndex
     - totalItems
     - itemId
    """
    pass

  def addProductNotification(self, itemId, email):
    """
    Add user requests for out of stock items. Once user will ask for notify me an entry will

    Parameters:
     - itemId
     - email
    """
    pass

  def sendProductNotifications(self, ):
    """
    Send the product notifications to the users for items which has stock.
    """
    pass

  def getAllBrandsByCategory(self, categoryId):
    """
    Returns list of brand names for a given category Id

    Parameters:
     - categoryId
    """
    pass

  def getAllBrands(self, ):
    """
    Returns list of brand names
    """
    pass

  def getAllSources(self, ):
    """
    Return list of all sources
    """
    pass

  def getItemPricingBySource(self, itemId, sourceId):
    """
    Returns the pricing information of an item. If no information is found, exception will be thrown.

    Parameters:
     - itemId
     - sourceId
    """
    pass

  def addSourceItemPricing(self, sourceItemPricing):
    """
    Adds prices to be displayed corresponding to the item if user comes from a source.
    If item is not found or source is not found, it will throw exception.

    Parameters:
     - sourceItemPricing
    """
    pass

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

    Parameters:
     - itemId
    """
    pass

  def getItemForSource(self, item_id, sourceId):
    """
    Get the item for a given itemId and sourceId. MRP and sellingPrice will be updated for source if we have different prices for source.

    Parameters:
     - item_id
     - sourceId
    """
    pass

  def searchItemsInRange(self, searchTerms, offset, limit):
    """
    Searches items matching the the given terms in the catalog and returns results within the specified range.

    Parameters:
     - searchTerms
     - offset
     - limit
    """
    pass

  def getSearchResultCount(self, searchTerms):
    """
    Gets the count of search results for the given search terms so that the user can go through all the pages.

    Parameters:
     - searchTerms
    """
    pass

  def getProductNotifications(self, startDateTime):
    """
    Returns a list of product notifications added after a supplied datetime

    Parameters:
     - startDateTime
    """
    pass

  def getProductNotificationRequestCount(self, startDateTime):
    """
    Returns a list of count of requests for product notification against each item

    Parameters:
     - startDateTime
    """
    pass

  def addAuthorizationLog(self, itemId, username, reason):
    """
    This method adds a log to authorize table with Item Id, username who authorized the change, reason.

    Parameters:
     - itemId
     - username
     - reason
    """
    pass

  def getClearanceSaleCatalogIds(self, ):
    pass

  def addupdateVoucherForItem(self, catalog_item_id, voucherType, voucherAmount):
    """
    Parameters:
     - catalog_item_id
     - voucherType
     - voucherAmount
    """
    pass

  def deleteVoucherForItem(self, catalog_item_id, voucherType):
    """
    Parameters:
     - catalog_item_id
     - voucherType
    """
    pass

  def getVoucherAmount(self, itemId, voucherType):
    """
    Parameters:
     - itemId
     - voucherType
    """
    pass

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

  def isValidCatalogItemId(self, catalog_item_id):
    """
    Parameters:
     - catalog_item_id
    """
    pass

  def getVatPercentageForItem(self, itemId, price):
    """
    Parameters:
     - itemId
     - price
    """
    pass

  def getVatAmountForItem(self, itemId, price):
    """
    Parameters:
     - itemId
     - price
    """
    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 addItem(self, item):
    """
    Availability and inventory attributes

    Parameters:
     - item
    """
    self.send_addItem(item)
    return self.recv_addItem()

  def send_addItem(self, item):
    self._oprot.writeMessageBegin('addItem', TMessageType.CALL, self._seqid)
    args = addItem_args()
    args.item = item
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

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

  def updateItem(self, item):
    """
    Parameters:
     - item
    """
    self.send_updateItem(item)
    return self.recv_updateItem()

  def send_updateItem(self, item):
    self._oprot.writeMessageBegin('updateItem', TMessageType.CALL, self._seqid)
    args = updateItem_args()
    args.item = item
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

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

  def isActive(self, itemId):
    """
    Checks if the item given to the corresponding itemId is active. If it's active,
    whether it's risky and if it's risky, its inventory position.

    Parameters:
     - itemId
    """
    self.send_isActive(itemId)
    return self.recv_isActive()

  def send_isActive(self, itemId):
    self._oprot.writeMessageBegin('isActive', TMessageType.CALL, self._seqid)
    args = isActive_args()
    args.itemId = itemId
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

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

  def getItemStatusDescription(self, itemId):
    """
    Parameters:
     - itemId
    """
    self.send_getItemStatusDescription(itemId)
    return self.recv_getItemStatusDescription()

  def send_getItemStatusDescription(self, itemId):
    self._oprot.writeMessageBegin('getItemStatusDescription', TMessageType.CALL, self._seqid)
    args = getItemStatusDescription_args()
    args.itemId = itemId
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

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

  def startItemOn(self, item_id, timestamp):
    """
    Parameters:
     - item_id
     - timestamp
    """
    self.send_startItemOn(item_id, timestamp)
    self.recv_startItemOn()

  def send_startItemOn(self, item_id, timestamp):
    self._oprot.writeMessageBegin('startItemOn', TMessageType.CALL, self._seqid)
    args = startItemOn_args()
    args.item_id = item_id
    args.timestamp = timestamp
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

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

  def retireItemOn(self, item_id, timestamp):
    """
    Parameters:
     - item_id
     - timestamp
    """
    self.send_retireItemOn(item_id, timestamp)
    self.recv_retireItemOn()

  def send_retireItemOn(self, item_id, timestamp):
    self._oprot.writeMessageBegin('retireItemOn', TMessageType.CALL, self._seqid)
    args = retireItemOn_args()
    args.item_id = item_id
    args.timestamp = timestamp
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

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

  def changeItemStatus(self, item_id, timestamp, newstatus):
    """
    Parameters:
     - item_id
     - timestamp
     - newstatus
    """
    self.send_changeItemStatus(item_id, timestamp, newstatus)
    self.recv_changeItemStatus()

  def send_changeItemStatus(self, item_id, timestamp, newstatus):
    self._oprot.writeMessageBegin('changeItemStatus', TMessageType.CALL, self._seqid)
    args = changeItemStatus_args()
    args.item_id = item_id
    args.timestamp = timestamp
    args.newstatus = newstatus
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

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

  def getItem(self, item_id):
    """
    Parameters:
     - item_id
    """
    self.send_getItem(item_id)
    return self.recv_getItem()

  def send_getItem(self, item_id):
    self._oprot.writeMessageBegin('getItem', TMessageType.CALL, self._seqid)
    args = getItem_args()
    args.item_id = item_id
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

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

  def getItemsByCatalogId(self, catalog_item_id):
    """
    Parameters:
     - catalog_item_id
    """
    self.send_getItemsByCatalogId(catalog_item_id)
    return self.recv_getItemsByCatalogId()

  def send_getItemsByCatalogId(self, catalog_item_id):
    self._oprot.writeMessageBegin('getItemsByCatalogId', TMessageType.CALL, self._seqid)
    args = getItemsByCatalogId_args()
    args.catalog_item_id = catalog_item_id
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

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

  def getValidItemsByCatalogId(self, catalog_item_id):
    """
    Parameters:
     - catalog_item_id
    """
    self.send_getValidItemsByCatalogId(catalog_item_id)
    return self.recv_getValidItemsByCatalogId()

  def send_getValidItemsByCatalogId(self, catalog_item_id):
    self._oprot.writeMessageBegin('getValidItemsByCatalogId', TMessageType.CALL, self._seqid)
    args = getValidItemsByCatalogId_args()
    args.catalog_item_id = catalog_item_id
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

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

  def getAllItems(self, isActive):
    """
    Parameters:
     - isActive
    """
    self.send_getAllItems(isActive)
    return self.recv_getAllItems()

  def send_getAllItems(self, isActive):
    self._oprot.writeMessageBegin('getAllItems', TMessageType.CALL, self._seqid)
    args = getAllItems_args()
    args.isActive = isActive
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

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

  def getAllItemsByStatus(self, itemStatus):
    """
    Parameters:
     - itemStatus
    """
    self.send_getAllItemsByStatus(itemStatus)
    return self.recv_getAllItemsByStatus()

  def send_getAllItemsByStatus(self, itemStatus):
    self._oprot.writeMessageBegin('getAllItemsByStatus', TMessageType.CALL, self._seqid)
    args = getAllItemsByStatus_args()
    args.itemStatus = itemStatus
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

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

  def markItemAsContentComplete(self, entityId, category, brand, modelName, modelNumber):
    """
    Parameters:
     - entityId
     - category
     - brand
     - modelName
     - modelNumber
    """
    self.send_markItemAsContentComplete(entityId, category, brand, modelName, modelNumber)
    return self.recv_markItemAsContentComplete()

  def send_markItemAsContentComplete(self, entityId, category, brand, modelName, modelNumber):
    self._oprot.writeMessageBegin('markItemAsContentComplete', TMessageType.CALL, self._seqid)
    args = markItemAsContentComplete_args()
    args.entityId = entityId
    args.category = category
    args.brand = brand
    args.modelName = modelName
    args.modelNumber = modelNumber
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

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

  def getAllItemsInRange(self, offset, limit):
    """
    Gets at most 'limit' items starting at the given offset. Returns an empty list if there are no more items at the given offset.

    Parameters:
     - offset
     - limit
    """
    self.send_getAllItemsInRange(offset, limit)
    return self.recv_getAllItemsInRange()

  def send_getAllItemsInRange(self, offset, limit):
    self._oprot.writeMessageBegin('getAllItemsInRange', TMessageType.CALL, self._seqid)
    args = getAllItemsInRange_args()
    args.offset = offset
    args.limit = limit
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

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

  def getAllItemsByStatusInRange(self, itemStatus, offset, limit):
    """
    Gets at most 'limit' items starting at the given offset in the given status. Returns an empty list if there are no more items at the given offset.

    Parameters:
     - itemStatus
     - offset
     - limit
    """
    self.send_getAllItemsByStatusInRange(itemStatus, offset, limit)
    return self.recv_getAllItemsByStatusInRange()

  def send_getAllItemsByStatusInRange(self, itemStatus, offset, limit):
    self._oprot.writeMessageBegin('getAllItemsByStatusInRange', TMessageType.CALL, self._seqid)
    args = getAllItemsByStatusInRange_args()
    args.itemStatus = itemStatus
    args.offset = offset
    args.limit = limit
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

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

  def getItemCountByStatus(self, useStatus, itemStatus):
    """
    Gets a count of all items by status

    Parameters:
     - useStatus
     - itemStatus
    """
    self.send_getItemCountByStatus(useStatus, itemStatus)
    return self.recv_getItemCountByStatus()

  def send_getItemCountByStatus(self, useStatus, itemStatus):
    self._oprot.writeMessageBegin('getItemCountByStatus', TMessageType.CALL, self._seqid)
    args = getItemCountByStatus_args()
    args.useStatus = useStatus
    args.itemStatus = itemStatus
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

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

  def getBestSellers(self, ):
    self.send_getBestSellers()
    return self.recv_getBestSellers()

  def send_getBestSellers(self, ):
    self._oprot.writeMessageBegin('getBestSellers', TMessageType.CALL, self._seqid)
    args = getBestSellers_args()
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

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

  def getBestSellersCatalogIds(self, beginIndex, totalItems, brand, category):
    """
    Parameters:
     - beginIndex
     - totalItems
     - brand
     - category
    """
    self.send_getBestSellersCatalogIds(beginIndex, totalItems, brand, category)
    return self.recv_getBestSellersCatalogIds()

  def send_getBestSellersCatalogIds(self, beginIndex, totalItems, brand, category):
    self._oprot.writeMessageBegin('getBestSellersCatalogIds', TMessageType.CALL, self._seqid)
    args = getBestSellersCatalogIds_args()
    args.beginIndex = beginIndex
    args.totalItems = totalItems
    args.brand = brand
    args.category = category
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

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

  def getBestSellersCount(self, ):
    self.send_getBestSellersCount()
    return self.recv_getBestSellersCount()

  def send_getBestSellersCount(self, ):
    self._oprot.writeMessageBegin('getBestSellersCount', TMessageType.CALL, self._seqid)
    args = getBestSellersCount_args()
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

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

  def getBestDeals(self, ):
    self.send_getBestDeals()
    return self.recv_getBestDeals()

  def send_getBestDeals(self, ):
    self._oprot.writeMessageBegin('getBestDeals', TMessageType.CALL, self._seqid)
    args = getBestDeals_args()
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

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

  def getBestDealsCatalogIds(self, beginIndex, totalItems, brand, category):
    """
    Parameters:
     - beginIndex
     - totalItems
     - brand
     - category
    """
    self.send_getBestDealsCatalogIds(beginIndex, totalItems, brand, category)
    return self.recv_getBestDealsCatalogIds()

  def send_getBestDealsCatalogIds(self, beginIndex, totalItems, brand, category):
    self._oprot.writeMessageBegin('getBestDealsCatalogIds', TMessageType.CALL, self._seqid)
    args = getBestDealsCatalogIds_args()
    args.beginIndex = beginIndex
    args.totalItems = totalItems
    args.brand = brand
    args.category = category
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

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

  def getBestDealsCount(self, ):
    self.send_getBestDealsCount()
    return self.recv_getBestDealsCount()

  def send_getBestDealsCount(self, ):
    self._oprot.writeMessageBegin('getBestDealsCount', TMessageType.CALL, self._seqid)
    args = getBestDealsCount_args()
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

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

  def getComingSoon(self, ):
    self.send_getComingSoon()
    return self.recv_getComingSoon()

  def send_getComingSoon(self, ):
    self._oprot.writeMessageBegin('getComingSoon', TMessageType.CALL, self._seqid)
    args = getComingSoon_args()
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

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

  def getComingSoonCatalogIds(self, beginIndex, totalItems, brand, category):
    """
    Parameters:
     - beginIndex
     - totalItems
     - brand
     - category
    """
    self.send_getComingSoonCatalogIds(beginIndex, totalItems, brand, category)
    return self.recv_getComingSoonCatalogIds()

  def send_getComingSoonCatalogIds(self, beginIndex, totalItems, brand, category):
    self._oprot.writeMessageBegin('getComingSoonCatalogIds', TMessageType.CALL, self._seqid)
    args = getComingSoonCatalogIds_args()
    args.beginIndex = beginIndex
    args.totalItems = totalItems
    args.brand = brand
    args.category = category
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

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

  def getComingSoonCount(self, ):
    self.send_getComingSoonCount()
    return self.recv_getComingSoonCount()

  def send_getComingSoonCount(self, ):
    self._oprot.writeMessageBegin('getComingSoonCount', TMessageType.CALL, self._seqid)
    args = getComingSoonCount_args()
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

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

  def getLatestArrivals(self, ):
    """
    Returns a list of items sorted in the descending order by start date.
    The list is limited to the 'latest_arrivals_count' configuraiton parameter.
    """
    self.send_getLatestArrivals()
    return self.recv_getLatestArrivals()

  def send_getLatestArrivals(self, ):
    self._oprot.writeMessageBegin('getLatestArrivals', TMessageType.CALL, self._seqid)
    args = getLatestArrivals_args()
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

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

  def getLatestArrivalsCatalogIds(self, beginIndex, totalItems, brand, categories):
    """
    Returns the list of catalog ids of latest arrivals in the given categories of the given brand.
    To ignore the categories, pass the list as empty. To ignore brand, pass it as null.

    Parameters:
     - beginIndex
     - totalItems
     - brand
     - categories
    """
    self.send_getLatestArrivalsCatalogIds(beginIndex, totalItems, brand, categories)
    return self.recv_getLatestArrivalsCatalogIds()

  def send_getLatestArrivalsCatalogIds(self, beginIndex, totalItems, brand, categories):
    self._oprot.writeMessageBegin('getLatestArrivalsCatalogIds', TMessageType.CALL, self._seqid)
    args = getLatestArrivalsCatalogIds_args()
    args.beginIndex = beginIndex
    args.totalItems = totalItems
    args.brand = brand
    args.categories = categories
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

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

  def getLatestArrivalsCount(self, ):
    """
    Get the total number of latest arrivals we are willing to show.
    The count's upper bound is the 'latest_arrivals_count' configuraiton parameter.
    """
    self.send_getLatestArrivalsCount()
    return self.recv_getLatestArrivalsCount()

  def send_getLatestArrivalsCount(self, ):
    self._oprot.writeMessageBegin('getLatestArrivalsCount', TMessageType.CALL, self._seqid)
    args = getLatestArrivalsCount_args()
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

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

  def generateNewEntityID(self, ):
    self.send_generateNewEntityID()
    return self.recv_generateNewEntityID()

  def send_generateNewEntityID(self, ):
    self._oprot.writeMessageBegin('generateNewEntityID', TMessageType.CALL, self._seqid)
    args = generateNewEntityID_args()
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

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

  def addCategory(self, category):
    """
    All category related functions

    Parameters:
     - category
    """
    self.send_addCategory(category)
    return self.recv_addCategory()

  def send_addCategory(self, category):
    self._oprot.writeMessageBegin('addCategory', TMessageType.CALL, self._seqid)
    args = addCategory_args()
    args.category = category
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

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

  def getCategory(self, id):
    """
    Parameters:
     - id
    """
    self.send_getCategory(id)
    return self.recv_getCategory()

  def send_getCategory(self, id):
    self._oprot.writeMessageBegin('getCategory', TMessageType.CALL, self._seqid)
    args = getCategory_args()
    args.id = id
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

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

  def getAllCategories(self, ):
    self.send_getAllCategories()
    return self.recv_getAllCategories()

  def send_getAllCategories(self, ):
    self._oprot.writeMessageBegin('getAllCategories', TMessageType.CALL, self._seqid)
    args = getAllCategories_args()
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

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

  def getAllSimilarItems(self, itemId):
    """
    Returns the list of similar items.

    Parameters:
     - itemId
    """
    self.send_getAllSimilarItems(itemId)
    return self.recv_getAllSimilarItems()

  def send_getAllSimilarItems(self, itemId):
    self._oprot.writeMessageBegin('getAllSimilarItems', TMessageType.CALL, self._seqid)
    args = getAllSimilarItems_args()
    args.itemId = itemId
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

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

  def addSimilarItem(self, itemId, catalogItemId):
    """
    Adds similar item.

    Parameters:
     - itemId
     - catalogItemId
    """
    self.send_addSimilarItem(itemId, catalogItemId)
    return self.recv_addSimilarItem()

  def send_addSimilarItem(self, itemId, catalogItemId):
    self._oprot.writeMessageBegin('addSimilarItem', TMessageType.CALL, self._seqid)
    args = addSimilarItem_args()
    args.itemId = itemId
    args.catalogItemId = catalogItemId
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

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

  def addTag(self, displayName, itemId):
    """
    Tag Related

    Parameters:
     - displayName
     - itemId
    """
    self.send_addTag(displayName, itemId)
    return self.recv_addTag()

  def send_addTag(self, displayName, itemId):
    self._oprot.writeMessageBegin('addTag', TMessageType.CALL, self._seqid)
    args = addTag_args()
    args.displayName = displayName
    args.itemId = itemId
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

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

  def deleteEntityTag(self, displayName, itemId):
    """
    Parameters:
     - displayName
     - itemId
    """
    self.send_deleteEntityTag(displayName, itemId)
    return self.recv_deleteEntityTag()

  def send_deleteEntityTag(self, displayName, itemId):
    self._oprot.writeMessageBegin('deleteEntityTag', TMessageType.CALL, self._seqid)
    args = deleteEntityTag_args()
    args.displayName = displayName
    args.itemId = itemId
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

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

  def deleteTag(self, displayName):
    """
    Parameters:
     - displayName
    """
    self.send_deleteTag(displayName)
    return self.recv_deleteTag()

  def send_deleteTag(self, displayName):
    self._oprot.writeMessageBegin('deleteTag', TMessageType.CALL, self._seqid)
    args = deleteTag_args()
    args.displayName = displayName
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

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

  def getAllTags(self, ):
    self.send_getAllTags()
    return self.recv_getAllTags()

  def send_getAllTags(self, ):
    self._oprot.writeMessageBegin('getAllTags', TMessageType.CALL, self._seqid)
    args = getAllTags_args()
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

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

  def getAllEntitiesByTagName(self, displayName):
    """
    Parameters:
     - displayName
    """
    self.send_getAllEntitiesByTagName(displayName)
    return self.recv_getAllEntitiesByTagName()

  def send_getAllEntitiesByTagName(self, displayName):
    self._oprot.writeMessageBegin('getAllEntitiesByTagName', TMessageType.CALL, self._seqid)
    args = getAllEntitiesByTagName_args()
    args.displayName = displayName
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

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

  def deleteSimilarItem(self, itemId, catalogItemId):
    """
    Delete similar item.

    Parameters:
     - itemId
     - catalogItemId
    """
    self.send_deleteSimilarItem(itemId, catalogItemId)
    return self.recv_deleteSimilarItem()

  def send_deleteSimilarItem(self, itemId, catalogItemId):
    self._oprot.writeMessageBegin('deleteSimilarItem', TMessageType.CALL, self._seqid)
    args = deleteSimilarItem_args()
    args.itemId = itemId
    args.catalogItemId = catalogItemId
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

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

  def checkSimilarItem(self, brand, modelNumber, modelName, color):
    """
    Checks if similar item exists (with same Brand, ModelNumber, ModelName, Color)
    If yes, returns the itemId else returns 0

    Parameters:
     - brand
     - modelNumber
     - modelName
     - color
    """
    self.send_checkSimilarItem(brand, modelNumber, modelName, color)
    return self.recv_checkSimilarItem()

  def send_checkSimilarItem(self, brand, modelNumber, modelName, color):
    self._oprot.writeMessageBegin('checkSimilarItem', TMessageType.CALL, self._seqid)
    args = checkSimilarItem_args()
    args.brand = brand
    args.modelNumber = modelNumber
    args.modelName = modelName
    args.color = color
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

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

  def validateRiskyStatus(self, itemId):
    """
    Check wether item is risky and change status if inventory is not available for risky items

    Parameters:
     - itemId
    """
    self.send_validateRiskyStatus(itemId)
    self.recv_validateRiskyStatus()

  def send_validateRiskyStatus(self, itemId):
    self._oprot.writeMessageBegin('validateRiskyStatus', TMessageType.CALL, self._seqid)
    args = validateRiskyStatus_args()
    args.itemId = itemId
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

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

  def changeItemRiskyFlag(self, itemId, risky):
    """
    Marks/Unmarks an item as risky. This flag is used for automatic marking of an item as INACTIVE in case of zero inventory.

    Parameters:
     - itemId
     - risky
    """
    self.send_changeItemRiskyFlag(itemId, risky)
    self.recv_changeItemRiskyFlag()

  def send_changeItemRiskyFlag(self, itemId, risky):
    self._oprot.writeMessageBegin('changeItemRiskyFlag', TMessageType.CALL, self._seqid)
    args = changeItemRiskyFlag_args()
    args.itemId = itemId
    args.risky = risky
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

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

  def getItemsByRiskyFlag(self, ):
    """
    Returns list of items marked as risky.
    """
    self.send_getItemsByRiskyFlag()
    return self.recv_getItemsByRiskyFlag()

  def send_getItemsByRiskyFlag(self, ):
    self._oprot.writeMessageBegin('getItemsByRiskyFlag', TMessageType.CALL, self._seqid)
    args = getItemsByRiskyFlag_args()
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

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

  def getItemsForMasterSheet(self, category, brand):
    """
    Returns list of items with any status except PHASED_OUT and filtered by category, brand.

    Parameters:
     - category
     - brand
    """
    self.send_getItemsForMasterSheet(category, brand)
    return self.recv_getItemsForMasterSheet()

  def send_getItemsForMasterSheet(self, category, brand):
    self._oprot.writeMessageBegin('getItemsForMasterSheet', TMessageType.CALL, self._seqid)
    args = getItemsForMasterSheet_args()
    args.category = category
    args.brand = brand
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

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

  def getSimilarItemsCatalogIds(self, beginIndex, totalItems, itemId):
    """
    Returns list of catalog ids of items with same similarity index as of the given itemId

    Parameters:
     - beginIndex
     - totalItems
     - itemId
    """
    self.send_getSimilarItemsCatalogIds(beginIndex, totalItems, itemId)
    return self.recv_getSimilarItemsCatalogIds()

  def send_getSimilarItemsCatalogIds(self, beginIndex, totalItems, itemId):
    self._oprot.writeMessageBegin('getSimilarItemsCatalogIds', TMessageType.CALL, self._seqid)
    args = getSimilarItemsCatalogIds_args()
    args.beginIndex = beginIndex
    args.totalItems = totalItems
    args.itemId = itemId
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

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

  def addProductNotification(self, itemId, email):
    """
    Add user requests for out of stock items. Once user will ask for notify me an entry will

    Parameters:
     - itemId
     - email
    """
    self.send_addProductNotification(itemId, email)
    return self.recv_addProductNotification()

  def send_addProductNotification(self, itemId, email):
    self._oprot.writeMessageBegin('addProductNotification', TMessageType.CALL, self._seqid)
    args = addProductNotification_args()
    args.itemId = itemId
    args.email = email
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

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

  def sendProductNotifications(self, ):
    """
    Send the product notifications to the users for items which has stock.
    """
    self.send_sendProductNotifications()
    return self.recv_sendProductNotifications()

  def send_sendProductNotifications(self, ):
    self._oprot.writeMessageBegin('sendProductNotifications', TMessageType.CALL, self._seqid)
    args = sendProductNotifications_args()
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

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

  def getAllBrandsByCategory(self, categoryId):
    """
    Returns list of brand names for a given category Id

    Parameters:
     - categoryId
    """
    self.send_getAllBrandsByCategory(categoryId)
    return self.recv_getAllBrandsByCategory()

  def send_getAllBrandsByCategory(self, categoryId):
    self._oprot.writeMessageBegin('getAllBrandsByCategory', TMessageType.CALL, self._seqid)
    args = getAllBrandsByCategory_args()
    args.categoryId = categoryId
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

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

  def getAllBrands(self, ):
    """
    Returns list of brand names
    """
    self.send_getAllBrands()
    return self.recv_getAllBrands()

  def send_getAllBrands(self, ):
    self._oprot.writeMessageBegin('getAllBrands', TMessageType.CALL, self._seqid)
    args = getAllBrands_args()
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

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

  def getAllSources(self, ):
    """
    Return list of all sources
    """
    self.send_getAllSources()
    return self.recv_getAllSources()

  def send_getAllSources(self, ):
    self._oprot.writeMessageBegin('getAllSources', TMessageType.CALL, self._seqid)
    args = getAllSources_args()
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

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

  def getItemPricingBySource(self, itemId, sourceId):
    """
    Returns the pricing information of an item. If no information is found, exception will be thrown.

    Parameters:
     - itemId
     - sourceId
    """
    self.send_getItemPricingBySource(itemId, sourceId)
    return self.recv_getItemPricingBySource()

  def send_getItemPricingBySource(self, itemId, sourceId):
    self._oprot.writeMessageBegin('getItemPricingBySource', TMessageType.CALL, self._seqid)
    args = getItemPricingBySource_args()
    args.itemId = itemId
    args.sourceId = sourceId
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

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

  def addSourceItemPricing(self, sourceItemPricing):
    """
    Adds prices to be displayed corresponding to the item if user comes from a source.
    If item is not found or source is not found, it will throw exception.

    Parameters:
     - sourceItemPricing
    """
    self.send_addSourceItemPricing(sourceItemPricing)
    self.recv_addSourceItemPricing()

  def send_addSourceItemPricing(self, sourceItemPricing):
    self._oprot.writeMessageBegin('addSourceItemPricing', TMessageType.CALL, self._seqid)
    args = addSourceItemPricing_args()
    args.sourceItemPricing = sourceItemPricing
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

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

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

    Parameters:
     - itemId
    """
    self.send_getAllSourcePricing(itemId)
    return self.recv_getAllSourcePricing()

  def send_getAllSourcePricing(self, itemId):
    self._oprot.writeMessageBegin('getAllSourcePricing', TMessageType.CALL, self._seqid)
    args = getAllSourcePricing_args()
    args.itemId = itemId
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

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

  def getItemForSource(self, item_id, sourceId):
    """
    Get the item for a given itemId and sourceId. MRP and sellingPrice will be updated for source if we have different prices for source.

    Parameters:
     - item_id
     - sourceId
    """
    self.send_getItemForSource(item_id, sourceId)
    return self.recv_getItemForSource()

  def send_getItemForSource(self, item_id, sourceId):
    self._oprot.writeMessageBegin('getItemForSource', TMessageType.CALL, self._seqid)
    args = getItemForSource_args()
    args.item_id = item_id
    args.sourceId = sourceId
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

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

  def searchItemsInRange(self, searchTerms, offset, limit):
    """
    Searches items matching the the given terms in the catalog and returns results within the specified range.

    Parameters:
     - searchTerms
     - offset
     - limit
    """
    self.send_searchItemsInRange(searchTerms, offset, limit)
    return self.recv_searchItemsInRange()

  def send_searchItemsInRange(self, searchTerms, offset, limit):
    self._oprot.writeMessageBegin('searchItemsInRange', TMessageType.CALL, self._seqid)
    args = searchItemsInRange_args()
    args.searchTerms = searchTerms
    args.offset = offset
    args.limit = limit
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

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

  def getSearchResultCount(self, searchTerms):
    """
    Gets the count of search results for the given search terms so that the user can go through all the pages.

    Parameters:
     - searchTerms
    """
    self.send_getSearchResultCount(searchTerms)
    return self.recv_getSearchResultCount()

  def send_getSearchResultCount(self, searchTerms):
    self._oprot.writeMessageBegin('getSearchResultCount', TMessageType.CALL, self._seqid)
    args = getSearchResultCount_args()
    args.searchTerms = searchTerms
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

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

  def getProductNotifications(self, startDateTime):
    """
    Returns a list of product notifications added after a supplied datetime

    Parameters:
     - startDateTime
    """
    self.send_getProductNotifications(startDateTime)
    return self.recv_getProductNotifications()

  def send_getProductNotifications(self, startDateTime):
    self._oprot.writeMessageBegin('getProductNotifications', TMessageType.CALL, self._seqid)
    args = getProductNotifications_args()
    args.startDateTime = startDateTime
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

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

  def getProductNotificationRequestCount(self, startDateTime):
    """
    Returns a list of count of requests for product notification against each item

    Parameters:
     - startDateTime
    """
    self.send_getProductNotificationRequestCount(startDateTime)
    return self.recv_getProductNotificationRequestCount()

  def send_getProductNotificationRequestCount(self, startDateTime):
    self._oprot.writeMessageBegin('getProductNotificationRequestCount', TMessageType.CALL, self._seqid)
    args = getProductNotificationRequestCount_args()
    args.startDateTime = startDateTime
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

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

  def addAuthorizationLog(self, itemId, username, reason):
    """
    This method adds a log to authorize table with Item Id, username who authorized the change, reason.

    Parameters:
     - itemId
     - username
     - reason
    """
    self.send_addAuthorizationLog(itemId, username, reason)
    return self.recv_addAuthorizationLog()

  def send_addAuthorizationLog(self, itemId, username, reason):
    self._oprot.writeMessageBegin('addAuthorizationLog', TMessageType.CALL, self._seqid)
    args = addAuthorizationLog_args()
    args.itemId = itemId
    args.username = username
    args.reason = reason
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

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

  def getClearanceSaleCatalogIds(self, ):
    self.send_getClearanceSaleCatalogIds()
    return self.recv_getClearanceSaleCatalogIds()

  def send_getClearanceSaleCatalogIds(self, ):
    self._oprot.writeMessageBegin('getClearanceSaleCatalogIds', TMessageType.CALL, self._seqid)
    args = getClearanceSaleCatalogIds_args()
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

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

  def addupdateVoucherForItem(self, catalog_item_id, voucherType, voucherAmount):
    """
    Parameters:
     - catalog_item_id
     - voucherType
     - voucherAmount
    """
    self.send_addupdateVoucherForItem(catalog_item_id, voucherType, voucherAmount)
    return self.recv_addupdateVoucherForItem()

  def send_addupdateVoucherForItem(self, catalog_item_id, voucherType, voucherAmount):
    self._oprot.writeMessageBegin('addupdateVoucherForItem', TMessageType.CALL, self._seqid)
    args = addupdateVoucherForItem_args()
    args.catalog_item_id = catalog_item_id
    args.voucherType = voucherType
    args.voucherAmount = voucherAmount
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

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

  def deleteVoucherForItem(self, catalog_item_id, voucherType):
    """
    Parameters:
     - catalog_item_id
     - voucherType
    """
    self.send_deleteVoucherForItem(catalog_item_id, voucherType)
    return self.recv_deleteVoucherForItem()

  def send_deleteVoucherForItem(self, catalog_item_id, voucherType):
    self._oprot.writeMessageBegin('deleteVoucherForItem', TMessageType.CALL, self._seqid)
    args = deleteVoucherForItem_args()
    args.catalog_item_id = catalog_item_id
    args.voucherType = voucherType
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

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

  def getVoucherAmount(self, itemId, voucherType):
    """
    Parameters:
     - itemId
     - voucherType
    """
    self.send_getVoucherAmount(itemId, voucherType)
    return self.recv_getVoucherAmount()

  def send_getVoucherAmount(self, itemId, voucherType):
    self._oprot.writeMessageBegin('getVoucherAmount', TMessageType.CALL, self._seqid)
    args = getVoucherAmount_args()
    args.itemId = itemId
    args.voucherType = voucherType
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

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

  def getAllItemVouchers(self, itemId):
    """
    Parameters:
     - itemId
    """
    self.send_getAllItemVouchers(itemId)
    return self.recv_getAllItemVouchers()

  def send_getAllItemVouchers(self, itemId):
    self._oprot.writeMessageBegin('getAllItemVouchers', TMessageType.CALL, self._seqid)
    args = getAllItemVouchers_args()
    args.itemId = itemId
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

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

  def isValidCatalogItemId(self, catalog_item_id):
    """
    Parameters:
     - catalog_item_id
    """
    self.send_isValidCatalogItemId(catalog_item_id)
    return self.recv_isValidCatalogItemId()

  def send_isValidCatalogItemId(self, catalog_item_id):
    self._oprot.writeMessageBegin('isValidCatalogItemId', TMessageType.CALL, self._seqid)
    args = isValidCatalogItemId_args()
    args.catalog_item_id = catalog_item_id
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

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

  def getVatPercentageForItem(self, itemId, price):
    """
    Parameters:
     - itemId
     - price
    """
    self.send_getVatPercentageForItem(itemId, price)
    return self.recv_getVatPercentageForItem()

  def send_getVatPercentageForItem(self, itemId, price):
    self._oprot.writeMessageBegin('getVatPercentageForItem', TMessageType.CALL, self._seqid)
    args = getVatPercentageForItem_args()
    args.itemId = itemId
    args.price = price
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

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

  def getVatAmountForItem(self, itemId, price):
    """
    Parameters:
     - itemId
     - price
    """
    self.send_getVatAmountForItem(itemId, price)
    return self.recv_getVatAmountForItem()

  def send_getVatAmountForItem(self, itemId, price):
    self._oprot.writeMessageBegin('getVatAmountForItem', TMessageType.CALL, self._seqid)
    args = getVatAmountForItem_args()
    args.itemId = itemId
    args.price = price
    args.write(self._oprot)
    self._oprot.writeMessageEnd()
    self._oprot.trans.flush()

  def recv_getVatAmountForItem(self, ):
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
    if mtype == TMessageType.EXCEPTION:
      x = TApplicationException()
      x.read(self._iprot)
      self._iprot.readMessageEnd()
      raise x
    result = getVatAmountForItem_result()
    result.read(self._iprot)
    self._iprot.readMessageEnd()
    if result.success is not None:
      return result.success
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getVatAmountForItem 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["addItem"] = Processor.process_addItem
    self._processMap["updateItem"] = Processor.process_updateItem
    self._processMap["isActive"] = Processor.process_isActive
    self._processMap["getItemStatusDescription"] = Processor.process_getItemStatusDescription
    self._processMap["startItemOn"] = Processor.process_startItemOn
    self._processMap["retireItemOn"] = Processor.process_retireItemOn
    self._processMap["changeItemStatus"] = Processor.process_changeItemStatus
    self._processMap["getItem"] = Processor.process_getItem
    self._processMap["getItemsByCatalogId"] = Processor.process_getItemsByCatalogId
    self._processMap["getValidItemsByCatalogId"] = Processor.process_getValidItemsByCatalogId
    self._processMap["getAllItems"] = Processor.process_getAllItems
    self._processMap["getAllItemsByStatus"] = Processor.process_getAllItemsByStatus
    self._processMap["markItemAsContentComplete"] = Processor.process_markItemAsContentComplete
    self._processMap["getAllItemsInRange"] = Processor.process_getAllItemsInRange
    self._processMap["getAllItemsByStatusInRange"] = Processor.process_getAllItemsByStatusInRange
    self._processMap["getItemCountByStatus"] = Processor.process_getItemCountByStatus
    self._processMap["getBestSellers"] = Processor.process_getBestSellers
    self._processMap["getBestSellersCatalogIds"] = Processor.process_getBestSellersCatalogIds
    self._processMap["getBestSellersCount"] = Processor.process_getBestSellersCount
    self._processMap["getBestDeals"] = Processor.process_getBestDeals
    self._processMap["getBestDealsCatalogIds"] = Processor.process_getBestDealsCatalogIds
    self._processMap["getBestDealsCount"] = Processor.process_getBestDealsCount
    self._processMap["getComingSoon"] = Processor.process_getComingSoon
    self._processMap["getComingSoonCatalogIds"] = Processor.process_getComingSoonCatalogIds
    self._processMap["getComingSoonCount"] = Processor.process_getComingSoonCount
    self._processMap["getLatestArrivals"] = Processor.process_getLatestArrivals
    self._processMap["getLatestArrivalsCatalogIds"] = Processor.process_getLatestArrivalsCatalogIds
    self._processMap["getLatestArrivalsCount"] = Processor.process_getLatestArrivalsCount
    self._processMap["generateNewEntityID"] = Processor.process_generateNewEntityID
    self._processMap["addCategory"] = Processor.process_addCategory
    self._processMap["getCategory"] = Processor.process_getCategory
    self._processMap["getAllCategories"] = Processor.process_getAllCategories
    self._processMap["getAllSimilarItems"] = Processor.process_getAllSimilarItems
    self._processMap["addSimilarItem"] = Processor.process_addSimilarItem
    self._processMap["addTag"] = Processor.process_addTag
    self._processMap["deleteEntityTag"] = Processor.process_deleteEntityTag
    self._processMap["deleteTag"] = Processor.process_deleteTag
    self._processMap["getAllTags"] = Processor.process_getAllTags
    self._processMap["getAllEntitiesByTagName"] = Processor.process_getAllEntitiesByTagName
    self._processMap["deleteSimilarItem"] = Processor.process_deleteSimilarItem
    self._processMap["checkSimilarItem"] = Processor.process_checkSimilarItem
    self._processMap["validateRiskyStatus"] = Processor.process_validateRiskyStatus
    self._processMap["changeItemRiskyFlag"] = Processor.process_changeItemRiskyFlag
    self._processMap["getItemsByRiskyFlag"] = Processor.process_getItemsByRiskyFlag
    self._processMap["getItemsForMasterSheet"] = Processor.process_getItemsForMasterSheet
    self._processMap["getSimilarItemsCatalogIds"] = Processor.process_getSimilarItemsCatalogIds
    self._processMap["addProductNotification"] = Processor.process_addProductNotification
    self._processMap["sendProductNotifications"] = Processor.process_sendProductNotifications
    self._processMap["getAllBrandsByCategory"] = Processor.process_getAllBrandsByCategory
    self._processMap["getAllBrands"] = Processor.process_getAllBrands
    self._processMap["getAllSources"] = Processor.process_getAllSources
    self._processMap["getItemPricingBySource"] = Processor.process_getItemPricingBySource
    self._processMap["addSourceItemPricing"] = Processor.process_addSourceItemPricing
    self._processMap["getAllSourcePricing"] = Processor.process_getAllSourcePricing
    self._processMap["getItemForSource"] = Processor.process_getItemForSource
    self._processMap["searchItemsInRange"] = Processor.process_searchItemsInRange
    self._processMap["getSearchResultCount"] = Processor.process_getSearchResultCount
    self._processMap["getProductNotifications"] = Processor.process_getProductNotifications
    self._processMap["getProductNotificationRequestCount"] = Processor.process_getProductNotificationRequestCount
    self._processMap["addAuthorizationLog"] = Processor.process_addAuthorizationLog
    self._processMap["getClearanceSaleCatalogIds"] = Processor.process_getClearanceSaleCatalogIds
    self._processMap["addupdateVoucherForItem"] = Processor.process_addupdateVoucherForItem
    self._processMap["deleteVoucherForItem"] = Processor.process_deleteVoucherForItem
    self._processMap["getVoucherAmount"] = Processor.process_getVoucherAmount
    self._processMap["getAllItemVouchers"] = Processor.process_getAllItemVouchers
    self._processMap["isValidCatalogItemId"] = Processor.process_isValidCatalogItemId
    self._processMap["getVatPercentageForItem"] = Processor.process_getVatPercentageForItem
    self._processMap["getVatAmountForItem"] = Processor.process_getVatAmountForItem

  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_addItem(self, seqid, iprot, oprot):
    args = addItem_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = addItem_result()
    try:
      result.success = self._handler.addItem(args.item)
    except CatalogServiceException, cex:
      result.cex = cex
    oprot.writeMessageBegin("addItem", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_updateItem(self, seqid, iprot, oprot):
    args = updateItem_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = updateItem_result()
    try:
      result.success = self._handler.updateItem(args.item)
    except CatalogServiceException, cex:
      result.cex = cex
    oprot.writeMessageBegin("updateItem", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_isActive(self, seqid, iprot, oprot):
    args = isActive_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = isActive_result()
    try:
      result.success = self._handler.isActive(args.itemId)
    except CatalogServiceException, isex:
      result.isex = isex
    oprot.writeMessageBegin("isActive", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_getItemStatusDescription(self, seqid, iprot, oprot):
    args = getItemStatusDescription_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = getItemStatusDescription_result()
    try:
      result.success = self._handler.getItemStatusDescription(args.itemId)
    except CatalogServiceException, isex:
      result.isex = isex
    oprot.writeMessageBegin("getItemStatusDescription", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_startItemOn(self, seqid, iprot, oprot):
    args = startItemOn_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = startItemOn_result()
    try:
      self._handler.startItemOn(args.item_id, args.timestamp)
    except CatalogServiceException, cex:
      result.cex = cex
    oprot.writeMessageBegin("startItemOn", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_retireItemOn(self, seqid, iprot, oprot):
    args = retireItemOn_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = retireItemOn_result()
    try:
      self._handler.retireItemOn(args.item_id, args.timestamp)
    except CatalogServiceException, cex:
      result.cex = cex
    oprot.writeMessageBegin("retireItemOn", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_changeItemStatus(self, seqid, iprot, oprot):
    args = changeItemStatus_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = changeItemStatus_result()
    try:
      self._handler.changeItemStatus(args.item_id, args.timestamp, args.newstatus)
    except CatalogServiceException, cex:
      result.cex = cex
    oprot.writeMessageBegin("changeItemStatus", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_getItem(self, seqid, iprot, oprot):
    args = getItem_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = getItem_result()
    try:
      result.success = self._handler.getItem(args.item_id)
    except CatalogServiceException, cex:
      result.cex = cex
    oprot.writeMessageBegin("getItem", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_getItemsByCatalogId(self, seqid, iprot, oprot):
    args = getItemsByCatalogId_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = getItemsByCatalogId_result()
    try:
      result.success = self._handler.getItemsByCatalogId(args.catalog_item_id)
    except CatalogServiceException, cex:
      result.cex = cex
    oprot.writeMessageBegin("getItemsByCatalogId", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_getValidItemsByCatalogId(self, seqid, iprot, oprot):
    args = getValidItemsByCatalogId_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = getValidItemsByCatalogId_result()
    try:
      result.success = self._handler.getValidItemsByCatalogId(args.catalog_item_id)
    except CatalogServiceException, cex:
      result.cex = cex
    oprot.writeMessageBegin("getValidItemsByCatalogId", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_getAllItems(self, seqid, iprot, oprot):
    args = getAllItems_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = getAllItems_result()
    try:
      result.success = self._handler.getAllItems(args.isActive)
    except CatalogServiceException, cex:
      result.cex = cex
    oprot.writeMessageBegin("getAllItems", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_getAllItemsByStatus(self, seqid, iprot, oprot):
    args = getAllItemsByStatus_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = getAllItemsByStatus_result()
    try:
      result.success = self._handler.getAllItemsByStatus(args.itemStatus)
    except CatalogServiceException, cex:
      result.cex = cex
    oprot.writeMessageBegin("getAllItemsByStatus", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_markItemAsContentComplete(self, seqid, iprot, oprot):
    args = markItemAsContentComplete_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = markItemAsContentComplete_result()
    try:
      result.success = self._handler.markItemAsContentComplete(args.entityId, args.category, args.brand, args.modelName, args.modelNumber)
    except CatalogServiceException, cex:
      result.cex = cex
    oprot.writeMessageBegin("markItemAsContentComplete", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_getAllItemsInRange(self, seqid, iprot, oprot):
    args = getAllItemsInRange_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = getAllItemsInRange_result()
    try:
      result.success = self._handler.getAllItemsInRange(args.offset, args.limit)
    except CatalogServiceException, cex:
      result.cex = cex
    oprot.writeMessageBegin("getAllItemsInRange", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_getAllItemsByStatusInRange(self, seqid, iprot, oprot):
    args = getAllItemsByStatusInRange_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = getAllItemsByStatusInRange_result()
    try:
      result.success = self._handler.getAllItemsByStatusInRange(args.itemStatus, args.offset, args.limit)
    except CatalogServiceException, cex:
      result.cex = cex
    oprot.writeMessageBegin("getAllItemsByStatusInRange", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_getItemCountByStatus(self, seqid, iprot, oprot):
    args = getItemCountByStatus_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = getItemCountByStatus_result()
    result.success = self._handler.getItemCountByStatus(args.useStatus, args.itemStatus)
    oprot.writeMessageBegin("getItemCountByStatus", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_getBestSellers(self, seqid, iprot, oprot):
    args = getBestSellers_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = getBestSellers_result()
    try:
      result.success = self._handler.getBestSellers()
    except CatalogServiceException, isex:
      result.isex = isex
    oprot.writeMessageBegin("getBestSellers", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_getBestSellersCatalogIds(self, seqid, iprot, oprot):
    args = getBestSellersCatalogIds_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = getBestSellersCatalogIds_result()
    try:
      result.success = self._handler.getBestSellersCatalogIds(args.beginIndex, args.totalItems, args.brand, args.category)
    except CatalogServiceException, cex:
      result.cex = cex
    oprot.writeMessageBegin("getBestSellersCatalogIds", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_getBestSellersCount(self, seqid, iprot, oprot):
    args = getBestSellersCount_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = getBestSellersCount_result()
    try:
      result.success = self._handler.getBestSellersCount()
    except CatalogServiceException, cex:
      result.cex = cex
    oprot.writeMessageBegin("getBestSellersCount", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_getBestDeals(self, seqid, iprot, oprot):
    args = getBestDeals_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = getBestDeals_result()
    try:
      result.success = self._handler.getBestDeals()
    except CatalogServiceException, isex:
      result.isex = isex
    oprot.writeMessageBegin("getBestDeals", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_getBestDealsCatalogIds(self, seqid, iprot, oprot):
    args = getBestDealsCatalogIds_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = getBestDealsCatalogIds_result()
    try:
      result.success = self._handler.getBestDealsCatalogIds(args.beginIndex, args.totalItems, args.brand, args.category)
    except CatalogServiceException, cex:
      result.cex = cex
    oprot.writeMessageBegin("getBestDealsCatalogIds", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_getBestDealsCount(self, seqid, iprot, oprot):
    args = getBestDealsCount_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = getBestDealsCount_result()
    try:
      result.success = self._handler.getBestDealsCount()
    except CatalogServiceException, cex:
      result.cex = cex
    oprot.writeMessageBegin("getBestDealsCount", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_getComingSoon(self, seqid, iprot, oprot):
    args = getComingSoon_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = getComingSoon_result()
    try:
      result.success = self._handler.getComingSoon()
    except CatalogServiceException, isex:
      result.isex = isex
    oprot.writeMessageBegin("getComingSoon", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_getComingSoonCatalogIds(self, seqid, iprot, oprot):
    args = getComingSoonCatalogIds_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = getComingSoonCatalogIds_result()
    try:
      result.success = self._handler.getComingSoonCatalogIds(args.beginIndex, args.totalItems, args.brand, args.category)
    except CatalogServiceException, cex:
      result.cex = cex
    oprot.writeMessageBegin("getComingSoonCatalogIds", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_getComingSoonCount(self, seqid, iprot, oprot):
    args = getComingSoonCount_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = getComingSoonCount_result()
    try:
      result.success = self._handler.getComingSoonCount()
    except CatalogServiceException, cex:
      result.cex = cex
    oprot.writeMessageBegin("getComingSoonCount", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_getLatestArrivals(self, seqid, iprot, oprot):
    args = getLatestArrivals_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = getLatestArrivals_result()
    try:
      result.success = self._handler.getLatestArrivals()
    except CatalogServiceException, isex:
      result.isex = isex
    oprot.writeMessageBegin("getLatestArrivals", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_getLatestArrivalsCatalogIds(self, seqid, iprot, oprot):
    args = getLatestArrivalsCatalogIds_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = getLatestArrivalsCatalogIds_result()
    try:
      result.success = self._handler.getLatestArrivalsCatalogIds(args.beginIndex, args.totalItems, args.brand, args.categories)
    except CatalogServiceException, cex:
      result.cex = cex
    oprot.writeMessageBegin("getLatestArrivalsCatalogIds", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_getLatestArrivalsCount(self, seqid, iprot, oprot):
    args = getLatestArrivalsCount_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = getLatestArrivalsCount_result()
    try:
      result.success = self._handler.getLatestArrivalsCount()
    except CatalogServiceException, cex:
      result.cex = cex
    oprot.writeMessageBegin("getLatestArrivalsCount", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_generateNewEntityID(self, seqid, iprot, oprot):
    args = generateNewEntityID_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = generateNewEntityID_result()
    result.success = self._handler.generateNewEntityID()
    oprot.writeMessageBegin("generateNewEntityID", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_addCategory(self, seqid, iprot, oprot):
    args = addCategory_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = addCategory_result()
    result.success = self._handler.addCategory(args.category)
    oprot.writeMessageBegin("addCategory", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_getCategory(self, seqid, iprot, oprot):
    args = getCategory_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = getCategory_result()
    result.success = self._handler.getCategory(args.id)
    oprot.writeMessageBegin("getCategory", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_getAllCategories(self, seqid, iprot, oprot):
    args = getAllCategories_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = getAllCategories_result()
    result.success = self._handler.getAllCategories()
    oprot.writeMessageBegin("getAllCategories", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_getAllSimilarItems(self, seqid, iprot, oprot):
    args = getAllSimilarItems_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = getAllSimilarItems_result()
    result.success = self._handler.getAllSimilarItems(args.itemId)
    oprot.writeMessageBegin("getAllSimilarItems", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_addSimilarItem(self, seqid, iprot, oprot):
    args = addSimilarItem_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = addSimilarItem_result()
    try:
      result.success = self._handler.addSimilarItem(args.itemId, args.catalogItemId)
    except CatalogServiceException, cex:
      result.cex = cex
    oprot.writeMessageBegin("addSimilarItem", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_addTag(self, seqid, iprot, oprot):
    args = addTag_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = addTag_result()
    result.success = self._handler.addTag(args.displayName, args.itemId)
    oprot.writeMessageBegin("addTag", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_deleteEntityTag(self, seqid, iprot, oprot):
    args = deleteEntityTag_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = deleteEntityTag_result()
    result.success = self._handler.deleteEntityTag(args.displayName, args.itemId)
    oprot.writeMessageBegin("deleteEntityTag", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_deleteTag(self, seqid, iprot, oprot):
    args = deleteTag_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = deleteTag_result()
    result.success = self._handler.deleteTag(args.displayName)
    oprot.writeMessageBegin("deleteTag", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_getAllTags(self, seqid, iprot, oprot):
    args = getAllTags_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = getAllTags_result()
    result.success = self._handler.getAllTags()
    oprot.writeMessageBegin("getAllTags", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_getAllEntitiesByTagName(self, seqid, iprot, oprot):
    args = getAllEntitiesByTagName_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = getAllEntitiesByTagName_result()
    result.success = self._handler.getAllEntitiesByTagName(args.displayName)
    oprot.writeMessageBegin("getAllEntitiesByTagName", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_deleteSimilarItem(self, seqid, iprot, oprot):
    args = deleteSimilarItem_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = deleteSimilarItem_result()
    try:
      result.success = self._handler.deleteSimilarItem(args.itemId, args.catalogItemId)
    except CatalogServiceException, cex:
      result.cex = cex
    oprot.writeMessageBegin("deleteSimilarItem", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_checkSimilarItem(self, seqid, iprot, oprot):
    args = checkSimilarItem_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = checkSimilarItem_result()
    result.success = self._handler.checkSimilarItem(args.brand, args.modelNumber, args.modelName, args.color)
    oprot.writeMessageBegin("checkSimilarItem", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_validateRiskyStatus(self, seqid, iprot, oprot):
    args = validateRiskyStatus_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = validateRiskyStatus_result()
    self._handler.validateRiskyStatus(args.itemId)
    oprot.writeMessageBegin("validateRiskyStatus", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_changeItemRiskyFlag(self, seqid, iprot, oprot):
    args = changeItemRiskyFlag_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = changeItemRiskyFlag_result()
    self._handler.changeItemRiskyFlag(args.itemId, args.risky)
    oprot.writeMessageBegin("changeItemRiskyFlag", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_getItemsByRiskyFlag(self, seqid, iprot, oprot):
    args = getItemsByRiskyFlag_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = getItemsByRiskyFlag_result()
    result.success = self._handler.getItemsByRiskyFlag()
    oprot.writeMessageBegin("getItemsByRiskyFlag", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_getItemsForMasterSheet(self, seqid, iprot, oprot):
    args = getItemsForMasterSheet_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = getItemsForMasterSheet_result()
    result.success = self._handler.getItemsForMasterSheet(args.category, args.brand)
    oprot.writeMessageBegin("getItemsForMasterSheet", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_getSimilarItemsCatalogIds(self, seqid, iprot, oprot):
    args = getSimilarItemsCatalogIds_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = getSimilarItemsCatalogIds_result()
    result.success = self._handler.getSimilarItemsCatalogIds(args.beginIndex, args.totalItems, args.itemId)
    oprot.writeMessageBegin("getSimilarItemsCatalogIds", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_addProductNotification(self, seqid, iprot, oprot):
    args = addProductNotification_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = addProductNotification_result()
    result.success = self._handler.addProductNotification(args.itemId, args.email)
    oprot.writeMessageBegin("addProductNotification", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_sendProductNotifications(self, seqid, iprot, oprot):
    args = sendProductNotifications_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = sendProductNotifications_result()
    result.success = self._handler.sendProductNotifications()
    oprot.writeMessageBegin("sendProductNotifications", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_getAllBrandsByCategory(self, seqid, iprot, oprot):
    args = getAllBrandsByCategory_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = getAllBrandsByCategory_result()
    result.success = self._handler.getAllBrandsByCategory(args.categoryId)
    oprot.writeMessageBegin("getAllBrandsByCategory", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_getAllBrands(self, seqid, iprot, oprot):
    args = getAllBrands_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = getAllBrands_result()
    result.success = self._handler.getAllBrands()
    oprot.writeMessageBegin("getAllBrands", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_getAllSources(self, seqid, iprot, oprot):
    args = getAllSources_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = getAllSources_result()
    result.success = self._handler.getAllSources()
    oprot.writeMessageBegin("getAllSources", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_getItemPricingBySource(self, seqid, iprot, oprot):
    args = getItemPricingBySource_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = getItemPricingBySource_result()
    try:
      result.success = self._handler.getItemPricingBySource(args.itemId, args.sourceId)
    except CatalogServiceException, cex:
      result.cex = cex
    oprot.writeMessageBegin("getItemPricingBySource", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_addSourceItemPricing(self, seqid, iprot, oprot):
    args = addSourceItemPricing_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = addSourceItemPricing_result()
    try:
      self._handler.addSourceItemPricing(args.sourceItemPricing)
    except CatalogServiceException, cex:
      result.cex = cex
    oprot.writeMessageBegin("addSourceItemPricing", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_getAllSourcePricing(self, seqid, iprot, oprot):
    args = getAllSourcePricing_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = getAllSourcePricing_result()
    try:
      result.success = self._handler.getAllSourcePricing(args.itemId)
    except CatalogServiceException, cex:
      result.cex = cex
    oprot.writeMessageBegin("getAllSourcePricing", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_getItemForSource(self, seqid, iprot, oprot):
    args = getItemForSource_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = getItemForSource_result()
    try:
      result.success = self._handler.getItemForSource(args.item_id, args.sourceId)
    except CatalogServiceException, cex:
      result.cex = cex
    oprot.writeMessageBegin("getItemForSource", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_searchItemsInRange(self, seqid, iprot, oprot):
    args = searchItemsInRange_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = searchItemsInRange_result()
    result.success = self._handler.searchItemsInRange(args.searchTerms, args.offset, args.limit)
    oprot.writeMessageBegin("searchItemsInRange", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_getSearchResultCount(self, seqid, iprot, oprot):
    args = getSearchResultCount_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = getSearchResultCount_result()
    result.success = self._handler.getSearchResultCount(args.searchTerms)
    oprot.writeMessageBegin("getSearchResultCount", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_getProductNotifications(self, seqid, iprot, oprot):
    args = getProductNotifications_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = getProductNotifications_result()
    result.success = self._handler.getProductNotifications(args.startDateTime)
    oprot.writeMessageBegin("getProductNotifications", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_getProductNotificationRequestCount(self, seqid, iprot, oprot):
    args = getProductNotificationRequestCount_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = getProductNotificationRequestCount_result()
    result.success = self._handler.getProductNotificationRequestCount(args.startDateTime)
    oprot.writeMessageBegin("getProductNotificationRequestCount", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_addAuthorizationLog(self, seqid, iprot, oprot):
    args = addAuthorizationLog_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = addAuthorizationLog_result()
    try:
      result.success = self._handler.addAuthorizationLog(args.itemId, args.username, args.reason)
    except CatalogServiceException, cex:
      result.cex = cex
    oprot.writeMessageBegin("addAuthorizationLog", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_getClearanceSaleCatalogIds(self, seqid, iprot, oprot):
    args = getClearanceSaleCatalogIds_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = getClearanceSaleCatalogIds_result()
    try:
      result.success = self._handler.getClearanceSaleCatalogIds()
    except CatalogServiceException, cex:
      result.cex = cex
    oprot.writeMessageBegin("getClearanceSaleCatalogIds", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_addupdateVoucherForItem(self, seqid, iprot, oprot):
    args = addupdateVoucherForItem_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = addupdateVoucherForItem_result()
    try:
      result.success = self._handler.addupdateVoucherForItem(args.catalog_item_id, args.voucherType, args.voucherAmount)
    except CatalogServiceException, cex:
      result.cex = cex
    oprot.writeMessageBegin("addupdateVoucherForItem", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_deleteVoucherForItem(self, seqid, iprot, oprot):
    args = deleteVoucherForItem_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = deleteVoucherForItem_result()
    try:
      result.success = self._handler.deleteVoucherForItem(args.catalog_item_id, args.voucherType)
    except CatalogServiceException, cex:
      result.cex = cex
    oprot.writeMessageBegin("deleteVoucherForItem", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_getVoucherAmount(self, seqid, iprot, oprot):
    args = getVoucherAmount_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = getVoucherAmount_result()
    result.success = self._handler.getVoucherAmount(args.itemId, args.voucherType)
    oprot.writeMessageBegin("getVoucherAmount", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_getAllItemVouchers(self, seqid, iprot, oprot):
    args = getAllItemVouchers_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = getAllItemVouchers_result()
    result.success = self._handler.getAllItemVouchers(args.itemId)
    oprot.writeMessageBegin("getAllItemVouchers", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_isValidCatalogItemId(self, seqid, iprot, oprot):
    args = isValidCatalogItemId_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = isValidCatalogItemId_result()
    result.success = self._handler.isValidCatalogItemId(args.catalog_item_id)
    oprot.writeMessageBegin("isValidCatalogItemId", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_getVatPercentageForItem(self, seqid, iprot, oprot):
    args = getVatPercentageForItem_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = getVatPercentageForItem_result()
    result.success = self._handler.getVatPercentageForItem(args.itemId, args.price)
    oprot.writeMessageBegin("getVatPercentageForItem", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()

  def process_getVatAmountForItem(self, seqid, iprot, oprot):
    args = getVatAmountForItem_args()
    args.read(iprot)
    iprot.readMessageEnd()
    result = getVatAmountForItem_result()
    result.success = self._handler.getVatAmountForItem(args.itemId, args.price)
    oprot.writeMessageBegin("getVatAmountForItem", TMessageType.REPLY, seqid)
    result.write(oprot)
    oprot.writeMessageEnd()
    oprot.trans.flush()


# HELPER FUNCTIONS AND STRUCTURES

class addItem_args:
  """
  Attributes:
   - item
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRUCT, 'item', (Item, Item.thrift_spec), None, ), # 1
  )

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

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, 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.item = Item()
          self.item.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('addItem_args')
    if self.item is not None:
      oprot.writeFieldBegin('item', TType.STRUCT, 1)
      self.item.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 addItem_result:
  """
  Attributes:
   - success
   - cex
  """

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

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

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

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('addItem_result')
    if self.success is not None:
      oprot.writeFieldBegin('success', TType.I64, 0)
      oprot.writeI64(self.success)
      oprot.writeFieldEnd()
    if self.cex is not None:
      oprot.writeFieldBegin('cex', TType.STRUCT, 1)
      self.cex.write(oprot)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


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

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

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

class updateItem_args:
  """
  Attributes:
   - item
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRUCT, 'item', (Item, Item.thrift_spec), None, ), # 1
  )

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

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, 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.item = Item()
          self.item.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('updateItem_args')
    if self.item is not None:
      oprot.writeFieldBegin('item', TType.STRUCT, 1)
      self.item.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 updateItem_result:
  """
  Attributes:
   - success
   - cex
  """

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

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

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

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('updateItem_result')
    if self.success is not None:
      oprot.writeFieldBegin('success', TType.I64, 0)
      oprot.writeI64(self.success)
      oprot.writeFieldEnd()
    if self.cex is not None:
      oprot.writeFieldBegin('cex', TType.STRUCT, 1)
      self.cex.write(oprot)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


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

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

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

class isActive_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('isActive_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 isActive_result:
  """
  Attributes:
   - success
   - isex
  """

  thrift_spec = (
    (0, TType.STRUCT, 'success', (ItemShippingInfo, ItemShippingInfo.thrift_spec), None, ), # 0
    (1, TType.STRUCT, 'isex', (CatalogServiceException, CatalogServiceException.thrift_spec), None, ), # 1
  )

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

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 0:
        if ftype == TType.STRUCT:
          self.success = ItemShippingInfo()
          self.success.read(iprot)
        else:
          iprot.skip(ftype)
      elif fid == 1:
        if ftype == TType.STRUCT:
          self.isex = CatalogServiceException()
          self.isex.read(iprot)
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('isActive_result')
    if self.success is not None:
      oprot.writeFieldBegin('success', TType.STRUCT, 0)
      self.success.write(oprot)
      oprot.writeFieldEnd()
    if self.isex is not None:
      oprot.writeFieldBegin('isex', TType.STRUCT, 1)
      self.isex.write(oprot)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


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

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

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

class getItemStatusDescription_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('getItemStatusDescription_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 getItemStatusDescription_result:
  """
  Attributes:
   - success
   - isex
  """

  thrift_spec = (
    (0, TType.STRING, 'success', None, None, ), # 0
    (1, TType.STRUCT, 'isex', (CatalogServiceException, CatalogServiceException.thrift_spec), None, ), # 1
  )

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

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

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('getItemStatusDescription_result')
    if self.success is not None:
      oprot.writeFieldBegin('success', TType.STRING, 0)
      oprot.writeString(self.success)
      oprot.writeFieldEnd()
    if self.isex is not None:
      oprot.writeFieldBegin('isex', TType.STRUCT, 1)
      self.isex.write(oprot)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


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

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

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

class startItemOn_args:
  """
  Attributes:
   - item_id
   - timestamp
  """

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

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

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 1:
        if ftype == TType.I64:
          self.item_id = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.I64:
          self.timestamp = 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('startItemOn_args')
    if self.item_id is not None:
      oprot.writeFieldBegin('item_id', TType.I64, 1)
      oprot.writeI64(self.item_id)
      oprot.writeFieldEnd()
    if self.timestamp is not None:
      oprot.writeFieldBegin('timestamp', TType.I64, 2)
      oprot.writeI64(self.timestamp)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


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

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

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

class startItemOn_result:
  """
  Attributes:
   - cex
  """

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

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

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

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('startItemOn_result')
    if self.cex is not None:
      oprot.writeFieldBegin('cex', TType.STRUCT, 1)
      self.cex.write(oprot)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


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

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

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

class retireItemOn_args:
  """
  Attributes:
   - item_id
   - timestamp
  """

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

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

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 1:
        if ftype == TType.I64:
          self.item_id = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.I64:
          self.timestamp = 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('retireItemOn_args')
    if self.item_id is not None:
      oprot.writeFieldBegin('item_id', TType.I64, 1)
      oprot.writeI64(self.item_id)
      oprot.writeFieldEnd()
    if self.timestamp is not None:
      oprot.writeFieldBegin('timestamp', TType.I64, 2)
      oprot.writeI64(self.timestamp)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


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

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

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

class retireItemOn_result:
  """
  Attributes:
   - cex
  """

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

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

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

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('retireItemOn_result')
    if self.cex is not None:
      oprot.writeFieldBegin('cex', TType.STRUCT, 1)
      self.cex.write(oprot)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


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

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

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

class changeItemStatus_args:
  """
  Attributes:
   - item_id
   - timestamp
   - newstatus
  """

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

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

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 1:
        if ftype == TType.I64:
          self.item_id = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.I64:
          self.timestamp = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.I32:
          self.newstatus = 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('changeItemStatus_args')
    if self.item_id is not None:
      oprot.writeFieldBegin('item_id', TType.I64, 1)
      oprot.writeI64(self.item_id)
      oprot.writeFieldEnd()
    if self.timestamp is not None:
      oprot.writeFieldBegin('timestamp', TType.I64, 2)
      oprot.writeI64(self.timestamp)
      oprot.writeFieldEnd()
    if self.newstatus is not None:
      oprot.writeFieldBegin('newstatus', TType.I32, 3)
      oprot.writeI32(self.newstatus)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


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

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

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

class changeItemStatus_result:
  """
  Attributes:
   - cex
  """

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

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

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

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('changeItemStatus_result')
    if self.cex is not None:
      oprot.writeFieldBegin('cex', TType.STRUCT, 1)
      self.cex.write(oprot)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


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

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

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

class getItem_args:
  """
  Attributes:
   - item_id
  """

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

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

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

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

  def validate(self):
    return


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

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

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

class getItem_result:
  """
  Attributes:
   - success
   - cex
  """

  thrift_spec = (
    (0, TType.STRUCT, 'success', (Item, Item.thrift_spec), None, ), # 0
    (1, TType.STRUCT, 'cex', (CatalogServiceException, CatalogServiceException.thrift_spec), None, ), # 1
  )

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

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 0:
        if ftype == TType.STRUCT:
          self.success = Item()
          self.success.read(iprot)
        else:
          iprot.skip(ftype)
      elif fid == 1:
        if ftype == TType.STRUCT:
          self.cex = CatalogServiceException()
          self.cex.read(iprot)
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('getItem_result')
    if self.success is not None:
      oprot.writeFieldBegin('success', TType.STRUCT, 0)
      self.success.write(oprot)
      oprot.writeFieldEnd()
    if self.cex is not None:
      oprot.writeFieldBegin('cex', TType.STRUCT, 1)
      self.cex.write(oprot)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


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

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

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

class getItemsByCatalogId_args:
  """
  Attributes:
   - catalog_item_id
  """

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

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

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

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

  def validate(self):
    return


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

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

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

class getItemsByCatalogId_result:
  """
  Attributes:
   - success
   - cex
  """

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

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

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 0:
        if ftype == TType.LIST:
          self.success = []
          (_etype19, _size16) = iprot.readListBegin()
          for _i20 in xrange(_size16):
            _elem21 = Item()
            _elem21.read(iprot)
            self.success.append(_elem21)
          iprot.readListEnd()
        else:
          iprot.skip(ftype)
      elif fid == 1:
        if ftype == TType.STRUCT:
          self.cex = CatalogServiceException()
          self.cex.read(iprot)
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('getItemsByCatalogId_result')
    if self.success is not None:
      oprot.writeFieldBegin('success', TType.LIST, 0)
      oprot.writeListBegin(TType.STRUCT, len(self.success))
      for iter22 in self.success:
        iter22.write(oprot)
      oprot.writeListEnd()
      oprot.writeFieldEnd()
    if self.cex is not None:
      oprot.writeFieldBegin('cex', TType.STRUCT, 1)
      self.cex.write(oprot)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


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

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

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

class getValidItemsByCatalogId_args:
  """
  Attributes:
   - catalog_item_id
  """

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

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

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

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

  def validate(self):
    return


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

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

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

class getValidItemsByCatalogId_result:
  """
  Attributes:
   - success
   - cex
  """

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

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

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 0:
        if ftype == TType.LIST:
          self.success = []
          (_etype26, _size23) = iprot.readListBegin()
          for _i27 in xrange(_size23):
            _elem28 = Item()
            _elem28.read(iprot)
            self.success.append(_elem28)
          iprot.readListEnd()
        else:
          iprot.skip(ftype)
      elif fid == 1:
        if ftype == TType.STRUCT:
          self.cex = CatalogServiceException()
          self.cex.read(iprot)
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('getValidItemsByCatalogId_result')
    if self.success is not None:
      oprot.writeFieldBegin('success', TType.LIST, 0)
      oprot.writeListBegin(TType.STRUCT, len(self.success))
      for iter29 in self.success:
        iter29.write(oprot)
      oprot.writeListEnd()
      oprot.writeFieldEnd()
    if self.cex is not None:
      oprot.writeFieldBegin('cex', TType.STRUCT, 1)
      self.cex.write(oprot)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


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

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

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

class getAllItems_args:
  """
  Attributes:
   - isActive
  """

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

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

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

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('getAllItems_args')
    if self.isActive is not None:
      oprot.writeFieldBegin('isActive', TType.BOOL, 1)
      oprot.writeBool(self.isActive)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


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

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

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

class getAllItems_result:
  """
  Attributes:
   - success
   - cex
  """

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

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

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 0:
        if ftype == TType.LIST:
          self.success = []
          (_etype33, _size30) = iprot.readListBegin()
          for _i34 in xrange(_size30):
            _elem35 = Item()
            _elem35.read(iprot)
            self.success.append(_elem35)
          iprot.readListEnd()
        else:
          iprot.skip(ftype)
      elif fid == 1:
        if ftype == TType.STRUCT:
          self.cex = CatalogServiceException()
          self.cex.read(iprot)
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('getAllItems_result')
    if self.success is not None:
      oprot.writeFieldBegin('success', TType.LIST, 0)
      oprot.writeListBegin(TType.STRUCT, len(self.success))
      for iter36 in self.success:
        iter36.write(oprot)
      oprot.writeListEnd()
      oprot.writeFieldEnd()
    if self.cex is not None:
      oprot.writeFieldBegin('cex', TType.STRUCT, 1)
      self.cex.write(oprot)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


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

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

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

class getAllItemsByStatus_args:
  """
  Attributes:
   - itemStatus
  """

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

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

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, 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.itemStatus = 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('getAllItemsByStatus_args')
    if self.itemStatus is not None:
      oprot.writeFieldBegin('itemStatus', TType.I32, 1)
      oprot.writeI32(self.itemStatus)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


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

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

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

class getAllItemsByStatus_result:
  """
  Attributes:
   - success
   - cex
  """

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

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

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 0:
        if ftype == TType.LIST:
          self.success = []
          (_etype40, _size37) = iprot.readListBegin()
          for _i41 in xrange(_size37):
            _elem42 = Item()
            _elem42.read(iprot)
            self.success.append(_elem42)
          iprot.readListEnd()
        else:
          iprot.skip(ftype)
      elif fid == 1:
        if ftype == TType.STRUCT:
          self.cex = CatalogServiceException()
          self.cex.read(iprot)
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('getAllItemsByStatus_result')
    if self.success is not None:
      oprot.writeFieldBegin('success', TType.LIST, 0)
      oprot.writeListBegin(TType.STRUCT, len(self.success))
      for iter43 in self.success:
        iter43.write(oprot)
      oprot.writeListEnd()
      oprot.writeFieldEnd()
    if self.cex is not None:
      oprot.writeFieldBegin('cex', TType.STRUCT, 1)
      self.cex.write(oprot)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


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

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

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

class markItemAsContentComplete_args:
  """
  Attributes:
   - entityId
   - category
   - brand
   - modelName
   - modelNumber
  """

  thrift_spec = (
    None, # 0
    (1, TType.I64, 'entityId', None, None, ), # 1
    (2, TType.I64, 'category', None, None, ), # 2
    (3, TType.STRING, 'brand', None, None, ), # 3
    (4, TType.STRING, 'modelName', None, None, ), # 4
    (5, TType.STRING, 'modelNumber', None, None, ), # 5
  )

  def __init__(self, entityId=None, category=None, brand=None, modelName=None, modelNumber=None,):
    self.entityId = entityId
    self.category = category
    self.brand = brand
    self.modelName = modelName
    self.modelNumber = modelNumber

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, 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.entityId = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.I64:
          self.category = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.STRING:
          self.brand = iprot.readString();
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.STRING:
          self.modelName = iprot.readString();
        else:
          iprot.skip(ftype)
      elif fid == 5:
        if ftype == TType.STRING:
          self.modelNumber = 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('markItemAsContentComplete_args')
    if self.entityId is not None:
      oprot.writeFieldBegin('entityId', TType.I64, 1)
      oprot.writeI64(self.entityId)
      oprot.writeFieldEnd()
    if self.category is not None:
      oprot.writeFieldBegin('category', TType.I64, 2)
      oprot.writeI64(self.category)
      oprot.writeFieldEnd()
    if self.brand is not None:
      oprot.writeFieldBegin('brand', TType.STRING, 3)
      oprot.writeString(self.brand)
      oprot.writeFieldEnd()
    if self.modelName is not None:
      oprot.writeFieldBegin('modelName', TType.STRING, 4)
      oprot.writeString(self.modelName)
      oprot.writeFieldEnd()
    if self.modelNumber is not None:
      oprot.writeFieldBegin('modelNumber', TType.STRING, 5)
      oprot.writeString(self.modelNumber)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


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

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

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

class markItemAsContentComplete_result:
  """
  Attributes:
   - success
   - cex
  """

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

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

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 0:
        if ftype == TType.BOOL:
          self.success = iprot.readBool();
        else:
          iprot.skip(ftype)
      elif fid == 1:
        if ftype == TType.STRUCT:
          self.cex = CatalogServiceException()
          self.cex.read(iprot)
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('markItemAsContentComplete_result')
    if self.success is not None:
      oprot.writeFieldBegin('success', TType.BOOL, 0)
      oprot.writeBool(self.success)
      oprot.writeFieldEnd()
    if self.cex is not None:
      oprot.writeFieldBegin('cex', TType.STRUCT, 1)
      self.cex.write(oprot)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


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

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

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

class getAllItemsInRange_args:
  """
  Attributes:
   - offset
   - limit
  """

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

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

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 1:
        if ftype == TType.I64:
          self.offset = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.I64:
          self.limit = 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('getAllItemsInRange_args')
    if self.offset is not None:
      oprot.writeFieldBegin('offset', TType.I64, 1)
      oprot.writeI64(self.offset)
      oprot.writeFieldEnd()
    if self.limit is not None:
      oprot.writeFieldBegin('limit', TType.I64, 2)
      oprot.writeI64(self.limit)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


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

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

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

class getAllItemsInRange_result:
  """
  Attributes:
   - success
   - cex
  """

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

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

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 0:
        if ftype == TType.LIST:
          self.success = []
          (_etype47, _size44) = iprot.readListBegin()
          for _i48 in xrange(_size44):
            _elem49 = Item()
            _elem49.read(iprot)
            self.success.append(_elem49)
          iprot.readListEnd()
        else:
          iprot.skip(ftype)
      elif fid == 1:
        if ftype == TType.STRUCT:
          self.cex = CatalogServiceException()
          self.cex.read(iprot)
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('getAllItemsInRange_result')
    if self.success is not None:
      oprot.writeFieldBegin('success', TType.LIST, 0)
      oprot.writeListBegin(TType.STRUCT, len(self.success))
      for iter50 in self.success:
        iter50.write(oprot)
      oprot.writeListEnd()
      oprot.writeFieldEnd()
    if self.cex is not None:
      oprot.writeFieldBegin('cex', TType.STRUCT, 1)
      self.cex.write(oprot)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


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

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

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

class getAllItemsByStatusInRange_args:
  """
  Attributes:
   - itemStatus
   - offset
   - limit
  """

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

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

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 1:
        if ftype == TType.I32:
          self.itemStatus = iprot.readI32();
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.I64:
          self.offset = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.I64:
          self.limit = 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('getAllItemsByStatusInRange_args')
    if self.itemStatus is not None:
      oprot.writeFieldBegin('itemStatus', TType.I32, 1)
      oprot.writeI32(self.itemStatus)
      oprot.writeFieldEnd()
    if self.offset is not None:
      oprot.writeFieldBegin('offset', TType.I64, 2)
      oprot.writeI64(self.offset)
      oprot.writeFieldEnd()
    if self.limit is not None:
      oprot.writeFieldBegin('limit', TType.I64, 3)
      oprot.writeI64(self.limit)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


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

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

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

class getAllItemsByStatusInRange_result:
  """
  Attributes:
   - success
   - cex
  """

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

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

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 0:
        if ftype == TType.LIST:
          self.success = []
          (_etype54, _size51) = iprot.readListBegin()
          for _i55 in xrange(_size51):
            _elem56 = Item()
            _elem56.read(iprot)
            self.success.append(_elem56)
          iprot.readListEnd()
        else:
          iprot.skip(ftype)
      elif fid == 1:
        if ftype == TType.STRUCT:
          self.cex = CatalogServiceException()
          self.cex.read(iprot)
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('getAllItemsByStatusInRange_result')
    if self.success is not None:
      oprot.writeFieldBegin('success', TType.LIST, 0)
      oprot.writeListBegin(TType.STRUCT, len(self.success))
      for iter57 in self.success:
        iter57.write(oprot)
      oprot.writeListEnd()
      oprot.writeFieldEnd()
    if self.cex is not None:
      oprot.writeFieldBegin('cex', TType.STRUCT, 1)
      self.cex.write(oprot)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


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

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

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

class getItemCountByStatus_args:
  """
  Attributes:
   - useStatus
   - itemStatus
  """

  thrift_spec = (
    None, # 0
    (1, TType.BOOL, 'useStatus', None, None, ), # 1
    (2, TType.I32, 'itemStatus', None, None, ), # 2
  )

  def __init__(self, useStatus=None, itemStatus=None,):
    self.useStatus = useStatus
    self.itemStatus = itemStatus

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 1:
        if ftype == TType.BOOL:
          self.useStatus = iprot.readBool();
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.I32:
          self.itemStatus = 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('getItemCountByStatus_args')
    if self.useStatus is not None:
      oprot.writeFieldBegin('useStatus', TType.BOOL, 1)
      oprot.writeBool(self.useStatus)
      oprot.writeFieldEnd()
    if self.itemStatus is not None:
      oprot.writeFieldBegin('itemStatus', TType.I32, 2)
      oprot.writeI32(self.itemStatus)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


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

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

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

class getItemCountByStatus_result:
  """
  Attributes:
   - success
  """

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

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

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 0:
        if ftype == TType.I32:
          self.success = iprot.readI32();
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('getItemCountByStatus_result')
    if self.success is not None:
      oprot.writeFieldBegin('success', TType.I32, 0)
      oprot.writeI32(self.success)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


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

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

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

class getBestSellers_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('getBestSellers_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 getBestSellers_result:
  """
  Attributes:
   - success
   - isex
  """

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

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

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 0:
        if ftype == TType.LIST:
          self.success = []
          (_etype61, _size58) = iprot.readListBegin()
          for _i62 in xrange(_size58):
            _elem63 = Item()
            _elem63.read(iprot)
            self.success.append(_elem63)
          iprot.readListEnd()
        else:
          iprot.skip(ftype)
      elif fid == 1:
        if ftype == TType.STRUCT:
          self.isex = CatalogServiceException()
          self.isex.read(iprot)
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('getBestSellers_result')
    if self.success is not None:
      oprot.writeFieldBegin('success', TType.LIST, 0)
      oprot.writeListBegin(TType.STRUCT, len(self.success))
      for iter64 in self.success:
        iter64.write(oprot)
      oprot.writeListEnd()
      oprot.writeFieldEnd()
    if self.isex is not None:
      oprot.writeFieldBegin('isex', TType.STRUCT, 1)
      self.isex.write(oprot)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


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

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

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

class getBestSellersCatalogIds_args:
  """
  Attributes:
   - beginIndex
   - totalItems
   - brand
   - category
  """

  thrift_spec = (
    None, # 0
    (1, TType.I64, 'beginIndex', None, None, ), # 1
    (2, TType.I64, 'totalItems', None, None, ), # 2
    (3, TType.STRING, 'brand', None, None, ), # 3
    (4, TType.I64, 'category', None, None, ), # 4
  )

  def __init__(self, beginIndex=None, totalItems=None, brand=None, category=None,):
    self.beginIndex = beginIndex
    self.totalItems = totalItems
    self.brand = brand
    self.category = category

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, 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.beginIndex = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.I64:
          self.totalItems = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.STRING:
          self.brand = iprot.readString();
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.I64:
          self.category = 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('getBestSellersCatalogIds_args')
    if self.beginIndex is not None:
      oprot.writeFieldBegin('beginIndex', TType.I64, 1)
      oprot.writeI64(self.beginIndex)
      oprot.writeFieldEnd()
    if self.totalItems is not None:
      oprot.writeFieldBegin('totalItems', TType.I64, 2)
      oprot.writeI64(self.totalItems)
      oprot.writeFieldEnd()
    if self.brand is not None:
      oprot.writeFieldBegin('brand', TType.STRING, 3)
      oprot.writeString(self.brand)
      oprot.writeFieldEnd()
    if self.category is not None:
      oprot.writeFieldBegin('category', TType.I64, 4)
      oprot.writeI64(self.category)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


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

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

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

class getBestSellersCatalogIds_result:
  """
  Attributes:
   - success
   - cex
  """

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

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

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 0:
        if ftype == TType.LIST:
          self.success = []
          (_etype68, _size65) = iprot.readListBegin()
          for _i69 in xrange(_size65):
            _elem70 = iprot.readI64();
            self.success.append(_elem70)
          iprot.readListEnd()
        else:
          iprot.skip(ftype)
      elif fid == 1:
        if ftype == TType.STRUCT:
          self.cex = CatalogServiceException()
          self.cex.read(iprot)
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('getBestSellersCatalogIds_result')
    if self.success is not None:
      oprot.writeFieldBegin('success', TType.LIST, 0)
      oprot.writeListBegin(TType.I64, len(self.success))
      for iter71 in self.success:
        oprot.writeI64(iter71)
      oprot.writeListEnd()
      oprot.writeFieldEnd()
    if self.cex is not None:
      oprot.writeFieldBegin('cex', TType.STRUCT, 1)
      self.cex.write(oprot)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


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

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

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

class getBestSellersCount_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('getBestSellersCount_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 getBestSellersCount_result:
  """
  Attributes:
   - success
   - cex
  """

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

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

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

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('getBestSellersCount_result')
    if self.success is not None:
      oprot.writeFieldBegin('success', TType.I64, 0)
      oprot.writeI64(self.success)
      oprot.writeFieldEnd()
    if self.cex is not None:
      oprot.writeFieldBegin('cex', TType.STRUCT, 1)
      self.cex.write(oprot)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


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

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

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

class getBestDeals_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('getBestDeals_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 getBestDeals_result:
  """
  Attributes:
   - success
   - isex
  """

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

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

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 0:
        if ftype == TType.LIST:
          self.success = []
          (_etype75, _size72) = iprot.readListBegin()
          for _i76 in xrange(_size72):
            _elem77 = Item()
            _elem77.read(iprot)
            self.success.append(_elem77)
          iprot.readListEnd()
        else:
          iprot.skip(ftype)
      elif fid == 1:
        if ftype == TType.STRUCT:
          self.isex = CatalogServiceException()
          self.isex.read(iprot)
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('getBestDeals_result')
    if self.success is not None:
      oprot.writeFieldBegin('success', TType.LIST, 0)
      oprot.writeListBegin(TType.STRUCT, len(self.success))
      for iter78 in self.success:
        iter78.write(oprot)
      oprot.writeListEnd()
      oprot.writeFieldEnd()
    if self.isex is not None:
      oprot.writeFieldBegin('isex', TType.STRUCT, 1)
      self.isex.write(oprot)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


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

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

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

class getBestDealsCatalogIds_args:
  """
  Attributes:
   - beginIndex
   - totalItems
   - brand
   - category
  """

  thrift_spec = (
    None, # 0
    (1, TType.I64, 'beginIndex', None, None, ), # 1
    (2, TType.I64, 'totalItems', None, None, ), # 2
    (3, TType.STRING, 'brand', None, None, ), # 3
    (4, TType.I64, 'category', None, None, ), # 4
  )

  def __init__(self, beginIndex=None, totalItems=None, brand=None, category=None,):
    self.beginIndex = beginIndex
    self.totalItems = totalItems
    self.brand = brand
    self.category = category

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, 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.beginIndex = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.I64:
          self.totalItems = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.STRING:
          self.brand = iprot.readString();
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.I64:
          self.category = 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('getBestDealsCatalogIds_args')
    if self.beginIndex is not None:
      oprot.writeFieldBegin('beginIndex', TType.I64, 1)
      oprot.writeI64(self.beginIndex)
      oprot.writeFieldEnd()
    if self.totalItems is not None:
      oprot.writeFieldBegin('totalItems', TType.I64, 2)
      oprot.writeI64(self.totalItems)
      oprot.writeFieldEnd()
    if self.brand is not None:
      oprot.writeFieldBegin('brand', TType.STRING, 3)
      oprot.writeString(self.brand)
      oprot.writeFieldEnd()
    if self.category is not None:
      oprot.writeFieldBegin('category', TType.I64, 4)
      oprot.writeI64(self.category)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


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

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

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

class getBestDealsCatalogIds_result:
  """
  Attributes:
   - success
   - cex
  """

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

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

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 0:
        if ftype == TType.LIST:
          self.success = []
          (_etype82, _size79) = iprot.readListBegin()
          for _i83 in xrange(_size79):
            _elem84 = iprot.readI64();
            self.success.append(_elem84)
          iprot.readListEnd()
        else:
          iprot.skip(ftype)
      elif fid == 1:
        if ftype == TType.STRUCT:
          self.cex = CatalogServiceException()
          self.cex.read(iprot)
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('getBestDealsCatalogIds_result')
    if self.success is not None:
      oprot.writeFieldBegin('success', TType.LIST, 0)
      oprot.writeListBegin(TType.I64, len(self.success))
      for iter85 in self.success:
        oprot.writeI64(iter85)
      oprot.writeListEnd()
      oprot.writeFieldEnd()
    if self.cex is not None:
      oprot.writeFieldBegin('cex', TType.STRUCT, 1)
      self.cex.write(oprot)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


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

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

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

class getBestDealsCount_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('getBestDealsCount_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 getBestDealsCount_result:
  """
  Attributes:
   - success
   - cex
  """

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

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

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

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('getBestDealsCount_result')
    if self.success is not None:
      oprot.writeFieldBegin('success', TType.I64, 0)
      oprot.writeI64(self.success)
      oprot.writeFieldEnd()
    if self.cex is not None:
      oprot.writeFieldBegin('cex', TType.STRUCT, 1)
      self.cex.write(oprot)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


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

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

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

class getComingSoon_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('getComingSoon_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 getComingSoon_result:
  """
  Attributes:
   - success
   - isex
  """

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

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

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 0:
        if ftype == TType.LIST:
          self.success = []
          (_etype89, _size86) = iprot.readListBegin()
          for _i90 in xrange(_size86):
            _elem91 = Item()
            _elem91.read(iprot)
            self.success.append(_elem91)
          iprot.readListEnd()
        else:
          iprot.skip(ftype)
      elif fid == 1:
        if ftype == TType.STRUCT:
          self.isex = CatalogServiceException()
          self.isex.read(iprot)
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('getComingSoon_result')
    if self.success is not None:
      oprot.writeFieldBegin('success', TType.LIST, 0)
      oprot.writeListBegin(TType.STRUCT, len(self.success))
      for iter92 in self.success:
        iter92.write(oprot)
      oprot.writeListEnd()
      oprot.writeFieldEnd()
    if self.isex is not None:
      oprot.writeFieldBegin('isex', TType.STRUCT, 1)
      self.isex.write(oprot)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


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

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

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

class getComingSoonCatalogIds_args:
  """
  Attributes:
   - beginIndex
   - totalItems
   - brand
   - category
  """

  thrift_spec = (
    None, # 0
    (1, TType.I64, 'beginIndex', None, None, ), # 1
    (2, TType.I64, 'totalItems', None, None, ), # 2
    (3, TType.STRING, 'brand', None, None, ), # 3
    (4, TType.I64, 'category', None, None, ), # 4
  )

  def __init__(self, beginIndex=None, totalItems=None, brand=None, category=None,):
    self.beginIndex = beginIndex
    self.totalItems = totalItems
    self.brand = brand
    self.category = category

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, 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.beginIndex = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.I64:
          self.totalItems = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.STRING:
          self.brand = iprot.readString();
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.I64:
          self.category = 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('getComingSoonCatalogIds_args')
    if self.beginIndex is not None:
      oprot.writeFieldBegin('beginIndex', TType.I64, 1)
      oprot.writeI64(self.beginIndex)
      oprot.writeFieldEnd()
    if self.totalItems is not None:
      oprot.writeFieldBegin('totalItems', TType.I64, 2)
      oprot.writeI64(self.totalItems)
      oprot.writeFieldEnd()
    if self.brand is not None:
      oprot.writeFieldBegin('brand', TType.STRING, 3)
      oprot.writeString(self.brand)
      oprot.writeFieldEnd()
    if self.category is not None:
      oprot.writeFieldBegin('category', TType.I64, 4)
      oprot.writeI64(self.category)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


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

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

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

class getComingSoonCatalogIds_result:
  """
  Attributes:
   - success
   - cex
  """

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

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

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 0:
        if ftype == TType.LIST:
          self.success = []
          (_etype96, _size93) = iprot.readListBegin()
          for _i97 in xrange(_size93):
            _elem98 = iprot.readI64();
            self.success.append(_elem98)
          iprot.readListEnd()
        else:
          iprot.skip(ftype)
      elif fid == 1:
        if ftype == TType.STRUCT:
          self.cex = CatalogServiceException()
          self.cex.read(iprot)
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('getComingSoonCatalogIds_result')
    if self.success is not None:
      oprot.writeFieldBegin('success', TType.LIST, 0)
      oprot.writeListBegin(TType.I64, len(self.success))
      for iter99 in self.success:
        oprot.writeI64(iter99)
      oprot.writeListEnd()
      oprot.writeFieldEnd()
    if self.cex is not None:
      oprot.writeFieldBegin('cex', TType.STRUCT, 1)
      self.cex.write(oprot)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


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

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

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

class getComingSoonCount_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('getComingSoonCount_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 getComingSoonCount_result:
  """
  Attributes:
   - success
   - cex
  """

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

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

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

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('getComingSoonCount_result')
    if self.success is not None:
      oprot.writeFieldBegin('success', TType.I64, 0)
      oprot.writeI64(self.success)
      oprot.writeFieldEnd()
    if self.cex is not None:
      oprot.writeFieldBegin('cex', TType.STRUCT, 1)
      self.cex.write(oprot)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


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

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

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

class getLatestArrivals_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('getLatestArrivals_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 getLatestArrivals_result:
  """
  Attributes:
   - success
   - isex
  """

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

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

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 0:
        if ftype == TType.LIST:
          self.success = []
          (_etype103, _size100) = iprot.readListBegin()
          for _i104 in xrange(_size100):
            _elem105 = Item()
            _elem105.read(iprot)
            self.success.append(_elem105)
          iprot.readListEnd()
        else:
          iprot.skip(ftype)
      elif fid == 1:
        if ftype == TType.STRUCT:
          self.isex = CatalogServiceException()
          self.isex.read(iprot)
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('getLatestArrivals_result')
    if self.success is not None:
      oprot.writeFieldBegin('success', TType.LIST, 0)
      oprot.writeListBegin(TType.STRUCT, len(self.success))
      for iter106 in self.success:
        iter106.write(oprot)
      oprot.writeListEnd()
      oprot.writeFieldEnd()
    if self.isex is not None:
      oprot.writeFieldBegin('isex', TType.STRUCT, 1)
      self.isex.write(oprot)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


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

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

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

class getLatestArrivalsCatalogIds_args:
  """
  Attributes:
   - beginIndex
   - totalItems
   - brand
   - categories
  """

  thrift_spec = (
    None, # 0
    (1, TType.I64, 'beginIndex', None, None, ), # 1
    (2, TType.I64, 'totalItems', None, None, ), # 2
    (3, TType.STRING, 'brand', None, None, ), # 3
    (4, TType.LIST, 'categories', (TType.I64,None), None, ), # 4
  )

  def __init__(self, beginIndex=None, totalItems=None, brand=None, categories=None,):
    self.beginIndex = beginIndex
    self.totalItems = totalItems
    self.brand = brand
    self.categories = categories

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, 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.beginIndex = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.I64:
          self.totalItems = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.STRING:
          self.brand = iprot.readString();
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.LIST:
          self.categories = []
          (_etype110, _size107) = iprot.readListBegin()
          for _i111 in xrange(_size107):
            _elem112 = iprot.readI64();
            self.categories.append(_elem112)
          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('getLatestArrivalsCatalogIds_args')
    if self.beginIndex is not None:
      oprot.writeFieldBegin('beginIndex', TType.I64, 1)
      oprot.writeI64(self.beginIndex)
      oprot.writeFieldEnd()
    if self.totalItems is not None:
      oprot.writeFieldBegin('totalItems', TType.I64, 2)
      oprot.writeI64(self.totalItems)
      oprot.writeFieldEnd()
    if self.brand is not None:
      oprot.writeFieldBegin('brand', TType.STRING, 3)
      oprot.writeString(self.brand)
      oprot.writeFieldEnd()
    if self.categories is not None:
      oprot.writeFieldBegin('categories', TType.LIST, 4)
      oprot.writeListBegin(TType.I64, len(self.categories))
      for iter113 in self.categories:
        oprot.writeI64(iter113)
      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 getLatestArrivalsCatalogIds_result:
  """
  Attributes:
   - success
   - cex
  """

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

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

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 0:
        if ftype == TType.LIST:
          self.success = []
          (_etype117, _size114) = iprot.readListBegin()
          for _i118 in xrange(_size114):
            _elem119 = iprot.readI64();
            self.success.append(_elem119)
          iprot.readListEnd()
        else:
          iprot.skip(ftype)
      elif fid == 1:
        if ftype == TType.STRUCT:
          self.cex = CatalogServiceException()
          self.cex.read(iprot)
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('getLatestArrivalsCatalogIds_result')
    if self.success is not None:
      oprot.writeFieldBegin('success', TType.LIST, 0)
      oprot.writeListBegin(TType.I64, len(self.success))
      for iter120 in self.success:
        oprot.writeI64(iter120)
      oprot.writeListEnd()
      oprot.writeFieldEnd()
    if self.cex is not None:
      oprot.writeFieldBegin('cex', TType.STRUCT, 1)
      self.cex.write(oprot)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


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

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

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

class getLatestArrivalsCount_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('getLatestArrivalsCount_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 getLatestArrivalsCount_result:
  """
  Attributes:
   - success
   - cex
  """

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

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

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

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('getLatestArrivalsCount_result')
    if self.success is not None:
      oprot.writeFieldBegin('success', TType.I64, 0)
      oprot.writeI64(self.success)
      oprot.writeFieldEnd()
    if self.cex is not None:
      oprot.writeFieldBegin('cex', TType.STRUCT, 1)
      self.cex.write(oprot)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


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

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

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

class generateNewEntityID_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('generateNewEntityID_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 generateNewEntityID_result:
  """
  Attributes:
   - success
  """

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

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

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

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

  def validate(self):
    return


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

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

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

class addCategory_args:
  """
  Attributes:
   - category
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRUCT, 'category', (Category, Category.thrift_spec), None, ), # 1
  )

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

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, 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.category = Category()
          self.category.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('addCategory_args')
    if self.category is not None:
      oprot.writeFieldBegin('category', TType.STRUCT, 1)
      self.category.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 addCategory_result:
  """
  Attributes:
   - success
  """

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

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

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 0:
        if ftype == TType.BOOL:
          self.success = iprot.readBool();
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('addCategory_result')
    if self.success is not None:
      oprot.writeFieldBegin('success', TType.BOOL, 0)
      oprot.writeBool(self.success)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


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

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

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

class getCategory_args:
  """
  Attributes:
   - id
  """

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

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

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

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

  def validate(self):
    return


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

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

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

class getCategory_result:
  """
  Attributes:
   - success
  """

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

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

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 0:
        if ftype == TType.STRUCT:
          self.success = Category()
          self.success.read(iprot)
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('getCategory_result')
    if self.success is not None:
      oprot.writeFieldBegin('success', TType.STRUCT, 0)
      self.success.write(oprot)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


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

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

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

class getAllCategories_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('getAllCategories_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 getAllCategories_result:
  """
  Attributes:
   - success
  """

  thrift_spec = (
    (0, TType.LIST, 'success', (TType.STRUCT,(Category, Category.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 = []
          (_etype124, _size121) = iprot.readListBegin()
          for _i125 in xrange(_size121):
            _elem126 = Category()
            _elem126.read(iprot)
            self.success.append(_elem126)
          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('getAllCategories_result')
    if self.success is not None:
      oprot.writeFieldBegin('success', TType.LIST, 0)
      oprot.writeListBegin(TType.STRUCT, len(self.success))
      for iter127 in self.success:
        iter127.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 getAllSimilarItems_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('getAllSimilarItems_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 getAllSimilarItems_result:
  """
  Attributes:
   - success
  """

  thrift_spec = (
    (0, TType.LIST, 'success', (TType.STRUCT,(Item, Item.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 = []
          (_etype131, _size128) = iprot.readListBegin()
          for _i132 in xrange(_size128):
            _elem133 = Item()
            _elem133.read(iprot)
            self.success.append(_elem133)
          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('getAllSimilarItems_result')
    if self.success is not None:
      oprot.writeFieldBegin('success', TType.LIST, 0)
      oprot.writeListBegin(TType.STRUCT, len(self.success))
      for iter134 in self.success:
        iter134.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 addSimilarItem_args:
  """
  Attributes:
   - itemId
   - catalogItemId
  """

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

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

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, 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.catalogItemId = 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('addSimilarItem_args')
    if self.itemId is not None:
      oprot.writeFieldBegin('itemId', TType.I64, 1)
      oprot.writeI64(self.itemId)
      oprot.writeFieldEnd()
    if self.catalogItemId is not None:
      oprot.writeFieldBegin('catalogItemId', TType.I64, 2)
      oprot.writeI64(self.catalogItemId)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


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

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

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

class addSimilarItem_result:
  """
  Attributes:
   - success
   - cex
  """

  thrift_spec = (
    (0, TType.STRUCT, 'success', (Item, Item.thrift_spec), None, ), # 0
    (1, TType.STRUCT, 'cex', (CatalogServiceException, CatalogServiceException.thrift_spec), None, ), # 1
  )

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

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 0:
        if ftype == TType.STRUCT:
          self.success = Item()
          self.success.read(iprot)
        else:
          iprot.skip(ftype)
      elif fid == 1:
        if ftype == TType.STRUCT:
          self.cex = CatalogServiceException()
          self.cex.read(iprot)
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('addSimilarItem_result')
    if self.success is not None:
      oprot.writeFieldBegin('success', TType.STRUCT, 0)
      self.success.write(oprot)
      oprot.writeFieldEnd()
    if self.cex is not None:
      oprot.writeFieldBegin('cex', TType.STRUCT, 1)
      self.cex.write(oprot)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


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

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

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

class addTag_args:
  """
  Attributes:
   - displayName
   - itemId
  """

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

  def __init__(self, displayName=None, itemId=None,):
    self.displayName = displayName
    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.displayName = 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('addTag_args')
    if self.displayName is not None:
      oprot.writeFieldBegin('displayName', TType.STRING, 1)
      oprot.writeString(self.displayName)
      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 addTag_result:
  """
  Attributes:
   - success
  """

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

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

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 0:
        if ftype == TType.BOOL:
          self.success = iprot.readBool();
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('addTag_result')
    if self.success is not None:
      oprot.writeFieldBegin('success', TType.BOOL, 0)
      oprot.writeBool(self.success)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


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

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

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

class deleteEntityTag_args:
  """
  Attributes:
   - displayName
   - itemId
  """

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

  def __init__(self, displayName=None, itemId=None,):
    self.displayName = displayName
    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.displayName = 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('deleteEntityTag_args')
    if self.displayName is not None:
      oprot.writeFieldBegin('displayName', TType.STRING, 1)
      oprot.writeString(self.displayName)
      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 deleteEntityTag_result:
  """
  Attributes:
   - success
  """

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

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

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 0:
        if ftype == TType.BOOL:
          self.success = iprot.readBool();
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('deleteEntityTag_result')
    if self.success is not None:
      oprot.writeFieldBegin('success', TType.BOOL, 0)
      oprot.writeBool(self.success)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


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

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

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

class deleteTag_args:
  """
  Attributes:
   - displayName
  """

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

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

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, 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.displayName = 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('deleteTag_args')
    if self.displayName is not None:
      oprot.writeFieldBegin('displayName', TType.STRING, 1)
      oprot.writeString(self.displayName)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


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

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

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

class deleteTag_result:
  """
  Attributes:
   - success
  """

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

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

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 0:
        if ftype == TType.BOOL:
          self.success = iprot.readBool();
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('deleteTag_result')
    if self.success is not None:
      oprot.writeFieldBegin('success', TType.BOOL, 0)
      oprot.writeBool(self.success)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


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

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

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

class getAllTags_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('getAllTags_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 getAllTags_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 = []
          (_etype138, _size135) = iprot.readListBegin()
          for _i139 in xrange(_size135):
            _elem140 = iprot.readString();
            self.success.append(_elem140)
          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('getAllTags_result')
    if self.success is not None:
      oprot.writeFieldBegin('success', TType.LIST, 0)
      oprot.writeListBegin(TType.STRING, len(self.success))
      for iter141 in self.success:
        oprot.writeString(iter141)
      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 getAllEntitiesByTagName_args:
  """
  Attributes:
   - displayName
  """

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

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

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, 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.displayName = 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('getAllEntitiesByTagName_args')
    if self.displayName is not None:
      oprot.writeFieldBegin('displayName', TType.STRING, 1)
      oprot.writeString(self.displayName)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


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

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

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

class getAllEntitiesByTagName_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 = []
          (_etype145, _size142) = iprot.readListBegin()
          for _i146 in xrange(_size142):
            _elem147 = iprot.readI64();
            self.success.append(_elem147)
          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('getAllEntitiesByTagName_result')
    if self.success is not None:
      oprot.writeFieldBegin('success', TType.LIST, 0)
      oprot.writeListBegin(TType.I64, len(self.success))
      for iter148 in self.success:
        oprot.writeI64(iter148)
      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 deleteSimilarItem_args:
  """
  Attributes:
   - itemId
   - catalogItemId
  """

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

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

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, 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.catalogItemId = 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('deleteSimilarItem_args')
    if self.itemId is not None:
      oprot.writeFieldBegin('itemId', TType.I64, 1)
      oprot.writeI64(self.itemId)
      oprot.writeFieldEnd()
    if self.catalogItemId is not None:
      oprot.writeFieldBegin('catalogItemId', TType.I64, 2)
      oprot.writeI64(self.catalogItemId)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


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

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

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

class deleteSimilarItem_result:
  """
  Attributes:
   - success
   - cex
  """

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

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

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 0:
        if ftype == TType.BOOL:
          self.success = iprot.readBool();
        else:
          iprot.skip(ftype)
      elif fid == 1:
        if ftype == TType.STRUCT:
          self.cex = CatalogServiceException()
          self.cex.read(iprot)
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('deleteSimilarItem_result')
    if self.success is not None:
      oprot.writeFieldBegin('success', TType.BOOL, 0)
      oprot.writeBool(self.success)
      oprot.writeFieldEnd()
    if self.cex is not None:
      oprot.writeFieldBegin('cex', TType.STRUCT, 1)
      self.cex.write(oprot)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


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

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

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

class checkSimilarItem_args:
  """
  Attributes:
   - brand
   - modelNumber
   - modelName
   - color
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRING, 'brand', None, None, ), # 1
    (2, TType.STRING, 'modelNumber', None, None, ), # 2
    (3, TType.STRING, 'modelName', None, None, ), # 3
    (4, TType.STRING, 'color', None, None, ), # 4
  )

  def __init__(self, brand=None, modelNumber=None, modelName=None, color=None,):
    self.brand = brand
    self.modelNumber = modelNumber
    self.modelName = modelName
    self.color = color

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, 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.brand = iprot.readString();
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.STRING:
          self.modelNumber = iprot.readString();
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.STRING:
          self.modelName = iprot.readString();
        else:
          iprot.skip(ftype)
      elif fid == 4:
        if ftype == TType.STRING:
          self.color = 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('checkSimilarItem_args')
    if self.brand is not None:
      oprot.writeFieldBegin('brand', TType.STRING, 1)
      oprot.writeString(self.brand)
      oprot.writeFieldEnd()
    if self.modelNumber is not None:
      oprot.writeFieldBegin('modelNumber', TType.STRING, 2)
      oprot.writeString(self.modelNumber)
      oprot.writeFieldEnd()
    if self.modelName is not None:
      oprot.writeFieldBegin('modelName', TType.STRING, 3)
      oprot.writeString(self.modelName)
      oprot.writeFieldEnd()
    if self.color is not None:
      oprot.writeFieldBegin('color', TType.STRING, 4)
      oprot.writeString(self.color)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


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

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

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

class checkSimilarItem_result:
  """
  Attributes:
   - success
  """

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

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

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

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

  def validate(self):
    return


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

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

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

class validateRiskyStatus_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('validateRiskyStatus_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 validateRiskyStatus_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('validateRiskyStatus_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 changeItemRiskyFlag_args:
  """
  Attributes:
   - itemId
   - risky
  """

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

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

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, 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.BOOL:
          self.risky = iprot.readBool();
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

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

  def validate(self):
    return


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

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

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

class changeItemRiskyFlag_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('changeItemRiskyFlag_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 getItemsByRiskyFlag_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('getItemsByRiskyFlag_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 getItemsByRiskyFlag_result:
  """
  Attributes:
   - success
  """

  thrift_spec = (
    (0, TType.LIST, 'success', (TType.STRUCT,(Item, Item.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 = []
          (_etype152, _size149) = iprot.readListBegin()
          for _i153 in xrange(_size149):
            _elem154 = Item()
            _elem154.read(iprot)
            self.success.append(_elem154)
          iprot.readListEnd()
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('getItemsByRiskyFlag_result')
    if self.success is not None:
      oprot.writeFieldBegin('success', TType.LIST, 0)
      oprot.writeListBegin(TType.STRUCT, len(self.success))
      for iter155 in self.success:
        iter155.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 getItemsForMasterSheet_args:
  """
  Attributes:
   - category
   - brand
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRING, 'category', None, None, ), # 1
    (2, TType.STRING, 'brand', None, None, ), # 2
  )

  def __init__(self, category=None, brand=None,):
    self.category = category
    self.brand = brand

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, 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.category = iprot.readString();
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.STRING:
          self.brand = 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('getItemsForMasterSheet_args')
    if self.category is not None:
      oprot.writeFieldBegin('category', TType.STRING, 1)
      oprot.writeString(self.category)
      oprot.writeFieldEnd()
    if self.brand is not None:
      oprot.writeFieldBegin('brand', TType.STRING, 2)
      oprot.writeString(self.brand)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


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

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

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

class getItemsForMasterSheet_result:
  """
  Attributes:
   - success
  """

  thrift_spec = (
    (0, TType.LIST, 'success', (TType.STRUCT,(Item, Item.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 = []
          (_etype159, _size156) = iprot.readListBegin()
          for _i160 in xrange(_size156):
            _elem161 = Item()
            _elem161.read(iprot)
            self.success.append(_elem161)
          iprot.readListEnd()
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('getItemsForMasterSheet_result')
    if self.success is not None:
      oprot.writeFieldBegin('success', TType.LIST, 0)
      oprot.writeListBegin(TType.STRUCT, len(self.success))
      for iter162 in self.success:
        iter162.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 getSimilarItemsCatalogIds_args:
  """
  Attributes:
   - beginIndex
   - totalItems
   - itemId
  """

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

  def __init__(self, beginIndex=None, totalItems=None, itemId=None,):
    self.beginIndex = beginIndex
    self.totalItems = totalItems
    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.beginIndex = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.I64:
          self.totalItems = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.I64:
          self.itemId = iprot.readI64();
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

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

  def validate(self):
    return


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

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

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

class getSimilarItemsCatalogIds_result:
  """
  Attributes:
   - success
  """

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

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

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 0:
        if ftype == TType.LIST:
          self.success = []
          (_etype166, _size163) = iprot.readListBegin()
          for _i167 in xrange(_size163):
            _elem168 = iprot.readI64();
            self.success.append(_elem168)
          iprot.readListEnd()
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('getSimilarItemsCatalogIds_result')
    if self.success is not None:
      oprot.writeFieldBegin('success', TType.LIST, 0)
      oprot.writeListBegin(TType.I64, len(self.success))
      for iter169 in self.success:
        oprot.writeI64(iter169)
      oprot.writeListEnd()
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


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

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

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

class addProductNotification_args:
  """
  Attributes:
   - itemId
   - email
  """

  thrift_spec = None
  def __init__(self, itemId=None, email=None,):
    self.itemId = itemId
    self.email = email

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, 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.email = 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('addProductNotification_args')
    if self.email is not None:
      oprot.writeFieldBegin('email', TType.STRING, -2)
      oprot.writeString(self.email)
      oprot.writeFieldEnd()
    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 addProductNotification_result:
  """
  Attributes:
   - success
  """

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

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

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 0:
        if ftype == TType.BOOL:
          self.success = iprot.readBool();
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('addProductNotification_result')
    if self.success is not None:
      oprot.writeFieldBegin('success', TType.BOOL, 0)
      oprot.writeBool(self.success)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


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

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

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

class sendProductNotifications_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('sendProductNotifications_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 sendProductNotifications_result:
  """
  Attributes:
   - success
  """

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

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

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 0:
        if ftype == TType.BOOL:
          self.success = iprot.readBool();
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('sendProductNotifications_result')
    if self.success is not None:
      oprot.writeFieldBegin('success', TType.BOOL, 0)
      oprot.writeBool(self.success)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


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

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

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

class getAllBrandsByCategory_args:
  """
  Attributes:
   - categoryId
  """

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

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

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, 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.categoryId = 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('getAllBrandsByCategory_args')
    if self.categoryId is not None:
      oprot.writeFieldBegin('categoryId', TType.I64, 1)
      oprot.writeI64(self.categoryId)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


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

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

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

class getAllBrandsByCategory_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 = []
          (_etype173, _size170) = iprot.readListBegin()
          for _i174 in xrange(_size170):
            _elem175 = iprot.readString();
            self.success.append(_elem175)
          iprot.readListEnd()
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('getAllBrandsByCategory_result')
    if self.success is not None:
      oprot.writeFieldBegin('success', TType.LIST, 0)
      oprot.writeListBegin(TType.STRING, len(self.success))
      for iter176 in self.success:
        oprot.writeString(iter176)
      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 getAllBrands_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('getAllBrands_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 getAllBrands_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 = []
          (_etype180, _size177) = iprot.readListBegin()
          for _i181 in xrange(_size177):
            _elem182 = iprot.readString();
            self.success.append(_elem182)
          iprot.readListEnd()
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('getAllBrands_result')
    if self.success is not None:
      oprot.writeFieldBegin('success', TType.LIST, 0)
      oprot.writeListBegin(TType.STRING, len(self.success))
      for iter183 in self.success:
        oprot.writeString(iter183)
      oprot.writeListEnd()
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


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

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

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

class getAllSources_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('getAllSources_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 getAllSources_result:
  """
  Attributes:
   - success
  """

  thrift_spec = (
    (0, TType.LIST, 'success', (TType.STRUCT,(Source, Source.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 = []
          (_etype187, _size184) = iprot.readListBegin()
          for _i188 in xrange(_size184):
            _elem189 = Source()
            _elem189.read(iprot)
            self.success.append(_elem189)
          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('getAllSources_result')
    if self.success is not None:
      oprot.writeFieldBegin('success', TType.LIST, 0)
      oprot.writeListBegin(TType.STRUCT, len(self.success))
      for iter190 in self.success:
        iter190.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 getItemPricingBySource_args:
  """
  Attributes:
   - itemId
   - sourceId
  """

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

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

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

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

  def validate(self):
    return


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

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

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

class getItemPricingBySource_result:
  """
  Attributes:
   - success
   - cex
  """

  thrift_spec = (
    (0, TType.STRUCT, 'success', (SourceItemPricing, SourceItemPricing.thrift_spec), None, ), # 0
    (1, TType.STRUCT, 'cex', (CatalogServiceException, CatalogServiceException.thrift_spec), None, ), # 1
  )

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

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 0:
        if ftype == TType.STRUCT:
          self.success = SourceItemPricing()
          self.success.read(iprot)
        else:
          iprot.skip(ftype)
      elif fid == 1:
        if ftype == TType.STRUCT:
          self.cex = CatalogServiceException()
          self.cex.read(iprot)
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('getItemPricingBySource_result')
    if self.success is not None:
      oprot.writeFieldBegin('success', TType.STRUCT, 0)
      self.success.write(oprot)
      oprot.writeFieldEnd()
    if self.cex is not None:
      oprot.writeFieldBegin('cex', TType.STRUCT, 1)
      self.cex.write(oprot)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


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

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

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

class addSourceItemPricing_args:
  """
  Attributes:
   - sourceItemPricing
  """

  thrift_spec = (
    None, # 0
    (1, TType.STRUCT, 'sourceItemPricing', (SourceItemPricing, SourceItemPricing.thrift_spec), None, ), # 1
  )

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

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, 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.sourceItemPricing = SourceItemPricing()
          self.sourceItemPricing.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('addSourceItemPricing_args')
    if self.sourceItemPricing is not None:
      oprot.writeFieldBegin('sourceItemPricing', TType.STRUCT, 1)
      self.sourceItemPricing.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 addSourceItemPricing_result:
  """
  Attributes:
   - cex
  """

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

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

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

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('addSourceItemPricing_result')
    if self.cex is not None:
      oprot.writeFieldBegin('cex', TType.STRUCT, 1)
      self.cex.write(oprot)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


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

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

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

class getAllSourcePricing_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('getAllSourcePricing_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 getAllSourcePricing_result:
  """
  Attributes:
   - success
   - cex
  """

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

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

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 0:
        if ftype == TType.LIST:
          self.success = []
          (_etype194, _size191) = iprot.readListBegin()
          for _i195 in xrange(_size191):
            _elem196 = SourceItemPricing()
            _elem196.read(iprot)
            self.success.append(_elem196)
          iprot.readListEnd()
        else:
          iprot.skip(ftype)
      elif fid == 1:
        if ftype == TType.STRUCT:
          self.cex = CatalogServiceException()
          self.cex.read(iprot)
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('getAllSourcePricing_result')
    if self.success is not None:
      oprot.writeFieldBegin('success', TType.LIST, 0)
      oprot.writeListBegin(TType.STRUCT, len(self.success))
      for iter197 in self.success:
        iter197.write(oprot)
      oprot.writeListEnd()
      oprot.writeFieldEnd()
    if self.cex is not None:
      oprot.writeFieldBegin('cex', TType.STRUCT, 1)
      self.cex.write(oprot)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


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

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

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

class getItemForSource_args:
  """
  Attributes:
   - item_id
   - sourceId
  """

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

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

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

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

  def validate(self):
    return


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

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

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

class getItemForSource_result:
  """
  Attributes:
   - success
   - cex
  """

  thrift_spec = (
    (0, TType.STRUCT, 'success', (Item, Item.thrift_spec), None, ), # 0
    (1, TType.STRUCT, 'cex', (CatalogServiceException, CatalogServiceException.thrift_spec), None, ), # 1
  )

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

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 0:
        if ftype == TType.STRUCT:
          self.success = Item()
          self.success.read(iprot)
        else:
          iprot.skip(ftype)
      elif fid == 1:
        if ftype == TType.STRUCT:
          self.cex = CatalogServiceException()
          self.cex.read(iprot)
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('getItemForSource_result')
    if self.success is not None:
      oprot.writeFieldBegin('success', TType.STRUCT, 0)
      self.success.write(oprot)
      oprot.writeFieldEnd()
    if self.cex is not None:
      oprot.writeFieldBegin('cex', TType.STRUCT, 1)
      self.cex.write(oprot)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


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

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

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

class searchItemsInRange_args:
  """
  Attributes:
   - searchTerms
   - offset
   - limit
  """

  thrift_spec = (
    None, # 0
    (1, TType.LIST, 'searchTerms', (TType.STRING,None), None, ), # 1
    (2, TType.I64, 'offset', None, None, ), # 2
    (3, TType.I64, 'limit', None, None, ), # 3
  )

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

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 1:
        if ftype == TType.LIST:
          self.searchTerms = []
          (_etype201, _size198) = iprot.readListBegin()
          for _i202 in xrange(_size198):
            _elem203 = iprot.readString();
            self.searchTerms.append(_elem203)
          iprot.readListEnd()
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.I64:
          self.offset = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.I64:
          self.limit = 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('searchItemsInRange_args')
    if self.searchTerms is not None:
      oprot.writeFieldBegin('searchTerms', TType.LIST, 1)
      oprot.writeListBegin(TType.STRING, len(self.searchTerms))
      for iter204 in self.searchTerms:
        oprot.writeString(iter204)
      oprot.writeListEnd()
      oprot.writeFieldEnd()
    if self.offset is not None:
      oprot.writeFieldBegin('offset', TType.I64, 2)
      oprot.writeI64(self.offset)
      oprot.writeFieldEnd()
    if self.limit is not None:
      oprot.writeFieldBegin('limit', TType.I64, 3)
      oprot.writeI64(self.limit)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


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

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

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

class searchItemsInRange_result:
  """
  Attributes:
   - success
  """

  thrift_spec = (
    (0, TType.LIST, 'success', (TType.STRUCT,(Item, Item.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 = []
          (_etype208, _size205) = iprot.readListBegin()
          for _i209 in xrange(_size205):
            _elem210 = Item()
            _elem210.read(iprot)
            self.success.append(_elem210)
          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('searchItemsInRange_result')
    if self.success is not None:
      oprot.writeFieldBegin('success', TType.LIST, 0)
      oprot.writeListBegin(TType.STRUCT, len(self.success))
      for iter211 in self.success:
        iter211.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 getSearchResultCount_args:
  """
  Attributes:
   - searchTerms
  """

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

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

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, 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.searchTerms = []
          (_etype215, _size212) = iprot.readListBegin()
          for _i216 in xrange(_size212):
            _elem217 = iprot.readString();
            self.searchTerms.append(_elem217)
          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('getSearchResultCount_args')
    if self.searchTerms is not None:
      oprot.writeFieldBegin('searchTerms', TType.LIST, 1)
      oprot.writeListBegin(TType.STRING, len(self.searchTerms))
      for iter218 in self.searchTerms:
        oprot.writeString(iter218)
      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 getSearchResultCount_result:
  """
  Attributes:
   - success
  """

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

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

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 0:
        if ftype == TType.I32:
          self.success = iprot.readI32();
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('getSearchResultCount_result')
    if self.success is not None:
      oprot.writeFieldBegin('success', TType.I32, 0)
      oprot.writeI32(self.success)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


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

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

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

class getProductNotifications_args:
  """
  Attributes:
   - startDateTime
  """

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

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

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, 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.startDateTime = 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('getProductNotifications_args')
    if self.startDateTime is not None:
      oprot.writeFieldBegin('startDateTime', TType.I64, 1)
      oprot.writeI64(self.startDateTime)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


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

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

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

class getProductNotifications_result:
  """
  Attributes:
   - success
  """

  thrift_spec = (
    (0, TType.LIST, 'success', (TType.STRUCT,(ProductNotificationRequest, ProductNotificationRequest.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 = []
          (_etype222, _size219) = iprot.readListBegin()
          for _i223 in xrange(_size219):
            _elem224 = ProductNotificationRequest()
            _elem224.read(iprot)
            self.success.append(_elem224)
          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('getProductNotifications_result')
    if self.success is not None:
      oprot.writeFieldBegin('success', TType.LIST, 0)
      oprot.writeListBegin(TType.STRUCT, len(self.success))
      for iter225 in self.success:
        iter225.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 getProductNotificationRequestCount_args:
  """
  Attributes:
   - startDateTime
  """

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

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

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, 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.startDateTime = 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('getProductNotificationRequestCount_args')
    if self.startDateTime is not None:
      oprot.writeFieldBegin('startDateTime', TType.I64, 1)
      oprot.writeI64(self.startDateTime)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


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

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

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

class getProductNotificationRequestCount_result:
  """
  Attributes:
   - success
  """

  thrift_spec = (
    (0, TType.LIST, 'success', (TType.STRUCT,(ProductNotificationRequestCount, ProductNotificationRequestCount.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 = []
          (_etype229, _size226) = iprot.readListBegin()
          for _i230 in xrange(_size226):
            _elem231 = ProductNotificationRequestCount()
            _elem231.read(iprot)
            self.success.append(_elem231)
          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('getProductNotificationRequestCount_result')
    if self.success is not None:
      oprot.writeFieldBegin('success', TType.LIST, 0)
      oprot.writeListBegin(TType.STRUCT, len(self.success))
      for iter232 in self.success:
        iter232.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 addAuthorizationLog_args:
  """
  Attributes:
   - itemId
   - username
   - reason
  """

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

  def __init__(self, itemId=None, username=None, reason=None,):
    self.itemId = itemId
    self.username = username
    self.reason = reason

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, 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.username = iprot.readString();
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.STRING:
          self.reason = 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('addAuthorizationLog_args')
    if self.itemId is not None:
      oprot.writeFieldBegin('itemId', TType.I64, 1)
      oprot.writeI64(self.itemId)
      oprot.writeFieldEnd()
    if self.username is not None:
      oprot.writeFieldBegin('username', TType.STRING, 2)
      oprot.writeString(self.username)
      oprot.writeFieldEnd()
    if self.reason is not None:
      oprot.writeFieldBegin('reason', TType.STRING, 3)
      oprot.writeString(self.reason)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


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

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

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

class addAuthorizationLog_result:
  """
  Attributes:
   - success
   - cex
  """

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

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

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 0:
        if ftype == TType.BOOL:
          self.success = iprot.readBool();
        else:
          iprot.skip(ftype)
      elif fid == 1:
        if ftype == TType.STRUCT:
          self.cex = CatalogServiceException()
          self.cex.read(iprot)
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('addAuthorizationLog_result')
    if self.success is not None:
      oprot.writeFieldBegin('success', TType.BOOL, 0)
      oprot.writeBool(self.success)
      oprot.writeFieldEnd()
    if self.cex is not None:
      oprot.writeFieldBegin('cex', TType.STRUCT, 1)
      self.cex.write(oprot)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


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

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

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

class getClearanceSaleCatalogIds_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('getClearanceSaleCatalogIds_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 getClearanceSaleCatalogIds_result:
  """
  Attributes:
   - success
   - cex
  """

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

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

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 0:
        if ftype == TType.LIST:
          self.success = []
          (_etype236, _size233) = iprot.readListBegin()
          for _i237 in xrange(_size233):
            _elem238 = iprot.readI64();
            self.success.append(_elem238)
          iprot.readListEnd()
        else:
          iprot.skip(ftype)
      elif fid == 1:
        if ftype == TType.STRUCT:
          self.cex = CatalogServiceException()
          self.cex.read(iprot)
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('getClearanceSaleCatalogIds_result')
    if self.success is not None:
      oprot.writeFieldBegin('success', TType.LIST, 0)
      oprot.writeListBegin(TType.I64, len(self.success))
      for iter239 in self.success:
        oprot.writeI64(iter239)
      oprot.writeListEnd()
      oprot.writeFieldEnd()
    if self.cex is not None:
      oprot.writeFieldBegin('cex', TType.STRUCT, 1)
      self.cex.write(oprot)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


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

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

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

class addupdateVoucherForItem_args:
  """
  Attributes:
   - catalog_item_id
   - voucherType
   - voucherAmount
  """

  thrift_spec = (
    None, # 0
    (1, TType.I64, 'catalog_item_id', None, None, ), # 1
    (2, TType.I64, 'voucherType', None, None, ), # 2
    (3, TType.I64, 'voucherAmount', None, None, ), # 3
  )

  def __init__(self, catalog_item_id=None, voucherType=None, voucherAmount=None,):
    self.catalog_item_id = catalog_item_id
    self.voucherType = voucherType
    self.voucherAmount = voucherAmount

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, 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.catalog_item_id = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.I64:
          self.voucherType = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 3:
        if ftype == TType.I64:
          self.voucherAmount = 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('addupdateVoucherForItem_args')
    if self.catalog_item_id is not None:
      oprot.writeFieldBegin('catalog_item_id', TType.I64, 1)
      oprot.writeI64(self.catalog_item_id)
      oprot.writeFieldEnd()
    if self.voucherType is not None:
      oprot.writeFieldBegin('voucherType', TType.I64, 2)
      oprot.writeI64(self.voucherType)
      oprot.writeFieldEnd()
    if self.voucherAmount is not None:
      oprot.writeFieldBegin('voucherAmount', TType.I64, 3)
      oprot.writeI64(self.voucherAmount)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


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

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

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

class addupdateVoucherForItem_result:
  """
  Attributes:
   - success
   - cex
  """

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

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

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 0:
        if ftype == TType.BOOL:
          self.success = iprot.readBool();
        else:
          iprot.skip(ftype)
      elif fid == 1:
        if ftype == TType.STRUCT:
          self.cex = CatalogServiceException()
          self.cex.read(iprot)
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('addupdateVoucherForItem_result')
    if self.success is not None:
      oprot.writeFieldBegin('success', TType.BOOL, 0)
      oprot.writeBool(self.success)
      oprot.writeFieldEnd()
    if self.cex is not None:
      oprot.writeFieldBegin('cex', TType.STRUCT, 1)
      self.cex.write(oprot)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


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

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

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

class deleteVoucherForItem_args:
  """
  Attributes:
   - catalog_item_id
   - voucherType
  """

  thrift_spec = (
    None, # 0
    (1, TType.I64, 'catalog_item_id', None, None, ), # 1
    (2, TType.I64, 'voucherType', None, None, ), # 2
  )

  def __init__(self, catalog_item_id=None, voucherType=None,):
    self.catalog_item_id = catalog_item_id
    self.voucherType = voucherType

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, 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.catalog_item_id = iprot.readI64();
        else:
          iprot.skip(ftype)
      elif fid == 2:
        if ftype == TType.I64:
          self.voucherType = 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('deleteVoucherForItem_args')
    if self.catalog_item_id is not None:
      oprot.writeFieldBegin('catalog_item_id', TType.I64, 1)
      oprot.writeI64(self.catalog_item_id)
      oprot.writeFieldEnd()
    if self.voucherType is not None:
      oprot.writeFieldBegin('voucherType', TType.I64, 2)
      oprot.writeI64(self.voucherType)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


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

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

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

class deleteVoucherForItem_result:
  """
  Attributes:
   - success
   - cex
  """

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

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

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 0:
        if ftype == TType.BOOL:
          self.success = iprot.readBool();
        else:
          iprot.skip(ftype)
      elif fid == 1:
        if ftype == TType.STRUCT:
          self.cex = CatalogServiceException()
          self.cex.read(iprot)
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('deleteVoucherForItem_result')
    if self.success is not None:
      oprot.writeFieldBegin('success', TType.BOOL, 0)
      oprot.writeBool(self.success)
      oprot.writeFieldEnd()
    if self.cex is not None:
      oprot.writeFieldBegin('cex', TType.STRUCT, 1)
      self.cex.write(oprot)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


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

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

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

class getVoucherAmount_args:
  """
  Attributes:
   - itemId
   - voucherType
  """

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

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

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, 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.voucherType = 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('getVoucherAmount_args')
    if self.itemId is not None:
      oprot.writeFieldBegin('itemId', TType.I64, 1)
      oprot.writeI64(self.itemId)
      oprot.writeFieldEnd()
    if self.voucherType is not None:
      oprot.writeFieldBegin('voucherType', TType.I64, 2)
      oprot.writeI64(self.voucherType)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


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

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

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

class getVoucherAmount_result:
  """
  Attributes:
   - success
  """

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

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

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

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

  def validate(self):
    return


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

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

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

class getAllItemVouchers_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('getAllItemVouchers_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 getAllItemVouchers_result:
  """
  Attributes:
   - success
  """

  thrift_spec = (
    (0, TType.LIST, 'success', (TType.STRUCT,(VoucherItemMapping, VoucherItemMapping.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 = []
          (_etype243, _size240) = iprot.readListBegin()
          for _i244 in xrange(_size240):
            _elem245 = VoucherItemMapping()
            _elem245.read(iprot)
            self.success.append(_elem245)
          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('getAllItemVouchers_result')
    if self.success is not None:
      oprot.writeFieldBegin('success', TType.LIST, 0)
      oprot.writeListBegin(TType.STRUCT, len(self.success))
      for iter246 in self.success:
        iter246.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 isValidCatalogItemId_args:
  """
  Attributes:
   - catalog_item_id
  """

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

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

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

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

  def validate(self):
    return


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

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

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

class isValidCatalogItemId_result:
  """
  Attributes:
   - success
  """

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

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

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 0:
        if ftype == TType.BOOL:
          self.success = iprot.readBool();
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('isValidCatalogItemId_result')
    if self.success is not None:
      oprot.writeFieldBegin('success', TType.BOOL, 0)
      oprot.writeBool(self.success)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


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

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

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

class getVatPercentageForItem_args:
  """
  Attributes:
   - itemId
   - price
  """

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

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

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, 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.DOUBLE:
          self.price = 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('getVatPercentageForItem_args')
    if self.itemId is not None:
      oprot.writeFieldBegin('itemId', TType.I64, 1)
      oprot.writeI64(self.itemId)
      oprot.writeFieldEnd()
    if self.price is not None:
      oprot.writeFieldBegin('price', TType.DOUBLE, 2)
      oprot.writeDouble(self.price)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


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

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

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

class getVatPercentageForItem_result:
  """
  Attributes:
   - success
  """

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

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

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 0:
        if ftype == TType.DOUBLE:
          self.success = iprot.readDouble();
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('getVatPercentageForItem_result')
    if self.success is not None:
      oprot.writeFieldBegin('success', TType.DOUBLE, 0)
      oprot.writeDouble(self.success)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


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

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

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

class getVatAmountForItem_args:
  """
  Attributes:
   - itemId
   - price
  """

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

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

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, 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.DOUBLE:
          self.price = 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('getVatAmountForItem_args')
    if self.itemId is not None:
      oprot.writeFieldBegin('itemId', TType.I64, 1)
      oprot.writeI64(self.itemId)
      oprot.writeFieldEnd()
    if self.price is not None:
      oprot.writeFieldBegin('price', TType.DOUBLE, 2)
      oprot.writeDouble(self.price)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


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

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

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

class getVatAmountForItem_result:
  """
  Attributes:
   - success
  """

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

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

  def read(self, iprot):
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
      return
    iprot.readStructBegin()
    while True:
      (fname, ftype, fid) = iprot.readFieldBegin()
      if ftype == TType.STOP:
        break
      if fid == 0:
        if ftype == TType.DOUBLE:
          self.success = iprot.readDouble();
        else:
          iprot.skip(ftype)
      else:
        iprot.skip(ftype)
      iprot.readFieldEnd()
    iprot.readStructEnd()

  def write(self, oprot):
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
      return
    oprot.writeStructBegin('getVatAmountForItem_result')
    if self.success is not None:
      oprot.writeFieldBegin('success', TType.DOUBLE, 0)
      oprot.writeDouble(self.success)
      oprot.writeFieldEnd()
    oprot.writeFieldStop()
    oprot.writeStructEnd()

  def validate(self):
    return


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

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

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